add prettier tailwind
This commit is contained in:
1 parent
142d2986b6
commit
389b6db432
102 files changed
+55921
-5
No files matched your search
+7
@@ -0,0 +1,7 @@
|
||||
Copyright © James Long and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
[](https://prettier.io)
|
||||
|
||||
<h2 align="center">Opinionated Code Formatter</h2>
|
||||
|
||||
<p align="center">
|
||||
<em>
|
||||
JavaScript
|
||||
· TypeScript
|
||||
· Flow
|
||||
· JSX
|
||||
· JSON
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
CSS
|
||||
· SCSS
|
||||
· Less
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
HTML
|
||||
· Vue
|
||||
· Angular
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
GraphQL
|
||||
· Markdown
|
||||
· YAML
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
<a href="https://prettier.io/docs/plugins">
|
||||
Your favorite language?
|
||||
</a>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/prettier/prettier/actions?query=branch%3Amain">
|
||||
<img alt="CI Status" src="https://img.shields.io/github/check-runs/prettier/prettier/main?style=flat-square&label=CI"></a>
|
||||
<a href="https://codecov.io/gh/prettier/prettier">
|
||||
<img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://x.com/acdlite/status/974390255393505280">
|
||||
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square"></a>
|
||||
<br/>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="weekly downloads from npm" src="https://img.shields.io/npm/dw/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://github.com/prettier/prettier#badge">
|
||||
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
|
||||
<a href="https://x.com/intent/follow?screen_name=PrettierCode">
|
||||
<img alt="Follow Prettier on X" src="https://img.shields.io/badge/%40PrettierCode-9f9f9f?style=flat-square&logo=x&labelColor=555"></a>
|
||||
</p>
|
||||
|
||||
## Intro
|
||||
|
||||
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
|
||||
|
||||
### Input
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```js
|
||||
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```js
|
||||
foo(
|
||||
reallyLongArg(),
|
||||
omgSoManyParameters(),
|
||||
IShouldRefactorThis(),
|
||||
isThereSeriouslyAnotherOne(),
|
||||
);
|
||||
```
|
||||
|
||||
Prettier can be run [in your editor](https://prettier.io/docs/editors) on-save, in a [pre-commit hook](https://prettier.io/docs/precommit), or in [CI environments](https://prettier.io/docs/cli#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
|
||||
|
||||
---
|
||||
|
||||
**[Documentation](https://prettier.io/docs/)**
|
||||
|
||||
[Install](https://prettier.io/docs/install) ·
|
||||
[Options](https://prettier.io/docs/options) ·
|
||||
[CLI](https://prettier.io/docs/cli) ·
|
||||
[API](https://prettier.io/docs/api)
|
||||
|
||||
**[Playground](https://prettier.io/playground/)**
|
||||
|
||||
---
|
||||
|
||||
## Badge
|
||||
|
||||
Show the world you're using _Prettier_ → [](https://github.com/prettier/prettier)
|
||||
|
||||
```md
|
||||
[](https://github.com/prettier/prettier)
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
+5844
File diff suppressed because it is too large.
Load diff
+80
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = function(cb, mod) {
|
||||
return function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
};
|
||||
|
||||
// node_modules/semver-compare/index.js
|
||||
var require_semver_compare = __commonJS({
|
||||
"node_modules/semver-compare/index.js": function(exports2, module2) {
|
||||
module2.exports = function cmp(a, b) {
|
||||
var pa = a.split(".");
|
||||
var pb = b.split(".");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var na = Number(pa[i]);
|
||||
var nb = Number(pb[i]);
|
||||
if (na > nb) return 1;
|
||||
if (nb > na) return -1;
|
||||
if (!isNaN(na) && isNaN(nb)) return 1;
|
||||
if (isNaN(na) && !isNaN(nb)) return -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/please-upgrade-node/index.js
|
||||
var require_please_upgrade_node = __commonJS({
|
||||
"node_modules/please-upgrade-node/index.js": function(exports2, module2) {
|
||||
var semverCompare = require_semver_compare();
|
||||
module2.exports = function pleaseUpgradeNode2(pkg, opts) {
|
||||
var opts = opts || {};
|
||||
var requiredVersion = pkg.engines.node.replace(">=", "");
|
||||
var currentVersion = process.version.replace("v", "");
|
||||
if (semverCompare(currentVersion, requiredVersion) === -1) {
|
||||
if (opts.message) {
|
||||
console.error(opts.message(requiredVersion));
|
||||
} else {
|
||||
console.error(
|
||||
pkg.name + " requires at least version " + requiredVersion + " of Node, please upgrade"
|
||||
);
|
||||
}
|
||||
if (opts.hasOwnProperty("exitCode")) {
|
||||
process.exit(opts.exitCode);
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// bin/prettier.cjs
|
||||
var nodeModule = require("module");
|
||||
if (typeof nodeModule.enableCompileCache === "function") {
|
||||
nodeModule.enableCompileCache();
|
||||
}
|
||||
var pleaseUpgradeNode = require_please_upgrade_node();
|
||||
var packageJson = require("../package.json");
|
||||
pleaseUpgradeNode(packageJson);
|
||||
var dynamicImport = new Function("module", "return import(module)");
|
||||
var promise;
|
||||
var index = process.argv.indexOf("--experimental-cli");
|
||||
if (process.env.PRETTIER_EXPERIMENTAL_CLI || index !== -1) {
|
||||
if (index !== -1) {
|
||||
process.argv.splice(index, 1);
|
||||
}
|
||||
promise = dynamicImport("../internal/experimental-cli.mjs").then(
|
||||
function(cli) {
|
||||
return cli.__promise;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
promise = dynamicImport("../internal/legacy-cli.mjs").then(function runCli(cli) {
|
||||
return cli.run();
|
||||
});
|
||||
}
|
||||
module.exports.__promise = promise;
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
// https://github.com/prettier/prettier/blob/next/src/document/public.js
|
||||
export namespace builders {
|
||||
type DocCommand =
|
||||
| Align
|
||||
| BreakParent
|
||||
| Cursor
|
||||
| Fill
|
||||
| Group
|
||||
| IfBreak
|
||||
| Indent
|
||||
| IndentIfBreak
|
||||
| Label
|
||||
| Line
|
||||
| LineSuffix
|
||||
| LineSuffixBoundary
|
||||
| Trim;
|
||||
type Doc = string | Doc[] | DocCommand;
|
||||
|
||||
interface Align {
|
||||
type: "align";
|
||||
contents: Doc;
|
||||
n: number | string | { type: "root" };
|
||||
}
|
||||
|
||||
interface BreakParent {
|
||||
type: "break-parent";
|
||||
}
|
||||
|
||||
interface Cursor {
|
||||
type: "cursor";
|
||||
placeholder: symbol;
|
||||
}
|
||||
|
||||
interface Fill {
|
||||
type: "fill";
|
||||
parts: Doc[];
|
||||
}
|
||||
|
||||
interface Group {
|
||||
type: "group";
|
||||
id?: symbol;
|
||||
contents: Doc;
|
||||
break: boolean;
|
||||
expandedStates: Doc[];
|
||||
}
|
||||
|
||||
interface HardlineWithoutBreakParent extends Line {
|
||||
hard: true;
|
||||
}
|
||||
|
||||
interface IfBreak {
|
||||
type: "if-break";
|
||||
breakContents: Doc;
|
||||
flatContents: Doc;
|
||||
}
|
||||
|
||||
interface Indent {
|
||||
type: "indent";
|
||||
contents: Doc;
|
||||
}
|
||||
|
||||
interface IndentIfBreak {
|
||||
type: "indent-if-break";
|
||||
}
|
||||
|
||||
interface Label {
|
||||
type: "label";
|
||||
label: any;
|
||||
contents: Doc;
|
||||
}
|
||||
|
||||
interface Line {
|
||||
type: "line";
|
||||
soft?: boolean | undefined;
|
||||
hard?: boolean | undefined;
|
||||
literal?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface LineSuffix {
|
||||
type: "line-suffix";
|
||||
contents: Doc;
|
||||
}
|
||||
|
||||
interface LineSuffixBoundary {
|
||||
type: "line-suffix-boundary";
|
||||
}
|
||||
|
||||
interface LiterallineWithoutBreakParent extends Line {
|
||||
hard: true;
|
||||
literal: true;
|
||||
}
|
||||
|
||||
type LiteralLine = [LiterallineWithoutBreakParent, BreakParent];
|
||||
|
||||
interface Softline extends Line {
|
||||
soft: true;
|
||||
}
|
||||
|
||||
type Hardline = [HardlineWithoutBreakParent, BreakParent];
|
||||
|
||||
interface Trim {
|
||||
type: "trim";
|
||||
}
|
||||
|
||||
interface GroupOptions {
|
||||
shouldBreak?: boolean | undefined;
|
||||
id?: symbol | undefined;
|
||||
}
|
||||
|
||||
function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc;
|
||||
|
||||
/** @see [align](https://github.com/prettier/prettier/blob/main/commands.md#align) */
|
||||
function align(widthOrString: Align["n"], doc: Doc): Align;
|
||||
|
||||
/** @see [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent) */
|
||||
const breakParent: BreakParent;
|
||||
|
||||
/** @see [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup) */
|
||||
function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group;
|
||||
|
||||
/** @see [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent) */
|
||||
function dedent(doc: Doc): Align;
|
||||
|
||||
/** @see [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot) */
|
||||
function dedentToRoot(doc: Doc): Align;
|
||||
|
||||
/** @see [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill) */
|
||||
function fill(docs: Doc[]): Fill;
|
||||
|
||||
/** @see [group](https://github.com/prettier/prettier/blob/main/commands.md#group) */
|
||||
function group(doc: Doc, opts?: GroupOptions): Group;
|
||||
|
||||
/** @see [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline) */
|
||||
const hardline: Hardline;
|
||||
|
||||
/** @see [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
|
||||
const hardlineWithoutBreakParent: HardlineWithoutBreakParent;
|
||||
|
||||
/** @see [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak) */
|
||||
function ifBreak(
|
||||
ifBreak: Doc,
|
||||
noBreak?: Doc,
|
||||
options?: { groupId?: symbol | undefined },
|
||||
): IfBreak;
|
||||
|
||||
/** @see [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent) */
|
||||
function indent(doc: Doc): Indent;
|
||||
|
||||
/** @see [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak) */
|
||||
function indentIfBreak(
|
||||
doc: Doc,
|
||||
opts: { groupId: symbol; negate?: boolean | undefined },
|
||||
): IndentIfBreak;
|
||||
|
||||
/** @see [join](https://github.com/prettier/prettier/blob/main/commands.md#join) */
|
||||
function join(sep: Doc, docs: Doc[]): Doc[];
|
||||
|
||||
/** @see [label](https://github.com/prettier/prettier/blob/main/commands.md#label) */
|
||||
function label(label: any | undefined, contents: Doc): Doc;
|
||||
|
||||
/** @see [line](https://github.com/prettier/prettier/blob/main/commands.md#line) */
|
||||
const line: Line;
|
||||
|
||||
/** @see [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix) */
|
||||
function lineSuffix(suffix: Doc): LineSuffix;
|
||||
|
||||
/** @see [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary) */
|
||||
const lineSuffixBoundary: LineSuffixBoundary;
|
||||
|
||||
/** @see [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline) */
|
||||
const literalline: LiteralLine;
|
||||
|
||||
/** @see [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */
|
||||
const literallineWithoutBreakParent: LiterallineWithoutBreakParent;
|
||||
|
||||
/** @see [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot) */
|
||||
function markAsRoot(doc: Doc): Align;
|
||||
|
||||
/** @see [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline) */
|
||||
const softline: Softline;
|
||||
|
||||
/** @see [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim) */
|
||||
const trim: Trim;
|
||||
|
||||
/** @see [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor) */
|
||||
const cursor: Cursor;
|
||||
}
|
||||
|
||||
export namespace printer {
|
||||
function printDocToString(
|
||||
doc: builders.Doc,
|
||||
options: Options,
|
||||
): {
|
||||
formatted: string;
|
||||
/**
|
||||
* This property is a misnomer, and has been since the changes in
|
||||
* https://github.com/prettier/prettier/pull/15709.
|
||||
* The region of the document indicated by `cursorNodeStart` and `cursorNodeText` will
|
||||
* sometimes actually be what lies BETWEEN a pair of leaf nodes in the AST, rather than a node.
|
||||
*/
|
||||
cursorNodeStart?: number | undefined;
|
||||
|
||||
/**
|
||||
* Note that, like cursorNodeStart, this is a misnomer and may actually be the text between two
|
||||
* leaf nodes in the AST instead of the text of a node.
|
||||
*/
|
||||
cursorNodeText?: string | undefined;
|
||||
};
|
||||
interface Options {
|
||||
/**
|
||||
* Specify the line length that the printer will wrap on.
|
||||
* @default 80
|
||||
*/
|
||||
printWidth: number;
|
||||
/**
|
||||
* Specify the number of spaces per indentation-level.
|
||||
* @default 2
|
||||
*/
|
||||
tabWidth: number;
|
||||
/**
|
||||
* Indent lines with tabs instead of spaces
|
||||
* @default false
|
||||
*/
|
||||
useTabs?: boolean;
|
||||
parentParser?: string | undefined;
|
||||
__embeddedInHtml?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace utils {
|
||||
function willBreak(doc: builders.Doc): boolean;
|
||||
function traverseDoc(
|
||||
doc: builders.Doc,
|
||||
onEnter?: (doc: builders.Doc) => void | boolean,
|
||||
onExit?: (doc: builders.Doc) => void,
|
||||
shouldTraverseConditionalGroups?: boolean,
|
||||
): void;
|
||||
function findInDoc<T = builders.Doc>(
|
||||
doc: builders.Doc,
|
||||
callback: (doc: builders.Doc) => T,
|
||||
defaultValue: T,
|
||||
): T;
|
||||
function mapDoc<T = builders.Doc>(
|
||||
doc: builders.Doc,
|
||||
callback: (doc: builders.Doc) => T,
|
||||
): T;
|
||||
function removeLines(doc: builders.Doc): builders.Doc;
|
||||
function stripTrailingHardline(doc: builders.Doc): builders.Doc;
|
||||
function replaceEndOfLine(
|
||||
doc: builders.Doc,
|
||||
replacement?: builders.Doc,
|
||||
): builders.Doc;
|
||||
function canBreak(doc: builders.Doc): boolean;
|
||||
}
|
||||
+1270
File diff suppressed because it is too large.
Load diff
+1242
File diff suppressed because it is too large.
Load diff
+685
@@ -0,0 +1,685 @@
|
||||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __esm = (fn, res) => function __init() {
|
||||
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
||||
};
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/utils/skip.js
|
||||
function skip(characters) {
|
||||
return (text, startIndex, options) => {
|
||||
const backwards = Boolean(options == null ? void 0 : options.backwards);
|
||||
if (startIndex === false) {
|
||||
return false;
|
||||
}
|
||||
const { length } = text;
|
||||
let cursor = startIndex;
|
||||
while (cursor >= 0 && cursor < length) {
|
||||
const character = text.charAt(cursor);
|
||||
if (characters instanceof RegExp) {
|
||||
if (!characters.test(character)) {
|
||||
return cursor;
|
||||
}
|
||||
} else if (!characters.includes(character)) {
|
||||
return cursor;
|
||||
}
|
||||
backwards ? cursor-- : cursor++;
|
||||
}
|
||||
if (cursor === -1 || cursor === length) {
|
||||
return cursor;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
var skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine;
|
||||
var init_skip = __esm({
|
||||
"src/utils/skip.js"() {
|
||||
skipWhitespace = skip(/\s/u);
|
||||
skipSpaces = skip(" ");
|
||||
skipToLineEnd = skip(",; ");
|
||||
skipEverythingButNewLine = skip(/[^\n\r]/u);
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/skip-inline-comment.js
|
||||
function skipInlineComment(text, startIndex) {
|
||||
if (startIndex === false) {
|
||||
return false;
|
||||
}
|
||||
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "*") {
|
||||
for (let i = startIndex + 2; i < text.length; ++i) {
|
||||
if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
|
||||
return i + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return startIndex;
|
||||
}
|
||||
var skip_inline_comment_default;
|
||||
var init_skip_inline_comment = __esm({
|
||||
"src/utils/skip-inline-comment.js"() {
|
||||
skip_inline_comment_default = skipInlineComment;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/skip-newline.js
|
||||
function skipNewline(text, startIndex, options) {
|
||||
const backwards = Boolean(options == null ? void 0 : options.backwards);
|
||||
if (startIndex === false) {
|
||||
return false;
|
||||
}
|
||||
const character = text.charAt(startIndex);
|
||||
if (backwards) {
|
||||
if (text.charAt(startIndex - 1) === "\r" && character === "\n") {
|
||||
return startIndex - 2;
|
||||
}
|
||||
if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
|
||||
return startIndex - 1;
|
||||
}
|
||||
} else {
|
||||
if (character === "\r" && text.charAt(startIndex + 1) === "\n") {
|
||||
return startIndex + 2;
|
||||
}
|
||||
if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
|
||||
return startIndex + 1;
|
||||
}
|
||||
}
|
||||
return startIndex;
|
||||
}
|
||||
var skip_newline_default;
|
||||
var init_skip_newline = __esm({
|
||||
"src/utils/skip-newline.js"() {
|
||||
skip_newline_default = skipNewline;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/skip-trailing-comment.js
|
||||
function skipTrailingComment(text, startIndex) {
|
||||
if (startIndex === false) {
|
||||
return false;
|
||||
}
|
||||
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "/") {
|
||||
return skipEverythingButNewLine(text, startIndex);
|
||||
}
|
||||
return startIndex;
|
||||
}
|
||||
var skip_trailing_comment_default;
|
||||
var init_skip_trailing_comment = __esm({
|
||||
"src/utils/skip-trailing-comment.js"() {
|
||||
init_skip();
|
||||
skip_trailing_comment_default = skipTrailingComment;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-next-non-space-non-comment-character-index.js
|
||||
function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) {
|
||||
let oldIdx = null;
|
||||
let nextIdx = startIndex;
|
||||
while (nextIdx !== oldIdx) {
|
||||
oldIdx = nextIdx;
|
||||
nextIdx = skipSpaces(text, nextIdx);
|
||||
nextIdx = skip_inline_comment_default(text, nextIdx);
|
||||
nextIdx = skip_trailing_comment_default(text, nextIdx);
|
||||
nextIdx = skip_newline_default(text, nextIdx);
|
||||
}
|
||||
return nextIdx;
|
||||
}
|
||||
var get_next_non_space_non_comment_character_index_default;
|
||||
var init_get_next_non_space_non_comment_character_index = __esm({
|
||||
"src/utils/get-next-non-space-non-comment-character-index.js"() {
|
||||
init_skip();
|
||||
init_skip_inline_comment();
|
||||
init_skip_newline();
|
||||
init_skip_trailing_comment();
|
||||
get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/has-newline.js
|
||||
function hasNewline(text, startIndex, options = {}) {
|
||||
const idx = skipSpaces(
|
||||
text,
|
||||
options.backwards ? startIndex - 1 : startIndex,
|
||||
options
|
||||
);
|
||||
const idx2 = skip_newline_default(text, idx, options);
|
||||
return idx !== idx2;
|
||||
}
|
||||
var has_newline_default;
|
||||
var init_has_newline = __esm({
|
||||
"src/utils/has-newline.js"() {
|
||||
init_skip();
|
||||
init_skip_newline();
|
||||
has_newline_default = hasNewline;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/is-next-line-empty.js
|
||||
function isNextLineEmpty(text, startIndex) {
|
||||
let oldIdx = null;
|
||||
let idx = startIndex;
|
||||
while (idx !== oldIdx) {
|
||||
oldIdx = idx;
|
||||
idx = skipToLineEnd(text, idx);
|
||||
idx = skip_inline_comment_default(text, idx);
|
||||
idx = skipSpaces(text, idx);
|
||||
}
|
||||
idx = skip_trailing_comment_default(text, idx);
|
||||
idx = skip_newline_default(text, idx);
|
||||
return idx !== false && has_newline_default(text, idx);
|
||||
}
|
||||
var is_next_line_empty_default;
|
||||
var init_is_next_line_empty = __esm({
|
||||
"src/utils/is-next-line-empty.js"() {
|
||||
init_has_newline();
|
||||
init_skip();
|
||||
init_skip_inline_comment();
|
||||
init_skip_newline();
|
||||
init_skip_trailing_comment();
|
||||
is_next_line_empty_default = isNextLineEmpty;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/is-previous-line-empty.js
|
||||
function isPreviousLineEmpty(text, startIndex) {
|
||||
let idx = startIndex - 1;
|
||||
idx = skipSpaces(text, idx, { backwards: true });
|
||||
idx = skip_newline_default(text, idx, { backwards: true });
|
||||
idx = skipSpaces(text, idx, { backwards: true });
|
||||
const idx2 = skip_newline_default(text, idx, { backwards: true });
|
||||
return idx !== idx2;
|
||||
}
|
||||
var is_previous_line_empty_default;
|
||||
var init_is_previous_line_empty = __esm({
|
||||
"src/utils/is-previous-line-empty.js"() {
|
||||
init_skip();
|
||||
init_skip_newline();
|
||||
is_previous_line_empty_default = isPreviousLineEmpty;
|
||||
}
|
||||
});
|
||||
|
||||
// src/main/comments/utils.js
|
||||
function describeNodeForDebugging(node) {
|
||||
const nodeType = node.type || node.kind || "(unknown type)";
|
||||
let nodeName = String(
|
||||
node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || ""
|
||||
);
|
||||
if (nodeName.length > 20) {
|
||||
nodeName = nodeName.slice(0, 19) + "\u2026";
|
||||
}
|
||||
return nodeType + (nodeName ? " " + nodeName : "");
|
||||
}
|
||||
function addCommentHelper(node, comment) {
|
||||
const comments = node.comments ?? (node.comments = []);
|
||||
comments.push(comment);
|
||||
comment.printed = false;
|
||||
comment.nodeDescription = describeNodeForDebugging(node);
|
||||
}
|
||||
function addLeadingComment(node, comment) {
|
||||
comment.leading = true;
|
||||
comment.trailing = false;
|
||||
addCommentHelper(node, comment);
|
||||
}
|
||||
function addDanglingComment(node, comment, marker) {
|
||||
comment.leading = false;
|
||||
comment.trailing = false;
|
||||
if (marker) {
|
||||
comment.marker = marker;
|
||||
}
|
||||
addCommentHelper(node, comment);
|
||||
}
|
||||
function addTrailingComment(node, comment) {
|
||||
comment.leading = false;
|
||||
comment.trailing = true;
|
||||
addCommentHelper(node, comment);
|
||||
}
|
||||
var init_utils = __esm({
|
||||
"src/main/comments/utils.js"() {
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-alignment-size.js
|
||||
function getAlignmentSize(text, tabWidth, startIndex = 0) {
|
||||
let size = 0;
|
||||
for (let i = startIndex; i < text.length; ++i) {
|
||||
if (text[i] === " ") {
|
||||
size = size + tabWidth - size % tabWidth;
|
||||
} else {
|
||||
size++;
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
var get_alignment_size_default;
|
||||
var init_get_alignment_size = __esm({
|
||||
"src/utils/get-alignment-size.js"() {
|
||||
get_alignment_size_default = getAlignmentSize;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-indent-size.js
|
||||
function getIndentSize(value, tabWidth) {
|
||||
const lastNewlineIndex = value.lastIndexOf("\n");
|
||||
if (lastNewlineIndex === -1) {
|
||||
return 0;
|
||||
}
|
||||
return get_alignment_size_default(
|
||||
// All the leading whitespaces
|
||||
value.slice(lastNewlineIndex + 1).match(/^[\t ]*/u)[0],
|
||||
tabWidth
|
||||
);
|
||||
}
|
||||
var get_indent_size_default;
|
||||
var init_get_indent_size = __esm({
|
||||
"src/utils/get-indent-size.js"() {
|
||||
init_get_alignment_size();
|
||||
get_indent_size_default = getIndentSize;
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/escape-string-regexp/index.js
|
||||
function escapeStringRegexp(string) {
|
||||
if (typeof string !== "string") {
|
||||
throw new TypeError("Expected a string");
|
||||
}
|
||||
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
||||
}
|
||||
var init_escape_string_regexp = __esm({
|
||||
"node_modules/escape-string-regexp/index.js"() {
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-max-continuous-count.js
|
||||
function getMaxContinuousCount(text, searchString) {
|
||||
const results = text.match(
|
||||
new RegExp(`(${escapeStringRegexp(searchString)})+`, "gu")
|
||||
);
|
||||
if (results === null) {
|
||||
return 0;
|
||||
}
|
||||
return results.reduce(
|
||||
(maxCount, result) => Math.max(maxCount, result.length / searchString.length),
|
||||
0
|
||||
);
|
||||
}
|
||||
var get_max_continuous_count_default;
|
||||
var init_get_max_continuous_count = __esm({
|
||||
"src/utils/get-max-continuous-count.js"() {
|
||||
init_escape_string_regexp();
|
||||
get_max_continuous_count_default = getMaxContinuousCount;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-next-non-space-non-comment-character.js
|
||||
function getNextNonSpaceNonCommentCharacter(text, startIndex) {
|
||||
const index = get_next_non_space_non_comment_character_index_default(text, startIndex);
|
||||
return index === false ? "" : text.charAt(index);
|
||||
}
|
||||
var get_next_non_space_non_comment_character_default;
|
||||
var init_get_next_non_space_non_comment_character = __esm({
|
||||
"src/utils/get-next-non-space-non-comment-character.js"() {
|
||||
init_get_next_non_space_non_comment_character_index();
|
||||
get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-preferred-quote.js
|
||||
function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) {
|
||||
const preferred = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE : DOUBLE_QUOTE;
|
||||
const alternate = preferred === SINGLE_QUOTE ? DOUBLE_QUOTE : SINGLE_QUOTE;
|
||||
let preferredQuoteCount = 0;
|
||||
let alternateQuoteCount = 0;
|
||||
for (const character of text) {
|
||||
if (character === preferred) {
|
||||
preferredQuoteCount++;
|
||||
} else if (character === alternate) {
|
||||
alternateQuoteCount++;
|
||||
}
|
||||
}
|
||||
return preferredQuoteCount > alternateQuoteCount ? alternate : preferred;
|
||||
}
|
||||
var SINGLE_QUOTE, DOUBLE_QUOTE, get_preferred_quote_default;
|
||||
var init_get_preferred_quote = __esm({
|
||||
"src/utils/get-preferred-quote.js"() {
|
||||
SINGLE_QUOTE = "'";
|
||||
DOUBLE_QUOTE = '"';
|
||||
get_preferred_quote_default = getPreferredQuote;
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/emoji-regex/index.mjs
|
||||
var emoji_regex_default;
|
||||
var init_emoji_regex = __esm({
|
||||
"node_modules/emoji-regex/index.mjs"() {
|
||||
emoji_regex_default = () => {
|
||||
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC6Line truncated
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/get-east-asian-width/lookup.js
|
||||
function isFullWidth(x) {
|
||||
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
||||
}
|
||||
function isWide(x) {
|
||||
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
||||
}
|
||||
var init_lookup = __esm({
|
||||
"node_modules/get-east-asian-width/lookup.js"() {
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/get-east-asian-width/index.js
|
||||
var _isNarrowWidth;
|
||||
var init_get_east_asian_width = __esm({
|
||||
"node_modules/get-east-asian-width/index.js"() {
|
||||
init_lookup();
|
||||
_isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint));
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/get-string-width.js
|
||||
function getStringWidth(text) {
|
||||
if (!text) {
|
||||
return 0;
|
||||
}
|
||||
if (!notAsciiRegex.test(text)) {
|
||||
return text.length;
|
||||
}
|
||||
text = text.replace(emoji_regex_default(), " ");
|
||||
let width = 0;
|
||||
for (const character of text) {
|
||||
const codePoint = character.codePointAt(0);
|
||||
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
||||
continue;
|
||||
}
|
||||
if (codePoint >= 768 && codePoint <= 879) {
|
||||
continue;
|
||||
}
|
||||
width += _isNarrowWidth(codePoint) ? 1 : 2;
|
||||
}
|
||||
return width;
|
||||
}
|
||||
var notAsciiRegex, get_string_width_default;
|
||||
var init_get_string_width = __esm({
|
||||
"src/utils/get-string-width.js"() {
|
||||
init_emoji_regex();
|
||||
init_get_east_asian_width();
|
||||
notAsciiRegex = /[^\x20-\x7F]/u;
|
||||
get_string_width_default = getStringWidth;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/has-newline-in-range.js
|
||||
function hasNewlineInRange(text, startIndex, endIndex) {
|
||||
for (let i = startIndex; i < endIndex; ++i) {
|
||||
if (text.charAt(i) === "\n") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var has_newline_in_range_default;
|
||||
var init_has_newline_in_range = __esm({
|
||||
"src/utils/has-newline-in-range.js"() {
|
||||
has_newline_in_range_default = hasNewlineInRange;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/has-spaces.js
|
||||
function hasSpaces(text, startIndex, options = {}) {
|
||||
const idx = skipSpaces(
|
||||
text,
|
||||
options.backwards ? startIndex - 1 : startIndex,
|
||||
options
|
||||
);
|
||||
return idx !== startIndex;
|
||||
}
|
||||
var has_spaces_default;
|
||||
var init_has_spaces = __esm({
|
||||
"src/utils/has-spaces.js"() {
|
||||
init_skip();
|
||||
has_spaces_default = hasSpaces;
|
||||
}
|
||||
});
|
||||
|
||||
// scripts/build/shims/string-replace-all.js
|
||||
var stringReplaceAll, string_replace_all_default;
|
||||
var init_string_replace_all = __esm({
|
||||
"scripts/build/shims/string-replace-all.js"() {
|
||||
stringReplaceAll = (isOptionalObject, original, pattern, replacement) => {
|
||||
if (isOptionalObject && (original === void 0 || original === null)) {
|
||||
return;
|
||||
}
|
||||
if (original.replaceAll) {
|
||||
return original.replaceAll(pattern, replacement);
|
||||
}
|
||||
if (pattern.global) {
|
||||
return original.replace(pattern, replacement);
|
||||
}
|
||||
return original.split(pattern).join(replacement);
|
||||
};
|
||||
string_replace_all_default = stringReplaceAll;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/make-string.js
|
||||
function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
|
||||
const otherQuote = enclosingQuote === '"' ? "'" : '"';
|
||||
const regex = /\\(.)|(["'])/gsu;
|
||||
const raw = string_replace_all_default(
|
||||
/* isOptionalObject */
|
||||
false,
|
||||
rawText,
|
||||
regex,
|
||||
(match, escaped, quote) => {
|
||||
if (escaped === otherQuote) {
|
||||
return escaped;
|
||||
}
|
||||
if (quote === enclosingQuote) {
|
||||
return "\\" + quote;
|
||||
}
|
||||
if (quote) {
|
||||
return quote;
|
||||
}
|
||||
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped;
|
||||
}
|
||||
);
|
||||
return enclosingQuote + raw + enclosingQuote;
|
||||
}
|
||||
var make_string_default;
|
||||
var init_make_string = __esm({
|
||||
"src/utils/make-string.js"() {
|
||||
init_string_replace_all();
|
||||
make_string_default = makeString;
|
||||
}
|
||||
});
|
||||
|
||||
// src/utils/public.js
|
||||
var public_exports = {};
|
||||
__export(public_exports, {
|
||||
addDanglingComment: () => addDanglingComment,
|
||||
addLeadingComment: () => addLeadingComment,
|
||||
addTrailingComment: () => addTrailingComment,
|
||||
getAlignmentSize: () => get_alignment_size_default,
|
||||
getIndentSize: () => get_indent_size_default,
|
||||
getMaxContinuousCount: () => get_max_continuous_count_default,
|
||||
getNextNonSpaceNonCommentCharacter: () => get_next_non_space_non_comment_character_default,
|
||||
getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2,
|
||||
getPreferredQuote: () => get_preferred_quote_default,
|
||||
getStringWidth: () => get_string_width_default,
|
||||
hasNewline: () => has_newline_default,
|
||||
hasNewlineInRange: () => has_newline_in_range_default,
|
||||
hasSpaces: () => has_spaces_default,
|
||||
isNextLineEmpty: () => isNextLineEmpty2,
|
||||
isNextLineEmptyAfterIndex: () => is_next_line_empty_default,
|
||||
isPreviousLineEmpty: () => isPreviousLineEmpty2,
|
||||
makeString: () => make_string_default,
|
||||
skip: () => skip,
|
||||
skipEverythingButNewLine: () => skipEverythingButNewLine,
|
||||
skipInlineComment: () => skip_inline_comment_default,
|
||||
skipNewline: () => skip_newline_default,
|
||||
skipSpaces: () => skipSpaces,
|
||||
skipToLineEnd: () => skipToLineEnd,
|
||||
skipTrailingComment: () => skip_trailing_comment_default,
|
||||
skipWhitespace: () => skipWhitespace
|
||||
});
|
||||
function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
|
||||
return get_next_non_space_non_comment_character_index_default(
|
||||
text,
|
||||
locEnd(node)
|
||||
);
|
||||
}
|
||||
function getNextNonSpaceNonCommentCharacterIndex2(text, startIndex) {
|
||||
return arguments.length === 2 || typeof startIndex === "number" ? get_next_non_space_non_comment_character_index_default(text, startIndex) : (
|
||||
// @ts-expect-error -- expected
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
legacyGetNextNonSpaceNonCommentCharacterIndex(...arguments)
|
||||
);
|
||||
}
|
||||
function legacyIsPreviousLineEmpty(text, node, locStart) {
|
||||
return is_previous_line_empty_default(text, locStart(node));
|
||||
}
|
||||
function isPreviousLineEmpty2(text, startIndex) {
|
||||
return arguments.length === 2 || typeof startIndex === "number" ? is_previous_line_empty_default(text, startIndex) : (
|
||||
// @ts-expect-error -- expected
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
legacyIsPreviousLineEmpty(...arguments)
|
||||
);
|
||||
}
|
||||
function legacyIsNextLineEmpty(text, node, locEnd) {
|
||||
return is_next_line_empty_default(text, locEnd(node));
|
||||
}
|
||||
function isNextLineEmpty2(text, startIndex) {
|
||||
return arguments.length === 2 || typeof startIndex === "number" ? is_next_line_empty_default(text, startIndex) : (
|
||||
// @ts-expect-error -- expected
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
legacyIsNextLineEmpty(...arguments)
|
||||
);
|
||||
}
|
||||
var init_public = __esm({
|
||||
"src/utils/public.js"() {
|
||||
init_get_next_non_space_non_comment_character_index();
|
||||
init_is_next_line_empty();
|
||||
init_is_previous_line_empty();
|
||||
init_utils();
|
||||
init_get_alignment_size();
|
||||
init_get_indent_size();
|
||||
init_get_max_continuous_count();
|
||||
init_get_next_non_space_non_comment_character();
|
||||
init_get_preferred_quote();
|
||||
init_get_string_width();
|
||||
init_has_newline();
|
||||
init_has_newline_in_range();
|
||||
init_has_spaces();
|
||||
init_make_string();
|
||||
init_skip();
|
||||
init_skip_inline_comment();
|
||||
init_skip_newline();
|
||||
init_skip_trailing_comment();
|
||||
}
|
||||
});
|
||||
|
||||
// src/main/version.evaluate.js
|
||||
var version_evaluate_exports = {};
|
||||
__export(version_evaluate_exports, {
|
||||
default: () => version_evaluate_default
|
||||
});
|
||||
var version_evaluate_default;
|
||||
var init_version_evaluate = __esm({
|
||||
"src/main/version.evaluate.js"() {
|
||||
version_evaluate_default = "3.6.2";
|
||||
}
|
||||
});
|
||||
|
||||
// src/index.cjs
|
||||
var prettierPromise = import("./index.mjs");
|
||||
var functionNames = [
|
||||
"formatWithCursor",
|
||||
"format",
|
||||
"check",
|
||||
"resolveConfig",
|
||||
"resolveConfigFile",
|
||||
"clearConfigCache",
|
||||
"getFileInfo",
|
||||
"getSupportInfo"
|
||||
];
|
||||
var prettier = /* @__PURE__ */ Object.create(null);
|
||||
for (const name of functionNames) {
|
||||
prettier[name] = async (...args) => {
|
||||
const prettier2 = await prettierPromise;
|
||||
return prettier2[name](...args);
|
||||
};
|
||||
}
|
||||
var debugApiFunctionNames = [
|
||||
"parse",
|
||||
"formatAST",
|
||||
"formatDoc",
|
||||
"printToDoc",
|
||||
"printDocToString"
|
||||
];
|
||||
var debugApis = /* @__PURE__ */ Object.create(null);
|
||||
for (const name of debugApiFunctionNames) {
|
||||
debugApis[name] = async (...args) => {
|
||||
const prettier2 = await prettierPromise;
|
||||
return prettier2.__debug[name](...args);
|
||||
};
|
||||
}
|
||||
prettier.__debug = debugApis;
|
||||
if (true) {
|
||||
prettier.util = (init_public(), __toCommonJS(public_exports));
|
||||
prettier.doc = require("./doc.js");
|
||||
prettier.version = (init_version_evaluate(), __toCommonJS(version_evaluate_exports)).default;
|
||||
} else {
|
||||
Object.defineProperties(prettier, {
|
||||
util: {
|
||||
get() {
|
||||
try {
|
||||
return null;
|
||||
} catch {
|
||||
}
|
||||
throw new Error(
|
||||
"prettier.util is not available in development CommonJS version"
|
||||
);
|
||||
}
|
||||
},
|
||||
doc: {
|
||||
get() {
|
||||
try {
|
||||
return null;
|
||||
} catch {
|
||||
}
|
||||
throw new Error(
|
||||
"prettier.doc is not available in development CommonJS version"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
prettier.version = null.version;
|
||||
}
|
||||
module.exports = prettier;
|
||||
+962
@@ -0,0 +1,962 @@
|
||||
// Copied from `@types/prettier`
|
||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5bb07fc4b087cb7ee91084afa6fe750551a7bbb1/types/prettier/index.d.ts
|
||||
|
||||
// Minimum TypeScript Version: 4.2
|
||||
|
||||
// Add `export {}` here to shut off automatic exporting from index.d.ts. There
|
||||
// are quite a few utility types here that don't need to be shipped with the
|
||||
// exported module.
|
||||
export {};
|
||||
|
||||
import { builders, printer, utils } from "./doc.js";
|
||||
|
||||
export namespace doc {
|
||||
export { builders, printer, utils };
|
||||
}
|
||||
|
||||
// This utility is here to handle the case where you have an explicit union
|
||||
// between string literals and the generic string type. It would normally
|
||||
// resolve out to just the string type, but this generic LiteralUnion maintains
|
||||
// the intellisense of the original union.
|
||||
//
|
||||
// It comes from this issue: microsoft/TypeScript#29729:
|
||||
// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227
|
||||
export type LiteralUnion<T extends U, U = string> =
|
||||
| T
|
||||
| (Pick<U, never> & { _?: never | undefined });
|
||||
|
||||
export type AST = any;
|
||||
export type Doc = doc.builders.Doc;
|
||||
|
||||
// The type of elements that make up the given array T.
|
||||
type ArrayElement<T> = T extends Array<infer E> ? E : never;
|
||||
|
||||
// A union of the properties of the given object that are arrays.
|
||||
type ArrayProperties<T> = {
|
||||
[K in keyof T]: NonNullable<T[K]> extends readonly any[] ? K : never;
|
||||
}[keyof T];
|
||||
|
||||
// A union of the properties of the given array T that can be used to index it.
|
||||
// If the array is a tuple, then that's going to be the explicit indices of the
|
||||
// array, otherwise it's going to just be number.
|
||||
type IndexProperties<T extends { length: number }> =
|
||||
IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number;
|
||||
|
||||
// Effectively performing T[P], except that it's telling TypeScript that it's
|
||||
// safe to do this for tuples, arrays, or objects.
|
||||
type IndexValue<T, P> = T extends any[]
|
||||
? P extends number
|
||||
? T[P]
|
||||
: never
|
||||
: P extends keyof T
|
||||
? T[P]
|
||||
: never;
|
||||
|
||||
// Determines if an object T is an array like string[] (in which case this
|
||||
// evaluates to false) or a tuple like [string] (in which case this evaluates to
|
||||
// true).
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
type IsTuple<T> = T extends []
|
||||
? true
|
||||
: T extends [infer First, ...infer Remain]
|
||||
? IsTuple<Remain>
|
||||
: false;
|
||||
|
||||
type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;
|
||||
type IterProperties<T> = T extends any[]
|
||||
? IndexProperties<T>
|
||||
: ArrayProperties<T>;
|
||||
|
||||
type CallCallback<T, U> = (path: AstPath<T>, index: number, value: any) => U;
|
||||
type EachCallback<T> = (
|
||||
path: AstPath<ArrayElement<T>>,
|
||||
index: number,
|
||||
value: any,
|
||||
) => void;
|
||||
type MapCallback<T, U> = (
|
||||
path: AstPath<ArrayElement<T>>,
|
||||
index: number,
|
||||
value: any,
|
||||
) => U;
|
||||
|
||||
// https://github.com/prettier/prettier/blob/next/src/common/ast-path.js
|
||||
export class AstPath<T = any> {
|
||||
constructor(value: T);
|
||||
|
||||
get key(): string | null;
|
||||
get index(): number | null;
|
||||
get node(): T;
|
||||
get parent(): T | null;
|
||||
get grandparent(): T | null;
|
||||
get isInArray(): boolean;
|
||||
get siblings(): T[] | null;
|
||||
get next(): T | null;
|
||||
get previous(): T | null;
|
||||
get isFirst(): boolean;
|
||||
get isLast(): boolean;
|
||||
get isRoot(): boolean;
|
||||
get root(): T;
|
||||
get ancestors(): T[];
|
||||
|
||||
stack: T[];
|
||||
|
||||
callParent<U>(callback: (path: this) => U, count?: number): U;
|
||||
|
||||
/**
|
||||
* @deprecated Please use `AstPath#key` or `AstPath#index`
|
||||
*/
|
||||
getName(): PropertyKey | null;
|
||||
|
||||
/**
|
||||
* @deprecated Please use `AstPath#node` or `AstPath#siblings`
|
||||
*/
|
||||
getValue(): T;
|
||||
|
||||
getNode(count?: number): T | null;
|
||||
|
||||
getParentNode(count?: number): T | null;
|
||||
|
||||
match(
|
||||
...predicates: Array<
|
||||
(node: any, name: string | null, number: number | null) => boolean
|
||||
>
|
||||
): boolean;
|
||||
|
||||
// For each of the tree walk functions (call, each, and map) this provides 5
|
||||
// strict type signatures, along with a fallback at the end if you end up
|
||||
// calling more than 5 properties deep. This helps a lot with typing because
|
||||
// for the majority of cases you're calling fewer than 5 properties, so the
|
||||
// tree walk functions have a clearer understanding of what you're doing.
|
||||
//
|
||||
// Note that resolving these types is somewhat complicated, and it wasn't
|
||||
// even supported until TypeScript 4.2 (before it would just say that the
|
||||
// type instantiation was excessively deep and possibly infinite).
|
||||
|
||||
call<U>(callback: CallCallback<T, U>): U;
|
||||
call<U, P1 extends CallProperties<T>>(
|
||||
callback: CallCallback<IndexValue<T, P1>, U>,
|
||||
prop1: P1,
|
||||
): U;
|
||||
call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(
|
||||
callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
): U;
|
||||
call<
|
||||
U,
|
||||
P1 extends keyof T,
|
||||
P2 extends CallProperties<T[P1]>,
|
||||
P3 extends CallProperties<IndexValue<T[P1], P2>>,
|
||||
>(
|
||||
callback: CallCallback<
|
||||
IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>,
|
||||
U
|
||||
>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
): U;
|
||||
call<
|
||||
U,
|
||||
P1 extends keyof T,
|
||||
P2 extends CallProperties<T[P1]>,
|
||||
P3 extends CallProperties<IndexValue<T[P1], P2>>,
|
||||
P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
|
||||
>(
|
||||
callback: CallCallback<
|
||||
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
|
||||
U
|
||||
>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
prop4: P4,
|
||||
): U;
|
||||
call<U, P extends PropertyKey>(
|
||||
callback: CallCallback<any, U>,
|
||||
prop1: P,
|
||||
prop2: P,
|
||||
prop3: P,
|
||||
prop4: P,
|
||||
...props: P[]
|
||||
): U;
|
||||
|
||||
each(callback: EachCallback<T>): void;
|
||||
each<P1 extends IterProperties<T>>(
|
||||
callback: EachCallback<IndexValue<T, P1>>,
|
||||
prop1: P1,
|
||||
): void;
|
||||
each<P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
|
||||
callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
): void;
|
||||
each<
|
||||
P1 extends keyof T,
|
||||
P2 extends IterProperties<T[P1]>,
|
||||
P3 extends IterProperties<IndexValue<T[P1], P2>>,
|
||||
>(
|
||||
callback: EachCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
): void;
|
||||
each<
|
||||
P1 extends keyof T,
|
||||
P2 extends IterProperties<T[P1]>,
|
||||
P3 extends IterProperties<IndexValue<T[P1], P2>>,
|
||||
P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
|
||||
>(
|
||||
callback: EachCallback<
|
||||
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>
|
||||
>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
prop4: P4,
|
||||
): void;
|
||||
each(
|
||||
callback: EachCallback<any[]>,
|
||||
prop1: PropertyKey,
|
||||
prop2: PropertyKey,
|
||||
prop3: PropertyKey,
|
||||
prop4: PropertyKey,
|
||||
...props: PropertyKey[]
|
||||
): void;
|
||||
|
||||
map<U>(callback: MapCallback<T, U>): U[];
|
||||
map<U, P1 extends IterProperties<T>>(
|
||||
callback: MapCallback<IndexValue<T, P1>, U>,
|
||||
prop1: P1,
|
||||
): U[];
|
||||
map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
|
||||
callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
): U[];
|
||||
map<
|
||||
U,
|
||||
P1 extends keyof T,
|
||||
P2 extends IterProperties<T[P1]>,
|
||||
P3 extends IterProperties<IndexValue<T[P1], P2>>,
|
||||
>(
|
||||
callback: MapCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
): U[];
|
||||
map<
|
||||
U,
|
||||
P1 extends keyof T,
|
||||
P2 extends IterProperties<T[P1]>,
|
||||
P3 extends IterProperties<IndexValue<T[P1], P2>>,
|
||||
P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
|
||||
>(
|
||||
callback: MapCallback<
|
||||
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
|
||||
U
|
||||
>,
|
||||
prop1: P1,
|
||||
prop2: P2,
|
||||
prop3: P3,
|
||||
prop4: P4,
|
||||
): U[];
|
||||
map<U>(
|
||||
callback: MapCallback<any[], U>,
|
||||
prop1: PropertyKey,
|
||||
prop2: PropertyKey,
|
||||
prop3: PropertyKey,
|
||||
prop4: PropertyKey,
|
||||
...props: PropertyKey[]
|
||||
): U[];
|
||||
}
|
||||
|
||||
/** @deprecated `FastPath` was renamed to `AstPath` */
|
||||
export type FastPath<T = any> = AstPath<T>;
|
||||
|
||||
export type BuiltInParser = (text: string, options?: any) => AST;
|
||||
export type BuiltInParserName =
|
||||
| "acorn"
|
||||
| "angular"
|
||||
| "babel-flow"
|
||||
| "babel-ts"
|
||||
| "babel"
|
||||
| "css"
|
||||
| "espree"
|
||||
| "flow"
|
||||
| "glimmer"
|
||||
| "graphql"
|
||||
| "html"
|
||||
| "json-stringify"
|
||||
| "json"
|
||||
| "json5"
|
||||
| "jsonc"
|
||||
| "less"
|
||||
| "lwc"
|
||||
| "markdown"
|
||||
| "mdx"
|
||||
| "meriyah"
|
||||
| "mjml"
|
||||
| "scss"
|
||||
| "typescript"
|
||||
| "vue"
|
||||
| "yaml";
|
||||
export type BuiltInParsers = Record<BuiltInParserName, BuiltInParser>;
|
||||
|
||||
/**
|
||||
* For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts`
|
||||
*/
|
||||
export interface Config extends Options {
|
||||
overrides?: Array<{
|
||||
files: string | string[];
|
||||
excludeFiles?: string | string[];
|
||||
options?: Options;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface Options extends Partial<RequiredOptions> {}
|
||||
|
||||
export interface RequiredOptions extends doc.printer.Options {
|
||||
/**
|
||||
* Print semicolons at the ends of statements.
|
||||
* @default true
|
||||
*/
|
||||
semi: boolean;
|
||||
/**
|
||||
* Use single quotes instead of double quotes.
|
||||
* @default false
|
||||
*/
|
||||
singleQuote: boolean;
|
||||
/**
|
||||
* Use single quotes in JSX.
|
||||
* @default false
|
||||
*/
|
||||
jsxSingleQuote: boolean;
|
||||
/**
|
||||
* Print trailing commas wherever possible.
|
||||
* @default "all"
|
||||
*/
|
||||
trailingComma: "none" | "es5" | "all";
|
||||
/**
|
||||
* Print spaces between brackets in object literals.
|
||||
* @default true
|
||||
*/
|
||||
bracketSpacing: boolean;
|
||||
/**
|
||||
* How to wrap object literals.
|
||||
* @default "preserve"
|
||||
*/
|
||||
objectWrap: "preserve" | "collapse";
|
||||
/**
|
||||
* Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
|
||||
* alone on the next line (does not apply to self closing elements).
|
||||
* @default false
|
||||
*/
|
||||
bracketSameLine: boolean;
|
||||
/**
|
||||
* Format only a segment of a file.
|
||||
* @default 0
|
||||
*/
|
||||
rangeStart: number;
|
||||
/**
|
||||
* Format only a segment of a file.
|
||||
* @default Number.POSITIVE_INFINITY
|
||||
*/
|
||||
rangeEnd: number;
|
||||
/**
|
||||
* Specify which parser to use.
|
||||
*/
|
||||
parser: LiteralUnion<BuiltInParserName>;
|
||||
/**
|
||||
* Specify the input filepath. This will be used to do parser inference.
|
||||
*/
|
||||
filepath: string;
|
||||
/**
|
||||
* Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
||||
* This is very useful when gradually transitioning large, unformatted codebases to prettier.
|
||||
* @default false
|
||||
*/
|
||||
requirePragma: boolean;
|
||||
/**
|
||||
* Prettier can insert a special @format marker at the top of files specifying that
|
||||
* the file has been formatted with prettier. This works well when used in tandem with
|
||||
* the --require-pragma option. If there is already a docblock at the top of
|
||||
* the file then this option will add a newline to it with the @format marker.
|
||||
* @default false
|
||||
*/
|
||||
insertPragma: boolean;
|
||||
/**
|
||||
* Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file.
|
||||
* @default false
|
||||
*/
|
||||
checkIgnorePragma: boolean;
|
||||
/**
|
||||
* By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
|
||||
* In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
|
||||
* @default "preserve"
|
||||
*/
|
||||
proseWrap: "always" | "never" | "preserve";
|
||||
/**
|
||||
* Include parentheses around a sole arrow function parameter.
|
||||
* @default "always"
|
||||
*/
|
||||
arrowParens: "avoid" | "always";
|
||||
/**
|
||||
* Provide ability to support new languages to prettier.
|
||||
*/
|
||||
plugins: Array<string | URL | Plugin>;
|
||||
/**
|
||||
* How to handle whitespaces in HTML.
|
||||
* @default "css"
|
||||
*/
|
||||
htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
|
||||
/**
|
||||
* Which end of line characters to apply.
|
||||
* @default "lf"
|
||||
*/
|
||||
endOfLine: "auto" | "lf" | "crlf" | "cr";
|
||||
/**
|
||||
* Change when properties in objects are quoted.
|
||||
* @default "as-needed"
|
||||
*/
|
||||
quoteProps: "as-needed" | "consistent" | "preserve";
|
||||
/**
|
||||
* Whether or not to indent the code inside <script> and <style> tags in Vue files.
|
||||
* @default false
|
||||
*/
|
||||
vueIndentScriptAndStyle: boolean;
|
||||
/**
|
||||
* Control whether Prettier formats quoted code embedded in the file.
|
||||
* @default "auto"
|
||||
*/
|
||||
embeddedLanguageFormatting: "auto" | "off";
|
||||
/**
|
||||
* Enforce single attribute per line in HTML, Vue and JSX.
|
||||
* @default false
|
||||
*/
|
||||
singleAttributePerLine: boolean;
|
||||
/**
|
||||
* Where to print operators when binary expressions wrap lines.
|
||||
* @default "end"
|
||||
*/
|
||||
experimentalOperatorPosition: "start" | "end";
|
||||
/**
|
||||
* Use curious ternaries, with the question mark after the condition, instead
|
||||
* of on the same line as the consequent.
|
||||
* @default false
|
||||
*/
|
||||
experimentalTernaries: boolean;
|
||||
/**
|
||||
* Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
|
||||
* @default false
|
||||
* @deprecated use bracketSameLine instead
|
||||
*/
|
||||
jsxBracketSameLine?: boolean;
|
||||
/**
|
||||
* Arbitrary additional values on an options object are always allowed.
|
||||
*/
|
||||
[_: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ParserOptions<T = any> extends RequiredOptions {
|
||||
locStart: (node: T) => number;
|
||||
locEnd: (node: T) => number;
|
||||
originalText: string;
|
||||
}
|
||||
|
||||
export interface Plugin<T = any> {
|
||||
languages?: SupportLanguage[] | undefined;
|
||||
parsers?: { [parserName: string]: Parser<T> } | undefined;
|
||||
printers?: { [astFormat: string]: Printer<T> } | undefined;
|
||||
options?: SupportOptions | undefined;
|
||||
defaultOptions?: Partial<RequiredOptions> | undefined;
|
||||
}
|
||||
|
||||
export interface Parser<T = any> {
|
||||
parse: (text: string, options: ParserOptions<T>) => T | Promise<T>;
|
||||
astFormat: string;
|
||||
hasPragma?: ((text: string) => boolean) | undefined;
|
||||
hasIgnorePragma?: ((text: string) => boolean) | undefined;
|
||||
locStart: (node: T) => number;
|
||||
locEnd: (node: T) => number;
|
||||
preprocess?:
|
||||
| ((text: string, options: ParserOptions<T>) => string)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface Printer<T = any> {
|
||||
print(
|
||||
path: AstPath<T>,
|
||||
options: ParserOptions<T>,
|
||||
print: (path: AstPath<T>) => Doc,
|
||||
args?: unknown,
|
||||
): Doc;
|
||||
embed?:
|
||||
| ((
|
||||
path: AstPath,
|
||||
options: Options,
|
||||
) =>
|
||||
| ((
|
||||
textToDoc: (text: string, options: Options) => Promise<Doc>,
|
||||
print: (
|
||||
selector?: string | number | Array<string | number> | AstPath,
|
||||
) => Doc,
|
||||
path: AstPath,
|
||||
options: Options,
|
||||
) => Promise<Doc | undefined> | Doc | undefined)
|
||||
| Doc
|
||||
| null)
|
||||
| undefined;
|
||||
preprocess?:
|
||||
| ((ast: T, options: ParserOptions<T>) => T | Promise<T>)
|
||||
| undefined;
|
||||
insertPragma?: (text: string) => string;
|
||||
/**
|
||||
* @returns `null` if you want to remove this node
|
||||
* @returns `void` if you want to use modified `cloned`
|
||||
* @returns anything if you want to replace the node with it
|
||||
*/
|
||||
massageAstNode?:
|
||||
| ((original: any, cloned: any, parent: any) => any)
|
||||
| undefined;
|
||||
hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
|
||||
canAttachComment?: ((node: T) => boolean) | undefined;
|
||||
isBlockComment?: ((node: T) => boolean) | undefined;
|
||||
willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;
|
||||
printComment?:
|
||||
| ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc)
|
||||
| undefined;
|
||||
/**
|
||||
* By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively.
|
||||
* This function can be provided to override that behavior.
|
||||
* @param node The node whose children should be returned.
|
||||
* @param options Current options.
|
||||
* @returns `[]` if the node has no children or `undefined` to fall back on the default behavior.
|
||||
*/
|
||||
getCommentChildNodes?:
|
||||
| ((node: T, options: ParserOptions<T>) => T[] | undefined)
|
||||
| undefined;
|
||||
handleComments?:
|
||||
| {
|
||||
ownLine?:
|
||||
| ((
|
||||
commentNode: any,
|
||||
text: string,
|
||||
options: ParserOptions<T>,
|
||||
ast: T,
|
||||
isLastComment: boolean,
|
||||
) => boolean)
|
||||
| undefined;
|
||||
endOfLine?:
|
||||
| ((
|
||||
commentNode: any,
|
||||
text: string,
|
||||
options: ParserOptions<T>,
|
||||
ast: T,
|
||||
isLastComment: boolean,
|
||||
) => boolean)
|
||||
| undefined;
|
||||
remaining?:
|
||||
| ((
|
||||
commentNode: any,
|
||||
text: string,
|
||||
options: ParserOptions<T>,
|
||||
ast: T,
|
||||
isLastComment: boolean,
|
||||
) => boolean)
|
||||
| undefined;
|
||||
}
|
||||
| undefined;
|
||||
getVisitorKeys?:
|
||||
| ((node: T, nonTraversableKeys: Set<string>) => string[])
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface CursorOptions extends Options {
|
||||
/**
|
||||
* Specify where the cursor is.
|
||||
*/
|
||||
cursorOffset: number;
|
||||
}
|
||||
|
||||
export interface CursorResult {
|
||||
formatted: string;
|
||||
cursorOffset: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* `format` is used to format text using Prettier. [Options](https://prettier.io/docs/options) may be provided to override the defaults.
|
||||
*/
|
||||
export function format(source: string, options?: Options): Promise<string>;
|
||||
|
||||
/**
|
||||
* `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`.
|
||||
* This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios.
|
||||
*/
|
||||
export function check(source: string, options?: Options): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code.
|
||||
* This is useful for editor integrations, to prevent the cursor from moving when code is formatted.
|
||||
*
|
||||
* The `cursorOffset` option should be provided, to specify where the cursor is.
|
||||
*/
|
||||
export function formatWithCursor(
|
||||
source: string,
|
||||
options: CursorOptions,
|
||||
): Promise<CursorResult>;
|
||||
|
||||
export interface ResolveConfigOptions {
|
||||
/**
|
||||
* If set to `false`, all caching will be bypassed.
|
||||
*/
|
||||
useCache?: boolean | undefined;
|
||||
/**
|
||||
* Pass directly the path of the config file if you don't wish to search for it.
|
||||
*/
|
||||
config?: string | URL | undefined;
|
||||
/**
|
||||
* If set to `true` and an `.editorconfig` file is in your project,
|
||||
* Prettier will parse it and convert its properties to the corresponding prettier configuration.
|
||||
* This configuration will be overridden by `.prettierrc`, etc. Currently,
|
||||
* the following EditorConfig properties are supported:
|
||||
* - indent_style
|
||||
* - indent_size/tab_width
|
||||
* - max_line_length
|
||||
*/
|
||||
editorconfig?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* `resolveConfig` can be used to resolve configuration for a given source file,
|
||||
* passing its path or url as the first argument. The config search will start at
|
||||
* the directory of the file location and continue to search up the directory.
|
||||
*
|
||||
* A promise is returned which will resolve to:
|
||||
*
|
||||
* - An options object, providing a [config file](https://prettier.io/docs/configuration) was found.
|
||||
* - `null`, if no file was found.
|
||||
*
|
||||
* The promise will be rejected if there was an error parsing the configuration file.
|
||||
*/
|
||||
export function resolveConfig(
|
||||
fileUrlOrPath: string | URL,
|
||||
options?: ResolveConfigOptions,
|
||||
): Promise<Options | null>;
|
||||
|
||||
/**
|
||||
* `resolveConfigFile` can be used to find the path of the Prettier configuration file,
|
||||
* that will be used when resolving the config (i.e. when calling `resolveConfig`).
|
||||
*
|
||||
* A promise is returned which will resolve to:
|
||||
*
|
||||
* - The path of the configuration file.
|
||||
* - `null`, if no file was found.
|
||||
*
|
||||
* The promise will be rejected if there was an error parsing the configuration file.
|
||||
*/
|
||||
export function resolveConfigFile(
|
||||
fileUrlOrPath?: string | URL,
|
||||
): Promise<string | null>;
|
||||
|
||||
/**
|
||||
* As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache.
|
||||
* Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.
|
||||
*/
|
||||
export function clearConfigCache(): Promise<void>;
|
||||
|
||||
export interface SupportLanguage {
|
||||
name: string;
|
||||
parsers: BuiltInParserName[] | string[];
|
||||
group?: string | undefined;
|
||||
tmScope?: string | undefined;
|
||||
aceMode?: string | undefined;
|
||||
codemirrorMode?: string | undefined;
|
||||
codemirrorMimeType?: string | undefined;
|
||||
aliases?: string[] | undefined;
|
||||
extensions?: string[] | undefined;
|
||||
filenames?: string[] | undefined;
|
||||
linguistLanguageId?: number | undefined;
|
||||
vscodeLanguageIds?: string[] | undefined;
|
||||
interpreters?: string[] | undefined;
|
||||
isSupported?: ((options: { filepath: string }) => boolean) | undefined;
|
||||
}
|
||||
|
||||
export interface SupportOptionRange {
|
||||
start: number;
|
||||
end: number;
|
||||
step: number;
|
||||
}
|
||||
|
||||
export type SupportOptionType =
|
||||
| "int"
|
||||
| "string"
|
||||
| "boolean"
|
||||
| "choice"
|
||||
| "path";
|
||||
|
||||
export type CoreCategoryType =
|
||||
| "Config"
|
||||
| "Editor"
|
||||
| "Format"
|
||||
| "Other"
|
||||
| "Output"
|
||||
| "Global"
|
||||
| "Special";
|
||||
|
||||
export interface BaseSupportOption<Type extends SupportOptionType> {
|
||||
readonly name?: string | undefined;
|
||||
/**
|
||||
* Usually you can use {@link CoreCategoryType}
|
||||
*/
|
||||
category: string;
|
||||
/**
|
||||
* The type of the option.
|
||||
*
|
||||
* When passing a type other than the ones listed below, the option is
|
||||
* treated as taking any string as argument, and `--option <${type}>` will
|
||||
* be displayed in --help.
|
||||
*/
|
||||
type: Type;
|
||||
/**
|
||||
* Indicate that the option is deprecated.
|
||||
*
|
||||
* Use a string to add an extra message to --help for the option,
|
||||
* for example to suggest a replacement option.
|
||||
*/
|
||||
deprecated?: true | string | undefined;
|
||||
/**
|
||||
* Description to be displayed in --help. If omitted, the option won't be
|
||||
* shown at all in --help.
|
||||
*/
|
||||
description?: string | undefined;
|
||||
}
|
||||
|
||||
export interface IntSupportOption extends BaseSupportOption<"int"> {
|
||||
default?: number | undefined;
|
||||
array?: false | undefined;
|
||||
range?: SupportOptionRange | undefined;
|
||||
}
|
||||
|
||||
export interface IntArraySupportOption extends BaseSupportOption<"int"> {
|
||||
default?: Array<{ value: number[] }> | undefined;
|
||||
array: true;
|
||||
}
|
||||
|
||||
export interface StringSupportOption extends BaseSupportOption<"string"> {
|
||||
default?: string | undefined;
|
||||
array?: false | undefined;
|
||||
}
|
||||
|
||||
export interface StringArraySupportOption extends BaseSupportOption<"string"> {
|
||||
default?: Array<{ value: string[] }> | undefined;
|
||||
array: true;
|
||||
}
|
||||
|
||||
export interface BooleanSupportOption extends BaseSupportOption<"boolean"> {
|
||||
default?: boolean | undefined;
|
||||
array?: false | undefined;
|
||||
description: string;
|
||||
oppositeDescription?: string | undefined;
|
||||
}
|
||||
|
||||
export interface BooleanArraySupportOption
|
||||
extends BaseSupportOption<"boolean"> {
|
||||
default?: Array<{ value: boolean[] }> | undefined;
|
||||
array: true;
|
||||
}
|
||||
|
||||
export interface ChoiceSupportOption<Value = any>
|
||||
extends BaseSupportOption<"choice"> {
|
||||
default?: Value | Array<{ value: Value }> | undefined;
|
||||
description: string;
|
||||
choices: Array<{
|
||||
value: Value;
|
||||
description: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface PathSupportOption extends BaseSupportOption<"path"> {
|
||||
default?: string | undefined;
|
||||
array?: false | undefined;
|
||||
}
|
||||
|
||||
export interface PathArraySupportOption extends BaseSupportOption<"path"> {
|
||||
default?: Array<{ value: string[] }> | undefined;
|
||||
array: true;
|
||||
}
|
||||
|
||||
export type SupportOption =
|
||||
| IntSupportOption
|
||||
| IntArraySupportOption
|
||||
| StringSupportOption
|
||||
| StringArraySupportOption
|
||||
| BooleanSupportOption
|
||||
| BooleanArraySupportOption
|
||||
| ChoiceSupportOption
|
||||
| PathSupportOption
|
||||
| PathArraySupportOption;
|
||||
|
||||
export interface SupportOptions extends Record<string, SupportOption> {}
|
||||
|
||||
export interface SupportInfo {
|
||||
languages: SupportLanguage[];
|
||||
options: SupportOption[];
|
||||
}
|
||||
|
||||
export interface FileInfoOptions {
|
||||
ignorePath?: string | URL | (string | URL)[] | undefined;
|
||||
withNodeModules?: boolean | undefined;
|
||||
plugins?: Array<string | URL | Plugin> | undefined;
|
||||
resolveConfig?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface FileInfoResult {
|
||||
ignored: boolean;
|
||||
inferredParser: string | null;
|
||||
}
|
||||
|
||||
export function getFileInfo(
|
||||
file: string | URL,
|
||||
options?: FileInfoOptions,
|
||||
): Promise<FileInfoResult>;
|
||||
|
||||
export interface SupportInfoOptions {
|
||||
plugins?: Array<string | URL | Plugin> | undefined;
|
||||
showDeprecated?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object representing the parsers, languages and file types Prettier supports for the current version.
|
||||
*/
|
||||
export function getSupportInfo(
|
||||
options?: SupportInfoOptions,
|
||||
): Promise<SupportInfo>;
|
||||
|
||||
/**
|
||||
* `version` field in `package.json`
|
||||
*/
|
||||
export const version: string;
|
||||
|
||||
// https://github.com/prettier/prettier/blob/next/src/utils/public.js
|
||||
export namespace util {
|
||||
interface SkipOptions {
|
||||
backwards?: boolean | undefined;
|
||||
}
|
||||
|
||||
type Quote = "'" | '"';
|
||||
|
||||
function getMaxContinuousCount(text: string, searchString: string): number;
|
||||
|
||||
function getStringWidth(text: string): number;
|
||||
|
||||
function getAlignmentSize(
|
||||
text: string,
|
||||
tabWidth: number,
|
||||
startIndex?: number | undefined,
|
||||
): number;
|
||||
|
||||
function getIndentSize(value: string, tabWidth: number): number;
|
||||
|
||||
function skipNewline(
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions | undefined,
|
||||
): number | false;
|
||||
|
||||
function skipInlineComment(
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
): number | false;
|
||||
|
||||
function skipTrailingComment(
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
): number | false;
|
||||
|
||||
function skipTrailingComment(
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
): number | false;
|
||||
|
||||
function hasNewline(
|
||||
text: string,
|
||||
startIndex: number,
|
||||
options?: SkipOptions | undefined,
|
||||
): boolean;
|
||||
|
||||
function hasNewlineInRange(
|
||||
text: string,
|
||||
startIndex: number,
|
||||
endIndex: number,
|
||||
): boolean;
|
||||
|
||||
function hasSpaces(
|
||||
text: string,
|
||||
startIndex: number,
|
||||
options?: SkipOptions | undefined,
|
||||
): boolean;
|
||||
|
||||
function getNextNonSpaceNonCommentCharacterIndex(
|
||||
text: string,
|
||||
startIndex: number,
|
||||
): number | false;
|
||||
|
||||
function getNextNonSpaceNonCommentCharacter(
|
||||
text: string,
|
||||
startIndex: number,
|
||||
): string;
|
||||
|
||||
function isNextLineEmpty(text: string, startIndex: number): boolean;
|
||||
|
||||
function isPreviousLineEmpty(text: string, startIndex: number): boolean;
|
||||
|
||||
function makeString(
|
||||
rawText: string,
|
||||
enclosingQuote: Quote,
|
||||
unescapeUnnecessaryEscapes?: boolean | undefined,
|
||||
): string;
|
||||
|
||||
function skip(
|
||||
characters: string | RegExp,
|
||||
): (
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions,
|
||||
) => number | false;
|
||||
|
||||
const skipWhitespace: (
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions,
|
||||
) => number | false;
|
||||
|
||||
const skipSpaces: (
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions,
|
||||
) => number | false;
|
||||
|
||||
const skipToLineEnd: (
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions,
|
||||
) => number | false;
|
||||
|
||||
const skipEverythingButNewLine: (
|
||||
text: string,
|
||||
startIndex: number | false,
|
||||
options?: SkipOptions,
|
||||
) => number | false;
|
||||
|
||||
function addLeadingComment(node: any, comment: any): void;
|
||||
|
||||
function addDanglingComment(node: any, comment: any, marker: any): void;
|
||||
|
||||
function addTrailingComment(node: any, comment: any): void;
|
||||
|
||||
function getPreferredQuote(
|
||||
text: string,
|
||||
preferredQuoteOrPreferSingleQuote: Quote | boolean,
|
||||
): Quote;
|
||||
}
|
||||
+19117
File diff suppressed because it is too large.
Load diff
+2634
File diff suppressed because it is too large.
Load diff
+13609
File diff suppressed because it is too large.
Load diff
+4707
File diff suppressed because it is too large.
Load diff
+202
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "3.6.2",
|
||||
"description": "Prettier is an opinionated code formatter",
|
||||
"bin": "./bin/prettier.cjs",
|
||||
"repository": "prettier/prettier",
|
||||
"funding": "https://github.com/prettier/prettier?sponsor=1",
|
||||
"homepage": "https://prettier.io",
|
||||
"author": "James Long",
|
||||
"license": "MIT",
|
||||
"main": "./index.cjs",
|
||||
"browser": "./standalone.js",
|
||||
"unpkg": "./standalone.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"require": "./index.cjs",
|
||||
"browser": {
|
||||
"import": "./standalone.mjs",
|
||||
"default": "./standalone.js"
|
||||
},
|
||||
"default": "./index.mjs"
|
||||
},
|
||||
"./*": "./*",
|
||||
"./doc": {
|
||||
"types": "./doc.d.ts",
|
||||
"require": "./doc.js",
|
||||
"default": "./doc.mjs"
|
||||
},
|
||||
"./standalone": {
|
||||
"types": "./standalone.d.ts",
|
||||
"require": "./standalone.js",
|
||||
"default": "./standalone.mjs"
|
||||
},
|
||||
"./plugins/estree": {
|
||||
"types": "./plugins/estree.d.ts",
|
||||
"require": "./plugins/estree.js",
|
||||
"default": "./plugins/estree.mjs"
|
||||
},
|
||||
"./plugins/babel": {
|
||||
"types": "./plugins/babel.d.ts",
|
||||
"require": "./plugins/babel.js",
|
||||
"default": "./plugins/babel.mjs"
|
||||
},
|
||||
"./plugins/flow": {
|
||||
"types": "./plugins/flow.d.ts",
|
||||
"require": "./plugins/flow.js",
|
||||
"default": "./plugins/flow.mjs"
|
||||
},
|
||||
"./plugins/typescript": {
|
||||
"types": "./plugins/typescript.d.ts",
|
||||
"require": "./plugins/typescript.js",
|
||||
"default": "./plugins/typescript.mjs"
|
||||
},
|
||||
"./plugins/acorn": {
|
||||
"types": "./plugins/acorn.d.ts",
|
||||
"require": "./plugins/acorn.js",
|
||||
"default": "./plugins/acorn.mjs"
|
||||
},
|
||||
"./plugins/meriyah": {
|
||||
"types": "./plugins/meriyah.d.ts",
|
||||
"require": "./plugins/meriyah.js",
|
||||
"default": "./plugins/meriyah.mjs"
|
||||
},
|
||||
"./plugins/angular": {
|
||||
"types": "./plugins/angular.d.ts",
|
||||
"require": "./plugins/angular.js",
|
||||
"default": "./plugins/angular.mjs"
|
||||
},
|
||||
"./plugins/postcss": {
|
||||
"types": "./plugins/postcss.d.ts",
|
||||
"require": "./plugins/postcss.js",
|
||||
"default": "./plugins/postcss.mjs"
|
||||
},
|
||||
"./plugins/graphql": {
|
||||
"types": "./plugins/graphql.d.ts",
|
||||
"require": "./plugins/graphql.js",
|
||||
"default": "./plugins/graphql.mjs"
|
||||
},
|
||||
"./plugins/markdown": {
|
||||
"types": "./plugins/markdown.d.ts",
|
||||
"require": "./plugins/markdown.js",
|
||||
"default": "./plugins/markdown.mjs"
|
||||
},
|
||||
"./plugins/glimmer": {
|
||||
"types": "./plugins/glimmer.d.ts",
|
||||
"require": "./plugins/glimmer.js",
|
||||
"default": "./plugins/glimmer.mjs"
|
||||
},
|
||||
"./plugins/html": {
|
||||
"types": "./plugins/html.d.ts",
|
||||
"require": "./plugins/html.js",
|
||||
"default": "./plugins/html.mjs"
|
||||
},
|
||||
"./plugins/yaml": {
|
||||
"types": "./plugins/yaml.d.ts",
|
||||
"require": "./plugins/yaml.js",
|
||||
"default": "./plugins/yaml.mjs"
|
||||
},
|
||||
"./esm/standalone.mjs": "./standalone.mjs",
|
||||
"./parser-babel": "./plugins/babel.js",
|
||||
"./parser-babel.js": "./plugins/babel.js",
|
||||
"./esm/parser-babel.mjs": "./plugins/babel.mjs",
|
||||
"./parser-flow": "./plugins/flow.js",
|
||||
"./parser-flow.js": "./plugins/flow.js",
|
||||
"./esm/parser-flow.mjs": "./plugins/flow.mjs",
|
||||
"./parser-typescript": "./plugins/typescript.js",
|
||||
"./parser-typescript.js": "./plugins/typescript.js",
|
||||
"./esm/parser-typescript.mjs": "./plugins/typescript.mjs",
|
||||
"./parser-espree": "./plugins/acorn.js",
|
||||
"./parser-espree.js": "./plugins/acorn.js",
|
||||
"./esm/parser-espree.mjs": "./plugins/acorn.mjs",
|
||||
"./parser-meriyah": "./plugins/meriyah.js",
|
||||
"./parser-meriyah.js": "./plugins/meriyah.js",
|
||||
"./esm/parser-meriyah.mjs": "./plugins/meriyah.mjs",
|
||||
"./parser-angular": "./plugins/angular.js",
|
||||
"./parser-angular.js": "./plugins/angular.js",
|
||||
"./esm/parser-angular.mjs": "./plugins/angular.mjs",
|
||||
"./parser-postcss": "./plugins/postcss.js",
|
||||
"./parser-postcss.js": "./plugins/postcss.js",
|
||||
"./esm/parser-postcss.mjs": "./plugins/postcss.mjs",
|
||||
"./parser-graphql": "./plugins/graphql.js",
|
||||
"./parser-graphql.js": "./plugins/graphql.js",
|
||||
"./esm/parser-graphql.mjs": "./plugins/graphql.mjs",
|
||||
"./parser-markdown": "./plugins/markdown.js",
|
||||
"./parser-markdown.js": "./plugins/markdown.js",
|
||||
"./esm/parser-markdown.mjs": "./plugins/markdown.mjs",
|
||||
"./parser-glimmer": "./plugins/glimmer.js",
|
||||
"./parser-glimmer.js": "./plugins/glimmer.js",
|
||||
"./esm/parser-glimmer.mjs": "./plugins/glimmer.mjs",
|
||||
"./parser-html": "./plugins/html.js",
|
||||
"./parser-html.js": "./plugins/html.js",
|
||||
"./esm/parser-html.mjs": "./plugins/html.mjs",
|
||||
"./parser-yaml": "./plugins/yaml.js",
|
||||
"./parser-yaml.js": "./plugins/yaml.js",
|
||||
"./esm/parser-yaml.mjs": "./plugins/yaml.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"THIRD-PARTY-NOTICES.md",
|
||||
"bin/prettier.cjs",
|
||||
"doc.d.ts",
|
||||
"doc.js",
|
||||
"doc.mjs",
|
||||
"index.cjs",
|
||||
"index.d.ts",
|
||||
"index.d.ts",
|
||||
"index.mjs",
|
||||
"internal/experimental-cli-worker.mjs",
|
||||
"internal/experimental-cli.mjs",
|
||||
"internal/legacy-cli.mjs",
|
||||
"package.json",
|
||||
"plugins/acorn.d.ts",
|
||||
"plugins/acorn.js",
|
||||
"plugins/acorn.mjs",
|
||||
"plugins/angular.d.ts",
|
||||
"plugins/angular.js",
|
||||
"plugins/angular.mjs",
|
||||
"plugins/babel.d.ts",
|
||||
"plugins/babel.js",
|
||||
"plugins/babel.mjs",
|
||||
"plugins/estree.d.ts",
|
||||
"plugins/estree.js",
|
||||
"plugins/estree.mjs",
|
||||
"plugins/flow.d.ts",
|
||||
"plugins/flow.js",
|
||||
"plugins/flow.mjs",
|
||||
"plugins/glimmer.d.ts",
|
||||
"plugins/glimmer.js",
|
||||
"plugins/glimmer.mjs",
|
||||
"plugins/graphql.d.ts",
|
||||
"plugins/graphql.js",
|
||||
"plugins/graphql.mjs",
|
||||
"plugins/html.d.ts",
|
||||
"plugins/html.js",
|
||||
"plugins/html.mjs",
|
||||
"plugins/markdown.d.ts",
|
||||
"plugins/markdown.js",
|
||||
"plugins/markdown.mjs",
|
||||
"plugins/meriyah.d.ts",
|
||||
"plugins/meriyah.js",
|
||||
"plugins/meriyah.mjs",
|
||||
"plugins/postcss.d.ts",
|
||||
"plugins/postcss.js",
|
||||
"plugins/postcss.mjs",
|
||||
"plugins/typescript.d.ts",
|
||||
"plugins/typescript.js",
|
||||
"plugins/typescript.mjs",
|
||||
"plugins/yaml.d.ts",
|
||||
"plugins/yaml.js",
|
||||
"plugins/yaml.mjs",
|
||||
"standalone.d.ts",
|
||||
"standalone.js",
|
||||
"standalone.mjs"
|
||||
],
|
||||
"preferUnplugged": true,
|
||||
"type": "commonjs"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
acorn: Parser;
|
||||
espree: Parser;
|
||||
};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var wi=Object.create;var fe=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var Ii=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Li=Object.prototype.hasOwnProperty;var at=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vi=(e,t)=>{for(var i in t)fe(e,i,{get:t[i],enumerable:!0})},nt=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ii(t))!Li.call(e,r)&&r!==i&&fe(e,r,{get:()=>t[r],enumerable:!(s=Pi(t,r))||s.enumerable});return e};var ot=(e,t,i)=>(i=e!=null?wi(Ni(e)):{},nt(t||!e||!e.__esModule?fe(i,"default",{value:e,enumerable:!0}):i,e)),Ri=e=>nt(fe({},"__esModule",{value:!0}),e);var zt=at((dr,Xt)=>{Xt.exports={}});var Xe=at((mr,We)=>{"use strict";var bs=zt(),Ss=/^[\da-fA-F]+$/,_s=/^\d+$/,Qt=new WeakMap;function Yt(e){e=e.Parser.acorn||e;let t=Qt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("<tag",!1),o=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),u={tc_oTag:n,tc_cTag:o,tc_expr:p},c={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};c.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(n),this.exprAllowed=!1},c.jsxTagEnd.updateContext=function(f){let v=this.context.pop();v===n&&f===i.slash||v===o?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:u,tokTypes:c},Qt.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}We.exports=function(e){return e=e||{},function(t){return Ts({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(We.exports,"tokTypes",{get:function(){return Yt(void 0).tokTypes},configurable:!0,enumerable:!0});function Ts(e,t){let i=t.acorn||void 0,s=Yt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,p=s.tokContexts.tc_oTag,u=s.tokContexts.tc_cTag,c=s.tokContexts.tc_expr,f=i.isNewLine,v=i.isIdentifierStart,T=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let h="",m=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(x):(h+=this.input.slice(m,this.pos),this.finishToken(n.jsxText,h));case 38:h+=this.input.slice(m,this.pos),h+=this.jsx_readEntity(),m=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:f(x)?(h+=this.input.slice(m,this.pos),h+=this.jsx_readNewLine(!0),m=this.pos):++this.pos}}}jsx_readNewLine(h){let m=this.input.charCodeAt(this.pos),x;return++this.pos,m===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=h?`
|
||||
`:`\r
|
||||
`):x=String.fromCharCode(m),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(h){let m="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===h)break;g===38?(m+=this.input.slice(x,this.pos),m+=this.jsx_readEntity(),x=this.pos):f(g)?(m+=this.input.slice(x,this.pos),m+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return m+=this.input.slice(x,this.pos++),this.finishToken(r.string,m)}jsx_readEntity(){let h="",m=0,x,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&m++<10;){if(g=this.input[this.pos++],g===";"){h[0]==="#"?h[1]==="x"?(h=h.substr(2),Ss.test(h)&&(x=String.fromCharCode(parseInt(h,16)))):(h=h.substr(1),_s.test(h)&&(x=String.fromCharCode(parseInt(h,10)))):x=bs[h];break}h+=g}return x||(this.pos=N,"&")}jsx_readWord(){let h,m=this.pos;do h=this.input.charCodeAt(++this.pos);while(T(h)||h===45);return this.finishToken(n.jsxName,this.input.slice(m,this.pos))}jsx_parseIdentifier(){let h=this.startNode();return this.type===n.jsxName?h.name=this.value:this.type.keyword?h.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(h,"JSXIdentifier")}jsx_parseNamespacedName(){let h=this.start,m=this.startLoc,x=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return x;var g=this.startNodeAt(h,m);return g.namespace=x,g.name=this.jsx_parseIdentifier(),this.finishNode(g,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let h=this.start,m=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===r.dot&&x.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let g=this.startNodeAt(h,m);g.object=x,g.property=this.jsx_parseIdentifier(),x=this.finishNode(g,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let h=this.jsx_parseExpressionContainer();return h.expression.type==="JSXEmptyExpression"&&this.raise(h.start,"JSX attributes must only be assigned a non-empty expression"),h;case n.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let h=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(h,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let h=this.startNode();return this.next(),h.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(h,"JSXExpressionContainer")}jsx_parseAttribute(){let h=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),h.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(h,"JSXSpreadAttribute")):(h.name=this.jsx_parseNamespacedName(),h.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(h,"JSXAttribute"))}jsx_parseOpeningElementAt(h,m){let x=this.startNodeAt(h,m);x.attributes=[];let g=this.jsx_parseElementName();for(g&&(x.name=g);this.type!==r.slash&&this.type!==n.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(r.slash),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(h,m){let x=this.startNodeAt(h,m),g=this.jsx_parseElementName();return g&&(x.name=g),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(h,m){let x=this.startNodeAt(h,m),g=[],N=this.jsx_parseOpeningElementAt(h,m),le=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(h=this.start,m=this.startLoc,this.next(),this.eat(r.slash)){le=this.jsx_parseClosingElementAt(h,m);break e}g.push(this.jsx_parseElementAt(h,m));break;case n.jsxText:g.push(this.parseExprAtom());break;case r.braceL:g.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(le.name)!==pe(N.name)&&this.raise(le.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let Le=N.name?"Element":"Fragment";return x["opening"+Le]=N,x["closing"+Le]=le,x.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+Le)}jsx_parseText(){let h=this.parseLiteral(this.value);return h.type="JSXText",h}jsx_parseElement(){let h=this.start,m=this.startLoc;return this.next(),this.jsx_parseElementAt(h,m)}parseExprAtom(h){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(h)}readToken(h){let m=this.curContext();if(m===c)return this.jsx_readToken();if(m===p||m===u){if(v(h))return this.jsx_readWord();if(h==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((h===34||h===39)&&m==p)return this.jsx_readString(h)}return h===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ut(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return ut(t.onComment)&&(t.onComment=Ki(t,t.onComment)),t}function Ki(e,t){return function(i,s,r,n,o,p){var u={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(u.loc=new ve(this,o,p)),e.ranges&&(u.range=[r,n]),t.push(u)}}var ne=1,Z=2,Ue=4,vt=8,Ge=16,bt=32,be=64,St=128,X=256,oe=512,Se=ne|Z|X;function qe(e,t){return Z|(e?Ue:0)|(t?vt:0)}var me=0,Je=1,J=2,_t=3,Tt=4,Ct=5,E=function(t,i,s){this.options=t=Hi(t),this.sourceFile=t.sourceFile,this.keywords=H(Di[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ve[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var n=(r?r+" ":"")+Ve.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Ve.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||||
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(V).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ne),this.regexpState=null,this.privateNameStack=[]},j={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};E.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};j.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};j.inGenerator.get=function(){return(this.currentVarScope().flags&vt)>0};j.inAsync.get=function(){return(this.currentVarScope().flags&Ue)>0};j.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe))return!1;if(i&Z)return(i&Ue)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};j.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&be)>0||this.options.allowSuperOutsideMethod};j.allowDirectSuper.get=function(){return(this.currentThisScope().flags&St)>0};j.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};j.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe)||i&Z&&!(i&Ge))return!0}return!1};j.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&X)>0};E.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};E.parse=function(t,i){return new this(i,t).parse()};E.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};E.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(E.prototype,j);var P=E.prototype,Wi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=e,e+=A.exec(this.input)[0].length;var t=Wi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){A.lastIndex=e+t[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||V.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,A.lastIndex=e,e+=A.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||V.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var _e=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!V.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,p),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(t,s.generator)|be|(i?St:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qe(i,!1)|Ge),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(K(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?M:K)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var gs="8.15.0";E.acorn={Parser:E,version:gs,defaultOptions:De,Position:ae,SourceLocation:ve,getLineInfo:gt,Node:Te,TokenType:_,tokTypes:a,keywordTypes:je,TokContext:F,tokContexts:C,isIdentifierChar:K,isIdentifierStart:M,Token:Ke,isNewLine:Y,lineBreak:V,lineBreakG:Ui,nonASCIIwhitespace:xt};var bi=ot(Xe(),1);function Cs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ee=Cs;function Es(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var ke=Es;var ks=(e,t,i)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(i);for(let s=t.length-1;s>=0;s--){let r=t[s];if(i(r,s,t))return r}}},$t=ks;var As=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},te=As;var ws=new Proxy(()=>{},{get:()=>ws});function w(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(w(i),t):t}function k(e){var i;return((i=e.range)==null?void 0:i[1])??e.end}function Ps(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var ie=Ps;function Is(e,t,i){let s=e.originalText.slice(t,i);for(let r of e[Symbol.for("comments")]){let n=w(r);if(n>i)break;let o=k(r);if(o<t)continue;let p=o-n;s=s.slice(0,n-t)+" ".repeat(p)+s.slice(o-t)}return s}var Zt=Is;var Ns=ie(["Block","CommentBlock","MultiLine"]),z=Ns;var Ls=ie(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ze=Ls;var Qe=new WeakMap;function Vs(e){return Qe.has(e)||Qe.set(e,z(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Qe.get(e)}var ei=Vs;function Rs(e){if(!z(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Ye=new WeakMap;function Os(e){return Ye.has(e)||Ye.set(e,Rs(e)),Ye.get(e)}var $e=Os;function Bs(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&k(s)===w(t)&&$e(s)&&$e(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[w(s),k(t)]),!ze(s)&&!z(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var ti=Bs;var he=null;function ce(e){if(he!==null&&typeof he.property){let t=he;return he=ce.prototype=null,t}return he=ce.prototype=e??Object.create(null),new ce}var Ds=10;for(let e=0;e<=Ds;e++)ce();function Ze(e){return ce(e)}function Fs(e,t="type"){Ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ii=Fs;var si={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","t
Line truncated
|
||||
`;e=se(!1,e.replace(qs,"").replace(Gs,""),Ws,"$1");let i="";for(;i!==e;)i=e,e=se(!1,e,Ks,`${t}$1 $2${t}`);e=e.replace(ui,"").trimEnd();let s=Object.create(null),r=se(!1,e,pi,"").replace(ui,"").trimEnd(),n;for(;n=pi.exec(e);){let o=se(!1,n[2],Hs,"");if(typeof s[n[1]]=="string"||Array.isArray(s[n[1]])){let p=s[n[1]];s[n[1]]=[...Xs,...Array.isArray(p)?p:[p],o]}else s[n[1]]=o}return{comments:r,pragmas:s}}var li=["noformat","noprettier"],fi=["format","prettier"];function zs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var di=zs;function mi(e){let t=di(e);t&&(e=e.slice(t.length+1));let i=hi(e),{pragmas:s,comments:r}=ci(i);return{shebang:t,text:e,pragmas:s,comments:r}}function xi(e){let{pragmas:t}=mi(e);return fi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function yi(e){let{pragmas:t}=mi(e);return li.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Qs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:xi,hasIgnorePragma:yi,locStart:w,locEnd:k,...e}}var we=Qs;var Pe="module",gi="script",Ie=[Pe,gi];function Ne(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return Pe;if(/\.(?:cjs|cts)$/iu.test(e))return gi}}var Ys={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function $s(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return Ee(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var vi,Zs=()=>(vi??(vi=E.extend((0,bi.default)())),vi);function er(e,t){let i=Zs(),s=[],r=i.parse(e,{...Ys,sourceType:t,allowImportExportEverywhere:t===Pe,onComment:s});return r.comments=s,r}function tr(e,t){let i=Ne(t==null?void 0:t.filepath),s=(i?[i]:Ie).map(n=>()=>er(e,n)),r;try{r=ke(s)}catch({errors:[n]}){throw $s(n)}return Ae(r,{text:e})}var Si=we(tr);var Ei=ot(Xe(),1);var I={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ir(e,t){let i=e[0],s=te(!1,e,-1),r={type:I.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function it(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}it.prototype={constructor:it,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=I.Identifier,e.value==="static"&&(e.type=I.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=I.Keyword);else if(i===s.privateId)e.type=I.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=I.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=I.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=I.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=I.Boolean:i.keyword==="null"?e.type=I.Null:e.type=I.Keyword;else if(i===s.num)e.type=I.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=I.JSXText):e.type=I.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=I.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(ir(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var _i=it;var Ti=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function sr(){return te(!1,Ti,-1)}function rr(e=5){let t=e==="latest"?sr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ti.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ar(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ci(e){let t=rr(e.ecmaVersion),i=ar(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'm
Line truncated
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[st](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var or={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=E.extend(rt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=E.extend((0,Ei.default)(),rt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function ki(e,t){let i=or.get(t);return new i(t,e).parse()}var ur={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function pr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:Ee(t,{loc:{start:{line:i,column:s}},cause:e})}function hr(e,t){let i=Ne(t==null?void 0:t.filepath),s=(i?[i]:Ie).map(n=>()=>ki(e,{...ur,sourceType:n})),r;try{r=ke(s)}catch({errors:[n]}){throw pr(n)}return Ae(r,{parser:"espree",text:e})}var Ai=we(hr);var cr={acorn:Si,espree:Ai};return Ri(lr);});
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
var wi=Object.create;var Le=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var Ii=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Li=Object.prototype.hasOwnProperty;var nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vi=(e,t)=>{for(var i in t)Le(e,i,{get:t[i],enumerable:!0})},Ri=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ii(t))!Li.call(e,r)&&r!==i&&Le(e,r,{get:()=>t[r],enumerable:!(s=Pi(t,r))||s.enumerable});return e};var ot=(e,t,i)=>(i=e!=null?wi(Ni(e)):{},Ri(t||!e||!e.__esModule?Le(i,"default",{value:e,enumerable:!0}):i,e));var zt=nt((fr,Xt)=>{Xt.exports={}});var Xe=nt((dr,We)=>{"use strict";var bs=zt(),Ss=/^[\da-fA-F]+$/,_s=/^\d+$/,Qt=new WeakMap;function Yt(e){e=e.Parser.acorn||e;let t=Qt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("<tag",!1),o=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),u={tc_oTag:n,tc_cTag:o,tc_expr:p},c={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};c.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(n),this.exprAllowed=!1},c.jsxTagEnd.updateContext=function(f){let v=this.context.pop();v===n&&f===i.slash||v===o?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:u,tokTypes:c},Qt.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}We.exports=function(e){return e=e||{},function(t){return Ts({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(We.exports,"tokTypes",{get:function(){return Yt(void 0).tokTypes},configurable:!0,enumerable:!0});function Ts(e,t){let i=t.acorn||void 0,s=Yt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,p=s.tokContexts.tc_oTag,u=s.tokContexts.tc_cTag,c=s.tokContexts.tc_expr,f=i.isNewLine,v=i.isIdentifierStart,T=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let h="",m=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(x):(h+=this.input.slice(m,this.pos),this.finishToken(n.jsxText,h));case 38:h+=this.input.slice(m,this.pos),h+=this.jsx_readEntity(),m=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:f(x)?(h+=this.input.slice(m,this.pos),h+=this.jsx_readNewLine(!0),m=this.pos):++this.pos}}}jsx_readNewLine(h){let m=this.input.charCodeAt(this.pos),x;return++this.pos,m===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=h?`
|
||||
`:`\r
|
||||
`):x=String.fromCharCode(m),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(h){let m="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===h)break;g===38?(m+=this.input.slice(x,this.pos),m+=this.jsx_readEntity(),x=this.pos):f(g)?(m+=this.input.slice(x,this.pos),m+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return m+=this.input.slice(x,this.pos++),this.finishToken(r.string,m)}jsx_readEntity(){let h="",m=0,x,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&m++<10;){if(g=this.input[this.pos++],g===";"){h[0]==="#"?h[1]==="x"?(h=h.substr(2),Ss.test(h)&&(x=String.fromCharCode(parseInt(h,16)))):(h=h.substr(1),_s.test(h)&&(x=String.fromCharCode(parseInt(h,10)))):x=bs[h];break}h+=g}return x||(this.pos=N,"&")}jsx_readWord(){let h,m=this.pos;do h=this.input.charCodeAt(++this.pos);while(T(h)||h===45);return this.finishToken(n.jsxName,this.input.slice(m,this.pos))}jsx_parseIdentifier(){let h=this.startNode();return this.type===n.jsxName?h.name=this.value:this.type.keyword?h.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(h,"JSXIdentifier")}jsx_parseNamespacedName(){let h=this.start,m=this.startLoc,x=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return x;var g=this.startNodeAt(h,m);return g.namespace=x,g.name=this.jsx_parseIdentifier(),this.finishNode(g,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let h=this.start,m=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===r.dot&&x.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let g=this.startNodeAt(h,m);g.object=x,g.property=this.jsx_parseIdentifier(),x=this.finishNode(g,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let h=this.jsx_parseExpressionContainer();return h.expression.type==="JSXEmptyExpression"&&this.raise(h.start,"JSX attributes must only be assigned a non-empty expression"),h;case n.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let h=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(h,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let h=this.startNode();return this.next(),h.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(h,"JSXExpressionContainer")}jsx_parseAttribute(){let h=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),h.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(h,"JSXSpreadAttribute")):(h.name=this.jsx_parseNamespacedName(),h.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(h,"JSXAttribute"))}jsx_parseOpeningElementAt(h,m){let x=this.startNodeAt(h,m);x.attributes=[];let g=this.jsx_parseElementName();for(g&&(x.name=g);this.type!==r.slash&&this.type!==n.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(r.slash),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(h,m){let x=this.startNodeAt(h,m),g=this.jsx_parseElementName();return g&&(x.name=g),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(h,m){let x=this.startNodeAt(h,m),g=[],N=this.jsx_parseOpeningElementAt(h,m),le=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(h=this.start,m=this.startLoc,this.next(),this.eat(r.slash)){le=this.jsx_parseClosingElementAt(h,m);break e}g.push(this.jsx_parseElementAt(h,m));break;case n.jsxText:g.push(this.parseExprAtom());break;case r.braceL:g.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(le.name)!==pe(N.name)&&this.raise(le.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let Ne=N.name?"Element":"Fragment";return x["opening"+Ne]=N,x["closing"+Ne]=le,x.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+Ne)}jsx_parseText(){let h=this.parseLiteral(this.value);return h.type="JSXText",h}jsx_parseElement(){let h=this.start,m=this.startLoc;return this.next(),this.jsx_parseElementAt(h,m)}parseExprAtom(h){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(h)}readToken(h){let m=this.curContext();if(m===c)return this.jsx_readToken();if(m===p||m===u){if(v(h))return this.jsx_readWord();if(h==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((h===34||h===39)&&m==p)return this.jsx_readString(h)}return h===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ut(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return ut(t.onComment)&&(t.onComment=Ki(t,t.onComment)),t}function Ki(e,t){return function(i,s,r,n,o,p){var u={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(u.loc=new ge(this,o,p)),e.ranges&&(u.range=[r,n]),t.push(u)}}var ne=1,Z=2,Ue=4,vt=8,Ge=16,bt=32,ve=64,St=128,X=256,oe=512,be=ne|Z|X;function qe(e,t){return Z|(e?Ue:0)|(t?vt:0)}var de=0,Je=1,J=2,_t=3,Tt=4,Ct=5,E=function(t,i,s){this.options=t=Hi(t),this.sourceFile=t.sourceFile,this.keywords=H(Di[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ve[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var n=(r?r+" ":"")+Ve.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Ve.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||||
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(V).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ne),this.regexpState=null,this.privateNameStack=[]},j={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};E.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};j.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};j.inGenerator.get=function(){return(this.currentVarScope().flags&vt)>0};j.inAsync.get=function(){return(this.currentVarScope().flags&Ue)>0};j.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe))return!1;if(i&Z)return(i&Ue)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};j.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&ve)>0||this.options.allowSuperOutsideMethod};j.allowDirectSuper.get=function(){return(this.currentThisScope().flags&St)>0};j.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};j.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe)||i&Z&&!(i&Ge))return!0}return!1};j.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&X)>0};E.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};E.parse=function(t,i){return new this(i,t).parse()};E.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};E.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(E.prototype,j);var P=E.prototype,Wi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=e,e+=A.exec(this.input)[0].length;var t=Wi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){A.lastIndex=e+t[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||V.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,A.lastIndex=e,e+=A.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||V.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Se=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!V.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,p),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(t,s.generator)|ve|(i?St:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qe(i,!1)|Ge),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(K(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?M:K)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var gs="8.15.0";E.acorn={Parser:E,version:gs,defaultOptions:De,Position:ae,SourceLocation:ge,getLineInfo:gt,Node:_e,TokenType:_,tokTypes:a,keywordTypes:je,TokContext:F,tokContexts:C,isIdentifierChar:K,isIdentifierStart:M,Token:Ke,isNewLine:Y,lineBreak:V,lineBreakG:Ui,nonASCIIwhitespace:xt};var bi=ot(Xe(),1);function Cs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ce=Cs;function Es(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Ee=Es;var ks=(e,t,i)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(i);for(let s=t.length-1;s>=0;s--){let r=t[s];if(i(r,s,t))return r}}},$t=ks;var As=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},te=As;var ws=new Proxy(()=>{},{get:()=>ws});function w(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(w(i),t):t}function k(e){var i;return((i=e.range)==null?void 0:i[1])??e.end}function Ps(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var ie=Ps;function Is(e,t,i){let s=e.originalText.slice(t,i);for(let r of e[Symbol.for("comments")]){let n=w(r);if(n>i)break;let o=k(r);if(o<t)continue;let p=o-n;s=s.slice(0,n-t)+" ".repeat(p)+s.slice(o-t)}return s}var Zt=Is;var Ns=ie(["Block","CommentBlock","MultiLine"]),z=Ns;var Ls=ie(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ze=Ls;var Qe=new WeakMap;function Vs(e){return Qe.has(e)||Qe.set(e,z(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Qe.get(e)}var ei=Vs;function Rs(e){if(!z(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Ye=new WeakMap;function Os(e){return Ye.has(e)||Ye.set(e,Rs(e)),Ye.get(e)}var $e=Os;function Bs(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&k(s)===w(t)&&$e(s)&&$e(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[w(s),k(t)]),!ze(s)&&!z(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var ti=Bs;var he=null;function ce(e){if(he!==null&&typeof he.property){let t=he;return he=ce.prototype=null,t}return he=ce.prototype=e??Object.create(null),new ce}var Ds=10;for(let e=0;e<=Ds;e++)ce();function Ze(e){return ce(e)}function Fs(e,t="type"){Ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ii=Fs;var si={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","t
Line truncated
|
||||
`;e=se(!1,e.replace(qs,"").replace(Gs,""),Ws,"$1");let i="";for(;i!==e;)i=e,e=se(!1,e,Ks,`${t}$1 $2${t}`);e=e.replace(ui,"").trimEnd();let s=Object.create(null),r=se(!1,e,pi,"").replace(ui,"").trimEnd(),n;for(;n=pi.exec(e);){let o=se(!1,n[2],Hs,"");if(typeof s[n[1]]=="string"||Array.isArray(s[n[1]])){let p=s[n[1]];s[n[1]]=[...Xs,...Array.isArray(p)?p:[p],o]}else s[n[1]]=o}return{comments:r,pragmas:s}}var li=["noformat","noprettier"],fi=["format","prettier"];function zs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var di=zs;function mi(e){let t=di(e);t&&(e=e.slice(t.length+1));let i=hi(e),{pragmas:s,comments:r}=ci(i);return{shebang:t,text:e,pragmas:s,comments:r}}function xi(e){let{pragmas:t}=mi(e);return fi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function yi(e){let{pragmas:t}=mi(e);return li.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Qs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:xi,hasIgnorePragma:yi,locStart:w,locEnd:k,...e}}var Ae=Qs;var we="module",gi="script",Pe=[we,gi];function Ie(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return we;if(/\.(?:cjs|cts)$/iu.test(e))return gi}}var Ys={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function $s(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return Ce(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var vi,Zs=()=>(vi??(vi=E.extend((0,bi.default)())),vi);function er(e,t){let i=Zs(),s=[],r=i.parse(e,{...Ys,sourceType:t,allowImportExportEverywhere:t===we,onComment:s});return r.comments=s,r}function tr(e,t){let i=Ie(t==null?void 0:t.filepath),s=(i?[i]:Pe).map(n=>()=>er(e,n)),r;try{r=Ee(s)}catch({errors:[n]}){throw $s(n)}return ke(r,{text:e})}var Si=Ae(tr);var Ei=ot(Xe(),1);var I={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ir(e,t){let i=e[0],s=te(!1,e,-1),r={type:I.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function it(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}it.prototype={constructor:it,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=I.Identifier,e.value==="static"&&(e.type=I.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=I.Keyword);else if(i===s.privateId)e.type=I.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=I.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=I.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=I.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=I.Boolean:i.keyword==="null"?e.type=I.Null:e.type=I.Keyword;else if(i===s.num)e.type=I.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=I.JSXText):e.type=I.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=I.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(ir(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var _i=it;var Ti=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function sr(){return te(!1,Ti,-1)}function rr(e=5){let t=e==="latest"?sr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ti.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ar(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ci(e){let t=rr(e.ecmaVersion),i=ar(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'm
Line truncated
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[st](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var or={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=E.extend(rt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=E.extend((0,Ei.default)(),rt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function ki(e,t){let i=or.get(t);return new i(t,e).parse()}var ur={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function pr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:Ce(t,{loc:{start:{line:i,column:s}},cause:e})}function hr(e,t){let i=Ie(t==null?void 0:t.filepath),s=(i?[i]:Pe).map(n=>()=>ki(e,{...ur,sourceType:n})),r;try{r=Ee(s)}catch({errors:[n]}){throw pr(n)}return ke(r,{parser:"espree",text:e})}var Ai=Ae(hr);var cr={acorn:Si,espree:Ai};var cn=at;export{cn as default,cr as parsers};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__ng_action: Parser;
|
||||
__ng_binding: Parser;
|
||||
__ng_directive: Parser;
|
||||
__ng_interpolation: Parser;
|
||||
};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var dt=Object.defineProperty;var qs=Object.getOwnPropertyDescriptor;var js=Object.getOwnPropertyNames;var zs=Object.prototype.hasOwnProperty;var tn=t=>{throw TypeError(t)};var nn=(t,e)=>{for(var n in e)dt(t,n,{get:e[n],enumerable:!0})},Gs=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of js(e))!zs.call(t,r)&&r!==n&&dt(t,r,{get:()=>e[r],enumerable:!(s=qs(e,r))||s.enumerable});return t};var Xs=t=>Gs(dt({},"__esModule",{value:!0}),t);var mt=(t,e,n)=>e.has(t)||tn("Cannot "+n);var L=(t,e,n)=>(mt(t,e,"read from private field"),n?n.call(t):e.get(t)),V=(t,e,n)=>e.has(t)?tn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(mt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),c=(t,e,n)=>(mt(t,e,"access private method"),n);var si={};nn(si,{parsers:()=>Zt});var Zt={};nn(Zt,{__ng_action:()=>Zr,__ng_binding:()=>ei,__ng_directive:()=>ni,__ng_interpolation:()=>ti});var ii=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var sn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(sn||(sn={}));var rn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(rn||(rn={}));var on;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(on||(on={}));var D;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(D||(D={}));var an;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(an||(an={}));var ln;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(ln||(ln={}));var cn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(cn||(cn={}));var un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(un||(un={}));var pn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(pn||(pn={}));var hn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(hn||(hn={}));var fn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(fn||(fn={}));var Js=void 0;var dn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(dn||(dn={}));var _;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseOr=11]="BitwiseOr",t[t.BitwiseAnd=12]="BitwiseAnd",t[t.Lower=13]="Lower",t[t.LowerEquals=14]="LowerEquals",t[t.Bigger=15]="Bigger",t[t.BiggerEquals=16]="BiggerEquals",t[t.NullishCoalesce=17]="NullishCoalesce",t[t.Exponentiation=18]="Exponentiation",t[t.In=19]="In"})(_||(_={}));function Ys(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function Qs(t,e,n){let s=t.length;if(s!==e.length)return!1;for(let r=0;r<s;r++)if(!n(t[r],e[r]))return!1;return!0}function ct(t,e){return Qs(t,e,(n,s)=>n.isEquivalent(s))}var b=class{type;sourceSpan;constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new Ct(this,e,null,n)}key(e,n,s){return new Tt(this,e,n,s)}callFn(e,n,s){return new St(this,e,null,n,s)}instantiate(e,n,s){return new Et(this,e,n,s)}conditional(e,n=null,s){return new _t(this,e,n,null,s)}equals(e,n){return new C(_.Equals,this,e,null,n)}notEquals(e,n){return new C(_.NotEquals,this,e,null,n)}identical(e,n){return new C(_.Identical,this,e,null,n)}notIdentical(e,n){return new C(_.NotIdentical,this,e,null,n)}minus(e,n){return new C(_.Minus,this,e,null,n)}plus(e,n){return new C(_.Plus,this,e,null,n)}divide(e,n){return new C(_.Divide,this,e,null,n)}multiply(e,n){return new C(_.Multiply,this,e,null,n)}modulo(e,n){return new C(_.Modulo,this,e,null,n)}power(e,n){return new C(_.Exponentiation,this,e,null,n)}and(e,n){return new C(_.And,this,e,null,n)}bitwiseOr(e,n){return new C(_.BitwiseOr,this,e,null,n)}bitwiseAnd(e,n){return new C(_.BitwiseAnd,this,e,null,n)}or(e,n){return new C(_.Or,this,e,null,n)}lower(e,n){return new C(_.Lower,this,e,null,n)}lowerEquals(e,n){return new C(_.LowerEquals,this,e,null,n)}bigger(e,n){return new C(_.Bigger,this,e,null,n)}biggerEquals(e,n){return new C(_.BiggerEquals,this,e,null,n)}isBlank(e){return this.equals(TYPED_NLine truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,ki=new RegExp(`[^${ds}]`),bi=new RegExp(`[${ds}]{2,}`,"g");var m;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.Error=7]="Error"})(m||(m={}));var q;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(q||(q={}));var Lr=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],qe=class{tokenize(e){return new Bt(e).scan()}},M=class{index;end;type;numValue;strValue;constructor(e,n,s,r,i){this.index=e,this.end=n,this.type=s,this.numValue=r,this.strValue=i}isCharacter(e){return this.type===m.Character&&this.numValue===e}isNumber(){return this.type===m.Number}isString(){return this.type===m.String}isOperator(e){return this.type===m.Operator&&this.strValue===e}isIdentifier(){return this.type===m.Identifier}isPrivateIdentifier(){return this.type===m.PrivateIdentifier}isKeyword(){return this.type===m.Keyword}isKeywordLet(){return this.type===m.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===m.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===m.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===m.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===m.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===m.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===m.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===m.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===m.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===m.Keyword&&this.strValue==="in"}isError(){return this.type===m.Error}toNumber(){return this.type===m.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===q.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===q.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}isTemplateLiteralInterpolationEnd(){return this.isOperator("}")}toString(){switch(this.type){case m.Character:case m.Identifier:case m.Keyword:case m.Operator:case m.PrivateIdentifier:case m.String:case m.Error:return this.strValue;case m.Number:return this.numValue.toString();default:return null}}},Ie=class extends M{kind;constructor(e,n,s,r){super(e,n,m.String,0,s),this.kind=r}};function Ze(t,e,n){return new M(t,e,m.Character,n,String.fromCharCode(n))}function Mr(t,e,n){return new M(t,e,m.Identifier,0,n)}function $r(t,e,n){return new M(t,e,m.PrivateIdentifier,0,n)}function Rr(t,e,n){return new M(t,e,m.Keyword,0,n)}function _e(t,e,n){return new M(t,e,m.Operator,0,n)}function Dr(t,e,n){return new M(t,e,m.Number,n,"")}function Br(t,e,n){return new M(t,e,m.Error,0,n)}var et=new M(-1,-1,m.Character,0,""),Bt=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Qe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,r=this.index;for(;s<=Zn;)if(++r>=n){s=Qe;break}else s=e.charCodeAt(r);if(this.peek=s,this.index=r,r>=n)return null;if(zn(s))return this.scanIdentifier();if(z(s))return this.scanNumber(r);let i=r;switch(s){case re:return this.advance(),z(this.peek)?this.scanNumber(i):Ze(i,this.index,re);case tt:case se:case nt:case ke:case Ce:case ie:case Te:return this.scanCharacter(i,s);case ot:return this.scanOpenBrace(i,s);case be:return this.scanCloseBrace(i,s);case ts:case es:return this.scanString();case Rt:return this.advance(),this.scanTemplateLiteralPart(i);case or:return this.scanPrivateIdentifier();case ns:case ss:case $t:case ar:case fr:return this.scanOperator(i,String.fromCharCode(s));case En:return this.scanComplexOperator(i,"*",En,"*");case yn:return this.scanQuestion(i);case lr:case cr:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=");case ir:case Ke:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=",Ke,"=");case Sn:return this.scanComplexOperator(i,"&",Sn,"&");case Cn:return this.scanComplexOperator(i,"|",Cn,"|");case ls:for(;Er(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,n){return this.advance(),Ze(e,this.index,n)}scanOperator(e,n){return this.advance(),_e(e,this.index,n)}scanOpenBrace(e,n){return this.braceStack.push("expression"),this.advance(),Ze(e,this.index,n)}scanCloseBrace(e,n){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(_e(e,this.index,"}")),this.scanTemplateLiteralPart(this.index)):Ze(e,this.index,n)}scanComplexOperator(e,n,s,
Line truncated
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
var qs=Object.defineProperty;var tn=n=>{throw TypeError(n)};var nn=(n,e)=>{for(var t in e)qs(n,t,{get:e[t],enumerable:!0})};var dt=(n,e,t)=>e.has(n)||tn("Cannot "+t);var L=(n,e,t)=>(dt(n,e,"read from private field"),t?t.call(n):e.get(n)),V=(n,e,t)=>e.has(n)?tn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),te=(n,e,t,s)=>(dt(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),c=(n,e,t)=>(dt(n,e,"access private method"),t);var Zt={};nn(Zt,{parsers:()=>Kt});var Kt={};nn(Kt,{__ng_action:()=>Jr,__ng_binding:()=>Yr,__ng_directive:()=>Kr,__ng_interpolation:()=>Qr});var ei=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var sn;(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"})(sn||(sn={}));var rn;(function(n){n[n.OnPush=0]="OnPush",n[n.Default=1]="Default"})(rn||(rn={}));var on;(function(n){n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(on||(on={}));var D;(function(n){n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL"})(D||(D={}));var an;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Ignore=2]="Ignore"})(an||(an={}));var ln;(function(n){n[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule"})(ln||(ln={}));var cn;(function(n){n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule"})(cn||(cn={}));var un;(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"})(un||(un={}));var pn;(function(n){n[n.Little=0]="Little",n[n.Big=1]="Big"})(pn||(pn={}));var hn;(function(n){n[n.None=0]="None",n[n.Const=1]="Const"})(hn||(hn={}));var fn;(function(n){n[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None"})(fn||(fn={}));var js=void 0;var dn;(function(n){n[n.Minus=0]="Minus",n[n.Plus=1]="Plus"})(dn||(dn={}));var _;(function(n){n[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Identical=2]="Identical",n[n.NotIdentical=3]="NotIdentical",n[n.Minus=4]="Minus",n[n.Plus=5]="Plus",n[n.Divide=6]="Divide",n[n.Multiply=7]="Multiply",n[n.Modulo=8]="Modulo",n[n.And=9]="And",n[n.Or=10]="Or",n[n.BitwiseOr=11]="BitwiseOr",n[n.BitwiseAnd=12]="BitwiseAnd",n[n.Lower=13]="Lower",n[n.LowerEquals=14]="LowerEquals",n[n.Bigger=15]="Bigger",n[n.BiggerEquals=16]="BiggerEquals",n[n.NullishCoalesce=17]="NullishCoalesce",n[n.Exponentiation=18]="Exponentiation",n[n.In=19]="In"})(_||(_={}));function zs(n,e){return n==null||e==null?n==e:n.isEquivalent(e)}function Gs(n,e,t){let s=n.length;if(s!==e.length)return!1;for(let r=0;r<s;r++)if(!t(n[r],e[r]))return!1;return!0}function ct(n,e){return Gs(n,e,(t,s)=>t.isEquivalent(s))}var b=class{type;sourceSpan;constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new _t(this,e,null,t)}key(e,t,s){return new Ct(this,e,t,s)}callFn(e,t,s){return new xt(this,e,null,t,s)}instantiate(e,t,s){return new St(this,e,t,s)}conditional(e,t=null,s){return new yt(this,e,t,null,s)}equals(e,t){return new C(_.Equals,this,e,null,t)}notEquals(e,t){return new C(_.NotEquals,this,e,null,t)}identical(e,t){return new C(_.Identical,this,e,null,t)}notIdentical(e,t){return new C(_.NotIdentical,this,e,null,t)}minus(e,t){return new C(_.Minus,this,e,null,t)}plus(e,t){return new C(_.Plus,this,e,null,t)}divide(e,t){return new C(_.Divide,this,e,null,t)}multiply(e,t){return new C(_.Multiply,this,e,null,t)}modulo(e,t){return new C(_.Modulo,this,e,null,t)}power(e,t){return new C(_.Exponentiation,this,e,null,t)}and(e,t){return new C(_.And,this,e,null,t)}bitwiseOr(e,t){return new C(_.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new C(_.BitwiseAnd,this,e,null,t)}or(e,t){return new C(_.Or,this,e,null,t)}lower(e,t){return new C(_.Lower,this,e,null,t)}lowerEquals(e,t){return new C(_.LowerEquals,this,e,null,t)}bigger(e,t){return new C(_.Bigger,this,e,null,t)}biggerEquals(e,t){return new C(_.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(TYPED_NULL_EXPR,e)}nullishCoalesce(e,t){return new C(_.NullishCoalesce,this,e,null,t)}toStmt(){return new It(this,null)}},st=class n extends b{name;constructor(e,t,s){super(t,s),this.name=e}isEquivalent(e){return e instanceof n&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(e){return new gt(this.name,e,null,this.sourceSpan)}},mt=class n extends b{expr;constructor(e,t,s){super(t,s),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof n&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}};varLine truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Ei=new RegExp(`[^${ds}]`),yi=new RegExp(`[${ds}]{2,}`,"g");var m;(function(n){n[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.Error=7]="Error"})(m||(m={}));var q;(function(n){n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(q||(q={}));var Ir=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],qe=class{tokenize(e){return new Dt(e).scan()}},M=class{index;end;type;numValue;strValue;constructor(e,t,s,r,i){this.index=e,this.end=t,this.type=s,this.numValue=r,this.strValue=i}isCharacter(e){return this.type===m.Character&&this.numValue===e}isNumber(){return this.type===m.Number}isString(){return this.type===m.String}isOperator(e){return this.type===m.Operator&&this.strValue===e}isIdentifier(){return this.type===m.Identifier}isPrivateIdentifier(){return this.type===m.PrivateIdentifier}isKeyword(){return this.type===m.Keyword}isKeywordLet(){return this.type===m.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===m.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===m.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===m.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===m.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===m.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===m.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===m.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===m.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===m.Keyword&&this.strValue==="in"}isError(){return this.type===m.Error}toNumber(){return this.type===m.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===q.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===q.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}isTemplateLiteralInterpolationEnd(){return this.isOperator("}")}toString(){switch(this.type){case m.Character:case m.Identifier:case m.Keyword:case m.Operator:case m.PrivateIdentifier:case m.String:case m.Error:return this.strValue;case m.Number:return this.numValue.toString();default:return null}}},Ie=class extends M{kind;constructor(e,t,s,r){super(e,t,m.String,0,s),this.kind=r}};function Ze(n,e,t){return new M(n,e,m.Character,t,String.fromCharCode(t))}function Nr(n,e,t){return new M(n,e,m.Identifier,0,t)}function Ar(n,e,t){return new M(n,e,m.PrivateIdentifier,0,t)}function Pr(n,e,t){return new M(n,e,m.Keyword,0,t)}function _e(n,e,t){return new M(n,e,m.Operator,0,t)}function Lr(n,e,t){return new M(n,e,m.Number,t,"")}function Mr(n,e,t){return new M(n,e,m.Error,0,t)}var et=new M(-1,-1,m.Character,0,""),Dt=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Qe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,r=this.index;for(;s<=Zn;)if(++r>=t){s=Qe;break}else s=e.charCodeAt(r);if(this.peek=s,this.index=r,r>=t)return null;if(zn(s))return this.scanIdentifier();if(z(s))return this.scanNumber(r);let i=r;switch(s){case re:return this.advance(),z(this.peek)?this.scanNumber(i):Ze(i,this.index,re);case tt:case se:case nt:case ke:case Ce:case ie:case Te:return this.scanCharacter(i,s);case ot:return this.scanOpenBrace(i,s);case be:return this.scanCloseBrace(i,s);case ts:case es:return this.scanString();case $t:return this.advance(),this.scanTemplateLiteralPart(i);case nr:return this.scanPrivateIdentifier();case ns:case ss:case Mt:case sr:case cr:return this.scanOperator(i,String.fromCharCode(s));case En:return this.scanComplexOperator(i,"*",En,"*");case yn:return this.scanQuestion(i);case rr:case ir:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=");case tr:case Ke:return this.scanComplexOperator(i,String.fromCharCode(s),Ke,"=",Ke,"=");case Sn:return this.scanComplexOperator(i,"&",Sn,"&");case Cn:return this.scanComplexOperator(i,"|",Cn,"|");case ls:for(;vr(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),Ze(e,this.index,t)}scanOperator(e,t){return this.advance(),_e(e,this.index,t)}scanOpenBrace(e,t){return this.braceStack.push("expression"),this.advance(),Ze(e,this.index,t)}scanCloseBrace(e,t){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(_e(e,this.index,"}")),this.scanTemplateLiteralPart(this.index)):Ze(e,this.index,t)}scanComplexOperator(e,t,s,
Line truncated
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__babel_estree: Parser;
|
||||
__js_expression: Parser;
|
||||
__ts_expression: Parser;
|
||||
__vue_event_binding: Parser;
|
||||
__vue_expression: Parser;
|
||||
__vue_ts_event_binding: Parser;
|
||||
__vue_ts_expression: Parser;
|
||||
babel: Parser;
|
||||
"babel-flow": Parser;
|
||||
"babel-ts": Parser;
|
||||
json: Parser;
|
||||
"json-stringify": Parser;
|
||||
json5: Parser;
|
||||
jsonc: Parser;
|
||||
};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var Ti=Object.create;var be=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Ai=Object.getOwnPropertyNames;var Si=Object.getPrototypeOf,Ei=Object.prototype.hasOwnProperty;var Ci=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Ue=(a,t)=>{for(var e in t)be(a,e,{get:t[e],enumerable:!0})},os=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ai(t))!Ei.call(a,i)&&i!==e&&be(a,i,{get:()=>t[i],enumerable:!(s=bi(t,i))||s.enumerable});return a};var ls=(a,t,e)=>(e=a!=null?Ti(Si(a)):{},os(t||!a||!a.__esModule?be(e,"default",{value:a,enumerable:!0}):e,a)),wi=a=>os(be({},"__esModule",{value:!0}),a);var Tt=Ci(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});function Ii(a,t){if(a==null)return{};var e={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(t.indexOf(s)!==-1)continue;e[s]=a[s]}return e}var B=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},se=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function D(a,t){let{line:e,column:s,index:i}=a;return new B(e,s+t,i+t)}var hs="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Ni={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:hs},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:hs}},cs={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ee=a=>a.type==="UpdateExpression"?cs.UpdateExpression[`${a.prefix}`]:cs[a.type],ki={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlocLine truncated
|
||||
- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Ee(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Ee(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Ee(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allLine truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):ee(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(e,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Z(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:xt(this.state.type)?e.name=H(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(C.brace),this.next(),e=this.jsxParseExpressionContainer(e,C.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(J.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(J.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(C.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(C.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(C.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],r=this.jsxParseOpeningElementAt(e),n=null;if(!r.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e);break e}i.push(this.jsxParseElementAt(e));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(C.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,C.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(J.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(J.MissingClosingTagElement,n,{openingTagName:Q(r.name)}):!q(r)&&!q(n)&&Q(n.name)!==Q(r.name)&&this.raise(J.MissingClosingTagElement,n,{openingTagName:Q(r.name)})}if(q(r)?(s.openingFragment=r,s.closingFragment=n):(s.openingElement=r,s.closingElement=n),s.children=i,this.match(47))throw this.raise(J.UnwrappedAdjacentJSXElements,this.state.startLoc);return q(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"
Line truncated
|
||||
`,++e,d===13&&t.charCodeAt(e)===10&&++e,++i,u=s=e):r.unterminated(n,o,l):++e}return{pos:e,str:h,firstInvalidLoc:c,lineStart:s,curLine:i,containsInvalid:!!c}}function gr(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function Tr(a,t,e,s,i,r){let n=!i;t++;let o=h=>({pos:t,ch:h,lineStart:e,curLine:s}),l=a.charCodeAt(t++);switch(l){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let h;return{code:h,pos:t}=et(a,t,e,s,2,!1,n,r),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:t}=Ms(a,t,e,s,n,r),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){let h=t-1,u=/^[0-7]+/.exec(a.slice(h,t+2))[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(h,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function et(a,t,e,s,i,r,n,o){let l=t,h;return{n:h,pos:t}=Ds(a,t,e,s,16,i,r,!1,o,!n),h===null&&(n?o.invalidEscapeSequence(l,e,s):t=l-1),{code:h,pos:t}}function Ds(a,t,e,s,i,r,n,o,l,h){let c=t,u=i===16?ys.hex:ys.decBinOct,f=i===16?Se.hex:i===10?Se.dec:i===8?Se.oct:Se.bin,d=!1,x=0;for(let A=0,N=r??1/0;A<N;++A){let S=a.charCodeAt(t),I;if(S===95&&o!=="bail"){let W=a.charCodeAt(t-1),$=a.charCodeAt(t+1);if(o){if(Number.isNaN($)||!f($)||u.has(W)||u.has($)){if(h)return{n:null,pos:t};l.unexpectedNumericSeparator(t,e,s)}}else{if(h)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(S>=97?I=S-97+10:S>=65?I=S-65+10:Pr(S)?I=S-48:I=1/0,I>=i){if(I<=9&&h)return{n:null,pos:t};if(I<=9&&l.invalidDigit(t,e,s,i))I=0;else if(n)I=0,d=!0;else break}++t,x=x*i+I}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:x,pos:t}}function Ms(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=et(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=et(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function pe(a,t,e){return new B(e,a-t,a)}var br=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new se(t.startLoc,t.endLoc)}},tt=class extends Qe{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.optionFlags&2048?(this.raise(p.InvalidDigit,pe(s,i,r),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,pe(s,i,r))},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,pe(s-1,i,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,pe(s,i,r))}}),this.state=new Ze,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new O(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return $e.lastIndex=t,$e.test(this.input)?$e.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ve.lastIndex=t,Ve.test(this.input)?Ve.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.co
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,h)},o.tail=l,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,D(this.state.lastTokEndLoc,h)),u}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),n=this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(l,h)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let l=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!l&&this.maybeAsyncOrAccessorProp(s)){let{key:h}=s,c=h.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(h),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(h),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,r,n,o){let l=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 135:r=this.parseNumericLiteral(i);break;case 134:r=this.parseStringLiteral(i);break;case 136:r=this.parseBigIntLiteral(i);break;case 139:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:if(s===137){r=this.parseDecimalLiteral(i);break}this.unexpected()}t.key=r,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(we(s,t.generator)),this.parseFunctionParams(t,i);let l=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTup
Line truncated
|
||||
`)return t-2;if(i===`
|
||||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t-1}else{if(i==="\r"&&a.charAt(t+1)===`
|
||||
`)return t+2;if(i===`
|
||||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var Vs=Hr;function Kr(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?js(a,t):t}var qs=Kr;function Wr(a,t){let e=null,s=t;for(;s!==e;)e=s,s=Us(a,s),s=$s(a,s),s=qs(a,s),s=Vs(a,s);return s}var zs=Wr;function Jr(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Hs=Jr;function Xr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(`
|
||||
`);return t===-1?a:a.slice(0,t)}var De=Xr;var Gr=(a,t,e)=>{if(!(a&&t==null)){if(t.findLast)return t.findLast(e);for(let s=t.length-1;s>=0;s--){let i=t[s];if(e(i,s,t))return i}}},Ks=Gr;var Yr=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Ws=Yr;var Qr=new Proxy(()=>{},{get:()=>Qr});function v(a){var s,i,r;let t=((s=a.range)==null?void 0:s[0])??a.start,e=(r=((i=a.declaration)==null?void 0:i.decorators)??a.decorators)==null?void 0:r[0];return e?Math.min(v(e),t):t}function k(a){var e;return((e=a.range)==null?void 0:e[1])??a.end}function Zr(a){let t=new Set(a);return e=>t.has(e==null?void 0:e.type)}var ae=Zr;function ea(a,t,e){let s=a.originalText.slice(t,e);for(let i of a[Symbol.for("comments")]){let r=v(i);if(r>e)break;let n=k(i);if(n<t)continue;let o=n-r;s=s.slice(0,r-t)+" ".repeat(o)+s.slice(n-t)}return s}var Js=ea;var ta=ae(["Block","CommentBlock","MultiLine"]),G=ta;var sa=ae(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),bt=sa;var At=new WeakMap;function ia(a){return At.has(a)||At.set(a,G(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(a.value)),At.get(a)}var Xs=ia;function ra(a){if(!G(a))return!1;let t=`*${a.value}*`.split(`
|
||||
`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var St=new WeakMap;function aa(a){return St.has(a)||St.set(a,ra(a)),St.get(a)}var Et=aa;function na(a){if(a.length<2)return;let t;for(let e=a.length-1;e>=0;e--){let s=a[e];if(t&&k(s)===v(t)&&Et(s)&&Et(t)&&(a.splice(e+1,1),s.value+="*//*"+t.value,s.range=[v(s),k(t)]),!bt(s)&&!G(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var Gs=na;var ge=null;function Te(a){if(ge!==null&&typeof ge.property){let t=ge;return ge=Te.prototype=null,t}return ge=Te.prototype=a??Object.create(null),new Te}var oa=10;for(let a=0;a<=oa;a++)Te();function Ct(a){return Te(a)}function la(a,t="type"){Ct(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var Ys=la;var Qs={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","t
Line truncated
|
||||
`;a=ne(!1,a.replace(ma,"").replace(da,""),ga,"$1");let e="";for(;e!==a;)e=a,a=ne(!1,a,Pa,`${t}$1 $2${t}`);a=a.replace(ai,"").trimEnd();let s=Object.create(null),i=ne(!1,a,ni,"").replace(ai,"").trimEnd(),r;for(;r=ni.exec(a);){let n=ne(!1,r[2],xa,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...Ta,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var hi=["noformat","noprettier"],ci=["format","prettier"];function pi(a){let t=De(a);t&&(a=a.slice(t.length+1));let e=oi(a),{pragmas:s,comments:i}=li(e);return{shebang:t,text:a,pragmas:s,comments:i}}function ui(a){let{pragmas:t}=pi(a);return ci.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function fi(a){let{pragmas:t}=pi(a);return hi.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function ba(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:ui,hasIgnorePragma:fi,locStart:v,locEnd:k,...a}}var Y=ba;var Nt="module",kt="script";function di(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/iu.test(a))return Nt;if(/\.(?:cjs|cts)$/iu.test(a))return kt}}function Aa(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Fe=Aa;var oe=a=>Y(Ia(a)),Sa={sourceType:Nt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","explicitResourceManagement","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!1,ranges:!1},mi="v8intrinsic",yi=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,t=Sa)=>({...t,plugins:[...t.plugins,...a]}),Ea=/@(?:no)?flow\b/u;function Ca(a,t){if(t!=null&&t.endsWith(".js.flow"))return!0;let e=De(a);e&&(a=a.slice(e.length));let s=zs(a,0);return s!==!1&&(a=a.slice(0,s)),Ea.test(a)}function wa(a,t,e){let s=a(t,e),i=s.errors.find(r=>!Na.has(r.reasonCode));if(i)throw i;return s}function Ia({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&Ca(e,i))return s.parser="babel-flow",Pi.parse(e,s);let r=t,n=s.__babelSourceType??di(i);n===kt&&(r=r.map(c=>({...c,sourceType:n})));let o=/%[A-Z]/u.test(e);e.includes("|>")?r=(o?[...yi,mi]:yi).flatMap(u=>r.map(f=>j([u],f))):o&&(r=r.map(c=>j([mi],c)));let l=a?Be.parseExpression:Be.parse,h;try{h=Hs(r.map(c=>()=>wa(l,e,c)))}catch({errors:[c]}){throw Oe(c)}return a&&(h=Fe(h,{text:e,rootMarker:s.rootMarker})),ii(h,{text:e})}}var Na=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),xi=[j(["jsx"])],ka=oe({optionsCombinations:xi}),va=oe({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),La=oe({isExpression:!0,optionsCombinations:[j(["jsx"])]}),Da=oe({isExpression:!0,optionsCombinations:[j(["typescript"])]}),Pi=oe({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),Ma=oe({optionsCombinations:xi.map(a=>j(["estree"],a))});var Dt={};Ue(Dt,{json:()=>Ba,"json-stringify":()=>Ua,json5:()=>Ra,jsonc:()=>_a});var Re=ls(Tt(),1);function Oa(a){return Array.isArray(a)&&a.length>0}var Lt=Oa;var gi={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Fa(a){let t=(0,Re.parse)(a,gi),{program:e}=t;if(e.body.length===0&&e.directives.length===0&&!e.interpreter)return t}function _e(a,t={}){let{allowComments:e=!0,allowEmpty:s=!1}=t,i;try{i=(0,Re.parseExpression)(a,gi)}catch(r){if(s&&r.code==="BABEL_PARSER_SYNTAX_ERROR"&&r.reasonCode==="ParseExpressionEmptyInput")try{i=Fa(a)}catch{}if(!i)throw Oe(r)}if(!e&&Lt(i.comments))throw K(i.comments[0],"Comment");return i=Fe(i,{type:"JsonRoot",text:a}),i.node.type==="File"?delete i.node:le(i.node),i}function K(a,t){let[e,s]=[a.loc.start,a.
Line truncated
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
var Ti=Object.create;var _e=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Ai=Object.getOwnPropertyNames;var Si=Object.getPrototypeOf,Ei=Object.prototype.hasOwnProperty;var Ci=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Ue=(a,t)=>{for(var e in t)_e(a,e,{get:t[e],enumerable:!0})},wi=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ai(t))!Ei.call(a,i)&&i!==e&&_e(a,i,{get:()=>t[i],enumerable:!(s=bi(t,i))||s.enumerable});return a};var ls=(a,t,e)=>(e=a!=null?Ti(Si(a)):{},wi(t||!a||!a.__esModule?_e(e,"default",{value:a,enumerable:!0}):e,a));var Tt=Ci(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});function Ii(a,t){if(a==null)return{};var e={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(t.indexOf(s)!==-1)continue;e[s]=a[s]}return e}var B=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},se=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function D(a,t){let{line:e,column:s,index:i}=a;return new B(e,s+t,i+t)}var hs="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Ni={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:hs},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:hs}},cs={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Se=a=>a.type==="UpdateExpression"?cs.UpdateExpression[`${a.prefix}`]:cs[a.type],ki={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one defaLine truncated
|
||||
- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Se(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Se(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Se(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allLine truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):ee(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(e,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Z(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:xt(this.state.type)?e.name=H(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(C.brace),this.next(),e=this.jsxParseExpressionContainer(e,C.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(J.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(J.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(C.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(C.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(C.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],r=this.jsxParseOpeningElementAt(e),n=null;if(!r.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e);break e}i.push(this.jsxParseElementAt(e));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(C.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,C.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(J.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(J.MissingClosingTagElement,n,{openingTagName:Q(r.name)}):!q(r)&&!q(n)&&Q(n.name)!==Q(r.name)&&this.raise(J.MissingClosingTagElement,n,{openingTagName:Q(r.name)})}if(q(r)?(s.openingFragment=r,s.closingFragment=n):(s.openingElement=r,s.closingElement=n),s.children=i,this.match(47))throw this.raise(J.UnwrappedAdjacentJSXElements,this.state.startLoc);return q(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"
Line truncated
|
||||
`,++e,d===13&&t.charCodeAt(e)===10&&++e,++i,u=s=e):r.unterminated(n,o,l):++e}return{pos:e,str:h,firstInvalidLoc:c,lineStart:s,curLine:i,containsInvalid:!!c}}function gr(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function Tr(a,t,e,s,i,r){let n=!i;t++;let o=h=>({pos:t,ch:h,lineStart:e,curLine:s}),l=a.charCodeAt(t++);switch(l){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let h;return{code:h,pos:t}=et(a,t,e,s,2,!1,n,r),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:t}=Ms(a,t,e,s,n,r),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){let h=t-1,u=/^[0-7]+/.exec(a.slice(h,t+2))[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(h,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function et(a,t,e,s,i,r,n,o){let l=t,h;return{n:h,pos:t}=Ds(a,t,e,s,16,i,r,!1,o,!n),h===null&&(n?o.invalidEscapeSequence(l,e,s):t=l-1),{code:h,pos:t}}function Ds(a,t,e,s,i,r,n,o,l,h){let c=t,u=i===16?ys.hex:ys.decBinOct,f=i===16?Ae.hex:i===10?Ae.dec:i===8?Ae.oct:Ae.bin,d=!1,x=0;for(let A=0,N=r??1/0;A<N;++A){let S=a.charCodeAt(t),I;if(S===95&&o!=="bail"){let W=a.charCodeAt(t-1),$=a.charCodeAt(t+1);if(o){if(Number.isNaN($)||!f($)||u.has(W)||u.has($)){if(h)return{n:null,pos:t};l.unexpectedNumericSeparator(t,e,s)}}else{if(h)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(S>=97?I=S-97+10:S>=65?I=S-65+10:Pr(S)?I=S-48:I=1/0,I>=i){if(I<=9&&h)return{n:null,pos:t};if(I<=9&&l.invalidDigit(t,e,s,i))I=0;else if(n)I=0,d=!0;else break}++t,x=x*i+I}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:x,pos:t}}function Ms(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=et(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=et(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function pe(a,t,e){return new B(e,a-t,a)}var br=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new se(t.startLoc,t.endLoc)}},tt=class extends Qe{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.optionFlags&2048?(this.raise(p.InvalidDigit,pe(s,i,r),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,pe(s,i,r))},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,pe(s-1,i,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,pe(s,i,r))}}),this.state=new Ze,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new O(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return $e.lastIndex=t,$e.test(this.input)?$e.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ve.lastIndex=t,Ve.test(this.input)?Ve.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.co
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,h)},o.tail=l,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,D(this.state.lastTokEndLoc,h)),u}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),n=this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(l,h)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let l=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!l&&this.maybeAsyncOrAccessorProp(s)){let{key:h}=s,c=h.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(h),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(h),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,r,n,o){let l=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 135:r=this.parseNumericLiteral(i);break;case 134:r=this.parseStringLiteral(i);break;case 136:r=this.parseBigIntLiteral(i);break;case 139:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:if(s===137){r=this.parseDecimalLiteral(i);break}this.unexpected()}t.key=r,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Ce(s,t.generator)),this.parseFunctionParams(t,i);let l=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTup
Line truncated
|
||||
`)return t-2;if(i===`
|
||||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t-1}else{if(i==="\r"&&a.charAt(t+1)===`
|
||||
`)return t+2;if(i===`
|
||||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var Vs=Hr;function Kr(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?js(a,t):t}var qs=Kr;function Wr(a,t){let e=null,s=t;for(;s!==e;)e=s,s=Us(a,s),s=$s(a,s),s=qs(a,s),s=Vs(a,s);return s}var zs=Wr;function Jr(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Hs=Jr;function Xr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(`
|
||||
`);return t===-1?a:a.slice(0,t)}var Le=Xr;var Gr=(a,t,e)=>{if(!(a&&t==null)){if(t.findLast)return t.findLast(e);for(let s=t.length-1;s>=0;s--){let i=t[s];if(e(i,s,t))return i}}},Ks=Gr;var Yr=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Ws=Yr;var Qr=new Proxy(()=>{},{get:()=>Qr});function v(a){var s,i,r;let t=((s=a.range)==null?void 0:s[0])??a.start,e=(r=((i=a.declaration)==null?void 0:i.decorators)??a.decorators)==null?void 0:r[0];return e?Math.min(v(e),t):t}function k(a){var e;return((e=a.range)==null?void 0:e[1])??a.end}function Zr(a){let t=new Set(a);return e=>t.has(e==null?void 0:e.type)}var ae=Zr;function ea(a,t,e){let s=a.originalText.slice(t,e);for(let i of a[Symbol.for("comments")]){let r=v(i);if(r>e)break;let n=k(i);if(n<t)continue;let o=n-r;s=s.slice(0,r-t)+" ".repeat(o)+s.slice(n-t)}return s}var Js=ea;var ta=ae(["Block","CommentBlock","MultiLine"]),G=ta;var sa=ae(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),bt=sa;var At=new WeakMap;function ia(a){return At.has(a)||At.set(a,G(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(a.value)),At.get(a)}var Xs=ia;function ra(a){if(!G(a))return!1;let t=`*${a.value}*`.split(`
|
||||
`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var St=new WeakMap;function aa(a){return St.has(a)||St.set(a,ra(a)),St.get(a)}var Et=aa;function na(a){if(a.length<2)return;let t;for(let e=a.length-1;e>=0;e--){let s=a[e];if(t&&k(s)===v(t)&&Et(s)&&Et(t)&&(a.splice(e+1,1),s.value+="*//*"+t.value,s.range=[v(s),k(t)]),!bt(s)&&!G(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var Gs=na;var ge=null;function Te(a){if(ge!==null&&typeof ge.property){let t=ge;return ge=Te.prototype=null,t}return ge=Te.prototype=a??Object.create(null),new Te}var oa=10;for(let a=0;a<=oa;a++)Te();function Ct(a){return Te(a)}function la(a,t="type"){Ct(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var Ys=la;var Qs={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","t
Line truncated
|
||||
`;a=ne(!1,a.replace(ma,"").replace(da,""),ga,"$1");let e="";for(;e!==a;)e=a,a=ne(!1,a,Pa,`${t}$1 $2${t}`);a=a.replace(ai,"").trimEnd();let s=Object.create(null),i=ne(!1,a,ni,"").replace(ai,"").trimEnd(),r;for(;r=ni.exec(a);){let n=ne(!1,r[2],xa,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...Ta,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var hi=["noformat","noprettier"],ci=["format","prettier"];function pi(a){let t=Le(a);t&&(a=a.slice(t.length+1));let e=oi(a),{pragmas:s,comments:i}=li(e);return{shebang:t,text:a,pragmas:s,comments:i}}function ui(a){let{pragmas:t}=pi(a);return ci.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function fi(a){let{pragmas:t}=pi(a);return hi.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function ba(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:ui,hasIgnorePragma:fi,locStart:v,locEnd:k,...a}}var Y=ba;var Nt="module",kt="script";function di(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/iu.test(a))return Nt;if(/\.(?:cjs|cts)$/iu.test(a))return kt}}function Aa(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Oe=Aa;var oe=a=>Y(Ia(a)),Sa={sourceType:Nt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","explicitResourceManagement","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!1,ranges:!1},mi="v8intrinsic",yi=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,t=Sa)=>({...t,plugins:[...t.plugins,...a]}),Ea=/@(?:no)?flow\b/u;function Ca(a,t){if(t!=null&&t.endsWith(".js.flow"))return!0;let e=Le(a);e&&(a=a.slice(e.length));let s=zs(a,0);return s!==!1&&(a=a.slice(0,s)),Ea.test(a)}function wa(a,t,e){let s=a(t,e),i=s.errors.find(r=>!Na.has(r.reasonCode));if(i)throw i;return s}function Ia({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&Ca(e,i))return s.parser="babel-flow",Pi.parse(e,s);let r=t,n=s.__babelSourceType??di(i);n===kt&&(r=r.map(c=>({...c,sourceType:n})));let o=/%[A-Z]/u.test(e);e.includes("|>")?r=(o?[...yi,mi]:yi).flatMap(u=>r.map(f=>j([u],f))):o&&(r=r.map(c=>j([mi],c)));let l=a?Fe.parseExpression:Fe.parse,h;try{h=Hs(r.map(c=>()=>wa(l,e,c)))}catch({errors:[c]}){throw Me(c)}return a&&(h=Oe(h,{text:e,rootMarker:s.rootMarker})),ii(h,{text:e})}}var Na=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),xi=[j(["jsx"])],ka=oe({optionsCombinations:xi}),va=oe({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),La=oe({isExpression:!0,optionsCombinations:[j(["jsx"])]}),Da=oe({isExpression:!0,optionsCombinations:[j(["typescript"])]}),Pi=oe({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),Ma=oe({optionsCombinations:xi.map(a=>j(["estree"],a))});var Dt={};Ue(Dt,{json:()=>Ba,"json-stringify":()=>Ua,json5:()=>Ra,jsonc:()=>_a});var Be=ls(Tt(),1);function Oa(a){return Array.isArray(a)&&a.length>0}var Lt=Oa;var gi={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Fa(a){let t=(0,Be.parse)(a,gi),{program:e}=t;if(e.body.length===0&&e.directives.length===0&&!e.interpreter)return t}function Re(a,t={}){let{allowComments:e=!0,allowEmpty:s=!1}=t,i;try{i=(0,Be.parseExpression)(a,gi)}catch(r){if(s&&r.code==="BABEL_PARSER_SYNTAX_ERROR"&&r.reasonCode==="ParseExpressionEmptyInput")try{i=Fa(a)}catch{}if(!i)throw Me(r)}if(!e&&Lt(i.comments))throw K(i.comments[0],"Comment");return i=Oe(i,{type:"JsonRoot",text:a}),i.node.type==="File"?delete i.node:le(i.node),i}function K(a,t){let[e,s]=[a.loc.start,a.
Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var On=Object.defineProperty;var za=Object.getOwnPropertyDescriptor;var Za=Object.getOwnPropertyNames;var eo=Object.prototype.hasOwnProperty;var Us=e=>{throw TypeError(e)};var xr=(e,t)=>{for(var r in t)On(e,r,{get:t[r],enumerable:!0})},to=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Za(t))!eo.call(e,s)&&s!==r&&On(e,s,{get:()=>t[s],enumerable:!(n=za(t,s))||n.enumerable});return e};var ro=e=>to(On({},"__esModule",{value:!0}),e);var Xs=(e,t,r)=>t.has(e)||Us("Cannot "+r);var mt=(e,t,r)=>(Xs(e,t,"read from private field"),r?r.call(e):t.get(e)),Ys=(e,t,r)=>t.has(e)?Us("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Hs=(e,t,r,n)=>(Xs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Bm={};xr(Bm,{languages:()=>Sm,options:()=>Ha,printers:()=>gm});var Vs=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var js={};xr(js,{canAttachComment:()=>Op,embed:()=>oi,experimentalFeatures:()=>Cm,getCommentChildNodes:()=>_p,getVisitorKeys:()=>br,handleComments:()=>rs,insertPragma:()=>di,isBlockComment:()=>te,isGap:()=>Mp,massageAstNode:()=>Bu,print:()=>Ga,printComment:()=>ju,willPrintOwnComments:()=>ns});var no=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},X=no;var so=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},v=so;function uo(e){return e!==null&&typeof e=="object"}var $s=uo;function*io(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>$s(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*ao(e,t){let r=[e];for(let n=0;n<r.length;n++){let s=r[n];for(let u of io(s,t))yield u,r.push(u)}}function Ks(e,{getVisitorKeys:t,predicate:r}){for(let n of ao(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}var Qs=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9Line truncated
|
||||
`)return t-2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var He=co;function lo(e,t,r={}){let n=Ye(e,r.backwards?t-1:t,r),s=He(e,n,r);return n!==s}var ee=lo;function mo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var _t=mo;function yo(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ru(e,t):t}var Mt=yo;function fo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=tu(e,n),n=_t(e,n),n=Ye(e,n);return n=Mt(e,n),n=He(e,n),n!==!1&&ee(e,n)}var vt=fo;function Do(e){return Array.isArray(e)&&e.length>0}var O=Do;var nu=new Proxy(()=>{},{get:()=>nu}),jt=nu;var gr="'",su='"';function Eo(e,t){let r=t===!0||t===gr?gr:su,n=r===gr?su:gr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Sr=Eo;function Fo(e,t,r){let n=t==='"'?"'":'"',u=X(!1,e,/\\(.)|(["'])/gsu,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+u+t}var uu=Fo;function Co(e,t){jt.ok(/^(?<quote>["']).*\k<quote>$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Sr(r,t.singleQuote);return e.charAt(0)===n?e:uu(r,n,!1)}var ut=Co;var iu=e=>Number.isInteger(e)&&e>=0;function j(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(j(r),t):t}function P(e){var r;return((r=e.range)==null?void 0:r[1])??e.end}function Bt(e,t){let r=j(e);return iu(r)&&r===j(t)}function Ao(e,t){let r=P(e);return iu(r)&&r===P(t)}function au(e,t){return Bt(e,t)&&Ao(e,t)}var rr=null;function nr(e){if(rr!==null&&typeof rr.property){let t=rr;return rr=nr.prototype=null,t}return rr=nr.prototype=e??Object.create(null),new nr}var To=10;for(let e=0;e<=To;e++)nr();function _n(e){return nr(e)}function xo(e,t="type"){_n(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=xo;var ou={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnTyp
Line truncated
|
||||
`):e.type==="UnaryExpression"?ir(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:wr(e)}function de(e,t){return Y(t)?kt(t):d(t,h.Leading,r=>ee(e,P(r)))}function cu(e){return e.quasis.some(t=>t.value.raw.includes(`
|
||||
`))}function _r(e,t){return(e.type==="TemplateLiteral"&&cu(e)||e.type==="TaggedTemplateExpression"&&cu(e.quasi))&&!ee(t,j(e),{backwards:!0})}function Mr(e){if(!d(e))return!1;let t=v(!1,Ve(e,h.Dangling),-1);return t&&!te(t)}function Au(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Rt(r)){if(t+=1,t>1)return!0}else if(w(r)){for(let n of le(r))if(Rt(n))return!0}return!1}function vr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&w(t)&&w(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Jo=new Set(["!","-","+","~"]);function we(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return we(e.expression,t);let r=n=>we(n,t-1);if(Nn(e))return st(e.pattern??e.regex.pattern)<=5;if(wr(e)||wo(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(ue(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(U(e))return e.elements.every(n=>n===null||r(n));if(yt(e)){if(e.type==="ImportExpression"||we(e.callee,t)){let n=le(e);return n.length<=t&&n.every(r)}return!1}return G(e)?we(e.object,t)&&we(e.property,t):e.type==="UnaryExpression"&&Jo.has(e.operator)||e.type==="UpdateExpression"?we(e.argument,t):!1}function du(e){return e}function ce(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function pe(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return pe(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return pe(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:pe(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:pe(e.callee,t);case"ConditionalExpression":return pe(e.test,t);case"UpdateExpression":return!e.prefix&&pe(e.argument,t);case"BindExpression":return e.object&&pe(e.object,t);case"SequenceExpression":return pe(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return pe(e.expression,t);default:return t(e)}}var lu={"==":!0,"!=":!0,"===":!0,"!==":!0},Ir={"*":!0,"/":!0,"%":!0},Rn={">>":!0,">>>":!0,"<<":!0};function ar(e,t){return!(sr(t)!==sr(e)||e==="**"||lu[e]&&lu[t]||t==="%"&&Ir[e]||e==="%"&&Ir[t]||t!==e&&Ir[t]&&Ir[e]||Rn[e]&&Rn[t])}var No=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function sr(e){return No.get(e)}function Tu(e){return!!Rn[e]||e==="|"||e==="^"||e==="&"}function xu(e){var r;if(e.rest)return!0;let t=Q(e);return((r=v(!1,t,-1))==null?void 0:r.type)==="RestElement"}var vn=new WeakMap;function Q(e){if(vn.has(e))return vn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),vn.set(e,t),t}function hu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var jn=new WeakMap;function le(e){if(jn.has(e))return jn.get(e);if(e.type==="ChainExpression")return le(e.expression);let t=e.arguments;return(e.type==="ImportExpression"||e.type==="TSImportType")&&(t=[e.type==="ImportExpression"?e.source:e.argument],e.options&&t.push(e.options)),jn.set(e,t),t}function Gt(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>Gt(e,t),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(n=>t(n,0),r.type==="ImportExpression"?"source":"argument"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function qn(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return[...r,e.type==="ImportExpression"?"source":"argument"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function or(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function kt(e){return(e==null?void 0:e.prettierIgnore)||d(e,h.PrettierIgnore)}var h={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},gu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&h.Leading&&!r.leading||e&h.Trailing&&!r.trailing||e&h.Dangling&&(r.leading||r.trailing)||e&h.Block&&!te(r)||e&h.Line&&!At(r)||e&h.First&&n!==0||e&h.Last&&n!==s.length-1||e&h.PrettierIgnore&&!or(r)||t&&!t(r))};function d(e,t,r){if(!O(e==null?void 0:e.comments))return!1;let n=gu(t,r);return n?e.comments.some(n):!0}function Ve(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=gu(t,r);return n?e.comments.filter(n):e.comments}var me=(e,{originalText:t})=>vt(t,P(e));function yt(e){return w(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Te(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!bt(e))}var xe=R(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Oe=R(["TSUnionType","UnionTypeAnnotation"]),qt=R(["TSIntersectionType","IntersectionTypeAnnotation"]),Je=R(["TSConditionalType","ConditionalTypeAnnotation"]);var Go=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Wt=e=>{for(let t of e.quasis)delete t.value};function Su(e,t){var n;if(e.type==="Program"&&delete t
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(Be(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Wo([...jr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Wn=class extends Error{name="InvalidDocError";constructor(t){super(Uo(t)),this.doc=t}},Tt=Wn;var bu={};function Xo(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===bu){r(s.pop());continue}r&&s.push(u,bu);let i=Be(u);if(!i)throw new Tt(u);if((t==null?void 0:t(u))!==!1)switch(i){case ge:case _e:{let a=i===ge?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case he:s.push(u.flatContents,u.breakContents);break;case fe:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case Ke:case $e:case ze:case Se:case Ze:s.push(u.contents);break;case Ne:case it:case Qe:case Ge:case oe:case Me:break;default:throw new Tt(u)}}}var pr=Xo;function ft(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(Be(u)){case ge:return t(u.map(n));case _e:return t({...u,parts:u.parts.map(n)});case he:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case fe:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case Ke:case $e:case ze:case Se:case Ze:return t({...u,contents:n(u.contents)});case Ne:case it:case Qe:case Ge:case oe:case Me:return t(u);default:throw new Tt(u)}}}function ku(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return pr(e,u),n}function Yo(e){if(e.type===fe&&e.break||e.type===oe&&e.hard||e.type===Me)return!0}function re(e){return ku(e,Yo,!1)}function Pu(e){if(e.length>0){let t=v(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Iu(e){let t=new Set,r=[];function n(u){if(u.type===Me&&Pu(r),u.type===fe){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===fe&&r.pop().break&&Pu(r)}pr(e,n,s,!0)}function Ho(e){return e.type===oe&&!e.hard?e.soft?"":" ":e.type===he?e.flatContents:e}function cr(e){return ft(e,Ho)}function Vo(e){switch(Be(e)){case _e:if(e.parts.every(t=>t===""))return"";break;case fe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===fe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ke:case $e:case ze:case Ze:if(!e.contents)return"";break;case he:if(!e.flatContents&&!e.breakContents)return"";break;case ge:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof v(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case Ne:case it:case Qe:case Ge:case oe:case Se:case Me:break;default:throw new Tt(e)}return e}function Ut(e){return ft(e,t=>Vo(t))}function ve(e,t=Rr){return ft(e,r=>typeof r=="string"?b(t,r.split(`
|
||||
`)):r)}function $o(e){if(e.type===oe)return!0}function Lu(e){return ku(e,$o,!1)}function lr(e,t){return e.type===Se?{...e,contents:t(e.contents)}:t(e)}function wu(e){let t=!0;return pr(e,r=>{switch(Be(r)){case Ne:if(r==="")break;case Qe:case Ge:case oe:case Me:return t=!1,!1}}),t}var Un=()=>{},et=Un,Xn=Un,Ou=Un;function D(e){return et(e),{type:$e,contents:e}}function be(e,t){return et(t),{type:Ke,contents:t,n:e}}function l(e,t={}){return et(e),Xn(t.expandedStates,!0),{type:fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _u(e){return be(Number.NEGATIVE_INFINITY,e)}function Jr(e){return be(-1,e)}function tt(e,t){return l(e[0],{...t,expandedStates:e})}function Nr(e){return Ou(e),{type:_e,parts:e}}function S(e,t="",r={}){return et(e),t!==""&&et(t),{type:he,breakContents:e,flatContents:t,groupId:r.groupId}}function xt(e,t){return et(e),{type:ze,contents:e,groupId:t.groupId,negate:t.negate}}function Yn(e){return et(e),{type:Ze,contents:e}}var je={type:Ge},Ce={type:Me};var Hn={type:oe,hard:!0},Ko={type:oe,hard:!0,literal:!0},x={type:oe},E={type:oe,soft:!0},F=[Hn,Ce],Rr=[Ko,Ce],mr={type:it};function b(e,t){et(e),Xn(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Mu(e,t,r){et(e);let n=e;if(t>0){for(let s=0;s<Math.floor(t/r);++s)n=D(n);n=be(t%r,n),n=be(Number.NEGATIVE_INFINITY,n)}return n}function at(e,t){return et(t),e?{type:Se,label:e,contents:t}:t}function Qo(e){if(!te(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Vn=new WeakMap;function zo(e){return Vn.has(e)||Vn.set(e,Qo(e)),Vn.get(e)}var vu=zo;function ju(e,t){let r=e.node;if(At(r))return t.originalText.slice(j(r),P(r)).trimEnd();if(vu(r))return Zo(r);if(te(r))return["/*",ve(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Zo(e){let t=e.value.split(`
|
||||
`);return["/*",b(F,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}var rs={};xr(rs,{endOfLine:()=>ip,ownLine:()=>up,remaining:()=>ap});function ep(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function $n(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=ep(e)}function De(e,t){t.leading=!0,t.trailing=!1,$n(e,t)}function Pe(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),$n(e,t)}function z(e,t){t.leading=!1,t.trailing=!0,$n(e,t)}function tp(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Ye(e,n),n=_t(e,n),n=Mt(e,n),n=He(e,n);return n}var ot=tp;function rp(e,t){let r=ot(e,t);return r===!1?"":e.charAt(r)}var ke=rp;function np(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var ie=np;var Kn=new WeakMap;function sp(e){return Kn.has(e)||Kn.set(e,te(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Kn.get(e)}var Gr=sp;var Ru=(e,t)=>At(e)||!ie(t,j(e),P(e));function up(e){return[Yu,Nu,Wu,Cp,pp,zn,Zn,Ju,Gu,xp,dp,ts,Xu,hp,qu,Uu,es,cp,Ip,Hu].some(t=>t(e))}function ip(e){return[op,Wu,Nu,Xu,zn,Zn,Ju,Gu,Uu,Ap,Tp,ts,Bp,es,Pp,kp,Lp,Hu].some(t=>t(e))}function ap(e){return[Yu,zn,Zn,lp,Fp,qu,ts,Ep,Dp,es,bp].some(t=>t(e))}function It(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?De(r,t):Pe(e,t)}function Qn(e,t){e.type==="BlockStatement"?It(e,t):De(e,t)}function op({comment:e,followingNode:t}){return t&&Gr(e)?(De(t,e),!0):!1}function zn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(ke(s,P(e))===")")return z(t,e),!0;if(t===r.consequent&&n===r.alternate){let i=ot(s,P(r.consequent));if(j(e)<i||r.alternate.type==="BlockStatement")return t.type==="BlockStatement"?(z(t,e),!0):Ru(e,s)&&!ie(s,j(t),j(e))?(z(t,e),!0):(Pe(r,e),!0)}return n.type==="BlockStatement"?(It(n,e),!0):n.type==="IfStatement"?(Qn(n.consequent,e),!0):r.consequent===n?(De(n,e),!0):!1}function Zn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:ke(s,P(e))===")"?(z(t,e),!0):n.type==="BlockStatement"?(It(n,e),!0):r.body===n?(De(n,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(z(t,e),!0):n.type==="BlockStatement"?(It(n,e),!0):n.type==="TryStatement"?(Qn(n.finalizer,e),!0):n.type==="CatchClause"?(Qn(n.body,e),!0):!1}function pp({comment:e,enclosingNode:t,followingNode:r}){return G(t)&&(r==null?void 0:r.type)==="Identifier"?(De(t,e),!0):!1}function cp({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||Je(t))?!1:(r==null?void 0:r.type)==="ConditionalExpression"||Je(r)?(Pe(t,e),!0):!1}function Nu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!ie(s,P(t),j(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||Je(r))&&n?u.experimentalTernaries&&r.alternate===n&&!(te(e)&&!ie(u.originalText,j(e),P(e)))?(Pe(r,e),!0):(De(n,e),!0):!1}function lp({comment:e,precedingNode:t,enclosingNode:r}){return Te(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(z(r.value.left,e),!0):!1}var mp=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Gu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(mp.has(r==null?void 0:r.type)){if(O(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return z(v(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return It(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return z(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?z(t,e):Pe(r,e,s),!0}}return!1}var yp=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);function qu({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&ke(n,P(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&ke(n,P(t))!==":"?(z(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&yp.has(r==null?void 0:r.type)&&(At(e)||e.placement==="ownLine")?(z(t,e),!0):!1}var fp=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Dp({comment:e,precedingNode:t,enclosingNode:r,text:n}){return ke(n,P(e))!=="("?!1:t&&fp.has(r==null?void 0:r.type)?(z(t,e),!0):!1}function Ep({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=ot(r,P(e));return n!==!1&&r.slice(n,n+2)==="=>"?(Pe(t,e),!0):!1}function Fp({comment:e,enclosingNode:t,text:r}){return ke(r,P(e))!==")"?!1:t&&(Vu(t)&&Q(t).length===0||yt(t)&&le(t).length===0)?(Pe(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Q(t.value).length===0?(Pe(t.value,e),!0):!1}function Cp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="ComponentTypeParameter"&&((r==null?void 0:r.type)==="DeclareComponent"||(r==null?void 0:r.type)==="ComponentTypeAnnotation")&&(n==null?void 0:n.type)!=="ComponentTypeParameter"?(z(t,e),!0):((t==null?void 0:t.type)==="ComponentParameter"||(t==null?void 0:t.type)==="RestElement")&&(r==null?void 0:r.type
Line truncated
|
||||
`;default:return`
|
||||
`}}var Ie=Symbol("MODE_BREAK"),pt=Symbol("MODE_FLAT"),Xt=Symbol("cursor"),ss=Symbol("DOC_FILL_PRINTED_LENGTH");function Ku(){return{value:"",length:0,queue:[]}}function vp(e,t){return us(e,{type:"indent"},t)}function jp(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Ku():t<0?us(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:us(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function us(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let c of n)switch(c.type){case"indent":m(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":m(),s+=c.n,u+=c.n.length;break;case"numberAlign":i+=1,a+=c.n;break;default:throw new Error(`Unexpected type '${c.type}'`)}return y(),{...e,value:s,length:u,queue:n};function o(c){s+=" ".repeat(c),u+=r.tabWidth*c}function p(c){s+=" ".repeat(c),u+=c}function m(){r.useTabs?f():y()}function f(){i>0&&o(i),C()}function y(){a>0&&p(a),C()}function C(){i=0,a=0}}function is(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===Xt){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Xt);return t}function qr(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:m}=a.pop(),f=Be(m);switch(f){case Ne:o.push(m),r-=st(m);break;case ge:case _e:{let y=f===ge?m:m.parts,C=m[ss]??0;for(let c=y.length-1;c>=C;c--)a.push({mode:p,doc:y[c]});break}case $e:case Ke:case ze:case Se:a.push({mode:p,doc:m.contents});break;case Qe:r+=is(o);break;case fe:{if(u&&m.break)return!1;let y=m.break?Ie:p,C=m.expandedStates&&y===Ie?v(!1,m.expandedStates,-1):m.contents;a.push({mode:y,doc:C});break}case he:{let C=(m.groupId?s[m.groupId]||pt:p)===Ie?m.breakContents:m.flatContents;C&&a.push({mode:p,doc:C});break}case oe:if(p===Ie||m.hard)return!0;m.soft||(o.push(" "),r--);break;case Ze:n=!0;break;case Ge:if(n)return!1;break}}return!1}function as(e,t){let r={},n=t.printWidth,s=$u(t.endOfLine),u=0,i=[{ind:Ku(),mode:Ie,doc:e}],a=[],o=!1,p=[],m=0;for(Iu(e);i.length>0;){let{ind:y,mode:C,doc:c}=i.pop();switch(Be(c)){case Ne:{let A=s!==`
|
||||
`?X(!1,c,`
|
||||
`,s):c;a.push(A),i.length>0&&(u+=st(A));break}case ge:for(let A=c.length-1;A>=0;A--)i.push({ind:y,mode:C,doc:c[A]});break;case it:if(m>=2)throw new Error("There are too many 'cursor' in doc.");a.push(Xt),m++;break;case $e:i.push({ind:vp(y,t),mode:C,doc:c.contents});break;case Ke:i.push({ind:jp(y,c.n,t),mode:C,doc:c.contents});break;case Qe:u-=is(a);break;case fe:switch(C){case pt:if(!o){i.push({ind:y,mode:c.break?Ie:pt,doc:c.contents});break}case Ie:{o=!1;let A={ind:y,mode:pt,doc:c.contents},T=n-u,B=p.length>0;if(!c.break&&qr(A,i,T,B,r))i.push(A);else if(c.expandedStates){let g=v(!1,c.expandedStates,-1);if(c.break){i.push({ind:y,mode:Ie,doc:g});break}else for(let _=1;_<c.expandedStates.length+1;_++)if(_>=c.expandedStates.length){i.push({ind:y,mode:Ie,doc:g});break}else{let M=c.expandedStates[_],J={ind:y,mode:pt,doc:M};if(qr(J,i,T,B,r)){i.push(J);break}}}else i.push({ind:y,mode:Ie,doc:c.contents});break}}c.id&&(r[c.id]=v(!1,i,-1).mode);break;case _e:{let A=n-u,T=c[ss]??0,{parts:B}=c,g=B.length-T;if(g===0)break;let _=B[T+0],M=B[T+1],J={ind:y,mode:pt,doc:_},I={ind:y,mode:Ie,doc:_},q=qr(J,[],A,p.length>0,r,!0);if(g===1){q?i.push(J):i.push(I);break}let k={ind:y,mode:pt,doc:M},W={ind:y,mode:Ie,doc:M};if(g===2){q?i.push(k,J):i.push(W,I);break}let ne=B[T+2],Z={ind:y,mode:C,doc:{...c,[ss]:T+2}};qr({ind:y,mode:pt,doc:[_,M,ne]},[],A,p.length>0,r,!0)?i.push(Z,k,J):q?i.push(Z,W,J):i.push(Z,W,I);break}case he:case ze:{let A=c.groupId?r[c.groupId]:C;if(A===Ie){let T=c.type===he?c.breakContents:c.negate?c.contents:D(c.contents);T&&i.push({ind:y,mode:C,doc:T})}if(A===pt){let T=c.type===he?c.flatContents:c.negate?D(c.contents):c.contents;T&&i.push({ind:y,mode:C,doc:T})}break}case Ze:p.push({ind:y,mode:C,doc:c.contents});break;case Ge:p.length>0&&i.push({ind:y,mode:C,doc:Hn});break;case oe:switch(C){case pt:if(c.hard)o=!0;else{c.soft||(a.push(" "),u+=1);break}case Ie:if(p.length>0){i.push({ind:y,mode:C,doc:c},...p.reverse()),p.length=0;break}c.literal?y.root?(a.push(s,y.root.value),u=y.root.length):(a.push(s),u=0):(u-=is(a),a.push(s+y.value),u=y.length);break}break;case Se:i.push({ind:y,mode:C,doc:c.contents});break;case Me:break;default:throw new Tt(c)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let f=a.indexOf(Xt);if(f!==-1){let y=a.indexOf(Xt,f+1);if(y===-1)return{formatted:a.filter(T=>T!==Xt).join("")};let C=a.slice(0,f).join(""),c=a.slice(f+1,y).join(""),A=a.slice(y+1).join("");return{formatted:C+c+A,cursorNodeStart:C.length,cursorNodeText:c}}return{formatted:a.join("")}}function Rp(e,t,r=0){let n=0;for(let s=r;s<e.length;++s)e[s]===" "?n=n+t-n%t:n++;return n}var Qu=Rp;function Jp(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:Qu(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var zu=Jp;function Wr(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&qp(e)){let p=Np(e,t,r);if(p)return p}let u="expressions";n.type==="TSTemplateLiteralType"&&(u="types");let i=[],a=e.map(r,u);i.push(je,"`");let o=0;return e.each(({index:p,node:m})=>{if(i.push(r()),m.tail)return;let{tabWidth:f}=t,y=m.value.raw,C=y.includes(`
|
||||
`)?zu(y,f):o;o=C;let c=a[p],A=n[u][p],T=ie(t.originalText,P(m),j(n.quasis[p+1]));if(!T){let g=as(c,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;g.includes(`
|
||||
`)?T=!0:c=g}T&&(d(A)||A.type==="Identifier"||G(A)||A.type==="ConditionalExpression"||A.type==="SequenceExpression"||xe(A)||Fe(A))&&(c=[D([E,c]),E]);let B=C===0&&y.endsWith(`
|
||||
`)?be(Number.NEGATIVE_INFINITY,c):Mu(c,C,f);i.push(l(["${",B,je,"}"]))},"quasis"),i.push("`"),i}function Zu(e,t,r){let n=r("quasi"),{node:s}=e,u="",i=Ve(s.quasi,h.Leading)[0];return i&&(ie(t.originalText,P(s.typeArguments??s.typeParameters??s.tag),j(i))?u=E:u=" "),at(n.label&&{tagged:!0,...n.label},[r("tag"),r(s.typeArguments?"typeArguments":"typeParameters"),u,je,n])}function Np(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(y=>"${"+as(y,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let y=1;y<n.quasis.length;y++){let C=v(!1,o,-1),c=a[y-1];C.cells.push(c),c.includes(`
|
||||
`)&&(C.hasLineBreak=!0),n.quasis[y].value.raw.includes(`
|
||||
`)&&o.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...o.map(y=>y.cells.length)),m=Array.from({length:p}).fill(0),f=[{cells:s},...o.filter(y=>y.cells.length>0)];for(let{cells:y}of f.filter(C=>!C.hasLineBreak))for(let[C,c]of y.entries())m[C]=Math.max(m[C],st(c));return i.push(je,"`",D([F,b(F,f.map(y=>b(" | ",y.cells.map((C,c)=>y.hasLineBreak?C:C+" ".repeat(m[c]-st(C))))))]),F,"`"),i}}function Gp(e,t){let{node:r}=e,n=t();return d(r)&&(n=l([D([E,n]),E])),["${",n,je,"}"]}function Yt(e,t){return e.map(r=>Gp(r,t),"expressions")}function Ur(e,t){return ft(e,r=>typeof r=="string"?t?X(!1,r,/(\\*)`/gu,"$1$1\\`"):os(r):r)}function os(e){return X(!1,e,/([\\`]|\$\{)/gu,String.raw`\$1`)}function qp({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var cs=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function ei(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Te(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>U(n)&&s==="elements",r,...cs)||e.match(t,r,...cs)}function ti(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Te(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...cs)}function ps(e,t){return d(e,h.Block|h.Leading,({value:r})=>r===` ${t} `)}function Xr({node:e,parent:t},r){return ps(e,r)||Wp(t)&&ps(t,r)||t.type==="ExpressionStatement"&&ps(t,r)}function Wp(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Up(e,t,r){let{node:n}=r,s=n.quasis.map(m=>m.value.raw),u=0,i=s.reduce((m,f,y)=>y===0?f:m+"@prettier-placeholder-"+u+++"-id"+f,""),a=await e(i,{parser:"scss"}),o=Yt(r,t),p=Xp(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",D([F,p]),E,"`"]}function Xp(e,t){if(!O(t))return e;let r=0,n=ft(Ut(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/u).map((u,i)=>i%2===0?ve(u):(r++,t[u])));return t.length===r?n:null}function Yp({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Yr(e){return e.type==="Identifier"&&e.name==="styled"}function ri(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function Hp({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Yr(t.object)||ri(t);case"CallExpression":return Yr(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Yr(t.callee.object.object)||ri(t.callee.object))||t.callee.object.type==="CallExpression"&&Yr(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Vp({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function $p(e){if(Yp(e)||Hp(e)||Vp(e)||ei(e))return Up}var ni=$p;async function Kp(e,t,r){let{node:n}=r,s=n.quasis.length,u=Yt(r,t),i=[];for(let a=0;a<s;a++){let o=n.quasis[a],p=a===0,m=a===s-1,f=o.value.cooked,y=f.split(`
|
||||
`),C=y.length,c=u[a],A=C>2&&y[0].trim()===""&&y[1].trim()==="",T=C>2&&y[C-1].trim()===""&&y[C-2].trim()==="",B=y.every(_=>/^\s*(?:#[^\n\r]*)?$/u.test(_));if(!m&&/#[^\n\r]*$/u.test(y[C-1]))return null;let g=null;B?g=Qp(y):g=await e(f,{parser:"graphql"}),g?(g=Ur(g,!1),!p&&A&&i.push(""),i.push(g),!m&&T&&i.push("")):!p&&!m&&A&&i.push(""),c&&i.push(c)}return["`",D([F,b(F,i)]),F,"`"]}function Qp(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([F,u]):t.push(u),r=!0);return t.length===0?null:b(F,t)}function zp({node:e,parent:t}){return Xr({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function Zp(e){if(zp(e))return Kp}var si=Zp;var ls=0;async function ui(e,t,r,n,s){let{node:u}=n,i=ls;ls=ls+1>>>0;let a=B=>`PRETTIER_HTML_PLACEHOLDER_${B}_${i}_IN_JS`,o=u.quasis.map((B,g,_)=>g===_.length-1?B.value.cooked:B.value.cooked+a(g)).join(""),p=Yt(n,r),m=new RegExp(a(String.raw`(\d+)`),"gu"),f=0,y=await t(o,{parser:e,__onHtmlRoot(B){f=B.children.length}}),C=ft(y,B=>{if(typeof B!="string")return B;let g=[],_=B.split(m);for(let M=0;M<_.length;M++){let J=_[M];if(M%2===0){J&&(J=os(J),s.__embeddedInHtml&&(J=X(!1,J,/<\/(?=script\b)/giu,String.raw`<\/`)),g.push(J));continue}let I=Number(J);g.push(p[I])}return g}),c=/^\s/u.test(o)?" ":"",A=/\s$/u.test(o)?" ":"",T=s.htmlWhitespaceSensitivity==="ignore"?F:c&&A?x:null;return T?l(["`",D([T,l(C)]),T,"`"]):at({hug:!1},l(["`",c,f>1?D(l(C)):l(C),A,"`"]))}function ec(e){return Xr(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var tc=ui.bind(void 0,"html"),rc=ui.bind(void 0,"angular");function nc(e){if(ec(e))return tc;if(ti(e))return rc}var ii=nc;async function sc(e,t,r){let{node:n}=r,s=X(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(o,p)=>"\\".repeat(p.length/2)+"`"),u=uc(s),i=u!=="";i&&(s=X(!1,s,new RegExp(`^${u}`,"gmu"),""));let a=Ur(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?D([E,a]):[Rr,_u(a)],E,"`"]}function uc(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function ic(e){if(ac(e))return sc}function ac({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var ai=ic;function oc(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||pc(t))return;let r;for(let n of[ni,si,ii,ai])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&at({embed:!0,...u.label},u)}}function pc({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var oi=oc;var cc=/\*\/$/,lc=/^\/\*\*?/,mi=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,mc=/(^|\s+)\/\/([^\n\r]*)/g,pi=/^(\r?\n)+/,yc=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,ci=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,fc=/(\r?\n|^) *\* ?/g,yi=[];function fi(e){let t=e.match(mi);return t?t[0].trimStart():""}function Di(e){let t=e.match(mi),r=t==null?void 0:t[0];return r==null?e:e.slice(r.length)}function Ei(e){let t=`
|
||||
`;e=X(!1,e.replace(lc,"").replace(cc,""),fc,"$1");let r="";for(;r!==e;)r=e,e=X(!1,e,yc,`${t}$1 $2${t}`);e=e.replace(pi,"").trimEnd();let n=Object.create(null),s=X(!1,e,ci,"").replace(pi,"").trimEnd(),u;for(;u=ci.exec(e);){let i=X(!1,u[2],mc,"");if(typeof n[u[1]]=="string"||Array.isArray(n[u[1]])){let a=n[u[1]];n[u[1]]=[...yi,...Array.isArray(a)?a:[a],i]}else n[u[1]]=i}return{comments:s,pragmas:n}}function Fi({comments:e="",pragmas:t={}}){let r=`
|
||||
`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>li(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${li(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length>0?s+r:"")+a+u}function li(e,t){return[...yi,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var Ci="format";function Dc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Ai=Dc;function Ec(e){let t=Ai(e);t&&(e=e.slice(t.length+1));let r=fi(e),{pragmas:n,comments:s}=Ei(r);return{shebang:t,text:e,pragmas:n,comments:s}}function di(e){let{shebang:t,text:r,pragmas:n,comments:s}=Ec(e),u=Di(r),i=Fi({pragmas:{[Ci]:"",...n},comments:s.trimStart()});return(t?`${t}
|
||||
`:"")+i+(u.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+u}function Fc(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let m of n)s(m)>=o&&u(m)<=p&&i.add(m);return r.slice(o,p)}var Ti=Fc;function ms(e,t){var u,i,a,o,p,m,f,y,C;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Tc(r)&&yr(e))return!0;if(Cc(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(A=>A.type==="ForOfStatement"))==null?void 0:i.left;if(c&&pe(c,A=>A===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(T=>T.type==="ExpressionStatement"||T.type==="ForStatement"||T.type==="ForInStatement"),A=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(A&&pe(A,T=>T===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let c=e.findAncestor(A=>!xe(A));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(A=>A.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&pe(c,A=>A===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(A=>A.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&pe(c,A=>A===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&O(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return xi(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!hc(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,A)=>A==="returnType"&&c.type==="ArrowFunctionExpression")&&dc(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(c,A)=>A==="declarations"&&c.type==="VariableDeclaration",(c,A)=>A==="left"&&c.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&Ac(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!xe(r);case"ConditionalExpression":return xe(r)||fu(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||xe(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:A}=r;if(!c&&A!=="TSTypeAssertion")return!0;let T=sr(c),B=s.operator,g=sr(B);return g>T||n==="right"&&g===T||g===T&&!ar(B,c)?!0:g<T&&c==="%"?B==="+"||B==="-":!!Tu
Line truncated
|
||||
\r `),As=e=>e===""||e===x||e===F||e===E;function Pc(e,t,r){var _,M,J,I,q;let{node:n}=e;if(n.type==="JSXElement"&&Wc(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(k=>Uc(k)?{type:"JSXText",value:" ",raw:" "}:k);let i=n.children.some(Y),a=n.children.filter(k=>k.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=re(s)||i||o||a,m=e.parent.rootMarker==="mdx",f=t.singleQuote?"{' '}":'{" "}',y=m?x:S([f,E]," "),C=((M=(_=n.openingElement)==null?void 0:_.name)==null?void 0:M.name)==="fbt",c=kc(e,t,r,y,C),A=n.children.some(k=>fr(k));for(let k=c.length-2;k>=0;k--){let W=c[k]===""&&c[k+1]==="",ne=c[k]===F&&c[k+1]===""&&c[k+2]===F,Z=(c[k]===E||c[k]===F)&&c[k+1]===""&&c[k+2]===y,lt=c[k]===y&&c[k+1]===""&&(c[k+2]===E||c[k+2]===F),L=c[k]===y&&c[k+1]===""&&c[k+2]===y,se=c[k]===E&&c[k+1]===""&&c[k+2]===F||c[k]===F&&c[k+1]===""&&c[k+2]===E;ne&&A||W||Z||L||se?c.splice(k,2):lt&&c.splice(k+1,2)}for(;c.length>0&&As(v(!1,c,-1));)c.pop();for(;c.length>1&&As(c[0])&&As(c[1]);)c.shift(),c.shift();let T=[""];for(let[k,W]of c.entries()){if(W===y){if(k===1&&wu(c[k-1])){if(c.length===2){T.push([T.pop(),f]);continue}T.push([f,F],"");continue}else if(k===c.length-1){T.push([T.pop(),f]);continue}else if(c[k-1]===""&&c[k-2]===F){T.push([T.pop(),f]);continue}}k%2===0?T.push([T.pop(),W]):T.push(W,""),re(W)&&(p=!0)}let B=A?Nr(T):l(T,{shouldBreak:!0});if(((J=t.cursorNode)==null?void 0:J.type)==="JSXText"&&n.children.includes(t.cursorNode)?B=[mr,B,mr]:((I=t.nodeBeforeCursor)==null?void 0:I.type)==="JSXText"&&n.children.includes(t.nodeBeforeCursor)?B=[mr,B]:((q=t.nodeAfterCursor)==null?void 0:q.type)==="JSXText"&&n.children.includes(t.nodeAfterCursor)&&(B=[B,mr]),m)return B;let g=l([s,D([F,B]),F,u]);return p?g:tt([l([s,...c,u]),g])}function kc(e,t,r,n,s){let u="",i=[u];function a(p){u=p,i.push([i.pop(),p])}function o(p){p!==""&&(u=p,i.push(p,""))}return e.each(({node:p,next:m})=>{if(p.type==="JSXText"){let f=ae(p);if(fr(p)){let y=Hr.split(f,!0);y[0]===""&&(y.shift(),/\n/u.test(y[0])?o(Bi(s,y[1],p,m)):o(n),y.shift());let C;if(v(!1,y,-1)===""&&(y.pop(),C=y.pop()),y.length===0)return;for(let[c,A]of y.entries())c%2===1?o(x):a(A);C!==void 0?/\n/u.test(C)?o(Bi(s,u,p,m)):o(n):o(Si(s,u,p,m))}else/\n/u.test(f)?f.match(/\n/gu).length>1&&o(F):o(n)}else{let f=r();if(a(f),m&&fr(m)){let C=Hr.trim(ae(m)),[c]=Hr.split(C);o(Si(s,c,p,m))}else o(F)}},"children"),i}function Si(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?E:F:E}function Bi(e,t,r,n){return e?F:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?F:E:F}var Ic=new Set(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Lc(e,t,r){let{parent:n}=e;if(Ic.has(n.type))return t;let s=wc(e),u=Le(e,r);return l([u?"":S("("),D([E,t]),E,u?"":S(")")],{shouldBreak:s})}function wc(e){return e.match(void 0,t=>t.type==="ArrowFunctionExpression",w)&&(e.match(void 0,void 0,void 0,t=>t.type==="JSXExpressionContainer")||e.match(void 0,void 0,void 0,t=>t.type==="ChainExpression",t=>t.type==="JSXExpressionContainer"))}function Oc(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(K(n.value)){let i=ae(n.value),a=X(!1,X(!1,i.slice(1,-1),"'","'"),""",'"'),o=Sr(a,t.jsxSingleQuote);a=o==='"'?X(!1,a,'"',"""):X(!1,a,"'","'"),u=e.call(()=>Ee(e,ve(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function _c(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!d(u)&&(U(u)||ue(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||w(u)||u.type==="ChainExpression"&&w(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||Y(i)&&(u.type==="ConditionalExpression"||Fe(u)));return s(n.expression,e.parent)?l(["{",r("expression"),je,"}"]):l(["{",D([E,r("expression")]),E,je,"}"])}function Mc(e,t,r){var a,o;let{node:n}=e,s=d(n.name)||d(n.typeParameters)||d(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&K(n.attributes[0].value)&&!n.attributes[0].value.value.includes(`
|
||||
`)&&!s&&!d(n.attributes[0]))return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>K(p.value)&&p.value.value.includes(`
|
||||
`)),i=t.singleAttributePerLine&&n.attributes.length>1?F:x;return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),D(e.map(()=>[i,r()],"attributes")),...vc(n,t,s)],{shouldBreak:u})}function vc(e,t,r){return e.selfClosing?[x,"/>"]:jc(e,t,r)?[">"]:[E,">"]}function jc(e,t,r){let n=e.attributes.length>0&&d(v(!1,e.attributes,-1),h.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Rc(e,t,r){let{node:n}=e,s=[];s.push("</");let u=r("name");return d(n.name,h.Leading|h.Line)?s.push(D([F,u]),F):d(n.name,h.Leading|h.Block)?s.push(" ",u):s.push(u),s.push(">"),s}function Jc(e,t){let{node:r}=e,n=d(r),s=d(r,h.Line),u=r.type==="JSXOpeningFragment";return[u?"<":"</",D([s?F:n&&!u?" ":"",N(e,t)]),s?F:"",">"]}function Nc(e,t,r){let n=Ee(e,Pc(e,t,r),t);return Lc(e,n,t)}function Gc(e,t){let{node:r}=e,n=d(r,h.Line);return[N(e,t,{indent:n}),n?F:""]}function qc(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!d(s)||!ns(e)?u:[D([E,Ee(e,u,t)]),E]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function bi(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Oc(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return b(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return b(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return qc(e,t,r);case"JSXExpressionContainer":return _c(e,t,r);case"JSXFragment":case"JSXElement":return Nc(e,t,r);case"JSXOpeningElement":return Mc(e,t,r);case"JSXClosingElement":return Rc(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return Jc(e,t);case"JSXEmptyExpression":return Gc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new qe(n,"JSX")}}function Wc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!fr(t)}function fr(e){return e.type==="JSXText"&&(Hr.hasNonWhitespaceCharacter(ae(e))||!/\n/u.test(ae(e)))}function Uc(e){return e.type==="JSXExpressionContainer"&&K(e.expression)&&e.expression.value===" "&&!d(e.expression)}function Pi(e){let{node:t,parent:r}=e;if(!Y(t)||!Y(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!fr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&kt(u.expression)}function Xc(e){return kt(e.node)||Pi(e)}var Vr=Xc;var Yc=0;function $r(e,t,r){var M;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((M=e.root.extra)==null?void 0:M.__isUsingHackPipeline),p=ds(e,t,r,!1,a);if(a)return p;if(o)return l(p);if(w(s)&&s.callee===n||s.type==="UnaryExpression"||G(s)&&!s.computed)return l([D([E,...p]),E]);let m=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!w(u)||s.type==="TemplateLiteral",f=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Te(s),y=Fe(n.left)&&ar(n.operator,n.left.operator);if(m||Ht(n)&&!y||!Ht(n)&&f)return l(p);if(p.length===0)return"";let C=Y(n.right),c=p.findIndex(J=>typeof J!="string"&&!Array.isArray(J)&&J.type===fe),A=p.slice(0,c===-1?1:c+1),T=p.slice(A.length,C?-1:void 0),B=Symbol("logicalChain-"+ ++Yc),g=l([...A,D(T)],{id:B});if(!C)return g;let _=v(!1,p,-1);return l([g,xt(_,{groupId:B})])}function ds(e,t,r,n,s){var B;let{node:u}=e;if(!Fe(u))return[l(r())];let i=[];ar(u.operator,u.left.operator)?i=e.call(g=>ds(g,t,r,!0,s),"left"):i.push(l(r("left")));let a=Ht(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Hc(e,t))&&!de(t.originalText,u.right),m=!d(u.right,h.Leading,Gr)&&de(t.originalText,u.right),f=u.type==="NGPipeExpression"?"|":u.operator,y=u.type==="NGPipeExpression"&&u.arguments.length>0?l(D([E,": ",b([x,": "],e.map(()=>be(2,l(r())),"arguments"))])):"",C;if(a)C=[f,de(t.originalText,u.right)?D([x,r("right"),y]):[" ",r("right"),y]];else{let _=f==="|>"&&((B=e.root.extra)==null?void 0:B.__isUsingHackPipeline)?e.call(M=>ds(M,t,r,!0,s),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let M="";if(m)switch(Be(_)){case ge:M=_.splice(0,1)[0];break;case Se:M=_.contents.splice(0,1)[0];break}C=[x,M,f," ",_,y]}else C=[o?x:"",f,o?" ":x,_,y]}let{parent:c}=e,A=d(u.left,h.Trailing|h.Line)
Line truncated
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
var za=Object.defineProperty;var Us=e=>{throw TypeError(e)};var xr=(e,t)=>{for(var r in t)za(e,r,{get:t[r],enumerable:!0})};var Xs=(e,t,r)=>t.has(e)||Us("Cannot "+r);var mt=(e,t,r)=>(Xs(e,t,"read from private field"),r?r.call(e):t.get(e)),Ys=(e,t,r)=>t.has(e)?Us("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Hs=(e,t,r,n)=>(Xs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Rs={};xr(Rs,{languages:()=>Tm,options:()=>Ha,printers:()=>dm});var Vs=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var vs={};xr(vs,{canAttachComment:()=>kp,embed:()=>oi,experimentalFeatures:()=>fm,getCommentChildNodes:()=>Ip,getVisitorKeys:()=>br,handleComments:()=>ts,insertPragma:()=>di,isBlockComment:()=>te,isGap:()=>Lp,massageAstNode:()=>Bu,print:()=>Ga,printComment:()=>ju,willPrintOwnComments:()=>rs});var Za=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},X=Za;var eo=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},v=eo;function to(e){return e!==null&&typeof e=="object"}var $s=to;function*ro(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>$s(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*no(e,t){let r=[e];for(let n=0;n<r.length;n++){let s=r[n];for(let u of ro(s,t))yield u,r.push(u)}}function Ks(e,{getVisitorKeys:t,predicate:r}){for(let n of no(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}var Qs=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uLine truncated
|
||||
`)return t-2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var He=io;function ao(e,t,r={}){let n=Ye(e,r.backwards?t-1:t,r),s=He(e,n,r);return n!==s}var ee=ao;function oo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var _t=oo;function po(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ru(e,t):t}var Mt=po;function co(e,t){let r=null,n=t;for(;n!==r;)r=n,n=tu(e,n),n=_t(e,n),n=Ye(e,n);return n=Mt(e,n),n=He(e,n),n!==!1&&ee(e,n)}var vt=co;function lo(e){return Array.isArray(e)&&e.length>0}var O=lo;var nu=new Proxy(()=>{},{get:()=>nu}),jt=nu;var gr="'",su='"';function mo(e,t){let r=t===!0||t===gr?gr:su,n=r===gr?su:gr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Sr=mo;function yo(e,t,r){let n=t==='"'?"'":'"',u=X(!1,e,/\\(.)|(["'])/gsu,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+u+t}var uu=yo;function fo(e,t){jt.ok(/^(?<quote>["']).*\k<quote>$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Sr(r,t.singleQuote);return e.charAt(0)===n?e:uu(r,n,!1)}var ut=fo;var iu=e=>Number.isInteger(e)&&e>=0;function j(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(j(r),t):t}function P(e){var r;return((r=e.range)==null?void 0:r[1])??e.end}function Bt(e,t){let r=j(e);return iu(r)&&r===j(t)}function Do(e,t){let r=P(e);return iu(r)&&r===P(t)}function au(e,t){return Bt(e,t)&&Do(e,t)}var rr=null;function nr(e){if(rr!==null&&typeof rr.property){let t=rr;return rr=nr.prototype=null,t}return rr=nr.prototype=e??Object.create(null),new nr}var Eo=10;for(let e=0;e<=Eo;e++)nr();function On(e){return nr(e)}function Fo(e,t="type"){On(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=Fo;var ou={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnTyp
Line truncated
|
||||
`):e.type==="UnaryExpression"?ir(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:wr(e)}function de(e,t){return Y(t)?kt(t):d(t,h.Leading,r=>ee(e,P(r)))}function cu(e){return e.quasis.some(t=>t.value.raw.includes(`
|
||||
`))}function _r(e,t){return(e.type==="TemplateLiteral"&&cu(e)||e.type==="TaggedTemplateExpression"&&cu(e.quasi))&&!ee(t,j(e),{backwards:!0})}function Mr(e){if(!d(e))return!1;let t=v(!1,Ve(e,h.Dangling),-1);return t&&!te(t)}function Au(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Rt(r)){if(t+=1,t>1)return!0}else if(w(r)){for(let n of le(r))if(Rt(n))return!0}return!1}function vr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&w(t)&&w(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Mo=new Set(["!","-","+","~"]);function we(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return we(e.expression,t);let r=n=>we(n,t-1);if(Jn(e))return st(e.pattern??e.regex.pattern)<=5;if(wr(e)||Po(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(ue(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(U(e))return e.elements.every(n=>n===null||r(n));if(yt(e)){if(e.type==="ImportExpression"||we(e.callee,t)){let n=le(e);return n.length<=t&&n.every(r)}return!1}return G(e)?we(e.object,t)&&we(e.property,t):e.type==="UnaryExpression"&&Mo.has(e.operator)||e.type==="UpdateExpression"?we(e.argument,t):!1}function du(e){return e}function ce(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function pe(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return pe(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return pe(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:pe(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:pe(e.callee,t);case"ConditionalExpression":return pe(e.test,t);case"UpdateExpression":return!e.prefix&&pe(e.argument,t);case"BindExpression":return e.object&&pe(e.object,t);case"SequenceExpression":return pe(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return pe(e.expression,t);default:return t(e)}}var lu={"==":!0,"!=":!0,"===":!0,"!==":!0},Ir={"*":!0,"/":!0,"%":!0},jn={">>":!0,">>>":!0,"<<":!0};function ar(e,t){return!(sr(t)!==sr(e)||e==="**"||lu[e]&&lu[t]||t==="%"&&Ir[e]||e==="%"&&Ir[t]||t!==e&&Ir[t]&&Ir[e]||jn[e]&&jn[t])}var vo=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function sr(e){return vo.get(e)}function Tu(e){return!!jn[e]||e==="|"||e==="^"||e==="&"}function xu(e){var r;if(e.rest)return!0;let t=Q(e);return((r=v(!1,t,-1))==null?void 0:r.type)==="RestElement"}var Mn=new WeakMap;function Q(e){if(Mn.has(e))return Mn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Mn.set(e,t),t}function hu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var vn=new WeakMap;function le(e){if(vn.has(e))return vn.get(e);if(e.type==="ChainExpression")return le(e.expression);let t=e.arguments;return(e.type==="ImportExpression"||e.type==="TSImportType")&&(t=[e.type==="ImportExpression"?e.source:e.argument],e.options&&t.push(e.options)),vn.set(e,t),t}function Gt(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>Gt(e,t),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(n=>t(n,0),r.type==="ImportExpression"?"source":"argument"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Gn(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return[...r,e.type==="ImportExpression"?"source":"argument"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function or(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function kt(e){return(e==null?void 0:e.prettierIgnore)||d(e,h.PrettierIgnore)}var h={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},gu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&h.Leading&&!r.leading||e&h.Trailing&&!r.trailing||e&h.Dangling&&(r.leading||r.trailing)||e&h.Block&&!te(r)||e&h.Line&&!At(r)||e&h.First&&n!==0||e&h.Last&&n!==s.length-1||e&h.PrettierIgnore&&!or(r)||t&&!t(r))};function d(e,t,r){if(!O(e==null?void 0:e.comments))return!1;let n=gu(t,r);return n?e.comments.some(n):!0}function Ve(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=gu(t,r);return n?e.comments.filter(n):e.comments}var me=(e,{originalText:t})=>vt(t,P(e));function yt(e){return w(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Te(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!bt(e))}var xe=R(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Oe=R(["TSUnionType","UnionTypeAnnotation"]),qt=R(["TSIntersectionType","IntersectionTypeAnnotation"]),Je=R(["TSConditionalType","ConditionalTypeAnnotation"]);var jo=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Wt=e=>{for(let t of e.quasis)delete t.value};function Su(e,t){var n;if(e.type==="Program"&&delete t
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(Be(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Jo([...jr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var qn=class extends Error{name="InvalidDocError";constructor(t){super(No(t)),this.doc=t}},Tt=qn;var bu={};function Go(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===bu){r(s.pop());continue}r&&s.push(u,bu);let i=Be(u);if(!i)throw new Tt(u);if((t==null?void 0:t(u))!==!1)switch(i){case ge:case _e:{let a=i===ge?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case he:s.push(u.flatContents,u.breakContents);break;case fe:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case Ke:case $e:case ze:case Se:case Ze:s.push(u.contents);break;case Ne:case it:case Qe:case Ge:case oe:case Me:break;default:throw new Tt(u)}}}var pr=Go;function ft(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(Be(u)){case ge:return t(u.map(n));case _e:return t({...u,parts:u.parts.map(n)});case he:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case fe:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case Ke:case $e:case ze:case Se:case Ze:return t({...u,contents:n(u.contents)});case Ne:case it:case Qe:case Ge:case oe:case Me:return t(u);default:throw new Tt(u)}}}function ku(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return pr(e,u),n}function qo(e){if(e.type===fe&&e.break||e.type===oe&&e.hard||e.type===Me)return!0}function re(e){return ku(e,qo,!1)}function Pu(e){if(e.length>0){let t=v(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Iu(e){let t=new Set,r=[];function n(u){if(u.type===Me&&Pu(r),u.type===fe){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===fe&&r.pop().break&&Pu(r)}pr(e,n,s,!0)}function Wo(e){return e.type===oe&&!e.hard?e.soft?"":" ":e.type===he?e.flatContents:e}function cr(e){return ft(e,Wo)}function Uo(e){switch(Be(e)){case _e:if(e.parts.every(t=>t===""))return"";break;case fe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===fe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ke:case $e:case ze:case Ze:if(!e.contents)return"";break;case he:if(!e.flatContents&&!e.breakContents)return"";break;case ge:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof v(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case Ne:case it:case Qe:case Ge:case oe:case Se:case Me:break;default:throw new Tt(e)}return e}function Ut(e){return ft(e,t=>Uo(t))}function ve(e,t=Rr){return ft(e,r=>typeof r=="string"?b(t,r.split(`
|
||||
`)):r)}function Xo(e){if(e.type===oe)return!0}function Lu(e){return ku(e,Xo,!1)}function lr(e,t){return e.type===Se?{...e,contents:t(e.contents)}:t(e)}function wu(e){let t=!0;return pr(e,r=>{switch(Be(r)){case Ne:if(r==="")break;case Qe:case Ge:case oe:case Me:return t=!1,!1}}),t}var Wn=()=>{},et=Wn,Un=Wn,Ou=Wn;function D(e){return et(e),{type:$e,contents:e}}function be(e,t){return et(t),{type:Ke,contents:t,n:e}}function l(e,t={}){return et(e),Un(t.expandedStates,!0),{type:fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _u(e){return be(Number.NEGATIVE_INFINITY,e)}function Jr(e){return be(-1,e)}function tt(e,t){return l(e[0],{...t,expandedStates:e})}function Nr(e){return Ou(e),{type:_e,parts:e}}function S(e,t="",r={}){return et(e),t!==""&&et(t),{type:he,breakContents:e,flatContents:t,groupId:r.groupId}}function xt(e,t){return et(e),{type:ze,contents:e,groupId:t.groupId,negate:t.negate}}function Xn(e){return et(e),{type:Ze,contents:e}}var je={type:Ge},Ce={type:Me};var Yn={type:oe,hard:!0},Yo={type:oe,hard:!0,literal:!0},x={type:oe},E={type:oe,soft:!0},F=[Yn,Ce],Rr=[Yo,Ce],mr={type:it};function b(e,t){et(e),Un(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Mu(e,t,r){et(e);let n=e;if(t>0){for(let s=0;s<Math.floor(t/r);++s)n=D(n);n=be(t%r,n),n=be(Number.NEGATIVE_INFINITY,n)}return n}function at(e,t){return et(t),e?{type:Se,label:e,contents:t}:t}function Ho(e){if(!te(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Hn=new WeakMap;function Vo(e){return Hn.has(e)||Hn.set(e,Ho(e)),Hn.get(e)}var vu=Vo;function ju(e,t){let r=e.node;if(At(r))return t.originalText.slice(j(r),P(r)).trimEnd();if(vu(r))return $o(r);if(te(r))return["/*",ve(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function $o(e){let t=e.value.split(`
|
||||
`);return["/*",b(F,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}var ts={};xr(ts,{endOfLine:()=>rp,ownLine:()=>tp,remaining:()=>np});function Ko(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Vn(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Ko(e)}function De(e,t){t.leading=!0,t.trailing=!1,Vn(e,t)}function Pe(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Vn(e,t)}function z(e,t){t.leading=!1,t.trailing=!0,Vn(e,t)}function Qo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Ye(e,n),n=_t(e,n),n=Mt(e,n),n=He(e,n);return n}var ot=Qo;function zo(e,t){let r=ot(e,t);return r===!1?"":e.charAt(r)}var ke=zo;function Zo(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var ie=Zo;var $n=new WeakMap;function ep(e){return $n.has(e)||$n.set(e,te(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),$n.get(e)}var Gr=ep;var Ru=(e,t)=>At(e)||!ie(t,j(e),P(e));function tp(e){return[Yu,Nu,Wu,fp,up,Qn,zn,Ju,Gu,Cp,Ep,es,Xu,Ap,qu,Uu,Zn,ip,Bp,Hu].some(t=>t(e))}function rp(e){return[sp,Wu,Nu,Xu,Qn,zn,Ju,Gu,Uu,Dp,Fp,es,xp,Zn,gp,Sp,bp,Hu].some(t=>t(e))}function np(e){return[Yu,Qn,zn,ap,yp,qu,es,mp,lp,Zn,hp].some(t=>t(e))}function It(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?De(r,t):Pe(e,t)}function Kn(e,t){e.type==="BlockStatement"?It(e,t):De(e,t)}function sp({comment:e,followingNode:t}){return t&&Gr(e)?(De(t,e),!0):!1}function Qn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(ke(s,P(e))===")")return z(t,e),!0;if(t===r.consequent&&n===r.alternate){let i=ot(s,P(r.consequent));if(j(e)<i||r.alternate.type==="BlockStatement")return t.type==="BlockStatement"?(z(t,e),!0):Ru(e,s)&&!ie(s,j(t),j(e))?(z(t,e),!0):(Pe(r,e),!0)}return n.type==="BlockStatement"?(It(n,e),!0):n.type==="IfStatement"?(Kn(n.consequent,e),!0):r.consequent===n?(De(n,e),!0):!1}function zn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:ke(s,P(e))===")"?(z(t,e),!0):n.type==="BlockStatement"?(It(n,e),!0):r.body===n?(De(n,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(z(t,e),!0):n.type==="BlockStatement"?(It(n,e),!0):n.type==="TryStatement"?(Kn(n.finalizer,e),!0):n.type==="CatchClause"?(Kn(n.body,e),!0):!1}function up({comment:e,enclosingNode:t,followingNode:r}){return G(t)&&(r==null?void 0:r.type)==="Identifier"?(De(t,e),!0):!1}function ip({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||Je(t))?!1:(r==null?void 0:r.type)==="ConditionalExpression"||Je(r)?(Pe(t,e),!0):!1}function Nu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!ie(s,P(t),j(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||Je(r))&&n?u.experimentalTernaries&&r.alternate===n&&!(te(e)&&!ie(u.originalText,j(e),P(e)))?(Pe(r,e),!0):(De(n,e),!0):!1}function ap({comment:e,precedingNode:t,enclosingNode:r}){return Te(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(z(r.value.left,e),!0):!1}var op=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Gu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(op.has(r==null?void 0:r.type)){if(O(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return z(v(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return It(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return z(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?z(t,e):Pe(r,e,s),!0}}return!1}var pp=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);function qu({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&ke(n,P(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&ke(n,P(t))!==":"?(z(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&pp.has(r==null?void 0:r.type)&&(At(e)||e.placement==="ownLine")?(z(t,e),!0):!1}var cp=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function lp({comment:e,precedingNode:t,enclosingNode:r,text:n}){return ke(n,P(e))!=="("?!1:t&&cp.has(r==null?void 0:r.type)?(z(t,e),!0):!1}function mp({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=ot(r,P(e));return n!==!1&&r.slice(n,n+2)==="=>"?(Pe(t,e),!0):!1}function yp({comment:e,enclosingNode:t,text:r}){return ke(r,P(e))!==")"?!1:t&&(Vu(t)&&Q(t).length===0||yt(t)&&le(t).length===0)?(Pe(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Q(t.value).length===0?(Pe(t.value,e),!0):!1}function fp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="ComponentTypeParameter"&&((r==null?void 0:r.type)==="DeclareComponent"||(r==null?void 0:r.type)==="ComponentTypeAnnotation")&&(n==null?void 0:n.type)!=="ComponentTypeParameter"?(z(t,e),!0):((t==null?void 0:t.type)==="ComponentParameter"||(t==null?void 0:t.type)==="RestElement")&&(r==null?void 0:r.type
Line truncated
|
||||
`;default:return`
|
||||
`}}var Ie=Symbol("MODE_BREAK"),pt=Symbol("MODE_FLAT"),Xt=Symbol("cursor"),ns=Symbol("DOC_FILL_PRINTED_LENGTH");function Ku(){return{value:"",length:0,queue:[]}}function wp(e,t){return ss(e,{type:"indent"},t)}function Op(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Ku():t<0?ss(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:ss(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function ss(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let c of n)switch(c.type){case"indent":m(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":m(),s+=c.n,u+=c.n.length;break;case"numberAlign":i+=1,a+=c.n;break;default:throw new Error(`Unexpected type '${c.type}'`)}return y(),{...e,value:s,length:u,queue:n};function o(c){s+=" ".repeat(c),u+=r.tabWidth*c}function p(c){s+=" ".repeat(c),u+=c}function m(){r.useTabs?f():y()}function f(){i>0&&o(i),C()}function y(){a>0&&p(a),C()}function C(){i=0,a=0}}function us(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===Xt){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Xt);return t}function qr(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:m}=a.pop(),f=Be(m);switch(f){case Ne:o.push(m),r-=st(m);break;case ge:case _e:{let y=f===ge?m:m.parts,C=m[ns]??0;for(let c=y.length-1;c>=C;c--)a.push({mode:p,doc:y[c]});break}case $e:case Ke:case ze:case Se:a.push({mode:p,doc:m.contents});break;case Qe:r+=us(o);break;case fe:{if(u&&m.break)return!1;let y=m.break?Ie:p,C=m.expandedStates&&y===Ie?v(!1,m.expandedStates,-1):m.contents;a.push({mode:y,doc:C});break}case he:{let C=(m.groupId?s[m.groupId]||pt:p)===Ie?m.breakContents:m.flatContents;C&&a.push({mode:p,doc:C});break}case oe:if(p===Ie||m.hard)return!0;m.soft||(o.push(" "),r--);break;case Ze:n=!0;break;case Ge:if(n)return!1;break}}return!1}function is(e,t){let r={},n=t.printWidth,s=$u(t.endOfLine),u=0,i=[{ind:Ku(),mode:Ie,doc:e}],a=[],o=!1,p=[],m=0;for(Iu(e);i.length>0;){let{ind:y,mode:C,doc:c}=i.pop();switch(Be(c)){case Ne:{let A=s!==`
|
||||
`?X(!1,c,`
|
||||
`,s):c;a.push(A),i.length>0&&(u+=st(A));break}case ge:for(let A=c.length-1;A>=0;A--)i.push({ind:y,mode:C,doc:c[A]});break;case it:if(m>=2)throw new Error("There are too many 'cursor' in doc.");a.push(Xt),m++;break;case $e:i.push({ind:wp(y,t),mode:C,doc:c.contents});break;case Ke:i.push({ind:Op(y,c.n,t),mode:C,doc:c.contents});break;case Qe:u-=us(a);break;case fe:switch(C){case pt:if(!o){i.push({ind:y,mode:c.break?Ie:pt,doc:c.contents});break}case Ie:{o=!1;let A={ind:y,mode:pt,doc:c.contents},T=n-u,B=p.length>0;if(!c.break&&qr(A,i,T,B,r))i.push(A);else if(c.expandedStates){let g=v(!1,c.expandedStates,-1);if(c.break){i.push({ind:y,mode:Ie,doc:g});break}else for(let _=1;_<c.expandedStates.length+1;_++)if(_>=c.expandedStates.length){i.push({ind:y,mode:Ie,doc:g});break}else{let M=c.expandedStates[_],J={ind:y,mode:pt,doc:M};if(qr(J,i,T,B,r)){i.push(J);break}}}else i.push({ind:y,mode:Ie,doc:c.contents});break}}c.id&&(r[c.id]=v(!1,i,-1).mode);break;case _e:{let A=n-u,T=c[ns]??0,{parts:B}=c,g=B.length-T;if(g===0)break;let _=B[T+0],M=B[T+1],J={ind:y,mode:pt,doc:_},I={ind:y,mode:Ie,doc:_},q=qr(J,[],A,p.length>0,r,!0);if(g===1){q?i.push(J):i.push(I);break}let k={ind:y,mode:pt,doc:M},W={ind:y,mode:Ie,doc:M};if(g===2){q?i.push(k,J):i.push(W,I);break}let ne=B[T+2],Z={ind:y,mode:C,doc:{...c,[ns]:T+2}};qr({ind:y,mode:pt,doc:[_,M,ne]},[],A,p.length>0,r,!0)?i.push(Z,k,J):q?i.push(Z,W,J):i.push(Z,W,I);break}case he:case ze:{let A=c.groupId?r[c.groupId]:C;if(A===Ie){let T=c.type===he?c.breakContents:c.negate?c.contents:D(c.contents);T&&i.push({ind:y,mode:C,doc:T})}if(A===pt){let T=c.type===he?c.flatContents:c.negate?D(c.contents):c.contents;T&&i.push({ind:y,mode:C,doc:T})}break}case Ze:p.push({ind:y,mode:C,doc:c.contents});break;case Ge:p.length>0&&i.push({ind:y,mode:C,doc:Yn});break;case oe:switch(C){case pt:if(c.hard)o=!0;else{c.soft||(a.push(" "),u+=1);break}case Ie:if(p.length>0){i.push({ind:y,mode:C,doc:c},...p.reverse()),p.length=0;break}c.literal?y.root?(a.push(s,y.root.value),u=y.root.length):(a.push(s),u=0):(u-=us(a),a.push(s+y.value),u=y.length);break}break;case Se:i.push({ind:y,mode:C,doc:c.contents});break;case Me:break;default:throw new Tt(c)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let f=a.indexOf(Xt);if(f!==-1){let y=a.indexOf(Xt,f+1);if(y===-1)return{formatted:a.filter(T=>T!==Xt).join("")};let C=a.slice(0,f).join(""),c=a.slice(f+1,y).join(""),A=a.slice(y+1).join("");return{formatted:C+c+A,cursorNodeStart:C.length,cursorNodeText:c}}return{formatted:a.join("")}}function _p(e,t,r=0){let n=0;for(let s=r;s<e.length;++s)e[s]===" "?n=n+t-n%t:n++;return n}var Qu=_p;function Mp(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:Qu(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var zu=Mp;function Wr(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&Rp(e)){let p=vp(e,t,r);if(p)return p}let u="expressions";n.type==="TSTemplateLiteralType"&&(u="types");let i=[],a=e.map(r,u);i.push(je,"`");let o=0;return e.each(({index:p,node:m})=>{if(i.push(r()),m.tail)return;let{tabWidth:f}=t,y=m.value.raw,C=y.includes(`
|
||||
`)?zu(y,f):o;o=C;let c=a[p],A=n[u][p],T=ie(t.originalText,P(m),j(n.quasis[p+1]));if(!T){let g=is(c,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;g.includes(`
|
||||
`)?T=!0:c=g}T&&(d(A)||A.type==="Identifier"||G(A)||A.type==="ConditionalExpression"||A.type==="SequenceExpression"||xe(A)||Fe(A))&&(c=[D([E,c]),E]);let B=C===0&&y.endsWith(`
|
||||
`)?be(Number.NEGATIVE_INFINITY,c):Mu(c,C,f);i.push(l(["${",B,je,"}"]))},"quasis"),i.push("`"),i}function Zu(e,t,r){let n=r("quasi"),{node:s}=e,u="",i=Ve(s.quasi,h.Leading)[0];return i&&(ie(t.originalText,P(s.typeArguments??s.typeParameters??s.tag),j(i))?u=E:u=" "),at(n.label&&{tagged:!0,...n.label},[r("tag"),r(s.typeArguments?"typeArguments":"typeParameters"),u,je,n])}function vp(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(y=>"${"+is(y,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let y=1;y<n.quasis.length;y++){let C=v(!1,o,-1),c=a[y-1];C.cells.push(c),c.includes(`
|
||||
`)&&(C.hasLineBreak=!0),n.quasis[y].value.raw.includes(`
|
||||
`)&&o.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...o.map(y=>y.cells.length)),m=Array.from({length:p}).fill(0),f=[{cells:s},...o.filter(y=>y.cells.length>0)];for(let{cells:y}of f.filter(C=>!C.hasLineBreak))for(let[C,c]of y.entries())m[C]=Math.max(m[C],st(c));return i.push(je,"`",D([F,b(F,f.map(y=>b(" | ",y.cells.map((C,c)=>y.hasLineBreak?C:C+" ".repeat(m[c]-st(C))))))]),F,"`"),i}}function jp(e,t){let{node:r}=e,n=t();return d(r)&&(n=l([D([E,n]),E])),["${",n,je,"}"]}function Yt(e,t){return e.map(r=>jp(r,t),"expressions")}function Ur(e,t){return ft(e,r=>typeof r=="string"?t?X(!1,r,/(\\*)`/gu,"$1$1\\`"):as(r):r)}function as(e){return X(!1,e,/([\\`]|\$\{)/gu,String.raw`\$1`)}function Rp({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var ps=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function ei(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Te(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>U(n)&&s==="elements",r,...ps)||e.match(t,r,...ps)}function ti(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Te(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ps)}function os(e,t){return d(e,h.Block|h.Leading,({value:r})=>r===` ${t} `)}function Xr({node:e,parent:t},r){return os(e,r)||Jp(t)&&os(t,r)||t.type==="ExpressionStatement"&&os(t,r)}function Jp(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Np(e,t,r){let{node:n}=r,s=n.quasis.map(m=>m.value.raw),u=0,i=s.reduce((m,f,y)=>y===0?f:m+"@prettier-placeholder-"+u+++"-id"+f,""),a=await e(i,{parser:"scss"}),o=Yt(r,t),p=Gp(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",D([F,p]),E,"`"]}function Gp(e,t){if(!O(t))return e;let r=0,n=ft(Ut(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/u).map((u,i)=>i%2===0?ve(u):(r++,t[u])));return t.length===r?n:null}function qp({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Yr(e){return e.type==="Identifier"&&e.name==="styled"}function ri(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function Wp({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Yr(t.object)||ri(t);case"CallExpression":return Yr(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Yr(t.callee.object.object)||ri(t.callee.object))||t.callee.object.type==="CallExpression"&&Yr(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Up({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Xp(e){if(qp(e)||Wp(e)||Up(e)||ei(e))return Np}var ni=Xp;async function Yp(e,t,r){let{node:n}=r,s=n.quasis.length,u=Yt(r,t),i=[];for(let a=0;a<s;a++){let o=n.quasis[a],p=a===0,m=a===s-1,f=o.value.cooked,y=f.split(`
|
||||
`),C=y.length,c=u[a],A=C>2&&y[0].trim()===""&&y[1].trim()==="",T=C>2&&y[C-1].trim()===""&&y[C-2].trim()==="",B=y.every(_=>/^\s*(?:#[^\n\r]*)?$/u.test(_));if(!m&&/#[^\n\r]*$/u.test(y[C-1]))return null;let g=null;B?g=Hp(y):g=await e(f,{parser:"graphql"}),g?(g=Ur(g,!1),!p&&A&&i.push(""),i.push(g),!m&&T&&i.push("")):!p&&!m&&A&&i.push(""),c&&i.push(c)}return["`",D([F,b(F,i)]),F,"`"]}function Hp(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([F,u]):t.push(u),r=!0);return t.length===0?null:b(F,t)}function Vp({node:e,parent:t}){return Xr({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function $p(e){if(Vp(e))return Yp}var si=$p;var cs=0;async function ui(e,t,r,n,s){let{node:u}=n,i=cs;cs=cs+1>>>0;let a=B=>`PRETTIER_HTML_PLACEHOLDER_${B}_${i}_IN_JS`,o=u.quasis.map((B,g,_)=>g===_.length-1?B.value.cooked:B.value.cooked+a(g)).join(""),p=Yt(n,r),m=new RegExp(a(String.raw`(\d+)`),"gu"),f=0,y=await t(o,{parser:e,__onHtmlRoot(B){f=B.children.length}}),C=ft(y,B=>{if(typeof B!="string")return B;let g=[],_=B.split(m);for(let M=0;M<_.length;M++){let J=_[M];if(M%2===0){J&&(J=as(J),s.__embeddedInHtml&&(J=X(!1,J,/<\/(?=script\b)/giu,String.raw`<\/`)),g.push(J));continue}let I=Number(J);g.push(p[I])}return g}),c=/^\s/u.test(o)?" ":"",A=/\s$/u.test(o)?" ":"",T=s.htmlWhitespaceSensitivity==="ignore"?F:c&&A?x:null;return T?l(["`",D([T,l(C)]),T,"`"]):at({hug:!1},l(["`",c,f>1?D(l(C)):l(C),A,"`"]))}function Kp(e){return Xr(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Qp=ui.bind(void 0,"html"),zp=ui.bind(void 0,"angular");function Zp(e){if(Kp(e))return Qp;if(ti(e))return zp}var ii=Zp;async function ec(e,t,r){let{node:n}=r,s=X(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(o,p)=>"\\".repeat(p.length/2)+"`"),u=tc(s),i=u!=="";i&&(s=X(!1,s,new RegExp(`^${u}`,"gmu"),""));let a=Ur(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?D([E,a]):[Rr,_u(a)],E,"`"]}function tc(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function rc(e){if(nc(e))return ec}function nc({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var ai=rc;function sc(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||uc(t))return;let r;for(let n of[ni,si,ii,ai])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&at({embed:!0,...u.label},u)}}function uc({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var oi=sc;var ic=/\*\/$/,ac=/^\/\*\*?/,mi=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,oc=/(^|\s+)\/\/([^\n\r]*)/g,pi=/^(\r?\n)+/,pc=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,ci=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,cc=/(\r?\n|^) *\* ?/g,yi=[];function fi(e){let t=e.match(mi);return t?t[0].trimStart():""}function Di(e){let t=e.match(mi),r=t==null?void 0:t[0];return r==null?e:e.slice(r.length)}function Ei(e){let t=`
|
||||
`;e=X(!1,e.replace(ac,"").replace(ic,""),cc,"$1");let r="";for(;r!==e;)r=e,e=X(!1,e,pc,`${t}$1 $2${t}`);e=e.replace(pi,"").trimEnd();let n=Object.create(null),s=X(!1,e,ci,"").replace(pi,"").trimEnd(),u;for(;u=ci.exec(e);){let i=X(!1,u[2],oc,"");if(typeof n[u[1]]=="string"||Array.isArray(n[u[1]])){let a=n[u[1]];n[u[1]]=[...yi,...Array.isArray(a)?a:[a],i]}else n[u[1]]=i}return{comments:s,pragmas:n}}function Fi({comments:e="",pragmas:t={}}){let r=`
|
||||
`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>li(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${li(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length>0?s+r:"")+a+u}function li(e,t){return[...yi,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var Ci="format";function lc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Ai=lc;function mc(e){let t=Ai(e);t&&(e=e.slice(t.length+1));let r=fi(e),{pragmas:n,comments:s}=Ei(r);return{shebang:t,text:e,pragmas:n,comments:s}}function di(e){let{shebang:t,text:r,pragmas:n,comments:s}=mc(e),u=Di(r),i=Fi({pragmas:{[Ci]:"",...n},comments:s.trimStart()});return(t?`${t}
|
||||
`:"")+i+(u.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+u}function yc(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let m of n)s(m)>=o&&u(m)<=p&&i.add(m);return r.slice(o,p)}var Ti=yc;function ls(e,t){var u,i,a,o,p,m,f,y,C;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Fc(r)&&yr(e))return!0;if(fc(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(A=>A.type==="ForOfStatement"))==null?void 0:i.left;if(c&&pe(c,A=>A===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(T=>T.type==="ExpressionStatement"||T.type==="ForStatement"||T.type==="ForInStatement"),A=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(A&&pe(A,T=>T===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let c=e.findAncestor(A=>!xe(A));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(A=>A.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&pe(c,A=>A===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(A=>A.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&pe(c,A=>A===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&O(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return xi(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!Ac(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,A)=>A==="returnType"&&c.type==="ArrowFunctionExpression")&&Ec(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(c,A)=>A==="declarations"&&c.type==="VariableDeclaration",(c,A)=>A==="left"&&c.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&Dc(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!xe(r);case"ConditionalExpression":return xe(r)||fu(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||xe(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:A}=r;if(!c&&A!=="TSTypeAssertion")return!0;let T=sr(c),B=s.operator,g=sr(B);return g>T||n==="right"&&g===T||g===T&&!ar(B,c)?!0:g<T&&c==="%"?B==="+"||B==="-":!!Tu
Line truncated
|
||||
\r `),Cs=e=>e===""||e===x||e===F||e===E;function gc(e,t,r){var _,M,J,I,q;let{node:n}=e;if(n.type==="JSXElement"&&Jc(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(k=>Nc(k)?{type:"JSXText",value:" ",raw:" "}:k);let i=n.children.some(Y),a=n.children.filter(k=>k.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=re(s)||i||o||a,m=e.parent.rootMarker==="mdx",f=t.singleQuote?"{' '}":'{" "}',y=m?x:S([f,E]," "),C=((M=(_=n.openingElement)==null?void 0:_.name)==null?void 0:M.name)==="fbt",c=Sc(e,t,r,y,C),A=n.children.some(k=>fr(k));for(let k=c.length-2;k>=0;k--){let W=c[k]===""&&c[k+1]==="",ne=c[k]===F&&c[k+1]===""&&c[k+2]===F,Z=(c[k]===E||c[k]===F)&&c[k+1]===""&&c[k+2]===y,lt=c[k]===y&&c[k+1]===""&&(c[k+2]===E||c[k+2]===F),L=c[k]===y&&c[k+1]===""&&c[k+2]===y,se=c[k]===E&&c[k+1]===""&&c[k+2]===F||c[k]===F&&c[k+1]===""&&c[k+2]===E;ne&&A||W||Z||L||se?c.splice(k,2):lt&&c.splice(k+1,2)}for(;c.length>0&&Cs(v(!1,c,-1));)c.pop();for(;c.length>1&&Cs(c[0])&&Cs(c[1]);)c.shift(),c.shift();let T=[""];for(let[k,W]of c.entries()){if(W===y){if(k===1&&wu(c[k-1])){if(c.length===2){T.push([T.pop(),f]);continue}T.push([f,F],"");continue}else if(k===c.length-1){T.push([T.pop(),f]);continue}else if(c[k-1]===""&&c[k-2]===F){T.push([T.pop(),f]);continue}}k%2===0?T.push([T.pop(),W]):T.push(W,""),re(W)&&(p=!0)}let B=A?Nr(T):l(T,{shouldBreak:!0});if(((J=t.cursorNode)==null?void 0:J.type)==="JSXText"&&n.children.includes(t.cursorNode)?B=[mr,B,mr]:((I=t.nodeBeforeCursor)==null?void 0:I.type)==="JSXText"&&n.children.includes(t.nodeBeforeCursor)?B=[mr,B]:((q=t.nodeAfterCursor)==null?void 0:q.type)==="JSXText"&&n.children.includes(t.nodeAfterCursor)&&(B=[B,mr]),m)return B;let g=l([s,D([F,B]),F,u]);return p?g:tt([l([s,...c,u]),g])}function Sc(e,t,r,n,s){let u="",i=[u];function a(p){u=p,i.push([i.pop(),p])}function o(p){p!==""&&(u=p,i.push(p,""))}return e.each(({node:p,next:m})=>{if(p.type==="JSXText"){let f=ae(p);if(fr(p)){let y=Hr.split(f,!0);y[0]===""&&(y.shift(),/\n/u.test(y[0])?o(Bi(s,y[1],p,m)):o(n),y.shift());let C;if(v(!1,y,-1)===""&&(y.pop(),C=y.pop()),y.length===0)return;for(let[c,A]of y.entries())c%2===1?o(x):a(A);C!==void 0?/\n/u.test(C)?o(Bi(s,u,p,m)):o(n):o(Si(s,u,p,m))}else/\n/u.test(f)?f.match(/\n/gu).length>1&&o(F):o(n)}else{let f=r();if(a(f),m&&fr(m)){let C=Hr.trim(ae(m)),[c]=Hr.split(C);o(Si(s,c,p,m))}else o(F)}},"children"),i}function Si(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?E:F:E}function Bi(e,t,r,n){return e?F:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?F:E:F}var Bc=new Set(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function bc(e,t,r){let{parent:n}=e;if(Bc.has(n.type))return t;let s=Pc(e),u=Le(e,r);return l([u?"":S("("),D([E,t]),E,u?"":S(")")],{shouldBreak:s})}function Pc(e){return e.match(void 0,t=>t.type==="ArrowFunctionExpression",w)&&(e.match(void 0,void 0,void 0,t=>t.type==="JSXExpressionContainer")||e.match(void 0,void 0,void 0,t=>t.type==="ChainExpression",t=>t.type==="JSXExpressionContainer"))}function kc(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(K(n.value)){let i=ae(n.value),a=X(!1,X(!1,i.slice(1,-1),"'","'"),""",'"'),o=Sr(a,t.jsxSingleQuote);a=o==='"'?X(!1,a,'"',"""):X(!1,a,"'","'"),u=e.call(()=>Ee(e,ve(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function Ic(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!d(u)&&(U(u)||ue(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||w(u)||u.type==="ChainExpression"&&w(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||Y(i)&&(u.type==="ConditionalExpression"||Fe(u)));return s(n.expression,e.parent)?l(["{",r("expression"),je,"}"]):l(["{",D([E,r("expression")]),E,je,"}"])}function Lc(e,t,r){var a,o;let{node:n}=e,s=d(n.name)||d(n.typeParameters)||d(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&K(n.attributes[0].value)&&!n.attributes[0].value.value.includes(`
|
||||
`)&&!s&&!d(n.attributes[0]))return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>K(p.value)&&p.value.value.includes(`
|
||||
`)),i=t.singleAttributePerLine&&n.attributes.length>1?F:x;return l(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),D(e.map(()=>[i,r()],"attributes")),...wc(n,t,s)],{shouldBreak:u})}function wc(e,t,r){return e.selfClosing?[x,"/>"]:Oc(e,t,r)?[">"]:[E,">"]}function Oc(e,t,r){let n=e.attributes.length>0&&d(v(!1,e.attributes,-1),h.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function _c(e,t,r){let{node:n}=e,s=[];s.push("</");let u=r("name");return d(n.name,h.Leading|h.Line)?s.push(D([F,u]),F):d(n.name,h.Leading|h.Block)?s.push(" ",u):s.push(u),s.push(">"),s}function Mc(e,t){let{node:r}=e,n=d(r),s=d(r,h.Line),u=r.type==="JSXOpeningFragment";return[u?"<":"</",D([s?F:n&&!u?" ":"",N(e,t)]),s?F:"",">"]}function vc(e,t,r){let n=Ee(e,gc(e,t,r),t);return bc(e,n,t)}function jc(e,t){let{node:r}=e,n=d(r,h.Line);return[N(e,t,{indent:n}),n?F:""]}function Rc(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!d(s)||!rs(e)?u:[D([E,Ee(e,u,t)]),E]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function bi(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return kc(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return b(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return b(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Rc(e,t,r);case"JSXExpressionContainer":return Ic(e,t,r);case"JSXFragment":case"JSXElement":return vc(e,t,r);case"JSXOpeningElement":return Lc(e,t,r);case"JSXClosingElement":return _c(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return Mc(e,t);case"JSXEmptyExpression":return jc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new qe(n,"JSX")}}function Jc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!fr(t)}function fr(e){return e.type==="JSXText"&&(Hr.hasNonWhitespaceCharacter(ae(e))||!/\n/u.test(ae(e)))}function Nc(e){return e.type==="JSXExpressionContainer"&&K(e.expression)&&e.expression.value===" "&&!d(e.expression)}function Pi(e){let{node:t,parent:r}=e;if(!Y(t)||!Y(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!fr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&kt(u.expression)}function Gc(e){return kt(e.node)||Pi(e)}var Vr=Gc;var qc=0;function $r(e,t,r){var M;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((M=e.root.extra)==null?void 0:M.__isUsingHackPipeline),p=As(e,t,r,!1,a);if(a)return p;if(o)return l(p);if(w(s)&&s.callee===n||s.type==="UnaryExpression"||G(s)&&!s.computed)return l([D([E,...p]),E]);let m=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!w(u)||s.type==="TemplateLiteral",f=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Te(s),y=Fe(n.left)&&ar(n.operator,n.left.operator);if(m||Ht(n)&&!y||!Ht(n)&&f)return l(p);if(p.length===0)return"";let C=Y(n.right),c=p.findIndex(J=>typeof J!="string"&&!Array.isArray(J)&&J.type===fe),A=p.slice(0,c===-1?1:c+1),T=p.slice(A.length,C?-1:void 0),B=Symbol("logicalChain-"+ ++qc),g=l([...A,D(T)],{id:B});if(!C)return g;let _=v(!1,p,-1);return l([g,xt(_,{groupId:B})])}function As(e,t,r,n,s){var B;let{node:u}=e;if(!Fe(u))return[l(r())];let i=[];ar(u.operator,u.left.operator)?i=e.call(g=>As(g,t,r,!0,s),"left"):i.push(l(r("left")));let a=Ht(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Wc(e,t))&&!de(t.originalText,u.right),m=!d(u.right,h.Leading,Gr)&&de(t.originalText,u.right),f=u.type==="NGPipeExpression"?"|":u.operator,y=u.type==="NGPipeExpression"&&u.arguments.length>0?l(D([E,": ",b([x,": "],e.map(()=>be(2,l(r())),"arguments"))])):"",C;if(a)C=[f,de(t.originalText,u.right)?D([x,r("right"),y]):[" ",r("right"),y]];else{let _=f==="|>"&&((B=e.root.extra)==null?void 0:B.__isUsingHackPipeline)?e.call(M=>As(M,t,r,!0,s),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let M="";if(m)switch(Be(_)){case ge:M=_.splice(0,1)[0];break;case Se:M=_.contents.splice(0,1)[0];break}C=[x,M,f," ",_,y]}else C=[o?x:"",f,o?" ":x,_,y]}let{parent:c}=e,A=d(u.left,h.Trailing|h.Line)
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
flow: Parser;
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var hA0=Object.create;var g5=Object.defineProperty;var yA0=Object.getOwnPropertyDescriptor;var gA0=Object.getOwnPropertyNames;var _A0=Object.getPrototypeOf,wA0=Object.prototype.hasOwnProperty;var bA0=(a0,W0)=>()=>(W0||a0((W0={exports:{}}).exports,W0),W0.exports),lY=(a0,W0)=>{for(var bx in W0)g5(a0,bx,{get:W0[bx],enumerable:!0})},pY=(a0,W0,bx,Yx)=>{if(W0&&typeof W0=="object"||typeof W0=="function")for(let x1 of gA0(W0))!wA0.call(a0,x1)&&x1!==bx&&g5(a0,x1,{get:()=>W0[x1],enumerable:!(Yx=yA0(W0,x1))||Yx.enumerable});return a0};var TA0=(a0,W0,bx)=>(bx=a0!=null?hA0(_A0(a0)):{},pY(W0||!a0||!a0.__esModule?g5(bx,"default",{value:a0,enumerable:!0}):bx,a0)),EA0=a0=>pY(g5({},"__esModule",{value:!0}),a0);var kY=bA0(mj=>{(function(a0){typeof globalThis!="object"&&(this?W0():(a0.defineProperty(a0.prototype,"_T_",{configurable:!0,get:W0}),_T_));function W0(){var bx=this||self;bx.globalThis=bx,delete a0.prototype._T_}})(Object);(function(a0){"use strict";var W0="loc",bx=70416,Yx=69748,x1=163,D1=92159,Ie=43587,k2="labeled_statement",Rr="&=",_1="int_of_string",Ce=110591,Qs=92909,Qa=11559,$o="regexp",_5=43301,Qp=11703,w5=122654,Za=255,Ej="%ni",b5=68252,Aj=232,T5=42785,Kn="declare_variable",Zp="while",E5=66938,A5=70301,S5=124907,x4=126515,Sj=218,Hn="pattern_identifier",P5=67643,Vn="export_source",I5=216,C5=64279,Pj="Out_of_memory",N5=113788,Ij="comments",O5=126624,Cj="win32",$n="object_key_bigint_literal",Nj=185,Oj=283,r4=123214,Wo="constructor",j5=69955,Wn="import_declaration",D5=68437,F5="Failure",e4="Unix.Unix_error",R5=64255,M5=42539,L5=110579,Qn="export_default_declaration",Zn="jsx_attribute_name",t4=11727,q5=43002,n4=126500,x7="component_param_pattern",jj="collect_comments_opt",r7="match_unary_pattern",e7="keyof_type",Dj="Invalid binary/octal ",Fj="range",U5=170,xs="false",B5=43798,Rj=", characters ",t7="object_type_property_getter",X5=65547,G5=126467,Y5=65007,J5=42237,z5=8318,K5=71215,n7="object_property_type",u7="type_alias",H5=67742,i7="function_body",Mj=304,V5=68111,u4=120745,$5=71959,i4=43880,Lj="Match_failure",qj=280,f7="type_cast",lt=109,rs="void",W5="generator",Q5=125124,Z5=101589,f4=94179,Uj=">>>",c4=70404,c7="optional_indexed_access_type",W1="argument",a7="object_property",s7="object_type_property",xy=67004,ry=42783,ey=68850,Bj="@",ty=43741,ny=43487,a4="object",Xj="end",s4=126571,uy=71956,iy=208,fy=126566,cy=67702,Gj="EEXIST",o7="this_expression",Yj=203,ay=11507,sy=113807,o4=119893,oy=42735,Ql="rest",v7="null_literal",Zl="protected",vy=43615,m2=8231,ly=68149,py=73727,ky=72348,my=92995,Qo=224,dy=11686,hy=43013,l7="assignment_pattern",yy=12329,p7="function_type",Zo=192,k7="jsx_element_name",gy=70018,m7="catch_clause_pattern",v4=126540,d7="template_literal",_y=120654,wy=68497,by=67679,h7="readonly_type",Ty=68735,Ey="<",l4=": No such file or directory",Ay=66915,Sy="chain",Jj="!",y7="object_type",Py=43712,p4=64297,Iy=183969,Cy=43503,Ny=67591,xv=65278,Oy=67669,g7="for_of_assignment_pattern",x6="`",jy=11502,_7="catch_body",Dy=42191,Zs=-744106340,Fy=182,rv=":",zj="a string",Ry=65663,My=66978,Ly=71947,k4=43519,qy=71086,Uy=125258,By=12538,w7="expression_or_spread",Kj="Printexc.handle_uncaught_exception",m4=69956,d4=120122,h4=247,Hj=231,Xy=" : flags Open_rdonly and Open_wronly are not compatible",b7="statement_fork_point",Vj=710,$j=-692038429,ze="static",Gy=55203,Yy=64324,Jy=64111,Wj="!==",zy=120132,Ky=124903,r6="class",Hy=222,T7="pattern_number_literal",es="kind",Vy=71903,E7="variable_declarator",A7="typeof_expression",$y=126627,Wy=70084,Qj=228,y4=70480,S7="class_private_field",Qy=239,g4=120713,on=65535,P7="private_name",Zy=43137,I7="remote_identifier",x9=70161,C7="label_identifier",r9="src/parser/statement_parser.ml",e9=8335,t9=19903,n9=64310,ev="_",N7="for_init_declaration",Zj="infer",u9=64466,i9=43018,xD="tokens",f9=92735,c9=66954,a9=65473,s9=70285,O7="sequence",o9="compare: functional value",v9=69890,e6=1e3,l9=65487,p9=42653,rD="\\\\",eD="%=",j7="match_member_pattern_base",k9=72367,D7="function_rest_param",tD="/static/",m9=124911,d9=65276,_4=126558,h9=11498,nD=137,F7="export_default_declaration_decl",y9="cases",w4=126602,R7="jsx_child",Ke="continue",g9=42962,uD="importKind",o1=122,C3="Literal",M7="pattern_object_property_identifier_key",_9=42508,xo="in",w9=55238,b9=67071,T9=70831,E9=72161,A9=67462,iD="<<=",S9=43009,P9=66383,b4=67827,I9=72202,C9=69839,N9=66775,fD="-=",tv=8202,O9=70105,j9=120538,L7="for_in_left_declaration",D9="rendersType",T4=126563,F9=70708,E4=126523,cD=166,q7="match_",aD=202,R9=110951,ts="component",A4=126552,M9=66977,sD=213,U7="enum_member_identifier",oD=210,B7="enum_bigint_body",vD=">=",L9=126495,q9="specifiers",lD=-88,U9="=",Line truncated
|
||||
`,ZD="**=",yu="pattern_object_property_pattern",O_="e",j_=72712,xF="Internal Error: Found object private prop",D_="ENOENT",F_=-42,gu="jsx_opening_attribute",R_=67646,_u="component_type",M_=64296,L_=43887,rF="Division_by_zero",eF="EnumDefaultedMember",wu="typeof_member_identifier",q_=43792,bu="match_member_pattern_property",Tu="declare_export_declaration_decl",U_=93026,Eu="type_annotation_hint",B_=42887,X_=43881,G_=43761,vk=8526,D3=119,Y_=43866,J_=72847,z_=8348,pe=101,K_=94026,lk=72272,tF="src/parser/flow_lexer.ml",H_=120744,av=8191,F3="implies",pk=255,kk=11711,Au="match_unary_pattern_argument",V_=71235,mk=68116,nF=261,E1=100,Su="match_expression",Pu="enum_body",dk=1114111,Iu="assignment",$_=71955,hk=43260,Cu="pattern_array_e",W_=126583,uF="prefix",Nu="class_body",f6="shorthand",yk=171,Q_=66256,gk=-97,iF=" =",Z_=94032,xw=42606,Ou="match_case",rw=71839,_k=120134,ew=55291,tw=92862,nw=43019,uw=126543,R3="function",iw=111355,fw=11389,cw=70753,aw=43249,sw=64829,wk="line",ju="function_declaration",bk="undefined",fF="([^/]+)",ow=110947,vw=70002,cF="Cygwin",Du="as_expression",lw=12591,Tk=64285,pw=2048,kw=73112,Ek=126589,aF=225,Ak=43259,mw=72817,Sk=64318,dw=172,sF=209,Fu="match_binding_pattern",Ru=" ",Mu="import_source",c6="delete",oF="Enum `",Pk=126553,hw=67001,sv="default",yw=11630,Ik=206,Lu="enum_bigint_member",gw=67504,Ck=67593,_w=113791,vF="MatchObjectPatternProperty",ww=69572,qu="typeof_type",lF=212,pF="%i",Uu="function_this_param",bw=72329,no="0x",ov=8239,Tw=75075,kF=57343,Bu="pattern_bigint_literal",Ew=12341,mF=201,vv="hook",dF=": closedir failed",Aw=42959,Nk=119970,hF=278,Sw=43560,yF="||=",Xu="member_private_name",Pw=120570,Gu="object_key_identifier",Ok=223,gF="Not_found",_F=230,Yu="jsx_element_name_member_expression",Ju="string_literal",Iw=120596,Cw=43807,Nw=69687,Ow=63743,jk=72192,zu="member_property",jw=43262,Ku="class_declaration",wF="renders*",bF="%Li",Dw=126578,Hu="jsx_attribute",M3=254,Oe="empty",a6="label",Vu="object_internal_slot_property_type",Dk=120133,Fw=43359,He="predicate",TF="??=",Rw=43697,Mw=-43,$u="default_opt",EF="the start of a statement",Lw=67826,Wu="object_",Qu="class_element",Fk=11631,Rk=70855,Zu="opaque_type",xi="number_literal",AF=", ",Mk=8319,Lk=120004,qk=133,ri="type_params",ei="pattern_object_rest_property",W2="import",qw=72e3,Uw=67413,Bw=12343,Xw=70080,ti="intersection_type",d2=-36,Gw=70005,Uk="properties",Yw=11679,Jw=8483,zw=110587,SF=43520,ni="computed_key",PF=207,ui="class_identifier",Kw="Invalid number ",ii="function_param_pattern",lv=12288,Hw=113817,Vw=70730,$w=178207,Bk=71236,IF=167,fi="object_indexer_property_type",Ww=64286,CF="TypeAnnotation",NF=220,ci="type_identifier",ai="spread_property",si="jsx_attribute_value_expression",Qw=126519,Xk=70108,Gk=126,Yk=42999,uo="prototype",Zw=" : flags Open_text and Open_binary are not compatible",OF="**",Jk=43823,xb=": Not a directory",oi="render_type",zk=72349,L3="test",rb=43776,eb=92879,tb=11263,jF=241,nb=93052,vi="nullable_type",ub=43704,ib=64321,DF="Property",fb=72191,FF=165,s6="instanceof",cb=69247,Ve="name",Kk=126634,ab=8516,Hk="typeArguments",sb=71127,li="jsx_spread_attribute",ob=66559,vb=44031,lb=43645,n2=8233,pb=71494,kb="opaque",Vk=72967,mb=70106,pi="logical",RF="@[%s =@ ",o6="0o",$k=126554,db=71351,Wk=8484,hb=72242,Qk=120687,q3=252,yb=183983,v6="%S",ki="function_this_param_type",Zk="decorators",gb=43255,mi="catch_clause",$e="-",_b=67711,MF=": file descriptor already closed",xm=64311,rm=120539,wb="arguments",em=73062,bb=173823,Tb=42124,Eb=72095,Ab=125259,Sb=42969,tm=70280,LF=12520,Pb=69749,Ib=70066,di="binary",hi="for_in_statement",Cb=43010,qF="^=",Nb=126570,yi="for_statement",nm=126584,gi="function_return_annotation",Ob=72144,jb=8505,_i="class_expression",Db=120076,Fb=69807,Rb=40981,Mb=-24976191,Lb=72768,qb=126550,um='"',wi="call_type_arg",UF="f",pv="this",im=126628,BF="===",XF=56320,bi="declare_module_exports",Ub=120512,vn=105,Bb=119974,Xb=71450,Gb=71942,GF=195,fm=120629,YF="/=",JF=">>",Ti="declare_interface",zF=4096,Ei="pattern_array_rest_element",Yb=71338,cm=126520,Ai="as_const_expression",KF="Popping lex mode from empty stack",HF="renders?",Jb=68405,Si="member",Pi="class_extends",kv=12287,am=126590,zb=66377,io="async",Ii="pattern_array_element",U3=240,Kb=69864,mv="readonly",Hb=70460,Vb=120779,$b=66378,Ci="new_",sm=126551,Ni="pattern_object_rest_property_pattern",Oi="for_statement_init",Wb=43595,om=68296,Qb=120712,Zb=64217,xT=69295,VF="||",rT=";",eT=70461,tT=66939,$F="collect_comments",WF=279,ji="generic_type",nT=68295,uT=44002,vm=72162,Di="object_call_property_type",lm=8305,pm=119995,km="with",Fi="class_property",QF="qualification",Ri="jsx_attribute_name_namespaced",Mi="if_statement",Li="typeof_qualified_identifier",ZF=238,iT=65615,xR=176,u2="expression",mm=126559,qi="jsx_attribute_value",Ui="<2>",Bi="component_param",dm="Map.bal",hm=132,fT=70412,cT=70440,rR="<<",ym="finally",eR="v",Xi="syntax_opt",Gi="meta_property",aT=12447,sT=67514,gm=12448,Yi="object_mapped_type_property",dv="operator",tR="closedir",Ji="unary_expressLine truncated
|
||||
`,n8=120093,T6="column",$f="component_rest_param",MA=70451,LA=70312,qA=69967,u8=70279,UA=66463,BA=92975,i8=70286,Wf="pattern_object_property_computed_key",Qf="object_key_string_literal",XA="jsError",Zf="type_args",GA=8304,xM="==",gv=115,xc="declare_component",YA=120092,JA=43638,zA=66811,KA=43334,HA=66863,VA=77823,rM=143,rc="optional_call",$A=126562,f8=70162,We=104,WA=66963,_v="await",c8=70107,Q2="0",QA=72250,ZA=8507,eM=291,xS=100351,a8="AssignmentPattern",ec="type",tM="%u",rS="NonNullExpression",tc="function_expression_or_method",eS=43470,nM=242,uM="camlinternalMod.ml",nc="match_or_pattern",tS=72750,nS=69414,uS=65370,uc="syntax",iM=32752,iS=42963,fM="End_of_file",fS=12294,cS=8471,cM="elementType",aS=43782,aM="++",sS=43641,oS=71944,vS=126601,lS=78894,pS=-45,wv="null",kS=177,sM="satisfies",mS=131071,ic="import_specifier",fc="class_method",cc="type_",dS=126514,hS=8454,oM="inexact",yS=67807,gS=8525,_S=65470,wS=71352,ac="tuple_spread_element",vM=219,bS="abstract",TS=73458,Qe="return",E6=65536,s8=126548,sc="array_element",ES=-253313196,AS=186,o8="catch",oc="infer_type",SS=12295,lM="Invalid legacy octal ",PS=69762,IS=43311,CS=65437,vc="variable_declaration",pM=-696510241,lc="function_params",kM=307,NS=64316,mM=311,v8=11565,dM="infinity",OS="@]",jS=65908,pc="extends",DS=66204,FS=43784,RS=11742,l8=126503,Ze="debugger",MS=70457,cs=-86,A6=912068366,LS=68786,p8="keyof",k8=69415,qS=12686,dn=127343600,kc="declare_type_alias",hM="the",yM=233,mc="jsx_element_name_namespaced",US=72283,gM=161,dc="class_static_block",hc="function_param_type",Lt=128,BS=-673950933,m8=126591,_M="Sys_error",XS=74649,GS=74862,S6="is",YS=43738,JS=68479,wM=196,d8=70854,yc="enum_boolean_member",h8=72163,zS=92783,bM=281,gc="component_param_name",KS=68863,hn=32768,TM=2048,HS=64284,EM="@{",VS="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",y8=8455,_c="update_expression",$S=65500,P6="from",WS=68447,g8=12592,QS=92766,AM=">>=",B2=110,ZS=66431,xP=43586,wc="jsx_identifier",rP=" : file already exists",U1=128,eP=71958,tP=66717,bc="enum_boolean_body",nP=64262,$r="id",Tc="component_renders_annotation",uP=42888,iP=8584,fP=73008,SM=306,Ec="enum_symbol_body",Ac="declare_namespace",_8=72713,cP=55215,Sc="object_property_value_type",Pc="match_wildcard_pattern",Ic="for_in_assignment_pattern",w8=8485,aP=43395,PM=229,as="true",sP=43743,Cc="enum_number_member",IM=234,oP=72969,CM="expected *",E2=102,NM=200,I6="symbol",bv="source",Nc="tparam_const_modifier",vP=43714,Oc="jsx_fragment",jc="jsx_attribute_name_identifier",C6="public",lP=43442,Dc="pattern_object_property",pP=65786,kP=70783,mP=43713,dP=72160,OM="*-/",Fc="export_named_specifier",Rc="arrow_function",hP=122623,b8=70006,jM="${",yP=43814,Mc="generic_qualified_identifier_type",DM=199,Lc="jsx_spread_child",T8=8489,E8=184,FM=2047,gP=66955,qc="try_catch",_P=70497,RM=313,MM=237,wP=67431,bP=125183,LM=-602162310,yn="params",TP="consequent",EP=68029,AP=67829,SP=68095,Uc="enum_string_body",PP=93823,IP=68351,CP=65495,Bc="declare_module",Xc="match_as_pattern_target",Gc="body_expression",NP=66175,A8=191,S8=70441,P8=65141,I8="&",Yc="super_expression",C8=126564,OP=72105,tS0="fs",xt="throw",jP=68287,DP=67839,Tv=116,FP=110882,RP=69404,MP=123197,Ev=65279,K3="src/parser/type_parser.ml",LP=68115,N8=126547,O8=126556,qP=73055,Jc="member_property_expression",zc="enum_defaulted_member",UP=43071,BP=11726,Kc="component_type_rest_param",XP=68607,Hc="object_key",GP=160,Z2="variance",YP=70655,JP=70414,H3="super",zP=123583,KP=65594,N6="method",HP=73648,O6=121,VP=93951,Vc="pattern_array_element_pattern",$P=43764,WP=42993,j8=120145,QP=74879,qM=168,D8=8486,ZP=72001,$c="tagged_template",Wc="module_ref_literal",xI=65312,Av="implements",rI=43700,eI=120003,UM="Invalid_argument",BM=262,Qc=16777215,tI=83526,F8=69744,R8=12336,Zc="switch_case",XM=-61,xa="optional_member",nI=64274,M8=64322,L8=126530,uI=71998,q8=72970,iI=13311,fI=73647,cI=120074,V3="let",GM="global",ra="expression_statement",ea="component_type_params",aI=512,sI=69634,oI=67461,vI=123627,lI=64913,YM="children",JM="PropertyDefinition",zM=1026,KM="%li",ta="declare_class",pI=43258,na="indexed_access_type",kI=124926,ss=112,mI="b",ua="predicate_expression",ia="if_alternate_statement",j6="private",HM=-594953737,VM=140,dI="nan",hI=72103,U8=11735,fa="statement",yI="rmdir",B8=66512,gI="match",_I=198,wI=11734,ca="import_named_specifier",bI=69599,TI=68799,EI=194559,aa="match_array_pattern",$M=174,sa="function_",oa="bigint_literal",f1=248,X8=67638,G8=126539,AI=11557,WM=214,SI=5760,rt="break",gn="block",va="match_member_pattern",PI=123565,II=66815,A1="value",QM=1039100673,CI=69746,NI=70448,OI=74751,la="init",jI=69551,Y8=65548,pa="jsx_member_expression",J8=68096,Sv=108,z8=126521,DI=71487,ka="match_statement",FI=178205,RI=12548,ZM=" : is a directory",_n=".",MI=12348,$3=-835925911,xe="typeParameters",LI=66855,i2="typeAnnotation",Pv="bigint",ma="jsx_attribute_value_literal",qI=194,xL="T_JSX_TEXT",UI=68466,K8=126537,rL=67714067,BI=69487,H8="export",XI=43822,V8=126499,GI=55242,da="member_type_Line truncated
|
||||
`,Cz="@.",Nz="@@",Oz="@%",jz=Bj,Dz="%c",Fz="%s",Rz=pF,Mz=KM,Lz=Ej,qz=bF,Uz="%f",Bz="%B",Xz="%{",Gz="%}",Yz="%(",Jz="%)",zz="%a",Kz="%t",Hz="%?",Vz="%r",$z="%_r",Wz=[0,h2,850,23],Qz=[0,h2,837,26],Zz=[0,h2,847,28],xK=[0,h2,815,21],rK=[0,h2,819,21],eK=[0,h2,823,19],tK=[0,h2,827,22],nK=[0,h2,832,30],uK=[0,h2,851,23],iK=[0,h2,836,26],fK=[0,h2,846,28],cK=[0,h2,814,21],aK=[0,h2,818,21],sK=[0,h2,822,19],oK=[0,h2,826,22],vK=[0,h2,831,30];function pN(x){return x[2]===5?12:-6}function wq(x){return[0,0,I1(x)]}function bq(x,r){var e=Bt(x[2]),t=x[1]+r|0;if(e<t){var u=e*2|0,i=t<=u?u:t,c=I1(i);sq(x[2],0,c,0,e),x[2]=c}}function pl(x,r){bq(x,1),ls(x[2],x[1],r),x[1]=x[1]+1|0}function G2(x,r){var e=Ux(r);bq(x,e),In(r,0,x[2],x[1],e),x[1]=x[1]+e|0}function Tq(x){return ol(x[2],0,x[1])}function Eq(x){if(typeof x=="number")switch(x){case 0:return Az;case 1:return Sz;case 2:return Pz;case 3:return Iz;case 4:return Cz;case 5:return Nz;default:return Oz}switch(x[0]){case 0:return x[1];case 1:return x[1];default:return Jx(jz,Sd(1,x[1]))}}function kN(x,r){for(var e=r;;){if(typeof e=="number")return;switch(e[0]){case 0:var t=e[1];G2(x,Dz);var e=t;break;case 1:var u=e[1];G2(x,Fz);var e=u;break;case 2:var i=e[1];G2(x,Rz);var e=i;break;case 3:var c=e[1];G2(x,Mz);var e=c;break;case 4:var v=e[1];G2(x,Lz);var e=v;break;case 5:var s=e[1];G2(x,qz);var e=s;break;case 6:var l=e[1];G2(x,Uz);var e=l;break;case 7:var p=e[1];G2(x,Bz);var e=p;break;case 8:var d=e[2],T=e[1];G2(x,Xz),kN(x,T),G2(x,Gz);var e=d;break;case 9:var b=e[3],C=e[1];G2(x,Yz),kN(x,C),G2(x,Jz);var e=b;break;case 10:var N=e[1];G2(x,zz);var e=N;break;case 11:var I=e[1];G2(x,Kz);var e=I;break;case 12:var F=e[1];G2(x,Hz);var e=F;break;case 13:var L=e[1];G2(x,Vz);var e=L;break;default:var X=e[1];G2(x,$z);var e=X}}}function a2(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,a2(x[1])];case 1:return[1,a2(x[1])];case 2:return[2,a2(x[1])];case 3:return[3,a2(x[1])];case 4:return[4,a2(x[1])];case 5:return[5,a2(x[1])];case 6:return[6,a2(x[1])];case 7:return[7,a2(x[1])];case 8:var r=x[1];return[8,r,a2(x[2])];case 9:var e=x[2],t=x[1];return[9,e,t,a2(x[3])];case 10:return[10,a2(x[1])];case 11:return[11,a2(x[1])];case 12:return[12,a2(x[1])];case 13:return[13,a2(x[1])];default:return[14,a2(x[1])]}}function Y2(x){if(typeof x=="number")return[0,function(y0){},function(y0){},function(y0){},function(y0){}];switch(x[0]){case 0:var r=Y2(x[1]),e=r[2],t=r[1];return[0,function(y0){t(j)},function(y0){e(j)},r[3],r[4]];case 1:var u=Y2(x[1]),i=u[2],c=u[1];return[0,function(y0){c(j)},function(y0){i(j)},u[3],u[4]];case 2:var v=Y2(x[1]),s=v[2],l=v[1];return[0,function(y0){l(j)},function(y0){s(j)},v[3],v[4]];case 3:var p=Y2(x[1]),d=p[2],T=p[1];return[0,function(y0){T(j)},function(y0){d(j)},p[3],p[4]];case 4:var b=Y2(x[1]),C=b[2],N=b[1];return[0,function(y0){N(j)},function(y0){C(j)},b[3],b[4]];case 5:var I=Y2(x[1]),F=I[2],L=I[1];return[0,function(y0){L(j)},function(y0){F(j)},I[3],I[4]];case 6:var X=Y2(x[1]),q=X[2],J=X[1];return[0,function(y0){J(j)},function(y0){q(j)},X[3],X[4]];case 7:var e0=Y2(x[1]),W=e0[2],x0=e0[1];return[0,function(y0){x0(j)},function(y0){W(j)},e0[3],e0[4]];case 8:var i0=Y2(x[2]),f0=i0[2],r0=i0[1];return[0,function(y0){r0(j)},function(y0){f0(j)},i0[3],i0[4]];case 9:var v0=x[2],o0=x[1],w0=Y2(x[3]),t0=w0[4],s0=w0[3],h0=w0[2],p0=w0[1],C0=Y2(g2(a2(o0),v0)),j0=C0[4],P0=C0[3],M0=C0[2],U0=C0[1];return[0,function(y0){p0(j),U0(j)},function(y0){M0(j),h0(j)},function(y0){s0(j),P0(j)},function(y0){j0(j),t0(j)}];case 10:var T0=Y2(x[1]),G0=T0[2],k0=T0[1];return[0,function(y0){k0(j)},function(y0){G0(j)},T0[3],T0[4]];case 11:var G=Y2(x[1]),S0=G[2],Z0=G[1];return[0,function(y0){Z0(j)},function(y0){S0(j)},G[3],G[4]];case 12:var N0=Y2(x[1]),ux=N0[2],ex=N0[1];return[0,function(y0){ex(j)},function(y0){ux(j)},N0[3],N0[4]];case 13:var nx=Y2(x[1]),px=nx[4],D0=nx[3],dx=nx[2],_x=nx[1];return[0,function(y0){_x(j)},function(y0){dx(j)},function(y0){D0(j)},function(y0){px(j)}];default:var K=Y2(x[1]),_0=K[4],U=K[3],m0=K[2],b0=K[1];return[0,function(y0){b0(j)},function(y0){m0(j)},function(y0){U(j)},function(y0){_0(j)}]}}function g2(x,r){x:{r:{e:{t:{n:{u:{i:{if(typeof x!="number"){switch(x[0]){case 0:var e=x[1];if(typeof r!="number")switch(r[0]){case 0:return[0,g2(e,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 1:var t=x[1];if(typeof r!="number")switch(r[0]){case 1:return[1,g2(t,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 2:var u=x[1];if(typeof r!="number")switch(r[0]){case 2:return[2,g2(u,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 3:var i=x[1];if(typeof r!="number")switch(r[0]){case 3:return[3,g2(i,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 4:var c=x[1];if(typeof r!="number")switch(r[
Line truncated
|
||||
`];function _N(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return h(ar(GH),e);if(Ov(e)===q3)return h(ar(BH),e);if(Ov(e)!==_E)return XH;for(var t=YC("%.12g",e),u=0,i=Ux(t);;){if(i<=u)return Jx(t,UH);var c=B1(t,u);x:{if(48<=c){if(58>c)break x}else if(c===45)break x;return t}var u=u+1|0}}function Pq(x,r){if(x.length-1<=r)return YH;var e=Pq(x,r+1|0),t=_N(x,r);return k(ar(JH),t,e)}function tp(x){x:{r:{for(var r=rl(gN);r;){e:{var e=r[2],t=r[1];try{var u=h(t,x)}catch{break e}if(u)break r}var r=e}var i=0;break x}var i=[0,u[1]]}if(i)return i[1];if(x===xN)return $H;if(x===QL)return WH;if(x[1]===WL){var c=x[2],v=c[3],s=c[2],l=c[1];return hs(ar(rN),l,s,v,v+5|0,QH)}if(x[1]===Nr){var p=x[2],d=p[3],T=p[2],b=p[1];return hs(ar(rN),b,T,d,d+6|0,ZH)}if(x[1]===Y6){var C=x[2],N=C[3],I=C[2],F=C[1];return hs(ar(rN),F,I,N,N+6|0,xV)}if(Ov(x)===0){var L=x.length-1,X=x[1][1];if(2<L>>>0)var q=Pq(x,2),J=_N(x,1),e0=k(ar(zH),J,q);else switch(L){case 0:var e0=KH;break;case 1:var e0=HH;break;default:var W=_N(x,1),e0=h(ar(VH),W)}var x0=[0,X,[0,e0]]}else var x0=[0,x[1],0];var i0=x0[2],f0=x0[1];return i0?Jx(f0,i0[1]):f0}function wN(x,r){var e=sJ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var c=N1(e,i)[1+i];let e0=i;var v=function(x0){return x0?e0===0?rV:eV:e0===0?tV:nV};if(c[0]===0){if(c[3]===c[6])var s=c[3],d=h(ar(uV),s);else var l=c[6],p=c[3],d=k(ar(aV),p,l);var T=c[7],b=c[4],C=c[8]?iV:cV,N=c[2],I=c[9],F=v(c[1]),X=[0,nz(ar(fV),F,I,N,C,d,b,T)]}else if(c[1])var X=0;else var L=v(0),X=[0,h(ar(sV),L)];if(X){var q=X[1];h(Sq(x,oV),q)}var J=i+1|0;if(t===i)break;var i=J}}function bN(x){for(;;){var r=rl(gN),e=1-ud(gN,r,[0,x,r]);if(!e)return e}}var vV=[0,tx,`(Cannot print locations:
|
||||
bytecode executable program file not found)`,`(Cannot print locations:
|
||||
bytecode executable program file appears to be corrupt)`,`(Cannot print locations:
|
||||
bytecode executable program file has wrong magic number)`,`(Cannot print locations:
|
||||
bytecode executable program file cannot be opened;
|
||||
-- too many open files. Try running with OCAMLRUNPARAM=b=2)`].slice(),lV=[0,[11,xA,[2,0,[12,10,0]]],ZR],pV=[0],kV="Fatal error: out of memory in uncaught exception handler",mV=[0,[11,xA,[2,0,[12,10,0]]],ZR],dV=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s
|
||||
`];ZC(Kj,function(x,r){try{try{var e=r?pV:DL(0);try{tN(j)}catch{}try{var t=tp(x);h(yN(lV),t),wN(Sn,e);var u=RJ(0);if(u<0){var i=Td(u);tq(N1(vV,i)[1+i])}var c=bn(Sn),v=c}catch(b){var s=X1(b),l=tp(x);h(yN(mV),l),wN(Sn,e);var p=tp(s);h(yN(dV),p),wN(Sn,DL(0));var v=bn(Sn)}var d=v}catch(b){var T=X1(b);if(T!==xN)throw z0(T,0);var d=tq(kV)}return d}catch{return 0}});var hV=[f1,"Stdlib.Fun.Finally_raised",Ca(0)],yV="Fun.Finally_raised: ";bN(function(x){return x[1]===hV?[0,Jx(yV,tp(x[2]))]:0});var gV="Digest.BLAKE2: wrong hash size";function TN(x){var r=x[1]<1?1:0,e=r||(64<x[1]?1:0);e&&X2(gV)}TN([0,16]),TN([0,32]),TN([0,64]);function Iq(x){var r=S2(x);return FJ(r,0,Ux(r))}var _V=mt(1,0,0),wV=mt(0,0,0),bV=mt(0,0,0),TV=mt(2,0,0),EV=mt(1,0,0);function Cq(x){return VY(7,0,[0,4])}function Nq(x,r,e,t,u){M6(x,0,qL(r,_V)),M6(x,1,e);var i=Nv(t,wV)?t:EV;M6(x,2,i);var c=Nv(u,bV)?u:TV;M6(x,3,c)}function Oq(x,r,e,t){var u=Cq(j);return Nq(u,x,r,e,t),u}var AV=mt(14371852,15349651,22696),SV=mt(12230193,11438743,35013),PV=mt(1424933,15549263,2083),IV=mt(9492471,4696708,SF);Oa([0,function(x){var r=dd(x),e=dd(x),t=dd(x);return Oq(r,e,t,dd(x))}],function(x){return Oq(IV,PV,SV,AV)});var jd=0,jq=-1,EN=[f1,"Stdlib.Format.String_tag",Ca(0)];function np(x,r){return x[13]=x[13]+r[3]|0,cN(r,x[28])}var Dq=1000000010;function CV(x,r){return x<=r?x:r}var NV=[f1,"Stdlib.Queue.Empty",Ca(0)],OV=[0,tx,0,tx],jV=tx,DV=tx,FV=tx,RV=tx,MV=[0,tx],LV=N_;function AN(x,r){return xx(x[17],r,0,Ux(r))}function Dd(x){return h(x[19],0)}function Fq(x,r,e){x[9]=x[9]-r|0,AN(x,e),x[11]=0}function Fd(x,r){var e=P(r,tx);return e&&Fq(x,Ux(r),r)}function Mv(x,r,e){var t=r[3],u=r[2];return Fd(x,r[1]),Dd(x),x[11]=1,x[10]=CV(x[8],(x[6]-e|0)+u|0),x[9]=x[6]-x[10]|0,h(x[21],x[10]),Fd(x,t)}function Rq(x,r){return Mv(x,OV,r)}function ml(x,r){var e=r[2],t=r[3];return Fd(x,r[1]),x[9]=x[9]-e|0,h(x[20],e),Fd(x,t)}function qV(x,r,e){if(typeof e=="number")switch(e){case 0:var t=ll(x[3]);if(!t)return;var u=t[1][1],i=function(Z0,N0){if(!N0)return[0,Z0,0];var ux=N0[1],ex=N0[2];return EJ(Z0,ux)?[0,Z0,N0]:[0,ux,i(Z0,ex)]};u[1]=i(x[6]-x[9]|0,u[1]);return;case 1:vl(x[2]);return;case 2:vl(x[3]);return;case 3:var c=ll(x[2]);return c?Rq(x,c[1][2]):Dd(x);case 4:var v=x[10]!==(x[6]-x[9]|0)?1:0;if(!v)return v;var s=x[28],l=s[2];if(l){var p=l[1];if(l[2]){var d=l[2];s[1]=s[1]-1|0,s[2]=d;var T=[0,p]}else{fN(s);var T=[0,p]}}else var T=0;if(!T)return;var b=T[1],C=b[1];x[12]=x[12]-b[3]|0,x[9]=x[9]+C|0;return;default:var N=vl(x[5]);return N?AN(x,h(x[25],N[1])):void 0}switch(e[0]){case 0:return Fq(x,r,e[1]);case 1:var I=e[2],F=e[1],L=I[1],X=I[2],q=ll(x[2]);if(!q)return;var J=q[1],e0=J[2];switch(J[1]){case 0:return ml(x,F);case 1:return Mv(x,I,e0);case 2:return Mv(x,I,e0);case 3:return x[9]<(r+Ux(L)|0)?Mv(x,I,e0):ml(x,F);case 4:return x[11]?ml(x,F):x[9]<(r+Ux(L)|0)||((x[6]-e0|0)+X|0)<x[10]?Mv(x,I,e0):ml(x,F);default:return ml(x,F)}case 2:var W=x[6]-x[9]|0,x0=e[2],i0=e[1],f0=ll(x[3]);if(!f0)return;var r0=f0[1][1],v0=r0[1];if(v0)for(var o0=r0[1],w0=v0[1];;){if(o0){var t0=o0[1],s0=o0[2];if(W>t0){var o0=s0;continue}var h0=t0}else var h0=w0;var p0=h0;break}else var p0=W;var C0=p0-W|0;return 0<=C0?ml(x,[0,DV,C0+i0|0,jV]):Mv(x,[0,RV,p0+x0|0,FV],x[6]);case 3:var j0=e[2],P0=e[1];if(x[8]<(x[6]-x[9]|0)){var M0=ll(x[2]);if(M0){var U0=M0[1],T0=U0[2],G0=U0[1];x[9]<T0&&3>=G0-1>>>0&&Rq(x,T0)}else Dd(x)}var k0=x[9]-P0|0,G=j0===1?1:x[9]<r?j0:5;return Fv([0,G,k0],x[2]);case 4:return Fv(e[1],x[3]);default:var S0=e[1];return AN(x,h(x[24],S0)),Fv(S0,x[5])}}function Mq(x){for(;;){var r=x[28][2],e=r?[0,r[1]]:0;if(!e)return;var t=e[1],u=t[1],i=0<=u?1:0,c=t[3],v=t[2],s=x[13]-x[12]|0,l=i||(x[9]<=s?1:0);if(!l)return l;var p=x[28],d=p[2];if(!d)throw z0(NV,1);if(d[2]){var T=d[2];p[1]=p[1]-1|0,p[2]=T}else fN(p);var b=0<=u?u:Dq;qV(x,b,v),x[12]=c+x[12]|0}}function Lq(x,r){return np(x,r),Mq(x)}function qq(x,r,e){return Lq(x,[0,r,[0,e],r])}function SN(x){return Z6(x),Fv([0,-1,[0,jq,MV,0]],x)}function PN(x,r){var e=ll(x[1]);if(e){var t=e[1],u=t[2],i=u[1];if(t[1]<x[12])return SN(x[1]);var c=u[2];if(typeof c!="number")switch(c[0]){case 3:1-r&&(u[1]=x[13]+i|0,vl(x[1]));return;case 1:case 2:r&&(u[1]=x[13]+i|0,vl(x[1]));return}}}function Uq(x,r,e){return np(x,e),r&&PN(x,1),Fv([0,x[13],e],x[1])}function Bq(x,r,e){if(x[14]=x[14]+1|0,x[14]<x[15])return Uq(x,0,[0,-x[13]|0,[3,r,e],0]);var t=x[14]===x[15]?1:0;if(!t)return t;var u=x[16];return qq(x,Ux(u),u)}function Xq(x,r){1<x[14]&&(x[14]<x[15]&&(np(x,[0,jd,1,0]),PN(x,1),PN(x,0)),x[14]=x[14]-1|0)}function Gq(x,r){if(x[23]&&np(x,[0,jd,5,0]),x[22]){var e=vl(x[4]);if(e)return h(x[27],e[1])}}function Yq(x,r){for(P2(function(e){return Gq(x,j)},x[4][1]);!(1>=x[14]);)Xq(x,j);return x[13]=Dq,Mq(x),r&&Dd(x),x[12]=1,x[13]=1,fN(x[28]),SN(x[1]),Z6(x[2]),Z6(x[3]),Z6(x[4]),Z6(x[5]),x[10]=0,x[14]=0,x[9]=x[6],Bq(x,0,3)}function IN(x,r,e){var t=x[14]<x[15]?1:0;return t&&qq(x,r,e)}function Jq(x,r,e){return IN(x,r,e)}function up(x,r){return Jq(x,1,Sd(1,r))}function Lv(x,r){return Yq(x,0),h(x[18],0)}function CN(x,r){retu
Line truncated
|
||||
`,an0=N_,sn0="unreachable regexp_class",on0=rD,vn0="unreachable regexp_body",ln0=tx,pn0=tx,kn0=tx,mn0=tx,dn0=FD,hn0="{'>'}",yn0=d6,gn0="{'}'}",_n0=jm,wn0=no,bn0=rT,Tn0=I8,En0=FD,An0=no,Sn0=rT,Pn0=I8,In0="unreachable type_token wholenumber",Cn0="unreachable type_token wholebigint",Nn0="unreachable type_token floatbigint",On0="unreachable type_token scinumber",jn0="unreachable type_token scibigint",Dn0="unreachable type_token hexnumber",Fn0="unreachable type_token hexbigint",Rn0="unreachable type_token legacyoctnumber",Mn0="unreachable type_token octnumber",Ln0="unreachable type_token octbigint",qn0="unreachable type_token binnumber",Un0="unreachable type_token bigbigint",Bn0="unreachable type_token",Xn0=CM,Gn0=[11,1],Yn0=[11,0],Jn0="unreachable template_tail",zn0=tx,Kn0=tx,Hn0="unreachable jsx_child",Vn0="unreachable jsx_tag",$n0=[0,MD],Wn0=[0,913],Qn0=[0,Zo],Zn0=[0,qI],x70=[0,AD],r70=[0,_I],e70=[0,8747],t70=[0,iy],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,DM],c70=[0,914],a70=[0,wM],s70=[0,GF],o70=[0,AR],v70=[0,915],l70=[0,Yj],p70=[0,919],k70=[0,917],m70=[0,NM],d70=[0,aD],h70=[0,sF],y70=[0,924],g70=[0,923],_70=[0,922],w70=[0,PF],b70=[0,921],T70=[0,lR],E70=[0,Ik],A70=[0,mF],S70=[0,I5],P70=[0,927],I70=[0,937],C70=[0,oD],N70=[0,lF],O70=[0,bD],j70=[0,338],D70=[0,352],F70=[0,929],R70=[0,936],M70=[0,8243],L70=[0,928],q70=[0,934],U70=[0,WM],B70=[0,sD],X70=[0,933],G70=[0,SR],Y70=[0,vM],J70=[0,Sj],z70=[0,920],K70=[0,932],H70=[0,Hy],V70=[0,RD],$70=[0,nR],W70=[0,aF],Q70=[0,918],Z70=[0,376],xu0=[0,uR],ru0=[0,926],eu0=[0,NF],tu0=[0,zR],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],au0=[0,945],su0=[0,8501],ou0=[0,Qo],vu0=[0,8226],lu0=[0,cD],pu0=[0,946],ku0=[0,8222],mu0=[0,Qj],du0=[0,FR],hu0=[0,8776],yu0=[0,PM],gu0=[0,8773],_u0=[0,9827],wu0=[0,Vj],bu0=[0,967],Tu0=[0,WR],Eu0=[0,E8],Au0=[0,Hj],Su0=[0,xR],Pu0=[0,8595],Iu0=[0,8224],Cu0=[0,8659],Nu0=[0,SD],Ou0=[0,8746],ju0=[0,8629],Du0=[0,LD],Fu0=[0,8745],Ru0=[0,8195],Mu0=[0,8709],Lu0=[0,Aj],qu0=[0,IM],Uu0=[0,yM],Bu0=[0,h4],Xu0=[0,9830],Gu0=[0,8707],Yu0=[0,8364],Ju0=[0,qR],zu0=[0,U3],Ku0=[0,951],Hu0=[0,8801],Vu0=[0,949],$u0=[0,8194],Wu0=[0,8805],Qu0=[0,947],Zu0=[0,8260],xi0=[0,tE],ri0=[0,wD],ei0=[0,_A],ti0=[0,8704],ni0=[0,ZF],ui0=[0,MM],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],ai0=[0,8660],si0=[0,62],oi0=[0,402],vi0=[0,948],li0=[0,_F],pi0=[0,Qy],ki0=[0,8712],mi0=[0,A8],di0=[0,953],hi0=[0,8734],yi0=[0,8465],gi0=[0,BR],_i0=[0,8220],wi0=[0,8968],bi0=[0,8592],Ti0=[0,yk],Ei0=[0,10216],Ai0=[0,955],Si0=[0,8656],Pi0=[0,954],Ii0=[0,60],Ci0=[0,8216],Ni0=[0,8249],Oi0=[0,YR],ji0=[0,9674],Di0=[0,8727],Fi0=[0,8970],Ri0=[0,GP],Mi0=[0,8711],Li0=[0,956],qi0=[0,8722],Ui0=[0,O4],Bi0=[0,rA],Xi0=[0,8212],Gi0=[0,VD],Yi0=[0,8804],Ji0=[0,957],zi0=[0,jF],Ki0=[0,8836],Hi0=[0,8713],Vi0=[0,dw],$i0=[0,8715],Wi0=[0,8800],Qi0=[0,8853],Zi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,nM],tf0=[0,339],nf0=[0,fv],uf0=[0,QR],if0=[0,Fy],ff0=[0,z3],cf0=[0,8855],af0=[0,iE],sf0=[0,f1],of0=[0,AS],vf0=[0,U5],lf0=[0,x1],pf0=[0,kS],kf0=[0,982],mf0=[0,960],df0=[0,966],hf0=[0,8869],yf0=[0,8240],gf0=[0,8706],_f0=[0,8744],wf0=[0,8211],bf0=[0,10217],Tf0=[0,8730],Ef0=[0,8658],Af0=[0,34],Sf0=[0,968],Pf0=[0,8733],If0=[0,8719],Cf0=[0,961],Nf0=[0,8971],Of0=[0,$M],jf0=[0,8476],Df0=[0,8221],Ff0=[0,8969],Rf0=[0,8594],Mf0=[0,M4],Lf0=[0,MR],qf0=[0,IF],Uf0=[0,8901],Bf0=[0,353],Xf0=[0,8218],Gf0=[0,8217],Yf0=[0,8250],Jf0=[0,8835],zf0=[0,8721],Kf0=[0,8838],Hf0=[0,8834],Vf0=[0,9824],$f0=[0,8764],Wf0=[0,962],Qf0=[0,963],Zf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,Ok],nc0=[0,8839],uc0=[0,iL],ic0=[0,PD],fc0=[0,Z3],cc0=[0,8657],ac0=[0,8482],sc0=[0,jg],oc0=[0,732],vc0=[0,M3],lc0=[0,8201],pc0=[0,977],kc0=[0,_R],mc0=[0,q3],dc0=[0,965],hc0=[0,978],yc0=[0,qM],gc0=[0,tA],_c0=[0,fL],wc0=[0,_D],bc0=[0,8205],Tc0=[0,950],Ec0=[0,pk],Ac0=[0,FF],Sc0=[0,_E],Pc0=[0,958],Ic0=[0,8593],Cc0=[0,Nj],Nc0=[0,8242],Oc0=[0,gM],jc0="unreachable regexp",Dc0="unreachable token wholenumber",Fc0="unreachable token wholebigint",Rc0="unreachable token floatbigint",Mc0="unreachable token scinumber",Lc0="unreachable token scibigint",qc0="unreachable token hexnumber",Uc0="unreachable token hexbigint",Bc0="unreachable token legacyoctnumber",Xc0="unreachable token legacynonoctnumber",Gc0="unreachable token octnumber",Yc0="unreachable token octbigint",Jc0="unreachable token bignumber",zc0="unreachable token bigint",Kc0="unreachable token",Hc0=CM,Vc0=[7,"#!"],$c0="expected ?",Wc0="unreachable string_escape",Qc0=Q2,Zc0=o6,xa0=o6,ra0=Q2,ea0=mI,ta0=UF,na0="n",ua0="r",ia0="t",fa0=eR,ca0=o6,aa0=no,sa0=no,oa0="unreachable id_char",va0=no,la0=no,pa0=o6,ka0=lM,ma0=Dj,da0=Kw,ha0=[27,"token ILLEGAL"],ya0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],ga0=[0,1],_a0=[0,1],wa0=KF,ba0=KF,Ta0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `exp
Line truncated
|
||||
\v\x07\f\r\x1B ! "#$%
Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xLine truncated
|
||||
\v\f\r`,t+1|0)-1|0;if(14<u>>>0)var i=w(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:H(r,15);var i=Re(y(r))===0?15:w(r);break;case 4:H(r,4);var i=te(y(r))===0?e(r):w(r);break;case 5:H(r,11);var i=te(y(r))===0?e(r):w(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:H(r,14);var c=Xv(y(r));if(c===0)var i=Er(y(r))===0&&Er(y(r))===0&&Er(y(r))===0?12:w(r);else if(c===1&&Er(y(r))===0){for(;;){var v=Bv(y(r));if(v!==0)break}var i=v===1?13:w(r)}else var i=w(r);break;case 13:var i=10;break;default:H(r,14);var i=Er(y(r))===0&&Er(y(r))===0?1:w(r)}if(16<i>>>0)return Sx(Wc0);switch(i){case 0:var s=Bx(r);return[0,x,s,m1(r),0];case 1:var l=Bx(r);return[0,x,l,[0,dt(Jx(Qc0,l))],0];case 2:var p=Bx(r),d=dt(Jx(Zc0,p));return k6<=d?[0,x,p,[0,d>>>3|0,48+(d&7)|0],1]:[0,x,p,[0,d],1];case 3:var T=Bx(r);return[0,x,T,[0,dt(Jx(xa0,T))],1];case 4:return[0,x,ra0,[0,0],0];case 5:return[0,x,ea0,[0,8],0];case 6:return[0,x,ta0,[0,12],0];case 7:return[0,x,na0,[0,10],0];case 8:return[0,x,ua0,[0,13],0];case 9:return[0,x,ia0,[0,9],0];case 10:return[0,x,fa0,[0,11],0];case 11:var b=Bx(r);return[0,x,b,[0,dt(Jx(ca0,b))],1];case 12:var C=Bx(r);return[0,x,C,[0,dt(Jx(aa0,I2(C,1,Ux(C)-1|0)))],0];case 13:var N=Bx(r),I=dt(Jx(sa0,I2(N,2,Ux(N)-3|0))),F=dk<I?_t(x,Hr(x,r)):x;return[0,F,N,[0,I],0];case 14:var L=Bx(r),X=m1(r);return[0,_t(x,Hr(x,r)),L,X,0];case 15:var q=Bx(r);return[0,ne(x,r),q,[0],0];default:var J=Bx(r);return[0,x,J,m1(r),0]}}function gB(x,r,e,t,u,i){for(var c=x,v=u;;){mr(i);var s=y(i),l=92<s?1:J0("",s+1|0)-1|0;if(4<l>>>0)var p=w(i);else switch(l){case 0:var p=3;break;case 1:for(;;){H(i,4);var d=y(i),T=-1<d?91<d?92<d?0:-1:J0("\0\0\0",d)-1|0:-1;if(T!==0)break}var p=w(i);break;case 2:var p=2;break;case 3:var p=0;break;default:var p=1}if(4<p>>>0)return Sx(un0);switch(p){case 0:var b=Bx(i);if(cr(t,b),Tr(r,b))return[0,c,Me(c,i),v];cr(e,b);break;case 1:cr(t,in0);var C=yB(c,i),N=C[4],I=C[3],F=C[2],L=C[1],X=N||v;cr(t,F),kq(function(w0){return ja(e,w0)},I);var c=L,v=X;break;case 2:var q=Bx(i);cr(t,q);var J=ne(_t(c,Hr(c,i)),i);return cr(e,q),[0,J,Me(J,i),v];case 3:var e0=Bx(i);cr(t,e0);var W=_t(c,Hr(c,i));return cr(e,e0),[0,W,Me(W,i),v];default:var x0=i[6],i0=i[3]-x0|0,f0=I1(i0*4|0),r0=fp(i[1],x0,i0,f0);oN(t,f0,0,r0),oN(e,f0,0,r0)}}}function _B(x,r,e,t){for(var u=x;;){mr(t);var i=y(t),c=96<i?1:J0("\x07",i+1|0)-1|0;if(6<c>>>0)var v=w(t);else switch(c){case 0:var v=0;break;case 1:for(;;){H(t,6);var s=y(t),l=-1<s?95<s?96<s?0:-1:J0("\0\0\0\0",s)-1|0:-1;if(l!==0)break}var v=w(t);break;case 2:var v=5;break;case 3:H(t,5);var v=Re(y(t))===0?4:w(t);break;case 4:H(t,6);var p=y(t),d=o1<p?pn<p?-1:0:-1,v=d===0?2:w(t);break;case 5:var v=3;break;default:var v=1}if(6<v>>>0)return Sx(fn0);switch(v){case 0:return[0,_t(u,Hr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:ht(e,92);var T=yB(u,t),b=T[3],C=T[1];cr(e,T[2]),kq(function(F){return ja(r,F)},b);var u=C;break;case 4:cr(e,cn0),cr(r,an0);var u=ne(u,t);break;case 5:cr(e,Bx(t)),ht(r,10);var u=ne(u,t);break;default:var N=Bx(t);cr(e,N),cr(r,N)}}}function NT0(x,r,e){for(var t=x;;){mr(e);var u=y(e),i=92<u?n2<u?1:m2<u?2:1:J0("\x07",u+1|0)-1|0;if(6<i>>>0)var c=w(e);else switch(i){case 0:var c=0;break;case 1:for(;;){H(e,7);var v=y(e),s=-1<v?90<v?92<v?m2<v?n2<v?0:-1:0:-1:J0("\0\0\0",v)-1|0:-1;if(s!==0)break}var c=w(e);break;case 2:var c=6;break;case 3:H(e,6);var c=Re(y(e))===0?6:w(e);break;case 4:if(H(e,4),HU(y(e))===0){for(;H(e,3),HU(y(e))===0;);var c=w(e)}else var c=w(e);break;case 5:var c=5;break;default:H(e,7);var l=y(e),p=-1<l?13<l?n2<l?0:m2<l?1:0:J0("",l)-1|0:-1;if(2<p>>>0)var c=w(e);else switch(p){case 0:var c=2;break;case 1:var c=1;break;default:H(e,1);var c=Re(y(e))===0?1:w(e)}}if(7<c>>>0)return Sx(vn0);switch(c){case 0:return[0,j2(t,Hr(t,e),lt),ln0];case 1:return[0,ne(j2(t,Hr(t,e),lt),e),pn0];case 2:cr(r,Bx(e));break;case 3:var d=Bx(e);return[0,t,I2(d,1,Ux(d)-1|0)];case 4:return[0,t,kn0];case 5:ht(r,91);x:{r:{e:{t:{n:for(;;){mr(e);var T=y(e),b=93<T?n2<T?1:m2<T?2:1:J0("",T+1|0)-1|0;if(5<b>>>0)var C=w(e);else switch(b){case 0:var C=0;break;case 1:for(;;){H(e,5);var N=y(e),I=-1<N?91<N?93<N?m2<N?n2<N?0:-1:0:-1:J0("\0\0",N)-1|0:-1;i
Line truncated
|
||||
`);return W0.length>1&&W0.every(bx=>bx.trimStart()[0]==="*")}var yj=new WeakMap;function RA0(a0){return yj.has(a0)||yj.set(a0,FA0(a0)),yj.get(a0)}var gj=RA0;function MA0(a0){if(a0.length<2)return;let W0;for(let bx=a0.length-1;bx>=0;bx--){let Yx=a0[bx];if(W0&&V2(Yx)===Pe(W0)&&gj(Yx)&&gj(W0)&&(a0.splice(bx+1,1),Yx.value+="*//*"+W0.value,Yx.range=[Pe(Yx),V2(W0)]),!dj(Yx)&&!I3(Yx))throw new TypeError(`Unknown comment type: "${Yx.type}".`);W0=Yx}}var _Y=MA0;var $p=null;function Wp(a0){if($p!==null&&typeof $p.property){let W0=$p;return $p=Wp.prototype=null,W0}return $p=Wp.prototype=a0??Object.create(null),new Wp}var LA0=10;for(let a0=0;a0<=LA0;a0++)Wp();function _j(a0){return Wp(a0)}function qA0(a0,W0="type"){_j(a0);function bx(Yx){let x1=Yx[W0],D1=a0[x1];if(!Array.isArray(D1))throw Object.assign(new Error(`Missing visitor keys for '${x1}'.`),{node:Yx});return D1}return bx}var wY=qA0;var bY={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id
Line truncated
|
||||
`;a0=Wl(!1,a0.replace(YA0,"").replace(GA0,""),HA0,"$1");let bx="";for(;bx!==a0;)bx=a0,a0=Wl(!1,a0,KA0,`${W0}$1 $2${W0}`);a0=a0.replace(IY,"").trimEnd();let Yx=Object.create(null),x1=Wl(!1,a0,CY,"").replace(IY,"").trimEnd(),D1;for(;D1=CY.exec(a0);){let Ie=Wl(!1,D1[2],zA0,"");if(typeof Yx[D1[1]]=="string"||Array.isArray(Yx[D1[1]])){let k2=Yx[D1[1]];Yx[D1[1]]=[...VA0,...Array.isArray(k2)?k2:[k2],Ie]}else Yx[D1[1]]=Ie}return{comments:x1,pragmas:Yx}}var jY=["noformat","noprettier"],DY=["format","prettier"];function $A0(a0){if(!a0.startsWith("#!"))return"";let W0=a0.indexOf(`
|
||||
`);return W0===-1?a0:a0.slice(0,W0)}var FY=$A0;function RY(a0){let W0=FY(a0);W0&&(a0=a0.slice(W0.length+1));let bx=NY(a0),{pragmas:Yx,comments:x1}=OY(bx);return{shebang:W0,text:a0,pragmas:Yx,comments:x1}}function MY(a0){let{pragmas:W0}=RY(a0);return DY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function LY(a0){let{pragmas:W0}=RY(a0);return jY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function WA0(a0){return a0=typeof a0=="function"?{parse:a0}:a0,{astFormat:"estree",hasPragma:MY,hasIgnorePragma:LY,locStart:Pe,locEnd:V2,...a0}}var qY=WA0;var QA0={comments:!1,components:!0,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!1};function ZA0(a0){let{message:W0,loc:bx}=a0;if(!bx)return a0;let{start:Yx,end:x1}=bx;return mY(W0,{loc:{start:{line:Yx.line,column:Yx.column+1},end:{line:x1.line,column:x1.column+1}},cause:a0})}function xS0(a0){let W0=UY.default.parse(a0,QA0),[bx]=W0.errors;if(bx)throw ZA0(bx);return PY(W0,{parser:"flow",text:a0})}var rS0=qY(xS0);return EA0(eS0);});
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
var hA0=Object.create;var kj=Object.defineProperty;var yA0=Object.getOwnPropertyDescriptor;var gA0=Object.getOwnPropertyNames;var _A0=Object.getPrototypeOf,wA0=Object.prototype.hasOwnProperty;var bA0=(a0,W0)=>()=>(W0||a0((W0={exports:{}}).exports,W0),W0.exports),pY=(a0,W0)=>{for(var bx in W0)kj(a0,bx,{get:W0[bx],enumerable:!0})},TA0=(a0,W0,bx,Yx)=>{if(W0&&typeof W0=="object"||typeof W0=="function")for(let x1 of gA0(W0))!wA0.call(a0,x1)&&x1!==bx&&kj(a0,x1,{get:()=>W0[x1],enumerable:!(Yx=yA0(W0,x1))||Yx.enumerable});return a0};var EA0=(a0,W0,bx)=>(bx=a0!=null?hA0(_A0(a0)):{},TA0(W0||!a0||!a0.__esModule?kj(bx,"default",{value:a0,enumerable:!0}):bx,a0));var kY=bA0(mj=>{(function(a0){typeof globalThis!="object"&&(this?W0():(a0.defineProperty(a0.prototype,"_T_",{configurable:!0,get:W0}),_T_));function W0(){var bx=this||self;bx.globalThis=bx,delete a0.prototype._T_}})(Object);(function(a0){"use strict";var W0="loc",bx=70416,Yx=69748,x1=163,D1=92159,Ie=43587,k2="labeled_statement",Rr="&=",_1="int_of_string",Ce=110591,Qs=92909,Qa=11559,$o="regexp",g5=43301,Qp=11703,_5=122654,Za=255,Aj="%ni",w5=68252,Sj=232,b5=42785,Kn="declare_variable",Zp="while",T5=66938,E5=70301,A5=124907,x4=126515,Pj=218,Hn="pattern_identifier",S5=67643,Vn="export_source",P5=216,I5=64279,Ij="Out_of_memory",C5=113788,Cj="comments",N5=126624,Nj="win32",$n="object_key_bigint_literal",Oj=185,jj=283,r4=123214,Wo="constructor",O5=69955,Wn="import_declaration",j5=68437,D5="Failure",e4="Unix.Unix_error",F5=64255,R5=42539,M5=110579,Qn="export_default_declaration",Zn="jsx_attribute_name",t4=11727,L5=43002,n4=126500,x7="component_param_pattern",Dj="collect_comments_opt",r7="match_unary_pattern",e7="keyof_type",Fj="Invalid binary/octal ",Rj="range",q5=170,xs="false",U5=43798,Mj=", characters ",t7="object_type_property_getter",B5=65547,X5=126467,G5=65007,Y5=42237,J5=8318,z5=71215,n7="object_property_type",u7="type_alias",K5=67742,i7="function_body",Lj=304,H5=68111,u4=120745,V5=71959,i4=43880,qj="Match_failure",Uj=280,f7="type_cast",lt=109,rs="void",$5="generator",W5=125124,Q5=101589,f4=94179,Bj=">>>",c4=70404,c7="optional_indexed_access_type",W1="argument",a7="object_property",s7="object_type_property",Z5=67004,xy=42783,ry=68850,Xj="@",ey=43741,ty=43487,a4="object",Gj="end",s4=126571,ny=71956,uy=208,iy=126566,fy=67702,Yj="EEXIST",o7="this_expression",Jj=203,cy=11507,ay=113807,o4=119893,sy=42735,Ql="rest",v7="null_literal",Zl="protected",oy=43615,m2=8231,vy=68149,ly=73727,py=72348,ky=92995,Qo=224,my=11686,dy=43013,l7="assignment_pattern",hy=12329,p7="function_type",Zo=192,k7="jsx_element_name",yy=70018,m7="catch_clause_pattern",v4=126540,d7="template_literal",gy=120654,_y=68497,wy=67679,h7="readonly_type",by=68735,Ty="<",l4=": No such file or directory",Ey=66915,Ay="chain",zj="!",y7="object_type",Sy=43712,p4=64297,Py=183969,Iy=43503,Cy=67591,xv=65278,Ny=67669,g7="for_of_assignment_pattern",x6="`",Oy=11502,_7="catch_body",jy=42191,Zs=-744106340,Dy=182,rv=":",Kj="a string",Fy=65663,Ry=66978,My=71947,k4=43519,Ly=71086,qy=125258,Uy=12538,w7="expression_or_spread",Hj="Printexc.handle_uncaught_exception",m4=69956,d4=120122,h4=247,Vj=231,By=" : flags Open_rdonly and Open_wronly are not compatible",b7="statement_fork_point",$j=710,Wj=-692038429,ze="static",Xy=55203,Gy=64324,Yy=64111,Qj="!==",Jy=120132,zy=124903,r6="class",Ky=222,T7="pattern_number_literal",es="kind",Hy=71903,E7="variable_declarator",A7="typeof_expression",Vy=126627,$y=70084,Zj=228,y4=70480,S7="class_private_field",Wy=239,g4=120713,on=65535,P7="private_name",Qy=43137,I7="remote_identifier",Zy=70161,C7="label_identifier",x9="src/parser/statement_parser.ml",r9=8335,e9=19903,t9=64310,ev="_",N7="for_init_declaration",xD="infer",n9=64466,u9=43018,rD="tokens",i9=92735,f9=66954,c9=65473,a9=70285,O7="sequence",s9="compare: functional value",o9=69890,e6=1e3,v9=65487,l9=42653,eD="\\\\",tD="%=",j7="match_member_pattern_base",p9=72367,D7="function_rest_param",nD="/static/",k9=124911,m9=65276,_4=126558,d9=11498,uD=137,F7="export_default_declaration_decl",h9="cases",w4=126602,R7="jsx_child",Ke="continue",y9=42962,iD="importKind",o1=122,C3="Literal",M7="pattern_object_property_identifier_key",g9=42508,xo="in",_9=55238,w9=67071,b9=70831,T9=72161,E9=67462,fD="<<=",A9=43009,S9=66383,b4=67827,P9=72202,I9=69839,C9=66775,cD="-=",tv=8202,N9=70105,O9=120538,L7="for_in_left_declaration",j9="rendersType",T4=126563,D9=70708,E4=126523,aD=166,q7="match_",sD=202,F9=110951,ts="component",A4=126552,R9=66977,oD=213,U7="enum_member_identifier",vD=210,B7="enum_bigint_body",lD=">=",M9=126495,L9="specifiers",pD=-88,q9="=",U9=65338,t6="members",B9=123535,X9=43702,G9=72767,nv="get",Y9=126633,S4=126536,J9=94098,z9="types",K9=113663,kD="Internal Error: Found private field in object props",X7="jsx_element",H9=70366,V9=110959,P4=120655,mD="trailingComments",dD=282,ro=24029,$9=-100,$2="yield",G7="binding_pattern",hD=275,Y7="typeof_identifier",yD="ENOTEMPTY",W9=-104,gD=295,I4=126468,Q9=1255,Z9=120628,J7="pattern_object_property_string_literal_Line truncated
|
||||
`,xF="**=",yu="pattern_object_property_pattern",N_="e",O_=72712,rF="Internal Error: Found object private prop",j_="ENOENT",D_=-42,gu="jsx_opening_attribute",F_=67646,_u="component_type",R_=64296,M_=43887,eF="Division_by_zero",tF="EnumDefaultedMember",wu="typeof_member_identifier",L_=43792,bu="match_member_pattern_property",Tu="declare_export_declaration_decl",q_=93026,Eu="type_annotation_hint",U_=42887,B_=43881,X_=43761,vk=8526,D3=119,G_=43866,Y_=72847,J_=8348,pe=101,z_=94026,lk=72272,nF="src/parser/flow_lexer.ml",K_=120744,av=8191,F3="implies",pk=255,kk=11711,Au="match_unary_pattern_argument",H_=71235,mk=68116,uF=261,E1=100,Su="match_expression",Pu="enum_body",dk=1114111,Iu="assignment",V_=71955,hk=43260,Cu="pattern_array_e",$_=126583,iF="prefix",Nu="class_body",f6="shorthand",yk=171,W_=66256,gk=-97,fF=" =",Q_=94032,Z_=42606,Ou="match_case",xw=71839,_k=120134,rw=55291,ew=92862,tw=43019,nw=126543,R3="function",uw=111355,iw=11389,fw=70753,cw=43249,aw=64829,wk="line",ju="function_declaration",bk="undefined",cF="([^/]+)",sw=110947,ow=70002,aF="Cygwin",Du="as_expression",vw=12591,Tk=64285,lw=2048,pw=73112,Ek=126589,sF=225,Ak=43259,kw=72817,Sk=64318,mw=172,oF=209,Fu="match_binding_pattern",Ru=" ",Mu="import_source",c6="delete",vF="Enum `",Pk=126553,dw=67001,sv="default",hw=11630,Ik=206,Lu="enum_bigint_member",yw=67504,Ck=67593,gw=113791,lF="MatchObjectPatternProperty",_w=69572,qu="typeof_type",pF=212,kF="%i",Uu="function_this_param",ww=72329,no="0x",ov=8239,bw=75075,mF=57343,Bu="pattern_bigint_literal",Tw=12341,dF=201,vv="hook",hF=": closedir failed",Ew=42959,Nk=119970,yF=278,Aw=43560,gF="||=",Xu="member_private_name",Sw=120570,Gu="object_key_identifier",Ok=223,_F="Not_found",wF=230,Yu="jsx_element_name_member_expression",Ju="string_literal",Pw=120596,Iw=43807,Cw=69687,Nw=63743,jk=72192,zu="member_property",Ow=43262,Ku="class_declaration",bF="renders*",TF="%Li",jw=126578,Hu="jsx_attribute",M3=254,Oe="empty",a6="label",Vu="object_internal_slot_property_type",Dk=120133,Dw=43359,He="predicate",EF="??=",Fw=43697,Rw=-43,$u="default_opt",AF="the start of a statement",Mw=67826,Wu="object_",Qu="class_element",Fk=11631,Rk=70855,Zu="opaque_type",xi="number_literal",SF=", ",Mk=8319,Lk=120004,qk=133,ri="type_params",ei="pattern_object_rest_property",W2="import",Lw=72e3,qw=67413,Uw=12343,Bw=70080,ti="intersection_type",d2=-36,Xw=70005,Uk="properties",Gw=11679,Yw=8483,Jw=110587,PF=43520,ni="computed_key",IF=207,ui="class_identifier",zw="Invalid number ",ii="function_param_pattern",lv=12288,Kw=113817,Hw=70730,Vw=178207,Bk=71236,CF=167,fi="object_indexer_property_type",$w=64286,NF="TypeAnnotation",OF=220,ci="type_identifier",ai="spread_property",si="jsx_attribute_value_expression",Ww=126519,Xk=70108,Gk=126,Yk=42999,uo="prototype",Qw=" : flags Open_text and Open_binary are not compatible",jF="**",Jk=43823,Zw=": Not a directory",oi="render_type",zk=72349,L3="test",xb=43776,rb=92879,eb=11263,DF=241,tb=93052,vi="nullable_type",nb=43704,ub=64321,FF="Property",ib=72191,RF=165,s6="instanceof",fb=69247,Ve="name",Kk=126634,cb=8516,Hk="typeArguments",ab=71127,li="jsx_spread_attribute",sb=66559,ob=44031,vb=43645,n2=8233,lb=71494,pb="opaque",Vk=72967,kb=70106,pi="logical",MF="@[%s =@ ",o6="0o",$k=126554,mb=71351,Wk=8484,db=72242,Qk=120687,q3=252,hb=183983,v6="%S",ki="function_this_param_type",Zk="decorators",yb=43255,mi="catch_clause",$e="-",gb=67711,LF=": file descriptor already closed",xm=64311,rm=120539,_b="arguments",em=73062,wb=173823,bb=42124,Tb=72095,Eb=125259,Ab=42969,tm=70280,qF=12520,Sb=69749,Pb=70066,di="binary",hi="for_in_statement",Ib=43010,UF="^=",Cb=126570,yi="for_statement",nm=126584,gi="function_return_annotation",Nb=72144,Ob=8505,_i="class_expression",jb=120076,Db=69807,Fb=40981,Rb=-24976191,Mb=72768,Lb=126550,um='"',wi="call_type_arg",BF="f",pv="this",im=126628,XF="===",GF=56320,bi="declare_module_exports",qb=120512,vn=105,Ub=119974,Bb=71450,Xb=71942,YF=195,fm=120629,JF="/=",zF=">>",Ti="declare_interface",KF=4096,Ei="pattern_array_rest_element",Gb=71338,cm=126520,Ai="as_const_expression",HF="Popping lex mode from empty stack",VF="renders?",Yb=68405,Si="member",Pi="class_extends",kv=12287,am=126590,Jb=66377,io="async",Ii="pattern_array_element",U3=240,zb=69864,mv="readonly",Kb=70460,Hb=120779,Vb=66378,Ci="new_",sm=126551,Ni="pattern_object_rest_property_pattern",Oi="for_statement_init",$b=43595,om=68296,Wb=120712,Qb=64217,Zb=69295,$F="||",xT=";",rT=70461,eT=66939,WF="collect_comments",QF=279,ji="generic_type",tT=68295,nT=44002,vm=72162,Di="object_call_property_type",lm=8305,pm=119995,km="with",Fi="class_property",ZF="qualification",Ri="jsx_attribute_name_namespaced",Mi="if_statement",Li="typeof_qualified_identifier",xR=238,uT=65615,rR=176,u2="expression",mm=126559,qi="jsx_attribute_value",Ui="<2>",Bi="component_param",dm="Map.bal",hm=132,iT=70412,fT=70440,eR="<<",ym="finally",tR="v",Xi="syntax_opt",Gi="meta_property",cT=12447,aT=67514,gm=12448,Yi="object_mapped_type_property",dv="operator",nR="closedir",Ji="unary_expressLine truncated
|
||||
`,n8=120093,T6="column",$f="component_rest_param",RA=70451,MA=70312,LA=69967,u8=70279,qA=66463,UA=92975,i8=70286,Wf="pattern_object_property_computed_key",Qf="object_key_string_literal",BA="jsError",Zf="type_args",XA=8304,rM="==",gv=115,xc="declare_component",GA=120092,YA=43638,JA=66811,zA=43334,KA=66863,HA=77823,eM=143,rc="optional_call",VA=126562,f8=70162,We=104,$A=66963,_v="await",c8=70107,Q2="0",WA=72250,QA=8507,tM=291,ZA=100351,a8="AssignmentPattern",ec="type",nM="%u",xS="NonNullExpression",tc="function_expression_or_method",rS=43470,uM=242,iM="camlinternalMod.ml",nc="match_or_pattern",eS=72750,tS=69414,nS=65370,uc="syntax",fM=32752,uS=42963,cM="End_of_file",iS=12294,fS=8471,aM="elementType",cS=43782,sM="++",aS=43641,sS=71944,oS=126601,vS=78894,lS=-45,wv="null",pS=177,oM="satisfies",kS=131071,ic="import_specifier",fc="class_method",cc="type_",mS=126514,dS=8454,vM="inexact",hS=67807,yS=8525,gS=65470,_S=71352,ac="tuple_spread_element",lM=219,wS="abstract",bS=73458,Qe="return",E6=65536,s8=126548,sc="array_element",TS=-253313196,ES=186,o8="catch",oc="infer_type",AS=12295,pM="Invalid legacy octal ",SS=69762,PS=43311,IS=65437,vc="variable_declaration",kM=-696510241,lc="function_params",mM=307,CS=64316,dM=311,v8=11565,hM="infinity",NS="@]",OS=65908,pc="extends",jS=66204,DS=43784,FS=11742,l8=126503,Ze="debugger",RS=70457,cs=-86,A6=912068366,MS=68786,p8="keyof",k8=69415,LS=12686,dn=127343600,kc="declare_type_alias",yM="the",gM=233,mc="jsx_element_name_namespaced",qS=72283,_M=161,dc="class_static_block",hc="function_param_type",Lt=128,US=-673950933,m8=126591,wM="Sys_error",BS=74649,XS=74862,S6="is",GS=43738,YS=68479,bM=196,d8=70854,yc="enum_boolean_member",h8=72163,JS=92783,TM=281,gc="component_param_name",zS=68863,hn=32768,EM=2048,KS=64284,AM="@{",HS="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",y8=8455,_c="update_expression",VS=65500,P6="from",$S=68447,g8=12592,WS=92766,SM=">>=",B2=110,QS=66431,ZS=43586,wc="jsx_identifier",xP=" : file already exists",U1=128,rP=71958,eP=66717,bc="enum_boolean_body",tP=64262,$r="id",Tc="component_renders_annotation",nP=42888,uP=8584,iP=73008,PM=306,Ec="enum_symbol_body",Ac="declare_namespace",_8=72713,fP=55215,Sc="object_property_value_type",Pc="match_wildcard_pattern",Ic="for_in_assignment_pattern",w8=8485,cP=43395,IM=229,as="true",aP=43743,Cc="enum_number_member",CM=234,sP=72969,NM="expected *",E2=102,OM=200,I6="symbol",bv="source",Nc="tparam_const_modifier",oP=43714,Oc="jsx_fragment",jc="jsx_attribute_name_identifier",C6="public",vP=43442,Dc="pattern_object_property",lP=65786,pP=70783,kP=43713,mP=72160,jM="*-/",Fc="export_named_specifier",Rc="arrow_function",dP=122623,b8=70006,DM="${",hP=43814,Mc="generic_qualified_identifier_type",FM=199,Lc="jsx_spread_child",T8=8489,E8=184,RM=2047,yP=66955,qc="try_catch",gP=70497,MM=313,LM=237,_P=67431,wP=125183,qM=-602162310,yn="params",bP="consequent",TP=68029,EP=67829,AP=68095,Uc="enum_string_body",SP=93823,PP=68351,IP=65495,Bc="declare_module",Xc="match_as_pattern_target",Gc="body_expression",CP=66175,A8=191,S8=70441,P8=65141,I8="&",Yc="super_expression",C8=126564,NP=72105,eS0="fs",xt="throw",OP=68287,jP=67839,Tv=116,DP=110882,FP=69404,RP=123197,Ev=65279,K3="src/parser/type_parser.ml",MP=68115,N8=126547,O8=126556,LP=73055,Jc="member_property_expression",zc="enum_defaulted_member",qP=43071,UP=11726,Kc="component_type_rest_param",BP=68607,Hc="object_key",XP=160,Z2="variance",GP=70655,YP=70414,H3="super",JP=123583,zP=65594,N6="method",KP=73648,O6=121,HP=93951,Vc="pattern_array_element_pattern",VP=43764,$P=42993,j8=120145,WP=74879,UM=168,D8=8486,QP=72001,$c="tagged_template",Wc="module_ref_literal",ZP=65312,Av="implements",xI=43700,rI=120003,BM="Invalid_argument",XM=262,Qc=16777215,eI=83526,F8=69744,R8=12336,Zc="switch_case",GM=-61,xa="optional_member",tI=64274,M8=64322,L8=126530,nI=71998,q8=72970,uI=13311,iI=73647,fI=120074,V3="let",YM="global",ra="expression_statement",ea="component_type_params",cI=512,aI=69634,sI=67461,oI=123627,vI=64913,JM="children",zM="PropertyDefinition",KM=1026,HM="%li",ta="declare_class",lI=43258,na="indexed_access_type",pI=124926,ss=112,kI="b",ua="predicate_expression",ia="if_alternate_statement",j6="private",VM=-594953737,$M=140,mI="nan",dI=72103,U8=11735,fa="statement",hI="rmdir",B8=66512,yI="match",gI=198,_I=11734,ca="import_named_specifier",wI=69599,bI=68799,TI=194559,aa="match_array_pattern",WM=174,sa="function_",oa="bigint_literal",f1=248,X8=67638,G8=126539,EI=11557,QM=214,AI=5760,rt="break",gn="block",va="match_member_pattern",SI=123565,PI=66815,A1="value",ZM=1039100673,II=69746,CI=70448,NI=74751,la="init",OI=69551,Y8=65548,pa="jsx_member_expression",J8=68096,Sv=108,z8=126521,jI=71487,ka="match_statement",DI=178205,FI=12548,xL=" : is a directory",_n=".",RI=12348,$3=-835925911,xe="typeParameters",MI=66855,i2="typeAnnotation",Pv="bigint",ma="jsx_attribute_value_literal",LI=194,rL="T_JSX_TEXT",qI=68466,K8=126537,eL=67714067,UI=69487,H8="export",BI=43822,V8=126499,XI=55242,da="member_type_Line truncated
|
||||
`,Cz="@.",Nz="@@",Oz="@%",jz=Xj,Dz="%c",Fz="%s",Rz=kF,Mz=HM,Lz=Aj,qz=TF,Uz="%f",Bz="%B",Xz="%{",Gz="%}",Yz="%(",Jz="%)",zz="%a",Kz="%t",Hz="%?",Vz="%r",$z="%_r",Wz=[0,h2,850,23],Qz=[0,h2,837,26],Zz=[0,h2,847,28],xK=[0,h2,815,21],rK=[0,h2,819,21],eK=[0,h2,823,19],tK=[0,h2,827,22],nK=[0,h2,832,30],uK=[0,h2,851,23],iK=[0,h2,836,26],fK=[0,h2,846,28],cK=[0,h2,814,21],aK=[0,h2,818,21],sK=[0,h2,822,19],oK=[0,h2,826,22],vK=[0,h2,831,30];function lN(x){return x[2]===5?12:-6}function bq(x){return[0,0,I1(x)]}function Tq(x,r){var e=Bt(x[2]),t=x[1]+r|0;if(e<t){var u=e*2|0,i=t<=u?u:t,c=I1(i);oq(x[2],0,c,0,e),x[2]=c}}function pl(x,r){Tq(x,1),ls(x[2],x[1],r),x[1]=x[1]+1|0}function G2(x,r){var e=Ux(r);Tq(x,e),In(r,0,x[2],x[1],e),x[1]=x[1]+e|0}function Eq(x){return ol(x[2],0,x[1])}function Aq(x){if(typeof x=="number")switch(x){case 0:return Az;case 1:return Sz;case 2:return Pz;case 3:return Iz;case 4:return Cz;case 5:return Nz;default:return Oz}switch(x[0]){case 0:return x[1];case 1:return x[1];default:return Jx(jz,Sd(1,x[1]))}}function pN(x,r){for(var e=r;;){if(typeof e=="number")return;switch(e[0]){case 0:var t=e[1];G2(x,Dz);var e=t;break;case 1:var u=e[1];G2(x,Fz);var e=u;break;case 2:var i=e[1];G2(x,Rz);var e=i;break;case 3:var c=e[1];G2(x,Mz);var e=c;break;case 4:var v=e[1];G2(x,Lz);var e=v;break;case 5:var s=e[1];G2(x,qz);var e=s;break;case 6:var l=e[1];G2(x,Uz);var e=l;break;case 7:var p=e[1];G2(x,Bz);var e=p;break;case 8:var d=e[2],T=e[1];G2(x,Xz),pN(x,T),G2(x,Gz);var e=d;break;case 9:var b=e[3],C=e[1];G2(x,Yz),pN(x,C),G2(x,Jz);var e=b;break;case 10:var N=e[1];G2(x,zz);var e=N;break;case 11:var I=e[1];G2(x,Kz);var e=I;break;case 12:var F=e[1];G2(x,Hz);var e=F;break;case 13:var L=e[1];G2(x,Vz);var e=L;break;default:var X=e[1];G2(x,$z);var e=X}}}function a2(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,a2(x[1])];case 1:return[1,a2(x[1])];case 2:return[2,a2(x[1])];case 3:return[3,a2(x[1])];case 4:return[4,a2(x[1])];case 5:return[5,a2(x[1])];case 6:return[6,a2(x[1])];case 7:return[7,a2(x[1])];case 8:var r=x[1];return[8,r,a2(x[2])];case 9:var e=x[2],t=x[1];return[9,e,t,a2(x[3])];case 10:return[10,a2(x[1])];case 11:return[11,a2(x[1])];case 12:return[12,a2(x[1])];case 13:return[13,a2(x[1])];default:return[14,a2(x[1])]}}function Y2(x){if(typeof x=="number")return[0,function(y0){},function(y0){},function(y0){},function(y0){}];switch(x[0]){case 0:var r=Y2(x[1]),e=r[2],t=r[1];return[0,function(y0){t(j)},function(y0){e(j)},r[3],r[4]];case 1:var u=Y2(x[1]),i=u[2],c=u[1];return[0,function(y0){c(j)},function(y0){i(j)},u[3],u[4]];case 2:var v=Y2(x[1]),s=v[2],l=v[1];return[0,function(y0){l(j)},function(y0){s(j)},v[3],v[4]];case 3:var p=Y2(x[1]),d=p[2],T=p[1];return[0,function(y0){T(j)},function(y0){d(j)},p[3],p[4]];case 4:var b=Y2(x[1]),C=b[2],N=b[1];return[0,function(y0){N(j)},function(y0){C(j)},b[3],b[4]];case 5:var I=Y2(x[1]),F=I[2],L=I[1];return[0,function(y0){L(j)},function(y0){F(j)},I[3],I[4]];case 6:var X=Y2(x[1]),q=X[2],J=X[1];return[0,function(y0){J(j)},function(y0){q(j)},X[3],X[4]];case 7:var e0=Y2(x[1]),W=e0[2],x0=e0[1];return[0,function(y0){x0(j)},function(y0){W(j)},e0[3],e0[4]];case 8:var i0=Y2(x[2]),f0=i0[2],r0=i0[1];return[0,function(y0){r0(j)},function(y0){f0(j)},i0[3],i0[4]];case 9:var v0=x[2],o0=x[1],w0=Y2(x[3]),t0=w0[4],s0=w0[3],h0=w0[2],p0=w0[1],C0=Y2(g2(a2(o0),v0)),j0=C0[4],P0=C0[3],M0=C0[2],U0=C0[1];return[0,function(y0){p0(j),U0(j)},function(y0){M0(j),h0(j)},function(y0){s0(j),P0(j)},function(y0){j0(j),t0(j)}];case 10:var T0=Y2(x[1]),G0=T0[2],k0=T0[1];return[0,function(y0){k0(j)},function(y0){G0(j)},T0[3],T0[4]];case 11:var G=Y2(x[1]),S0=G[2],Z0=G[1];return[0,function(y0){Z0(j)},function(y0){S0(j)},G[3],G[4]];case 12:var N0=Y2(x[1]),ux=N0[2],ex=N0[1];return[0,function(y0){ex(j)},function(y0){ux(j)},N0[3],N0[4]];case 13:var nx=Y2(x[1]),px=nx[4],D0=nx[3],dx=nx[2],_x=nx[1];return[0,function(y0){_x(j)},function(y0){dx(j)},function(y0){D0(j)},function(y0){px(j)}];default:var K=Y2(x[1]),_0=K[4],U=K[3],m0=K[2],b0=K[1];return[0,function(y0){b0(j)},function(y0){m0(j)},function(y0){U(j)},function(y0){_0(j)}]}}function g2(x,r){x:{r:{e:{t:{n:{u:{i:{if(typeof x!="number"){switch(x[0]){case 0:var e=x[1];if(typeof r!="number")switch(r[0]){case 0:return[0,g2(e,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 1:var t=x[1];if(typeof r!="number")switch(r[0]){case 1:return[1,g2(t,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 2:var u=x[1];if(typeof r!="number")switch(r[0]){case 2:return[2,g2(u,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 3:var i=x[1];if(typeof r!="number")switch(r[0]){case 3:return[3,g2(i,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 4:var c=x[1];if(typeof r!="number")switch(r[
Line truncated
|
||||
`];function gN(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return h(ar(GH),e);if(Ov(e)===q3)return h(ar(BH),e);if(Ov(e)!==gE)return XH;for(var t=GC("%.12g",e),u=0,i=Ux(t);;){if(i<=u)return Jx(t,UH);var c=B1(t,u);x:{if(48<=c){if(58>c)break x}else if(c===45)break x;return t}var u=u+1|0}}function Iq(x,r){if(x.length-1<=r)return YH;var e=Iq(x,r+1|0),t=gN(x,r);return k(ar(JH),t,e)}function tp(x){x:{r:{for(var r=rl(yN);r;){e:{var e=r[2],t=r[1];try{var u=h(t,x)}catch{break e}if(u)break r}var r=e}var i=0;break x}var i=[0,u[1]]}if(i)return i[1];if(x===ZC)return $H;if(x===ZL)return WH;if(x[1]===QL){var c=x[2],v=c[3],s=c[2],l=c[1];return hs(ar(xN),l,s,v,v+5|0,QH)}if(x[1]===Nr){var p=x[2],d=p[3],T=p[2],b=p[1];return hs(ar(xN),b,T,d,d+6|0,ZH)}if(x[1]===Y6){var C=x[2],N=C[3],I=C[2],F=C[1];return hs(ar(xN),F,I,N,N+6|0,xV)}if(Ov(x)===0){var L=x.length-1,X=x[1][1];if(2<L>>>0)var q=Iq(x,2),J=gN(x,1),e0=k(ar(zH),J,q);else switch(L){case 0:var e0=KH;break;case 1:var e0=HH;break;default:var W=gN(x,1),e0=h(ar(VH),W)}var x0=[0,X,[0,e0]]}else var x0=[0,x[1],0];var i0=x0[2],f0=x0[1];return i0?Jx(f0,i0[1]):f0}function _N(x,r){var e=sJ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var c=N1(e,i)[1+i];let e0=i;var v=function(x0){return x0?e0===0?rV:eV:e0===0?tV:nV};if(c[0]===0){if(c[3]===c[6])var s=c[3],d=h(ar(uV),s);else var l=c[6],p=c[3],d=k(ar(aV),p,l);var T=c[7],b=c[4],C=c[8]?iV:cV,N=c[2],I=c[9],F=v(c[1]),X=[0,nz(ar(fV),F,I,N,C,d,b,T)]}else if(c[1])var X=0;else var L=v(0),X=[0,h(ar(sV),L)];if(X){var q=X[1];h(Pq(x,oV),q)}var J=i+1|0;if(t===i)break;var i=J}}function wN(x){for(;;){var r=rl(yN),e=1-ud(yN,r,[0,x,r]);if(!e)return e}}var vV=[0,tx,`(Cannot print locations:
|
||||
bytecode executable program file not found)`,`(Cannot print locations:
|
||||
bytecode executable program file appears to be corrupt)`,`(Cannot print locations:
|
||||
bytecode executable program file has wrong magic number)`,`(Cannot print locations:
|
||||
bytecode executable program file cannot be opened;
|
||||
-- too many open files. Try running with OCAMLRUNPARAM=b=2)`].slice(),lV=[0,[11,ZE,[2,0,[12,10,0]]],xM],pV=[0],kV="Fatal error: out of memory in uncaught exception handler",mV=[0,[11,ZE,[2,0,[12,10,0]]],xM],dV=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s
|
||||
`];QC(Hj,function(x,r){try{try{var e=r?pV:FL(0);try{eN(j)}catch{}try{var t=tp(x);h(hN(lV),t),_N(Sn,e);var u=RJ(0);if(u<0){var i=Td(u);nq(N1(vV,i)[1+i])}var c=bn(Sn),v=c}catch(b){var s=X1(b),l=tp(x);h(hN(mV),l),_N(Sn,e);var p=tp(s);h(hN(dV),p),_N(Sn,FL(0));var v=bn(Sn)}var d=v}catch(b){var T=X1(b);if(T!==ZC)throw z0(T,0);var d=nq(kV)}return d}catch{return 0}});var hV=[f1,"Stdlib.Fun.Finally_raised",Ca(0)],yV="Fun.Finally_raised: ";wN(function(x){return x[1]===hV?[0,Jx(yV,tp(x[2]))]:0});var gV="Digest.BLAKE2: wrong hash size";function bN(x){var r=x[1]<1?1:0,e=r||(64<x[1]?1:0);e&&X2(gV)}bN([0,16]),bN([0,32]),bN([0,64]);function Cq(x){var r=S2(x);return FJ(r,0,Ux(r))}var _V=mt(1,0,0),wV=mt(0,0,0),bV=mt(0,0,0),TV=mt(2,0,0),EV=mt(1,0,0);function Nq(x){return VY(7,0,[0,4])}function Oq(x,r,e,t,u){M6(x,0,UL(r,_V)),M6(x,1,e);var i=Nv(t,wV)?t:EV;M6(x,2,i);var c=Nv(u,bV)?u:TV;M6(x,3,c)}function jq(x,r,e,t){var u=Nq(j);return Oq(u,x,r,e,t),u}var AV=mt(14371852,15349651,22696),SV=mt(12230193,11438743,35013),PV=mt(1424933,15549263,2083),IV=mt(9492471,4696708,PF);Oa([0,function(x){var r=dd(x),e=dd(x),t=dd(x);return jq(r,e,t,dd(x))}],function(x){return jq(IV,PV,SV,AV)});var jd=0,Dq=-1,TN=[f1,"Stdlib.Format.String_tag",Ca(0)];function np(x,r){return x[13]=x[13]+r[3]|0,fN(r,x[28])}var Fq=1000000010;function CV(x,r){return x<=r?x:r}var NV=[f1,"Stdlib.Queue.Empty",Ca(0)],OV=[0,tx,0,tx],jV=tx,DV=tx,FV=tx,RV=tx,MV=[0,tx],LV=C_;function EN(x,r){return xx(x[17],r,0,Ux(r))}function Dd(x){return h(x[19],0)}function Rq(x,r,e){x[9]=x[9]-r|0,EN(x,e),x[11]=0}function Fd(x,r){var e=P(r,tx);return e&&Rq(x,Ux(r),r)}function Mv(x,r,e){var t=r[3],u=r[2];return Fd(x,r[1]),Dd(x),x[11]=1,x[10]=CV(x[8],(x[6]-e|0)+u|0),x[9]=x[6]-x[10]|0,h(x[21],x[10]),Fd(x,t)}function Mq(x,r){return Mv(x,OV,r)}function ml(x,r){var e=r[2],t=r[3];return Fd(x,r[1]),x[9]=x[9]-e|0,h(x[20],e),Fd(x,t)}function qV(x,r,e){if(typeof e=="number")switch(e){case 0:var t=ll(x[3]);if(!t)return;var u=t[1][1],i=function(Z0,N0){if(!N0)return[0,Z0,0];var ux=N0[1],ex=N0[2];return EJ(Z0,ux)?[0,Z0,N0]:[0,ux,i(Z0,ex)]};u[1]=i(x[6]-x[9]|0,u[1]);return;case 1:vl(x[2]);return;case 2:vl(x[3]);return;case 3:var c=ll(x[2]);return c?Mq(x,c[1][2]):Dd(x);case 4:var v=x[10]!==(x[6]-x[9]|0)?1:0;if(!v)return v;var s=x[28],l=s[2];if(l){var p=l[1];if(l[2]){var d=l[2];s[1]=s[1]-1|0,s[2]=d;var T=[0,p]}else{iN(s);var T=[0,p]}}else var T=0;if(!T)return;var b=T[1],C=b[1];x[12]=x[12]-b[3]|0,x[9]=x[9]+C|0;return;default:var N=vl(x[5]);return N?EN(x,h(x[25],N[1])):void 0}switch(e[0]){case 0:return Rq(x,r,e[1]);case 1:var I=e[2],F=e[1],L=I[1],X=I[2],q=ll(x[2]);if(!q)return;var J=q[1],e0=J[2];switch(J[1]){case 0:return ml(x,F);case 1:return Mv(x,I,e0);case 2:return Mv(x,I,e0);case 3:return x[9]<(r+Ux(L)|0)?Mv(x,I,e0):ml(x,F);case 4:return x[11]?ml(x,F):x[9]<(r+Ux(L)|0)||((x[6]-e0|0)+X|0)<x[10]?Mv(x,I,e0):ml(x,F);default:return ml(x,F)}case 2:var W=x[6]-x[9]|0,x0=e[2],i0=e[1],f0=ll(x[3]);if(!f0)return;var r0=f0[1][1],v0=r0[1];if(v0)for(var o0=r0[1],w0=v0[1];;){if(o0){var t0=o0[1],s0=o0[2];if(W>t0){var o0=s0;continue}var h0=t0}else var h0=w0;var p0=h0;break}else var p0=W;var C0=p0-W|0;return 0<=C0?ml(x,[0,DV,C0+i0|0,jV]):Mv(x,[0,RV,p0+x0|0,FV],x[6]);case 3:var j0=e[2],P0=e[1];if(x[8]<(x[6]-x[9]|0)){var M0=ll(x[2]);if(M0){var U0=M0[1],T0=U0[2],G0=U0[1];x[9]<T0&&3>=G0-1>>>0&&Mq(x,T0)}else Dd(x)}var k0=x[9]-P0|0,G=j0===1?1:x[9]<r?j0:5;return Fv([0,G,k0],x[2]);case 4:return Fv(e[1],x[3]);default:var S0=e[1];return EN(x,h(x[24],S0)),Fv(S0,x[5])}}function Lq(x){for(;;){var r=x[28][2],e=r?[0,r[1]]:0;if(!e)return;var t=e[1],u=t[1],i=0<=u?1:0,c=t[3],v=t[2],s=x[13]-x[12]|0,l=i||(x[9]<=s?1:0);if(!l)return l;var p=x[28],d=p[2];if(!d)throw z0(NV,1);if(d[2]){var T=d[2];p[1]=p[1]-1|0,p[2]=T}else iN(p);var b=0<=u?u:Fq;qV(x,b,v),x[12]=c+x[12]|0}}function qq(x,r){return np(x,r),Lq(x)}function Uq(x,r,e){return qq(x,[0,r,[0,e],r])}function AN(x){return Z6(x),Fv([0,-1,[0,Dq,MV,0]],x)}function SN(x,r){var e=ll(x[1]);if(e){var t=e[1],u=t[2],i=u[1];if(t[1]<x[12])return AN(x[1]);var c=u[2];if(typeof c!="number")switch(c[0]){case 3:1-r&&(u[1]=x[13]+i|0,vl(x[1]));return;case 1:case 2:r&&(u[1]=x[13]+i|0,vl(x[1]));return}}}function Bq(x,r,e){return np(x,e),r&&SN(x,1),Fv([0,x[13],e],x[1])}function Xq(x,r,e){if(x[14]=x[14]+1|0,x[14]<x[15])return Bq(x,0,[0,-x[13]|0,[3,r,e],0]);var t=x[14]===x[15]?1:0;if(!t)return t;var u=x[16];return Uq(x,Ux(u),u)}function Gq(x,r){1<x[14]&&(x[14]<x[15]&&(np(x,[0,jd,1,0]),SN(x,1),SN(x,0)),x[14]=x[14]-1|0)}function Yq(x,r){if(x[23]&&np(x,[0,jd,5,0]),x[22]){var e=vl(x[4]);if(e)return h(x[27],e[1])}}function Jq(x,r){for(P2(function(e){return Yq(x,j)},x[4][1]);!(1>=x[14]);)Gq(x,j);return x[13]=Fq,Lq(x),r&&Dd(x),x[12]=1,x[13]=1,iN(x[28]),AN(x[1]),Z6(x[2]),Z6(x[3]),Z6(x[4]),Z6(x[5]),x[10]=0,x[14]=0,x[9]=x[6],Xq(x,0,3)}function PN(x,r,e){var t=x[14]<x[15]?1:0;return t&&Uq(x,r,e)}function zq(x,r,e){return PN(x,r,e)}function up(x,r){return zq(x,1,Sd(1,r))}function Lv(x,r){return Jq(x,0),h(x[18],0)}function IN(x,r){retu
Line truncated
|
||||
`,an0=C_,sn0="unreachable regexp_class",on0=eD,vn0="unreachable regexp_body",ln0=tx,pn0=tx,kn0=tx,mn0=tx,dn0=RD,hn0="{'>'}",yn0=d6,gn0="{'}'}",_n0=jm,wn0=no,bn0=xT,Tn0=I8,En0=RD,An0=no,Sn0=xT,Pn0=I8,In0="unreachable type_token wholenumber",Cn0="unreachable type_token wholebigint",Nn0="unreachable type_token floatbigint",On0="unreachable type_token scinumber",jn0="unreachable type_token scibigint",Dn0="unreachable type_token hexnumber",Fn0="unreachable type_token hexbigint",Rn0="unreachable type_token legacyoctnumber",Mn0="unreachable type_token octnumber",Ln0="unreachable type_token octbigint",qn0="unreachable type_token binnumber",Un0="unreachable type_token bigbigint",Bn0="unreachable type_token",Xn0=NM,Gn0=[11,1],Yn0=[11,0],Jn0="unreachable template_tail",zn0=tx,Kn0=tx,Hn0="unreachable jsx_child",Vn0="unreachable jsx_tag",$n0=[0,LD],Wn0=[0,913],Qn0=[0,Zo],Zn0=[0,LI],x70=[0,SD],r70=[0,gI],e70=[0,8747],t70=[0,uy],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,FM],c70=[0,914],a70=[0,bM],s70=[0,YF],o70=[0,SR],v70=[0,915],l70=[0,Jj],p70=[0,919],k70=[0,917],m70=[0,OM],d70=[0,sD],h70=[0,oF],y70=[0,924],g70=[0,923],_70=[0,922],w70=[0,IF],b70=[0,921],T70=[0,pR],E70=[0,Ik],A70=[0,dF],S70=[0,P5],P70=[0,927],I70=[0,937],C70=[0,vD],N70=[0,pF],O70=[0,TD],j70=[0,338],D70=[0,352],F70=[0,929],R70=[0,936],M70=[0,8243],L70=[0,928],q70=[0,934],U70=[0,QM],B70=[0,oD],X70=[0,933],G70=[0,PR],Y70=[0,lM],J70=[0,Pj],z70=[0,920],K70=[0,932],H70=[0,Ky],V70=[0,MD],$70=[0,uR],W70=[0,sF],Q70=[0,918],Z70=[0,376],xu0=[0,iR],ru0=[0,926],eu0=[0,OF],tu0=[0,KR],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],au0=[0,945],su0=[0,8501],ou0=[0,Qo],vu0=[0,8226],lu0=[0,aD],pu0=[0,946],ku0=[0,8222],mu0=[0,Zj],du0=[0,RR],hu0=[0,8776],yu0=[0,IM],gu0=[0,8773],_u0=[0,9827],wu0=[0,$j],bu0=[0,967],Tu0=[0,QR],Eu0=[0,E8],Au0=[0,Vj],Su0=[0,rR],Pu0=[0,8595],Iu0=[0,8224],Cu0=[0,8659],Nu0=[0,PD],Ou0=[0,8746],ju0=[0,8629],Du0=[0,qD],Fu0=[0,8745],Ru0=[0,8195],Mu0=[0,8709],Lu0=[0,Sj],qu0=[0,CM],Uu0=[0,gM],Bu0=[0,h4],Xu0=[0,9830],Gu0=[0,8707],Yu0=[0,8364],Ju0=[0,UR],zu0=[0,U3],Ku0=[0,951],Hu0=[0,8801],Vu0=[0,949],$u0=[0,8194],Wu0=[0,8805],Qu0=[0,947],Zu0=[0,8260],xi0=[0,eE],ri0=[0,bD],ei0=[0,gA],ti0=[0,8704],ni0=[0,xR],ui0=[0,LM],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],ai0=[0,8660],si0=[0,62],oi0=[0,402],vi0=[0,948],li0=[0,wF],pi0=[0,Wy],ki0=[0,8712],mi0=[0,A8],di0=[0,953],hi0=[0,8734],yi0=[0,8465],gi0=[0,XR],_i0=[0,8220],wi0=[0,8968],bi0=[0,8592],Ti0=[0,yk],Ei0=[0,10216],Ai0=[0,955],Si0=[0,8656],Pi0=[0,954],Ii0=[0,60],Ci0=[0,8216],Ni0=[0,8249],Oi0=[0,JR],ji0=[0,9674],Di0=[0,8727],Fi0=[0,8970],Ri0=[0,XP],Mi0=[0,8711],Li0=[0,956],qi0=[0,8722],Ui0=[0,O4],Bi0=[0,xA],Xi0=[0,8212],Gi0=[0,$D],Yi0=[0,8804],Ji0=[0,957],zi0=[0,DF],Ki0=[0,8836],Hi0=[0,8713],Vi0=[0,mw],$i0=[0,8715],Wi0=[0,8800],Qi0=[0,8853],Zi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,uM],tf0=[0,339],nf0=[0,fv],uf0=[0,ZR],if0=[0,Dy],ff0=[0,z3],cf0=[0,8855],af0=[0,uE],sf0=[0,f1],of0=[0,ES],vf0=[0,q5],lf0=[0,x1],pf0=[0,pS],kf0=[0,982],mf0=[0,960],df0=[0,966],hf0=[0,8869],yf0=[0,8240],gf0=[0,8706],_f0=[0,8744],wf0=[0,8211],bf0=[0,10217],Tf0=[0,8730],Ef0=[0,8658],Af0=[0,34],Sf0=[0,968],Pf0=[0,8733],If0=[0,8719],Cf0=[0,961],Nf0=[0,8971],Of0=[0,WM],jf0=[0,8476],Df0=[0,8221],Ff0=[0,8969],Rf0=[0,8594],Mf0=[0,M4],Lf0=[0,LR],qf0=[0,CF],Uf0=[0,8901],Bf0=[0,353],Xf0=[0,8218],Gf0=[0,8217],Yf0=[0,8250],Jf0=[0,8835],zf0=[0,8721],Kf0=[0,8838],Hf0=[0,8834],Vf0=[0,9824],$f0=[0,8764],Wf0=[0,962],Qf0=[0,963],Zf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,Ok],nc0=[0,8839],uc0=[0,fL],ic0=[0,ID],fc0=[0,Z3],cc0=[0,8657],ac0=[0,8482],sc0=[0,Og],oc0=[0,732],vc0=[0,M3],lc0=[0,8201],pc0=[0,977],kc0=[0,wR],mc0=[0,q3],dc0=[0,965],hc0=[0,978],yc0=[0,UM],gc0=[0,eA],_c0=[0,cL],wc0=[0,wD],bc0=[0,8205],Tc0=[0,950],Ec0=[0,pk],Ac0=[0,RF],Sc0=[0,gE],Pc0=[0,958],Ic0=[0,8593],Cc0=[0,Oj],Nc0=[0,8242],Oc0=[0,_M],jc0="unreachable regexp",Dc0="unreachable token wholenumber",Fc0="unreachable token wholebigint",Rc0="unreachable token floatbigint",Mc0="unreachable token scinumber",Lc0="unreachable token scibigint",qc0="unreachable token hexnumber",Uc0="unreachable token hexbigint",Bc0="unreachable token legacyoctnumber",Xc0="unreachable token legacynonoctnumber",Gc0="unreachable token octnumber",Yc0="unreachable token octbigint",Jc0="unreachable token bignumber",zc0="unreachable token bigint",Kc0="unreachable token",Hc0=NM,Vc0=[7,"#!"],$c0="expected ?",Wc0="unreachable string_escape",Qc0=Q2,Zc0=o6,xa0=o6,ra0=Q2,ea0=kI,ta0=BF,na0="n",ua0="r",ia0="t",fa0=tR,ca0=o6,aa0=no,sa0=no,oa0="unreachable id_char",va0=no,la0=no,pa0=o6,ka0=pM,ma0=Fj,da0=zw,ha0=[27,"token ILLEGAL"],ya0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],ga0=[0,1],_a0=[0,1],wa0=HF,ba0=HF,Ta0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `exp
Line truncated
|
||||
\v\x07\f\r\x1B ! "#$%
Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xLine truncated
|
||||
\v\f\r`,t+1|0)-1|0;if(14<u>>>0)var i=w(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:H(r,15);var i=Re(y(r))===0?15:w(r);break;case 4:H(r,4);var i=te(y(r))===0?e(r):w(r);break;case 5:H(r,11);var i=te(y(r))===0?e(r):w(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:H(r,14);var c=Xv(y(r));if(c===0)var i=Er(y(r))===0&&Er(y(r))===0&&Er(y(r))===0?12:w(r);else if(c===1&&Er(y(r))===0){for(;;){var v=Bv(y(r));if(v!==0)break}var i=v===1?13:w(r)}else var i=w(r);break;case 13:var i=10;break;default:H(r,14);var i=Er(y(r))===0&&Er(y(r))===0?1:w(r)}if(16<i>>>0)return Sx(Wc0);switch(i){case 0:var s=Bx(r);return[0,x,s,m1(r),0];case 1:var l=Bx(r);return[0,x,l,[0,dt(Jx(Qc0,l))],0];case 2:var p=Bx(r),d=dt(Jx(Zc0,p));return k6<=d?[0,x,p,[0,d>>>3|0,48+(d&7)|0],1]:[0,x,p,[0,d],1];case 3:var T=Bx(r);return[0,x,T,[0,dt(Jx(xa0,T))],1];case 4:return[0,x,ra0,[0,0],0];case 5:return[0,x,ea0,[0,8],0];case 6:return[0,x,ta0,[0,12],0];case 7:return[0,x,na0,[0,10],0];case 8:return[0,x,ua0,[0,13],0];case 9:return[0,x,ia0,[0,9],0];case 10:return[0,x,fa0,[0,11],0];case 11:var b=Bx(r);return[0,x,b,[0,dt(Jx(ca0,b))],1];case 12:var C=Bx(r);return[0,x,C,[0,dt(Jx(aa0,I2(C,1,Ux(C)-1|0)))],0];case 13:var N=Bx(r),I=dt(Jx(sa0,I2(N,2,Ux(N)-3|0))),F=dk<I?_t(x,Hr(x,r)):x;return[0,F,N,[0,I],0];case 14:var L=Bx(r),X=m1(r);return[0,_t(x,Hr(x,r)),L,X,0];case 15:var q=Bx(r);return[0,ne(x,r),q,[0],0];default:var J=Bx(r);return[0,x,J,m1(r),0]}}function _B(x,r,e,t,u,i){for(var c=x,v=u;;){mr(i);var s=y(i),l=92<s?1:J0("",s+1|0)-1|0;if(4<l>>>0)var p=w(i);else switch(l){case 0:var p=3;break;case 1:for(;;){H(i,4);var d=y(i),T=-1<d?91<d?92<d?0:-1:J0("\0\0\0",d)-1|0:-1;if(T!==0)break}var p=w(i);break;case 2:var p=2;break;case 3:var p=0;break;default:var p=1}if(4<p>>>0)return Sx(un0);switch(p){case 0:var b=Bx(i);if(cr(t,b),Tr(r,b))return[0,c,Me(c,i),v];cr(e,b);break;case 1:cr(t,in0);var C=gB(c,i),N=C[4],I=C[3],F=C[2],L=C[1],X=N||v;cr(t,F),mq(function(w0){return ja(e,w0)},I);var c=L,v=X;break;case 2:var q=Bx(i);cr(t,q);var J=ne(_t(c,Hr(c,i)),i);return cr(e,q),[0,J,Me(J,i),v];case 3:var e0=Bx(i);cr(t,e0);var W=_t(c,Hr(c,i));return cr(e,e0),[0,W,Me(W,i),v];default:var x0=i[6],i0=i[3]-x0|0,f0=I1(i0*4|0),r0=fp(i[1],x0,i0,f0);sN(t,f0,0,r0),sN(e,f0,0,r0)}}}function wB(x,r,e,t){for(var u=x;;){mr(t);var i=y(t),c=96<i?1:J0("\x07",i+1|0)-1|0;if(6<c>>>0)var v=w(t);else switch(c){case 0:var v=0;break;case 1:for(;;){H(t,6);var s=y(t),l=-1<s?95<s?96<s?0:-1:J0("\0\0\0\0",s)-1|0:-1;if(l!==0)break}var v=w(t);break;case 2:var v=5;break;case 3:H(t,5);var v=Re(y(t))===0?4:w(t);break;case 4:H(t,6);var p=y(t),d=o1<p?pn<p?-1:0:-1,v=d===0?2:w(t);break;case 5:var v=3;break;default:var v=1}if(6<v>>>0)return Sx(fn0);switch(v){case 0:return[0,_t(u,Hr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:ht(e,92);var T=gB(u,t),b=T[3],C=T[1];cr(e,T[2]),mq(function(F){return ja(r,F)},b);var u=C;break;case 4:cr(e,cn0),cr(r,an0);var u=ne(u,t);break;case 5:cr(e,Bx(t)),ht(r,10);var u=ne(u,t);break;default:var N=Bx(t);cr(e,N),cr(r,N)}}}function NT0(x,r,e){for(var t=x;;){mr(e);var u=y(e),i=92<u?n2<u?1:m2<u?2:1:J0("\x07",u+1|0)-1|0;if(6<i>>>0)var c=w(e);else switch(i){case 0:var c=0;break;case 1:for(;;){H(e,7);var v=y(e),s=-1<v?90<v?92<v?m2<v?n2<v?0:-1:0:-1:J0("\0\0\0",v)-1|0:-1;if(s!==0)break}var c=w(e);break;case 2:var c=6;break;case 3:H(e,6);var c=Re(y(e))===0?6:w(e);break;case 4:if(H(e,4),VU(y(e))===0){for(;H(e,3),VU(y(e))===0;);var c=w(e)}else var c=w(e);break;case 5:var c=5;break;default:H(e,7);var l=y(e),p=-1<l?13<l?n2<l?0:m2<l?1:0:J0("",l)-1|0:-1;if(2<p>>>0)var c=w(e);else switch(p){case 0:var c=2;break;case 1:var c=1;break;default:H(e,1);var c=Re(y(e))===0?1:w(e)}}if(7<c>>>0)return Sx(vn0);switch(c){case 0:return[0,j2(t,Hr(t,e),lt),ln0];case 1:return[0,ne(j2(t,Hr(t,e),lt),e),pn0];case 2:cr(r,Bx(e));break;case 3:var d=Bx(e);return[0,t,I2(d,1,Ux(d)-1|0)];case 4:return[0,t,kn0];case 5:ht(r,91);x:{r:{e:{t:{n:for(;;){mr(e);var T=y(e),b=93<T?n2<T?1:m2<T?2:1:J0("",T+1|0)-1|0;if(5<b>>>0)var C=w(e);else switch(b){case 0:var C=0;break;case 1:for(;;){H(e,5);var N=y(e),I=-1<N?91<N?93<N?m2<N?n2<N?0:-1:0:-1:J0("\0\0",N)-1|0:-1;i
Line truncated
|
||||
`);return W0.length>1&&W0.every(bx=>bx.trimStart()[0]==="*")}var yj=new WeakMap;function RA0(a0){return yj.has(a0)||yj.set(a0,FA0(a0)),yj.get(a0)}var gj=RA0;function MA0(a0){if(a0.length<2)return;let W0;for(let bx=a0.length-1;bx>=0;bx--){let Yx=a0[bx];if(W0&&V2(Yx)===Pe(W0)&&gj(Yx)&&gj(W0)&&(a0.splice(bx+1,1),Yx.value+="*//*"+W0.value,Yx.range=[Pe(Yx),V2(W0)]),!dj(Yx)&&!I3(Yx))throw new TypeError(`Unknown comment type: "${Yx.type}".`);W0=Yx}}var _Y=MA0;var $p=null;function Wp(a0){if($p!==null&&typeof $p.property){let W0=$p;return $p=Wp.prototype=null,W0}return $p=Wp.prototype=a0??Object.create(null),new Wp}var LA0=10;for(let a0=0;a0<=LA0;a0++)Wp();function _j(a0){return Wp(a0)}function qA0(a0,W0="type"){_j(a0);function bx(Yx){let x1=Yx[W0],D1=a0[x1];if(!Array.isArray(D1))throw Object.assign(new Error(`Missing visitor keys for '${x1}'.`),{node:Yx});return D1}return bx}var wY=qA0;var bY={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id
Line truncated
|
||||
`;a0=Wl(!1,a0.replace(YA0,"").replace(GA0,""),HA0,"$1");let bx="";for(;bx!==a0;)bx=a0,a0=Wl(!1,a0,KA0,`${W0}$1 $2${W0}`);a0=a0.replace(IY,"").trimEnd();let Yx=Object.create(null),x1=Wl(!1,a0,CY,"").replace(IY,"").trimEnd(),D1;for(;D1=CY.exec(a0);){let Ie=Wl(!1,D1[2],zA0,"");if(typeof Yx[D1[1]]=="string"||Array.isArray(Yx[D1[1]])){let k2=Yx[D1[1]];Yx[D1[1]]=[...VA0,...Array.isArray(k2)?k2:[k2],Ie]}else Yx[D1[1]]=Ie}return{comments:x1,pragmas:Yx}}var jY=["noformat","noprettier"],DY=["format","prettier"];function $A0(a0){if(!a0.startsWith("#!"))return"";let W0=a0.indexOf(`
|
||||
`);return W0===-1?a0:a0.slice(0,W0)}var FY=$A0;function RY(a0){let W0=FY(a0);W0&&(a0=a0.slice(W0.length+1));let bx=NY(a0),{pragmas:Yx,comments:x1}=OY(bx);return{shebang:W0,text:a0,pragmas:Yx,comments:x1}}function MY(a0){let{pragmas:W0}=RY(a0);return DY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function LY(a0){let{pragmas:W0}=RY(a0);return jY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function WA0(a0){return a0=typeof a0=="function"?{parse:a0}:a0,{astFormat:"estree",hasPragma:MY,hasIgnorePragma:LY,locStart:Pe,locEnd:V2,...a0}}var qY=WA0;var QA0={comments:!1,components:!0,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!1};function ZA0(a0){let{message:W0,loc:bx}=a0;if(!bx)return a0;let{start:Yx,end:x1}=bx;return mY(W0,{loc:{start:{line:Yx.line,column:Yx.column+1},end:{line:x1.line,column:x1.column+1}},cause:a0})}function xS0(a0){let W0=UY.default.parse(a0,QA0),[bx]=W0.errors;if(bx)throw ZA0(bx);return PY(W0,{parser:"flow",text:a0})}var rS0=qY(xS0);var AP0=Ej;export{AP0 as default,Tj as parsers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
glimmer: Parser;
|
||||
};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var Ve=Object.defineProperty;var zs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Gs=Object.prototype.hasOwnProperty;var _r=e=>{throw TypeError(e)};var He=(e,t)=>{for(var r in t)Ve(e,r,{get:t[r],enumerable:!0})},Ks=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ys(t))!Gs.call(e,n)&&n!==r&&Ve(e,n,{get:()=>t[n],enumerable:!(s=zs(t,n))||s.enumerable});return e};var Ws=e=>Ks(Ve({},"__esModule",{value:!0}),e);var Or=(e,t,r)=>t.has(e)||_r("Cannot "+r);var I=(e,t,r)=>(Or(e,t,"read from private field"),r?r.call(e):t.get(e)),Lt=(e,t,r)=>t.has(e)?_r("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Y=(e,t,r,s)=>(Or(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r);var Pi={};He(Pi,{languages:()=>hs,parsers:()=>Pr,printers:()=>Ci});var js=(e,t,r,s)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,s):r.global?t.replace(r,s):t.split(r).join(s)},Fe=js;var Dt="string",Gt="array",Kt="cursor",_t="indent",Ot="align",Wt="trim",Bt="group",It="fill",bt="if-break",jt="indent-if-break",Qt="line-suffix",Jt="line-suffix-boundary",j="line",$t="label",Rt="break-parent",fe=new Set([Kt,_t,Ot,Wt,Bt,It,bt,jt,Qt,Jt,j,$t,Rt]);var Qs=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},G=Qs;function Js(e){if(typeof e=="string")return Dt;if(Array.isArray(e))return Gt;if(!e)return;let{type:t}=e;if(fe.has(t))return t}var qt=Js;var $s=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Xs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(qt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=$s([...fe].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Ue=class extends Error{name="InvalidDocError";constructor(t){super(Xs(t)),this.doc=t}},Me=Ue;function tn(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(qt(i)){case Gt:return t(i.map(s));case It:return t({...i,parts:i.parts.map(s)});case bt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case Bt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Ot:case _t:case jt:case $t:case Qt:return t({...i,contents:s(i.contents)});case Dt:case Kt:case Wt:case Jt:case j:case Rt:return t(i);default:throw new Me(i)}}}function Br(e,t=Ir){return tn(e,r=>typeof r=="string"?yt(t,r.split(`
|
||||
`)):r)}var ze=()=>{},kt=ze,Ye=ze,Rr=ze;function B(e){return kt(e),{type:_t,contents:e}}function en(e,t){return kt(t),{type:Ot,contents:t,n:e}}function R(e,t={}){return kt(e),Ye(t.expandedStates,!0),{type:Bt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Xt(e){return en(-1,e)}function Ge(e){return Rr(e),{type:It,parts:e}}function Ke(e,t="",r={}){return kt(e),t!==""&&kt(t),{type:bt,breakContents:e,flatContents:t,groupId:r.groupId}}var qr={type:Rt};var rn={type:j,hard:!0},sn={type:j,hard:!0,literal:!0},L={type:j},F={type:j,soft:!0},tt=[rn,qr],Ir=[sn,qr];function yt(e,t){kt(e),Ye(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var me="'",Vr='"';function nn(e,t){let r=t===!0||t===me?me:Vr,s=r===me?Vr:me,n=0,i=0;for(let a of e)a===r?n++:a===s&&i++;return n>i?s:r}var de=nn;function We(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var z,je=class{constructor(t){Lt(this,z);Y(this,z,new Set(t))}getLeadingWhitespaceCount(t){let r=I(this,z),s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=I(this,z),s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return I(this,z).has(t.charAt(0))}hasTrailingWhitespace(t){return I(this,z).has(G(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${We([...I(this,z)].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=I(this,z);return Array.prototype.every.call(t,s=>r.has(s))}};z=new WeakMap;var Hr=je;var an=[" ",`
|
||||
`,"\f","\r"," "],on=new Hr(an),K=on;function ln(e){return Array.isArray(e)&&e.length>0}var Zt=ln;var Qe=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Fr=Qe;function Ur(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=K.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Ur.ignoredProperties=new Set(["loc","selfClosing"]);var Mr=Ur;function cn(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=await n(t.chars,{parser:"css"});return i?[tt,i,Xt(F)]:[]}}var zr=cn;var te=null;function ee(e){if(te!==null&&typeof te.property){let t=te;return te=ee.prototype=null,t}return te=ee.prototype=e??Object.create(null),new ee}var un=10;for(let e=0;e<=un;e++)ee();function Je(e){return ee(e)}function hn(e,t="type"){Je(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Yr=hn;var Gr={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]};var pn=Yr(Gr),Kr=pn;function St(e){return e.loc.start.offset}function re(e){return e.loc.end.offset}var Wr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Qr(e){return e.toUpperCase()===e}function fn(e){return e.type==="ElementNode"&&typeof e.tag=="string"&&!e.tag.startsWith(":")&&(Qr(e.tag[0])||e.tag.includes("."))}function mn(e){return Wr.has(e.toLowerCase())&&!Qr(e[0])}function $e(e){return e.selfClosing===!0||mn(e.tag)||fn(e)&&e.children.every(t=>ge(t))}function ge(e){return e.type==="TextNode"&&!/\S/u.test(e.chars)}function jr(e){return(e==null?void 0:e.type)==="MustacheCommentStatement"&&typeof e.value=="string"&&e.value.trim()==="prettier-ignore"}function Jr(e){return jr(e.node)||e.isInArray&&(e.key==="children"||e.key==="body"||e.key==="parts")&&jr(e.siblings[e.index-2])}var ns=2;function dn(e,t,r){var n,i,a,o,c,h,p,m,S;let{node:s}=e;switch(s.type){case"Block":case"Program":case"Template":return R(e.map(r,"body"));case"ElementNode":{let y=R(bn(e,r)),v=t.htmlWhitespaceSensitivity==="ignore"&&((n=e.next)==null?void 0:n.type)==="ElementNode"?F:"";if($e(s))return[y,v];let C=["</",s.tag,">"];return s.children.length===0?[y,B(C),v]:t.htmlWhitespaceSensitivity==="ignore"?[y,B($r(e,t,r)),tt,B(C),v]:[y,B(R($r(e,t,r))),B(C),v]}case"BlockStatement":return wn(e)?[Tn(e,r),ts(e,t,r),es(e,t,r)]:[En(e,r),R([ts(e,t,r),es(e,t,r),Nn(e,t,r)])];case"ElementModifierStatement":return R(["{{",ss(e,r),"}}"]);case"MustacheStatement":return R([be(s),ss(e,r),ye(s)]);case"SubExpression":return R(["(",_n(e,r),F,")"]);case"AttrNode":{let{name:y,value:v}=s,C=v.type==="TextNode";if(C&&v.chars===""&&St(v)===re(v))return y;let w=C?de(v.chars,t.singleQuote):v.type==="ConcatStatement"?de(v.parts.map(q=>q.type==="TextNode"?q.chars:"").join(""),t.singleQuote):"",U=r("value");return[y,"=",w,y==="class"&&w?R(B(U)):U,w]}case"ConcatStatement":return e.map(r,"parts");case"Hash":return yt(L,e.map(r,"pairs"));case"HashPair":return[s.key,"=",r("value")];case"TextNode":{if(e.parent.tag==="pre"||e.parent.tag==="style")return s.chars;let y=Fe(!1,s.chars,"{{",String.raw`\{{`),v=Pn(e);if(v){if(v==="class"){let X=y.trim().split(/\s+/u).join(" "),rt=!1,V=!1;return e.parent.type==="ConcatStatement"&&(((i=e.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/u.test(y)&&(rt=!0),((a=e.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/u.test(y)&&X!==""&&(V=!0)),[rt?L:"",X,V?L:""]}return Br(y)}let C=K.isWhitespaceOnly(y),{isFirst:P,isLast:w}=e;if(t.htmlWhitespaceSensitivity!=="ignore"){let X=w&&e.parent.type==="Template",rt=P&&e.parent.type==="Template";if(C){if(rt||X)return"";let A=[L],nt=Vt(y);return nt&&(A=se(nt)),w&&(A=A.map(ue=>Xt(ue))),A}let V=K.getLeadingWhitespace
Line truncated
|
||||
`).length-1}function xn(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return Vt(t)}function An(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return Vt(t)}function se(e=0){return Array.from({length:Math.min(e,ns)}).fill(tt)}function Ln(e,t){let{node:{value:r}}=e,s=de(r,Dn(e)?!t.singleQuote:t.singleQuote);return[s,Fe(!1,r,s,`\\${s}`),s]}function Dn(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function _n(e,t){let r=Xe(e,t),s=ke(e,t);return s?B([r,L,R(s)]):r}function ss(e,t){let r=Xe(e,t),s=ke(e,t);return s?[B([r,L,s]),F]:r}function Xe(e,t){return t("path")}function ke(e,t){var n;let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),((n=r.hash)==null?void 0:n.pairs.length)>0&&s.push(t("hash")),s.length===0?"":yt(L,s)}function Ze(e){return["as |",e.blockParams.join(" "),"|"]}var On=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),Bn=new Set(["true","false","null","undefined"]),In=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&Bn.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>On.has(r));function Rn(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>In(r,s)?`[${r}]`:r).join(".")}var qn={print:dn,massageAstNode:Mr,hasPrettierIgnore:Jr,getVisitorKeys:Kr,embed:zr},us=qn;var hs=[{name:"Handlebars",type:"markup",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Pr={};He(Pr,{glimmer:()=>Ni});var Vn=Object.freeze([]);function fs(){return Vn}var Qa=fs(),Ja=fs();var tr=Object.assign;var ps=console;function ms(e,t="unexpected unreachable branch"){throw ps.log("unreachable",e),ps.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var Hn=function(){var e=function(it,d,k,g){for(k=k||{},g=it.length;g--;k[it[g]]=d);return k},t=[2,44],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,52,56,60],n=[1,35],i=[1,38],a=[1,30],o=[1,31],c=[1,32],h=[1,33],p=[1,34],m=[1,37],S=[14,15,19,29,34,39,44,47,48,52,56,60],y=[14,15,19,29,34,44,47,48,52,56,60],v=[15,18],C=[14,15,19,29,34,47,48,52,56,60],P=[33,64,71,79,80,81,82,83,84],w=[23,33,55,64,67,71,74,79,80,81,82,83,84],U=[1,51],q=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],$=[2,43],Nt=[55,64,71,79,80,81,82,83,84],Ct=[1,58],X=[1,59],rt=[1,66],V=[33,64,71,74,79,80,81,82,83,84],Pt=[23,64,71,79,80,81,82,83,84],H=[1,76],st=[64,67,71,79,80,81,82,83,84],A=[33,74],nt=[23,33,55,67,71,74],ue=[1,106],Le=[1,118],xr=[71,76],De={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[2Line truncated
|
||||
`+x.showPosition()+`
|
||||
Expecting `+pe.join(", ")+", got '"+(this.terminals_[O]||O)+"'":qe="Parse error on line "+(at+1)+": Unexpected "+(O==Lr?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(qe,{text:x.match,token:this.terminals_[O]||O,line:x.yylineno,loc:Be,expected:pe})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+O);switch(M[0]){case 1:g.push(O),N.push(x.yytext),l.push(x.yylloc),g.push(M[1]),O=null,Ie?(O=Ie,Ie=null):(Yt=x.yyleng,u=x.yytext,at=x.yylineno,Be=x.yylloc,Ar>0&&Ar--);break;case 2:if(Z=this.productions_[M[1]][1],At.$=N[N.length-Z],At._$={first_line:l[l.length-(Z||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Z||1)].first_column,last_column:l[l.length-1].last_column},Us&&(At._$.range=[l[l.length-(Z||1)].range[0],l[l.length-1].range[1]]),Re=this.performAction.apply(At,[u,Yt,at,dt.yy,M[1],N,l].concat(Fs)),typeof Re<"u")return Re;Z&&(g=g.slice(0,-1*Z*2),N=N.slice(0,-1*Z),l=l.slice(0,-1*Z)),g.push(this.productions_[M[1]][0]),N.push(At.$),l.push(At._$),Dr=xt[g[g.length-2]][g[g.length-1]],g.push(Dr);break;case 3:return!0}}return!0}},Vs=function(){var it={EOF:1,parseError:function(k,g){if(this.yy.parser)this.yy.parser.parseError(k,g);else throw new Error(k)},setInput:function(d,k){return this.yy=k||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var k=d.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},unput:function(d){var k=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===b.length?this.yylloc.first_column:0)+b[b.length-g.length].length-g[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(d){this.unput(this.match.slice(d))},pastInput:function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var d=this.pastInput(),k=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
|
||||
`+k+"^"},test_match:function(d,k){var g,b,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),b=d[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var l in N)this[l]=N[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,k,g,b;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),l=0;l<N.length;l++)if(g=this._input.match(this.rules[N[l]]),g&&(!k||g[0].length>k[0].length)){if(k=g,b=l,this.options.backtrack_lexer){if(d=this.test_match(g,N[l]),d!==!1)return d;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(d=this.test_match(k,N[b]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(k,g,b,N){function l(u,at){return g.yytext=g.yytext.substring(u,g.yyleng-at+u)}var xt=N;switch(b){case 0:if(g.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):g.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),g.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(g.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return g.yytext=l(1,2).replace(/\\"/g,'"'),79;break;case 32:return g.yytext=l(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return g.yytext=g.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return it}();De.lexer=Vs;function _e(){this.yy={}}return _e.prototype=De,De.Parser=_e,new _e}(),Se=Hn;var er=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function rr(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<er.length;c++)this[er[c]]=o[er[c]];Error.captureStackTrace&&Error.captureStackTrace(this,rr);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}rr.prototype=new Error;var ot=rr;function Ee(){this.parents=[]}Ee.prototype={constructor:Ee,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!Ee.prototype[r.type])throw new ot('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new ot(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(e){if(!this[e.type])throw new ot("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||tLine truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var cr=function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||Ss(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),lo=function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new cr(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e}();var Ne={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function vs(e){return function(t){return Array.isArray(t)&&t[0]===e}}var uo=vs(Ne.FlushElement);var ho=vs(Ne.GetSymbol);var ri=!1,si=/["\x26\xa0]/u,Eo=new RegExp(si.source,"gu"),ni=/[&<>\xa0]/u,vo=new RegExp(ni.source,"gu");var dr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ii(e){var t;return dr.has(e.toLowerCase())&&((t=e[0])==null?void 0:t.toLowerCase())===e[0]}function ce(e){
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(ri){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function E(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var ci={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},Cr=function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}();function ws(e,t,r){return new Cr("Cannot remove a node unless it is part of an array",e,t,r)}function ui(e,t,r){return new Cr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function Ts(e,t){return new Cr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var zt=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new Sr(this)}}},Sr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Ds(e){return typeof e=="function"?e:e.enter}function _s(e){return typeof e=="function"?void 0:e.exit}function Ae(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=function(h,p){if(h.Program&&(p==="Template"&&!h.Template||p==="Block"&&!h.Block))return h.Program;let m=h[p];return m!==void 0?m:h.All}(e,i.type);if(c!==void 0&&(r=Ds(c),s=_s(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(Os(e,n,a,o),n):Ae(e,new zt(n,a,o))||n;n=void 0}if(n===void 0){let h=ci[i.type];for(let p=0;p<h.length;p++)hi(e,c,t,h[p]);s!==void 0&&(n=s(i,t))}return n}function Ns(e,t,r){e[t]=r}function hi(e,t,r,s){let n,i,{node:a}=r,o=function(c,h){return c[h]}(a,s);if(o){if(t!==void 0){let c=function(h,p){let m=typeof h!="function"?h.keys:void 0;if(m===void 0)return;let S=m[p];return S!==void 0?S:m.All}(t,s);c!==void 0&&(n=Ds(c),i=_s(c))}if(n!==void 0&&n(a,s)!==void 0)throw Ts(a,s);if(Array.isArray(o))Os(e,o,r,s);else{let c=Ae(e,new zt(o,r,s));c!==void 0&&function(h,p,m,S){if(S===null)throw ws(m,h,p);if(Array.isArray(S)){if(S.length!==1)throw S.length===0?ws(m,h,p):ui(m,h,p);Ns(h,p,S[0])}else Ns(h,p,S)}(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw Ts(a,s)}}function Os(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=Ae(e,new zt(i,r,s));a!==void 0&&(n+=pi(t,n,a)-1)}}function pi(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function fi(e,t){Ae(t,new zt(e))}function Ft(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function Bs(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var ur;function hr(){return ur||(ur=new wt("","(synthetic)")),ur}function Cs(e,t){return f.var({name:e,loc:T(t||null)})}function ct(e,t){let r=T(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return f.path({head:f.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:T(t||null)})}}let{head:s,tail:n}=function(i,a){let[o,...c]=i.split("."),h=f.head({original:o,loc:T(a||null)});return f.path({head:h,tail:c,loc:T(a||null)})}(e,r);return f.path({head:s,tail:n,loc:r})}function Pe(e,t,r){return f.literal({type:e,value:t,loc:T(r||null)})}function ie(e=[],t){return f.hash({pairs:e,loc:T(t||null)})}function Is(e){return e.map(t=>typeof t=="string"?f.var({name:t,loc:D.synthetic(t)}):t)}function Ps(e=[],t=[],r=!1,s){return f.blockItself({body:e,params:Is(t),chained:r,loc:T(s||null)})}function xs(e=[],t=[],r){return f.template({body:e,blockParams:t,loc:T(r||null)})}function T(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?D.forHbsLoc(hr(),t):D.forHbsLoc(hr(),oi)}{let[t,r,s,n,i]=e,a=i?new wt("",i):hr();return D.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var mi={mustache:function(e,t=[],r=ie([]),s=!1,n,i){return f.mustache({path:ct(e),params:t,hash:r,trusting:s,strip:i,loc:T(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,p=null;return h=s.type==="Template"?f.blockItself({params:Is(s.blockParams),body:s.body,loc:s.loc}):s,(n==null?void 0:n.type)==="Template"?(n.blockParams.length,p=f.blockItself({params:[],body:n.body,loc:n.loc})):p=n,f.block({path:ct(e),params:t||[],hash:r||ie([]),defaultBlock:h,elseBlock:p,loc:T(i||null),openStrip:a,inverseStrip:o,closeStrip:c})}
Line truncated
|
||||
`)}},vr=class extends Er{parse(t,r){var i;t.loc;let s=f.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return(i=this.pendingError)==null||i.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=f.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if((s==null?void 0:s.type)==="ElementNode")throw E(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){var m;if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw E("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=fr(this,t),i=this.source.spanFor(t.loc),a,o=[];if((m=t.program.blockParams)!=null&&m.length){let S=n.loc.collapse("end");S=t.program.loc?S.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?S.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):S.withEnd(i.getEnd()),a=As(this.source,t,S);let y=S.asString(),v=y.indexOf("|")+1,C=y.indexOf("|",v);for(let P of t.program.blockParams){let w,U;w=v>=C?-1:y.indexOf(P,v),w===-1||w+P.length>C?(v=C,U=this.source.spanFor(gr)):(v=w,U=S.sliceStartChars({skipStart:v,chars:P.length}),v+=P.length),o.push(f.var({name:P,loc:U}))}}else a=As(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,p=f.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});Ft(this.currentElement(),p)}MustacheStatement(t){var o;(o=this.pendingError)==null||o.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw E("Illegal use of ...attributes",this.source.spanFor(t.loc));if(Bs(t.path))s=f.mustache({path:this.acceptNode(t.path),params:[],hash:f.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:c,params:h,hash:p}=fr(this,t);s=f.mustache({path:c,params:h,hash:p,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw E("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":mr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),mr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":mr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:Ft(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),p=h.split(/\n/u),m=p.length-1;return{lines:m,columns:p[m].length}}(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=f.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":Ft(this.currentElement(),i);break;default:throw E(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw E("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw E("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw E("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw E("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=fr(this,t);return f.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw E('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw E('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw E("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw E("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=f.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw E("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=f.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw E("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=f.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return f.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map(s=>f.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)}));return f.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return f.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return f.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return f.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return f.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return f.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function fr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",E(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map(i=>e.acceptNode(i)),n=ce(s)?Nr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):f.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function mr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(Bs(r)){let o=`{{${function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)}(r)}}}`;throw E(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=f.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function As(e,t,r){if(!t.program.loc){let n=G(!1,t.program.body,0),i=G(!1,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Ht(e){return/[\t\n\f ]/u.test(e)}var wLine truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=f.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw E("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw E("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let p=f.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(p)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Ht(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw E('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Ht(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Ht(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw E("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw E('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Ht(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw E(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(f.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw E('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Ht(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Ht(o))throw E(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw E(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=ai(t),s=Nr(t);return f.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(dr.has(t.name)&&!s)throw E(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw E(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw E(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw E("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return ce(t)?t[0]:f.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},di={},Tr=class extends lr{constructor(){super({})}parse(){}};function Rs(e,t={}){var c,h,p;let r,s,n,i=t.mode||"precomLine truncated
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(G(!1,r,-2))?G(!1,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(G(!1,r,-1))&&r[1]===""&&G(!1,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ti(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ni={parse:vi,astFormat:"glimmer",locStart:St,locEnd:re};var Ci={glimmer:us};return Ws(Pi);});
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
var zs=Object.defineProperty;var _r=e=>{throw TypeError(e)};var Ve=(e,t)=>{for(var r in t)zs(e,r,{get:t[r],enumerable:!0})};var Or=(e,t,r)=>t.has(e)||_r("Cannot "+r);var I=(e,t,r)=>(Or(e,t,"read from private field"),r?r.call(e):t.get(e)),Lt=(e,t,r)=>t.has(e)?_r("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Y=(e,t,r,s)=>(Or(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r);var xr={};Ve(xr,{languages:()=>hs,parsers:()=>Cr,printers:()=>vi});var Ys=(e,t,r,s)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,s):r.global?t.replace(r,s):t.split(r).join(s)},He=Ys;var Dt="string",Gt="array",Kt="cursor",_t="indent",Ot="align",Wt="trim",Bt="group",It="fill",bt="if-break",jt="indent-if-break",Qt="line-suffix",Jt="line-suffix-boundary",j="line",$t="label",Rt="break-parent",fe=new Set([Kt,_t,Ot,Wt,Bt,It,bt,jt,Qt,Jt,j,$t,Rt]);var Gs=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},G=Gs;function Ks(e){if(typeof e=="string")return Dt;if(Array.isArray(e))return Gt;if(!e)return;let{type:t}=e;if(fe.has(t))return t}var qt=Ks;var Ws=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function js(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(qt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Ws([...fe].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Fe=class extends Error{name="InvalidDocError";constructor(t){super(js(t)),this.doc=t}},Ue=Fe;function Js(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(qt(i)){case Gt:return t(i.map(s));case It:return t({...i,parts:i.parts.map(s)});case bt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case Bt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Ot:case _t:case jt:case $t:case Qt:return t({...i,contents:s(i.contents)});case Dt:case Kt:case Wt:case Jt:case j:case Rt:return t(i);default:throw new Ue(i)}}}function Br(e,t=Ir){return Js(e,r=>typeof r=="string"?yt(t,r.split(`
|
||||
`)):r)}var Me=()=>{},kt=Me,ze=Me,Rr=Me;function B(e){return kt(e),{type:_t,contents:e}}function $s(e,t){return kt(t),{type:Ot,contents:t,n:e}}function R(e,t={}){return kt(e),ze(t.expandedStates,!0),{type:Bt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Xt(e){return $s(-1,e)}function Ye(e){return Rr(e),{type:It,parts:e}}function Ge(e,t="",r={}){return kt(e),t!==""&&kt(t),{type:bt,breakContents:e,flatContents:t,groupId:r.groupId}}var qr={type:Rt};var Xs={type:j,hard:!0},Zs={type:j,hard:!0,literal:!0},L={type:j},F={type:j,soft:!0},tt=[Xs,qr],Ir=[Zs,qr];function yt(e,t){kt(e),ze(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var me="'",Vr='"';function tn(e,t){let r=t===!0||t===me?me:Vr,s=r===me?Vr:me,n=0,i=0;for(let a of e)a===r?n++:a===s&&i++;return n>i?s:r}var de=tn;function Ke(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var z,We=class{constructor(t){Lt(this,z);Y(this,z,new Set(t))}getLeadingWhitespaceCount(t){let r=I(this,z),s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=I(this,z),s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return I(this,z).has(t.charAt(0))}hasTrailingWhitespace(t){return I(this,z).has(G(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${Ke([...I(this,z)].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=I(this,z);return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=I(this,z);return Array.prototype.every.call(t,s=>r.has(s))}};z=new WeakMap;var Hr=We;var en=[" ",`
|
||||
`,"\f","\r"," "],rn=new Hr(en),K=rn;function sn(e){return Array.isArray(e)&&e.length>0}var Zt=sn;var je=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Fr=je;function Ur(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=K.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Ur.ignoredProperties=new Set(["loc","selfClosing"]);var Mr=Ur;function nn(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=await n(t.chars,{parser:"css"});return i?[tt,i,Xt(F)]:[]}}var zr=nn;var te=null;function ee(e){if(te!==null&&typeof te.property){let t=te;return te=ee.prototype=null,t}return te=ee.prototype=e??Object.create(null),new ee}var an=10;for(let e=0;e<=an;e++)ee();function Qe(e){return ee(e)}function on(e,t="type"){Qe(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Yr=on;var Gr={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]};var ln=Yr(Gr),Kr=ln;function St(e){return e.loc.start.offset}function re(e){return e.loc.end.offset}var Wr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function Qr(e){return e.toUpperCase()===e}function cn(e){return e.type==="ElementNode"&&typeof e.tag=="string"&&!e.tag.startsWith(":")&&(Qr(e.tag[0])||e.tag.includes("."))}function un(e){return Wr.has(e.toLowerCase())&&!Qr(e[0])}function Je(e){return e.selfClosing===!0||un(e.tag)||cn(e)&&e.children.every(t=>ge(t))}function ge(e){return e.type==="TextNode"&&!/\S/u.test(e.chars)}function jr(e){return(e==null?void 0:e.type)==="MustacheCommentStatement"&&typeof e.value=="string"&&e.value.trim()==="prettier-ignore"}function Jr(e){return jr(e.node)||e.isInArray&&(e.key==="children"||e.key==="body"||e.key==="parts")&&jr(e.siblings[e.index-2])}var ns=2;function hn(e,t,r){var n,i,a,o,c,h,p,m,S;let{node:s}=e;switch(s.type){case"Block":case"Program":case"Template":return R(e.map(r,"body"));case"ElementNode":{let y=R(fn(e,r)),v=t.htmlWhitespaceSensitivity==="ignore"&&((n=e.next)==null?void 0:n.type)==="ElementNode"?F:"";if(Je(s))return[y,v];let C=["</",s.tag,">"];return s.children.length===0?[y,B(C),v]:t.htmlWhitespaceSensitivity==="ignore"?[y,B($r(e,t,r)),tt,B(C),v]:[y,B(R($r(e,t,r))),B(C),v]}case"BlockStatement":return kn(e)?[Sn(e,r),ts(e,t,r),es(e,t,r)]:[bn(e,r),R([ts(e,t,r),es(e,t,r),En(e,t,r)])];case"ElementModifierStatement":return R(["{{",ss(e,r),"}}"]);case"MustacheStatement":return R([be(s),ss(e,r),ye(s)]);case"SubExpression":return R(["(",Pn(e,r),F,")"]);case"AttrNode":{let{name:y,value:v}=s,C=v.type==="TextNode";if(C&&v.chars===""&&St(v)===re(v))return y;let w=C?de(v.chars,t.singleQuote):v.type==="ConcatStatement"?de(v.parts.map(q=>q.type==="TextNode"?q.chars:"").join(""),t.singleQuote):"",U=r("value");return[y,"=",w,y==="class"&&w?R(B(U)):U,w]}case"ConcatStatement":return e.map(r,"parts");case"Hash":return yt(L,e.map(r,"pairs"));case"HashPair":return[s.key,"=",r("value")];case"TextNode":{if(e.parent.tag==="pre"||e.parent.tag==="style")return s.chars;let y=He(!1,s.chars,"{{",String.raw`\{{`),v=wn(e);if(v){if(v==="class"){let X=y.trim().split(/\s+/u).join(" "),rt=!1,V=!1;return e.parent.type==="ConcatStatement"&&(((i=e.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/u.test(y)&&(rt=!0),((a=e.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/u.test(y)&&X!==""&&(V=!0)),[rt?L:"",X,V?L:""]}return Br(y)}let C=K.isWhitespaceOnly(y),{isFirst:x,isLast:w}=e;if(t.htmlWhitespaceSensitivity!=="ignore"){let X=w&&e.parent.type==="Template",rt=x&&e.parent.type==="Template";if(C){if(rt||X)return"";let A=[L],nt=Vt(y);return nt&&(A=se(nt)),w&&(A=A.map(ue=>Xt(ue))),A}let V=K.getLeadingWhitespace
Line truncated
|
||||
`).length-1}function Tn(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return Vt(t)}function Nn(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return Vt(t)}function se(e=0){return Array.from({length:Math.min(e,ns)}).fill(tt)}function Cn(e,t){let{node:{value:r}}=e,s=de(r,xn(e)?!t.singleQuote:t.singleQuote);return[s,He(!1,r,s,`\\${s}`),s]}function xn(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function Pn(e,t){let r=$e(e,t),s=ke(e,t);return s?B([r,L,R(s)]):r}function ss(e,t){let r=$e(e,t),s=ke(e,t);return s?[B([r,L,s]),F]:r}function $e(e,t){return t("path")}function ke(e,t){var n;let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),((n=r.hash)==null?void 0:n.pairs.length)>0&&s.push(t("hash")),s.length===0?"":yt(L,s)}function Xe(e){return["as |",e.blockParams.join(" "),"|"]}var An=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),Ln=new Set(["true","false","null","undefined"]),Dn=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&Ln.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>An.has(r));function _n(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>Dn(r,s)?`[${r}]`:r).join(".")}var On={print:hn,massageAstNode:Mr,hasPrettierIgnore:Jr,getVisitorKeys:Kr,embed:zr},us=On;var hs=[{name:"Handlebars",type:"markup",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Cr={};Ve(Cr,{glimmer:()=>Ei});var Bn=Object.freeze([]);function fs(){return Bn}var Ya=fs(),Ga=fs();var Ze=Object.assign;var ps=console;function ms(e,t="unexpected unreachable branch"){throw ps.log("unreachable",e),ps.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var In=function(){var e=function(it,d,k,g){for(k=k||{},g=it.length;g--;k[it[g]]=d);return k},t=[2,44],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,52,56,60],n=[1,35],i=[1,38],a=[1,30],o=[1,31],c=[1,32],h=[1,33],p=[1,34],m=[1,37],S=[14,15,19,29,34,39,44,47,48,52,56,60],y=[14,15,19,29,34,44,47,48,52,56,60],v=[15,18],C=[14,15,19,29,34,47,48,52,56,60],x=[33,64,71,79,80,81,82,83,84],w=[23,33,55,64,67,71,74,79,80,81,82,83,84],U=[1,51],q=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],$=[2,43],Nt=[55,64,71,79,80,81,82,83,84],Ct=[1,58],X=[1,59],rt=[1,66],V=[33,64,71,74,79,80,81,82,83,84],xt=[23,64,71,79,80,81,82,83,84],H=[1,76],st=[64,67,71,79,80,81,82,83,84],A=[33,74],nt=[23,33,55,67,71,74],ue=[1,106],Le=[1,118],Pr=[71,76],De={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[2Line truncated
|
||||
`+P.showPosition()+`
|
||||
Expecting `+pe.join(", ")+", got '"+(this.terminals_[O]||O)+"'":qe="Parse error on line "+(at+1)+": Unexpected "+(O==Lr?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(qe,{text:P.match,token:this.terminals_[O]||O,line:P.yylineno,loc:Be,expected:pe})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+O);switch(M[0]){case 1:g.push(O),N.push(P.yytext),l.push(P.yylloc),g.push(M[1]),O=null,Ie?(O=Ie,Ie=null):(Yt=P.yyleng,u=P.yytext,at=P.yylineno,Be=P.yylloc,Ar>0&&Ar--);break;case 2:if(Z=this.productions_[M[1]][1],At.$=N[N.length-Z],At._$={first_line:l[l.length-(Z||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Z||1)].first_column,last_column:l[l.length-1].last_column},Us&&(At._$.range=[l[l.length-(Z||1)].range[0],l[l.length-1].range[1]]),Re=this.performAction.apply(At,[u,Yt,at,dt.yy,M[1],N,l].concat(Fs)),typeof Re<"u")return Re;Z&&(g=g.slice(0,-1*Z*2),N=N.slice(0,-1*Z),l=l.slice(0,-1*Z)),g.push(this.productions_[M[1]][0]),N.push(At.$),l.push(At._$),Dr=Pt[g[g.length-2]][g[g.length-1]],g.push(Dr);break;case 3:return!0}}return!0}},Vs=function(){var it={EOF:1,parseError:function(k,g){if(this.yy.parser)this.yy.parser.parseError(k,g);else throw new Error(k)},setInput:function(d,k){return this.yy=k||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var k=d.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},unput:function(d){var k=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===b.length?this.yylloc.first_column:0)+b[b.length-g.length].length-g[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(d){this.unput(this.match.slice(d))},pastInput:function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var d=this.pastInput(),k=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
|
||||
`+k+"^"},test_match:function(d,k){var g,b,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),b=d[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var l in N)this[l]=N[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,k,g,b;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),l=0;l<N.length;l++)if(g=this._input.match(this.rules[N[l]]),g&&(!k||g[0].length>k[0].length)){if(k=g,b=l,this.options.backtrack_lexer){if(d=this.test_match(g,N[l]),d!==!1)return d;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(d=this.test_match(k,N[b]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var k=this.next();return k||this.lex()},begin:function(k){this.conditionStack.push(k)},popState:function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},pushState:function(k){this.begin(k)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(k,g,b,N){function l(u,at){return g.yytext=g.yytext.substring(u,g.yyleng-at+u)}var Pt=N;switch(b){case 0:if(g.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):g.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),g.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(g.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return g.yytext=l(1,2).replace(/\\"/g,'"'),79;break;case 32:return g.yytext=l(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return g.yytext=g.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return it}();De.lexer=Vs;function _e(){this.yy={}}return _e.prototype=De,De.Parser=_e,new _e}(),Se=In;var tr=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function er(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<tr.length;c++)this[tr[c]]=o[tr[c]];Error.captureStackTrace&&Error.captureStackTrace(this,er);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}er.prototype=new Error;var ot=er;function Ee(){this.parents=[]}Ee.prototype={constructor:Ee,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!Ee.prototype[r.type])throw new ot('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new ot(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(e){if(!this[e.type])throw new ot("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||tLine truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var lr=function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||Ss(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),so=function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new lr(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e}();var Ne={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function vs(e){return function(t){return Array.isArray(t)&&t[0]===e}}var io=vs(Ne.FlushElement);var ao=vs(Ne.GetSymbol);var Xn=!1,Zn=/["\x26\xa0]/u,go=new RegExp(Zn.source,"gu"),ti=/[&<>\xa0]/u,bo=new RegExp(ti.source,"gu");var mr=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ei(e){var t;return mr.has(e.toLowerCase())&&((t=e[0])==null?void 0:t.toLowerCase())===e[0]}function ce(e){
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(Xn){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function E(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var ii={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},Nr=function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}();function ws(e,t,r){return new Nr("Cannot remove a node unless it is part of an array",e,t,r)}function ai(e,t,r){return new Nr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function Ts(e,t){return new Nr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var zt=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new kr(this)}}},kr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Ds(e){return typeof e=="function"?e:e.enter}function _s(e){return typeof e=="function"?void 0:e.exit}function Ae(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=function(h,p){if(h.Program&&(p==="Template"&&!h.Template||p==="Block"&&!h.Block))return h.Program;let m=h[p];return m!==void 0?m:h.All}(e,i.type);if(c!==void 0&&(r=Ds(c),s=_s(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(Os(e,n,a,o),n):Ae(e,new zt(n,a,o))||n;n=void 0}if(n===void 0){let h=ii[i.type];for(let p=0;p<h.length;p++)oi(e,c,t,h[p]);s!==void 0&&(n=s(i,t))}return n}function Ns(e,t,r){e[t]=r}function oi(e,t,r,s){let n,i,{node:a}=r,o=function(c,h){return c[h]}(a,s);if(o){if(t!==void 0){let c=function(h,p){let m=typeof h!="function"?h.keys:void 0;if(m===void 0)return;let S=m[p];return S!==void 0?S:m.All}(t,s);c!==void 0&&(n=Ds(c),i=_s(c))}if(n!==void 0&&n(a,s)!==void 0)throw Ts(a,s);if(Array.isArray(o))Os(e,o,r,s);else{let c=Ae(e,new zt(o,r,s));c!==void 0&&function(h,p,m,S){if(S===null)throw ws(m,h,p);if(Array.isArray(S)){if(S.length!==1)throw S.length===0?ws(m,h,p):ai(m,h,p);Ns(h,p,S[0])}else Ns(h,p,S)}(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw Ts(a,s)}}function Os(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=Ae(e,new zt(i,r,s));a!==void 0&&(n+=li(t,n,a)-1)}}function li(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function ci(e,t){Ae(t,new zt(e))}function Ft(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function Bs(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var cr;function ur(){return cr||(cr=new wt("","(synthetic)")),cr}function Cs(e,t){return f.var({name:e,loc:T(t||null)})}function ct(e,t){let r=T(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return f.path({head:f.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:T(t||null)})}}let{head:s,tail:n}=function(i,a){let[o,...c]=i.split("."),h=f.head({original:o,loc:T(a||null)});return f.path({head:h,tail:c,loc:T(a||null)})}(e,r);return f.path({head:s,tail:n,loc:r})}function xe(e,t,r){return f.literal({type:e,value:t,loc:T(r||null)})}function ie(e=[],t){return f.hash({pairs:e,loc:T(t||null)})}function Is(e){return e.map(t=>typeof t=="string"?f.var({name:t,loc:D.synthetic(t)}):t)}function xs(e=[],t=[],r=!1,s){return f.blockItself({body:e,params:Is(t),chained:r,loc:T(s||null)})}function Ps(e=[],t=[],r){return f.template({body:e,blockParams:t,loc:T(r||null)})}function T(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?D.forHbsLoc(ur(),t):D.forHbsLoc(ur(),si)}{let[t,r,s,n,i]=e,a=i?new wt("",i):ur();return D.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var ui={mustache:function(e,t=[],r=ie([]),s=!1,n,i){return f.mustache({path:ct(e),params:t,hash:r,trusting:s,strip:i,loc:T(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,p=null;return h=s.type==="Template"?f.blockItself({params:Is(s.blockParams),body:s.body,loc:s.loc}):s,(n==null?void 0:n.type)==="Template"?(n.blockParams.length,p=f.blockItself({params:[],body:n.body,loc:n.loc})):p=n,f.block({path:ct(e),params:t||[],hash:r||ie([]),defaultBlock:h,elseBlock:p,loc:T(i||null),openStrip:a,inverseStrip:o,closeStrip:c})}
Line truncated
|
||||
`)}},Er=class extends Sr{parse(t,r){var i;t.loc;let s=f.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return(i=this.pendingError)==null||i.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=f.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if((s==null?void 0:s.type)==="ElementNode")throw E(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){var m;if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw E("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=pr(this,t),i=this.source.spanFor(t.loc),a,o=[];if((m=t.program.blockParams)!=null&&m.length){let S=n.loc.collapse("end");S=t.program.loc?S.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?S.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):S.withEnd(i.getEnd()),a=As(this.source,t,S);let y=S.asString(),v=y.indexOf("|")+1,C=y.indexOf("|",v);for(let x of t.program.blockParams){let w,U;w=v>=C?-1:y.indexOf(x,v),w===-1||w+x.length>C?(v=C,U=this.source.spanFor(dr)):(v=w,U=S.sliceStartChars({skipStart:v,chars:x.length}),v+=x.length),o.push(f.var({name:x,loc:U}))}}else a=As(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,p=f.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});Ft(this.currentElement(),p)}MustacheStatement(t){var o;(o=this.pendingError)==null||o.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw E("Illegal use of ...attributes",this.source.spanFor(t.loc));if(Bs(t.path))s=f.mustache({path:this.acceptNode(t.path),params:[],hash:f.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:c,params:h,hash:p}=pr(this,t);s=f.mustache({path:c,params:h,hash:p,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw E("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":fr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),fr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":fr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:Ft(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),p=h.split(/\n/u),m=p.length-1;return{lines:m,columns:p[m].length}}(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=f.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":Ft(this.currentElement(),i);break;default:throw E(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw E("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw E("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw E("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw E("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=pr(this,t);return f.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw E('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw E('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw E("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw E("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=f.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw E("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=f.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw E("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=f.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return f.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map(s=>f.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)}));return f.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return f.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return f.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return f.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return f.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return f.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function pr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",E(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map(i=>e.acceptNode(i)),n=ce(s)?Tr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):f.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function fr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(Bs(r)){let o=`{{${function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)}(r)}}}`;throw E(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=f.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function As(e,t,r){if(!t.program.loc){let n=G(!1,t.program.body,0),i=G(!1,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Ht(e){return/[\t\n\f ]/u.test(e)}var vLine truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=f.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw E("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw E("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let p=f.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(p)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Ht(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw E('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Ht(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Ht(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw E("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw E('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Ht(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw E(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(f.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw E('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Ht(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw E("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Ht(o))throw E(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw E(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=ri(t),s=Tr(t);return f.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(mr.has(t.name)&&!s)throw E(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw E(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw E(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw E("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return ce(t)?t[0]:f.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},hi={},wr=class extends or{constructor(){super({})}parse(){}};function Rs(e,t={}){var c,h,p;let r,s,n,i=t.mode||"precomLine truncated
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(G(!1,r,-2))?G(!1,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(G(!1,r,-1))&&r[1]===""&&G(!1,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Si(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ei={parse:yi,astFormat:"glimmer",locStart:St,locEnd:re};var vi={glimmer:us};var Do=xr;export{Do as default,hs as languages,Cr as parsers,vi as printers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
graphql: Parser;
|
||||
};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ce=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var _t=Object.prototype.hasOwnProperty;var xe=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},Nt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Tt(t))!_t.call(e,r)&&r!==n&&ce(e,r,{get:()=>t[r],enumerable:!(i=Et(t,r))||i.enumerable});return e};var xt=e=>Nt(ce({},"__esModule",{value:!0}),e);var En={};xe(En,{languages:()=>Qe,options:()=>Ke,parsers:()=>Ne,printers:()=>mn});var yt=(e,t,n,i)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,i):n.global?t.replace(n,i):t.split(n).join(i)},G=yt;var j="indent";var $="group";var w="if-break";var S="line";var X="break-parent";var Re=()=>{},L=Re,pe=Re;function N(e){return L(e),{type:j,contents:e}}function y(e,t={}){return L(e),pe(t.expandedStates,!0),{type:$,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return L(e),t!==""&&L(t),{type:w,breakContents:e,flatContents:t,groupId:n.groupId}}var Dt={type:X};var gt={type:S,hard:!0};var k={type:S},p={type:S,soft:!0},f=[gt,Dt];function E(e,t){L(e),pe(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}function H(e){return(t,n,i)=>{let r=!!(i!=null&&i.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var er=H(/\s/u),J=H(" "),ve=H(",; "),Le=H(/[^\n\r]/u);function kt(e,t,n){let i=!!(n!=null&&n.backwards);if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
|
||||
`)return t-2;if(r===`
|
||||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(r===`
|
||||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t+1}return t}var q=kt;function St(e,t,n={}){let i=J(e,n.backwards?t-1:t,n),r=q(e,i,n);return i!==r}var be=St;function Ct(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Pe=Ct;function Rt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Le(e,t):t}var we=Rt;function vt(e,t){let n=null,i=t;for(;i!==n;)n=i,i=ve(e,i),i=Pe(e,i),i=J(e,i);return i=we(e,i),i=q(e,i),i!==!1&&be(e,i)}var Fe=vt;function Lt(e){return Array.isArray(e)&&e.length>0}var fe=Lt;var he=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Be=he;var F=null;function B(e){if(F!==null&&typeof F.property){let t=F;return F=B.prototype=null,t}return F=B.prototype=e??Object.create(null),new B}var bt=10;for(let e=0;e<=bt;e++)B();function de(e){return B(e)}function Pt(e,t="type"){de(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ue=Pt;var Q=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},U=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},W={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},xr=new Set(Object.keys(W));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var wt=Ue(W,"kind"),Me=wt;function K(e){return e.loc.start}function z(e){return e.loc.end}var Ve="format",Ye=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,Ge=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;function je(e){return Ge.test(e)}function $e(e){return Ye.test(e)}function Xe(e){return`# @${Ve}
|
||||
|
||||
${e}`}function Ft(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var D=Ft;function Bt(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[K(i)]!=="{",s=!!i.name;return[r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&fe(i.variableDefinitions)?" ":"",He(e,n),x(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),He(e,n)," on ",n("typeCondition"),x(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",N([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",x(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=G(!1,i.value,'"""',String.raw`\"""`).split(`
|
||||
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',G(!1,G(!1,i.value,/["\\]/gu,String.raw`\$&`),`
|
||||
`,String.raw`\n`),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",N([p,E([I("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,N([p,E([I("",", "),p],e.map(n,"fields"))]),p,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",x(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(D(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...Vt(e,t,n)),s.push(x(e,n,i)),i.fields.length>0&&s.push([" {",N([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[D(e,t,n),n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),x(e,n,i)];case"DirectiveDefinition":return[D(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[D(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),x(e,n,i),i.values.length>0?[" {",N([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[D(e,t,n),n("name"),x(e,n,i)];case"InputValueDefinition":return[D(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",x(e,n,i)];case"SchemaExtension":return["extend schema",x(e,n,i),...i.operationTypes.length>0?[" {",N([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[D(e,t,n),"schema",x(e,n,i)," {",i.operationTypes.length>0?N([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),x(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",x(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([D(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),x(e,n,i),i.types.length>0?[" =",I(""," "),N([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[D(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),x(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Be(i,"Graphql","kind")}}function x(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(N([p,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&Fe(t.originalText,z(s))?[a,f]:a},i)}function Ut(e){return e.kind!=="Comment"}function Mt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Vt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let l=s[u];r.push(a[u]);let T=s[u+1];if(T){let A=t.originalText.slice(l.loc.end,T.loc.start).includes("#");r.push(" &",A?k:" ")}}return r}function He(e,t){let{node:n}=e;return fe(n.variableDefinitions)?y(["(",N([p,E([I("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function Je(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}Je.ignoredProperties=new Set(["loc","comments"]);function Yt(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(i=>i.value.trim()==="prettier-ignore")}var Gt={print:Bt,massageAstNode:Je,hasPrettierIgnore:Yt,insertPragma:Xe,printComment:Mt,canAttachComment:Ut,getVisitorKeys:Me},qe=Gt;var Qe=[{name:"GraphQL",type:"data",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var We={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var jt={bracketSpacing:We.bracketSpacing},Ke=jt;var Ne={};xe(Ne,{graphql:()=>dn});function ze(e){return typeof e=="object"&&e!==null}function Ze(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var $t=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll($t)){if(typeof r.index=="number"||Ze(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function tt(e){return me(e.source,M(e.source,e.start))}function me(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l}
|
||||
`,h=i.split(/\r\n|[\n\r]/g),A=h[r];if(A.length>120){let O=Math.floor(l/80),ae=l%80,_=[];for(let v=0;v<A.length;v+=80)_.push(A.slice(v,v+80));return T+et([[`${a} |`,_[0]],..._.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(ae)],["|",_[O+1]]])}return T+et([[`${a-1} |`,h[r-1]],[`${a} |`,A],["|","^".padStart(l)],[`${a+1} |`,h[r+1]]])}function et(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
||||
`)}function Xt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Z=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:A}=Xt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=nt(Array.isArray(a)?a:a?[a]:void 0);let O=nt((i=this.nodes)===null||i===void 0?void 0:i.map(_=>_.loc).filter(_=>_!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=l??(O==null?void 0:O.map(_=>_.start)),this.locations=l&&u?l.map(_=>M(u,_)):O==null?void 0:O.map(_=>M(_.source,_.start));let ae=ze(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=A??ae)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+tt(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+me(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function nt(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new Z(`Syntax Error: ${n}`,{source:e,positions:[t]})}var ee;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ee||(ee={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function rt(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function it(e){return e>=97&&e<=122||e>=65&&e<=90}function Ee(e){return it(e)||e===95}function st(e){return it(e)||b(e)||e===95}function ot(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=Ht(u);l!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Ht(e){let t=0;for(;t<e.length&&rt(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var te=class{constructor(t){let n=new U(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Jt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function ct(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function P(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ne(e,t){return ut(e.charCodeAt(t))&<(e.charCodeAt(t+1))}function ut(e){return e>=55296&&e<=56319}function lt(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new U(t,n,i,s,a,r)}function Jt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return qt(e,r);case 33:return m(e,o.BANG,r,r+1);case 36:return m(e,o.DOLLAR,r,r+1);case 38:return m(e,o.AMP,r,r+1);case 40:return m(e,o.PAREN_L,r,r+1);case 41:return m(e,o.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function en(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",l=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),l.push(u);let h=m(e,o.BLOCK_STRING,t,s+3,ot(l).join(`
|
||||
`));return e.line+=l.length-1,e.lineStart=r,h}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),l.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(P(T))++s;else if(ne(n,s))s+=2;else throw d(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw d(e.source,s,"Unterminated string.")}function tn(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(st(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function re(e,t){if(!!!e)throw new Error(t)}function ie(e){return se(e,[])}function se(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return nn(e,t);default:return String(e)}}function nn(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(rn(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:se(i,n)}else if(Array.isArray(e))return on(e,n);return sn(e,n)}function rn(e){return typeof e.toJSON=="function"}function sn(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+an(e)+"]":"{ "+n.map(([r,s])=>r+": "+se(s,t)).join(", ")+" }"}function on(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(se(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function an(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var cn=globalThis.process&&!0,pt=cn?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ie(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
|
||||
|
||||
Ensure that there is only one instance of "graphql" in the node_modules
|
||||
directory. If different versions of "graphql" are the dependencies of other
|
||||
relied on modules, use "resolutions" to ensure only one version is installed.
|
||||
|
||||
https://yarnpkg.com/en/docs/selective-version-resolutions
|
||||
|
||||
Duplicate "graphql" modules cannot be used at the same time since different
|
||||
versions may have different capabilities and behavior. The data from one
|
||||
version used in the function from another could produce confusing and
|
||||
spurious results.`)}}return!1};var Y=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||re(!1,`Body must be a string. Received: ${ie(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ft(e){return pt(e,Y)}function ht(e,t){let n=new _e(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var _e=class{constructor(t,n={}){let i=ft(t)?t:new Y(t);this._lexer=new te(i),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),di
Line truncated
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
var Et=Object.defineProperty;var xe=(e,t)=>{for(var n in t)Et(e,n,{get:t[n],enumerable:!0})};var Ne={};xe(Ne,{languages:()=>Qe,options:()=>Ke,parsers:()=>_e,printers:()=>pn});var Tt=(e,t,n,i)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,i):n.global?t.replace(n,i):t.split(n).join(i)},G=Tt;var j="indent";var $="group";var w="if-break";var S="line";var X="break-parent";var Re=()=>{},L=Re,le=Re;function N(e){return L(e),{type:j,contents:e}}function y(e,t={}){return L(e),le(t.expandedStates,!0),{type:$,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return L(e),t!==""&&L(t),{type:w,breakContents:e,flatContents:t,groupId:n.groupId}}var yt={type:X};var Ot={type:S,hard:!0};var k={type:S},p={type:S,soft:!0},f=[Ot,yt];function E(e,t){L(e),le(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}function H(e){return(t,n,i)=>{let r=!!(i!=null&&i.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var Qn=H(/\s/u),J=H(" "),ve=H(",; "),Le=H(/[^\n\r]/u);function It(e,t,n){let i=!!(n!=null&&n.backwards);if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
|
||||
`)return t-2;if(r===`
|
||||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(r===`
|
||||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t+1}return t}var q=It;function At(e,t,n={}){let i=J(e,n.backwards?t-1:t,n),r=q(e,i,n);return i!==r}var be=At;function Dt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Pe=Dt;function gt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Le(e,t):t}var we=gt;function kt(e,t){let n=null,i=t;for(;i!==n;)n=i,i=ve(e,i),i=Pe(e,i),i=J(e,i);return i=we(e,i),i=q(e,i),i!==!1&&be(e,i)}var Fe=kt;function St(e){return Array.isArray(e)&&e.length>0}var pe=St;var fe=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Be=fe;var F=null;function B(e){if(F!==null&&typeof F.property){let t=F;return F=B.prototype=null,t}return F=B.prototype=e??Object.create(null),new B}var Ct=10;for(let e=0;e<=Ct;e++)B();function he(e){return B(e)}function Rt(e,t="type"){he(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ue=Rt;var Q=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},U=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},W={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},mr=new Set(Object.keys(W));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var vt=Ue(W,"kind"),Me=vt;function K(e){return e.loc.start}function z(e){return e.loc.end}var Ve="format",Ye=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,Ge=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;function je(e){return Ge.test(e)}function $e(e){return Ye.test(e)}function Xe(e){return`# @${Ve}
|
||||
|
||||
${e}`}function Lt(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var D=Lt;function bt(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[K(i)]!=="{",s=!!i.name;return[r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&pe(i.variableDefinitions)?" ":"",He(e,n),x(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),He(e,n)," on ",n("typeCondition"),x(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",N([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",x(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=G(!1,i.value,'"""',String.raw`\"""`).split(`
|
||||
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',G(!1,G(!1,i.value,/["\\]/gu,String.raw`\$&`),`
|
||||
`,String.raw`\n`),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",N([p,E([I("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,N([p,E([I("",", "),p],e.map(n,"fields"))]),p,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",x(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(D(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...Ft(e,t,n)),s.push(x(e,n,i)),i.fields.length>0&&s.push([" {",N([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[D(e,t,n),n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),x(e,n,i)];case"DirectiveDefinition":return[D(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",N([p,E([I("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[D(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),x(e,n,i),i.values.length>0?[" {",N([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[D(e,t,n),n("name"),x(e,n,i)];case"InputValueDefinition":return[D(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",x(e,n,i)];case"SchemaExtension":return["extend schema",x(e,n,i),...i.operationTypes.length>0?[" {",N([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[D(e,t,n),"schema",x(e,n,i)," {",i.operationTypes.length>0?N([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),x(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",x(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([D(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),x(e,n,i),i.types.length>0?[" =",I(""," "),N([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[D(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),x(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Be(i,"Graphql","kind")}}function x(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(N([p,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&Fe(t.originalText,z(s))?[a,f]:a},i)}function Pt(e){return e.kind!=="Comment"}function wt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Ft(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let l=s[u];r.push(a[u]);let T=s[u+1];if(T){let A=t.originalText.slice(l.loc.end,T.loc.start).includes("#");r.push(" &",A?k:" ")}}return r}function He(e,t){let{node:n}=e;return pe(n.variableDefinitions)?y(["(",N([p,E([I("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function Je(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}Je.ignoredProperties=new Set(["loc","comments"]);function Bt(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(i=>i.value.trim()==="prettier-ignore")}var Ut={print:bt,massageAstNode:Je,hasPrettierIgnore:Bt,insertPragma:Xe,printComment:wt,canAttachComment:Pt,getVisitorKeys:Me},qe=Ut;var Qe=[{name:"GraphQL",type:"data",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var We={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Mt={bracketSpacing:We.bracketSpacing},Ke=Mt;var _e={};xe(_e,{graphql:()=>ln});function ze(e){return typeof e=="object"&&e!==null}function Ze(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Vt=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(Vt)){if(typeof r.index=="number"||Ze(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function tt(e){return de(e.source,M(e.source,e.start))}function de(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l}
|
||||
`,h=i.split(/\r\n|[\n\r]/g),A=h[r];if(A.length>120){let O=Math.floor(l/80),ae=l%80,_=[];for(let v=0;v<A.length;v+=80)_.push(A.slice(v,v+80));return T+et([[`${a} |`,_[0]],..._.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(ae)],["|",_[O+1]]])}return T+et([[`${a-1} |`,h[r-1]],[`${a} |`,A],["|","^".padStart(l)],[`${a+1} |`,h[r+1]]])}function et(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
||||
`)}function Yt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Z=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:A}=Yt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=nt(Array.isArray(a)?a:a?[a]:void 0);let O=nt((i=this.nodes)===null||i===void 0?void 0:i.map(_=>_.loc).filter(_=>_!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=l??(O==null?void 0:O.map(_=>_.start)),this.locations=l&&u?l.map(_=>M(u,_)):O==null?void 0:O.map(_=>M(_.source,_.start));let ae=ze(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=A??ae)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+tt(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+de(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function nt(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new Z(`Syntax Error: ${n}`,{source:e,positions:[t]})}var ee;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ee||(ee={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function rt(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function it(e){return e>=97&&e<=122||e>=65&&e<=90}function me(e){return it(e)||e===95}function st(e){return it(e)||b(e)||e===95}function ot(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=Gt(u);l!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Gt(e){let t=0;for(;t<e.length&&rt(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var te=class{constructor(t){let n=new U(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=jt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function ct(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function P(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ne(e,t){return ut(e.charCodeAt(t))&<(e.charCodeAt(t+1))}function ut(e){return e>=55296&&e<=56319}function lt(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new U(t,n,i,s,a,r)}function jt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return $t(e,r);case 33:return m(e,o.BANG,r,r+1);case 36:return m(e,o.DOLLAR,r,r+1);case 38:return m(e,o.AMP,r,r+1);case 40:return m(e,o.PAREN_L,r,r+1);case 41:return m(e,o.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Wt(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",l=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),l.push(u);let h=m(e,o.BLOCK_STRING,t,s+3,ot(l).join(`
|
||||
`));return e.line+=l.length-1,e.lineStart=r,h}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),l.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(P(T))++s;else if(ne(n,s))s+=2;else throw d(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw d(e.source,s,"Unterminated string.")}function Kt(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(st(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function re(e,t){if(!!!e)throw new Error(t)}function ie(e){return se(e,[])}function se(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return zt(e,t);default:return String(e)}}function zt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Zt(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:se(i,n)}else if(Array.isArray(e))return tn(e,n);return en(e,n)}function Zt(e){return typeof e.toJSON=="function"}function en(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+nn(e)+"]":"{ "+n.map(([r,s])=>r+": "+se(s,t)).join(", ")+" }"}function tn(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(se(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function nn(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var rn=globalThis.process&&!0,pt=rn?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ie(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
|
||||
|
||||
Ensure that there is only one instance of "graphql" in the node_modules
|
||||
directory. If different versions of "graphql" are the dependencies of other
|
||||
relied on modules, use "resolutions" to ensure only one version is installed.
|
||||
|
||||
https://yarnpkg.com/en/docs/selective-version-resolutions
|
||||
|
||||
Duplicate "graphql" modules cannot be used at the same time since different
|
||||
versions may have different capabilities and behavior. The data from one
|
||||
version used in the function from another could produce confusing and
|
||||
spurious results.`)}}return!1};var Y=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||re(!1,`Body must be a string. Received: ${ie(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ft(e){return pt(e,Y)}function ht(e,t){let n=new Te(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var Te=class{constructor(t,n={}){let i=ft(t)?t:new Y(t);this._lexer=new te(i),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),di
Line truncated
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
angular: Parser;
|
||||
html: Parser;
|
||||
lwc: Parser;
|
||||
mjml: Parser;
|
||||
vue: Parser;
|
||||
};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var At=Object.defineProperty;var Ei=Object.getOwnPropertyDescriptor;var Ai=Object.getOwnPropertyNames;var Di=Object.prototype.hasOwnProperty;var on=t=>{throw TypeError(t)};var vi=(t,e,r)=>e in t?At(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var un=(t,e)=>{for(var r in e)At(t,r,{get:e[r],enumerable:!0})},yi=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ai(e))!Di.call(t,s)&&s!==r&&At(t,s,{get:()=>e[s],enumerable:!(n=Ei(e,s))||n.enumerable});return t};var wi=t=>yi(At({},"__esModule",{value:!0}),t);var cr=(t,e,r)=>vi(t,typeof e!="symbol"?e+"":e,r),ln=(t,e,r)=>e.has(t)||on("Cannot "+r);var R=(t,e,r)=>(ln(t,e,"read from private field"),r?r.call(t):e.get(t)),Dt=(t,e,r)=>e.has(t)?on("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),cn=(t,e,r,n)=>(ln(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var mu={};un(mu,{languages:()=>qs,options:()=>Vs,parsers:()=>rn,printers:()=>hu});var bi=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=bi;var we="string",ze="array",Ye="cursor",be="indent",Te="align",je="trim",xe="group",ke="fill",ce="if-break",Be="indent-if-break",Ke="line-suffix",Xe="line-suffix-boundary",j="line",Qe="label",Le="break-parent",vt=new Set([Ye,be,Te,je,xe,ke,ce,Be,Ke,Xe,j,Qe,Le]);var Ti=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=Ti;function xi(t){if(typeof t=="string")return we;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(vt.has(e))return e}var Fe=xi;var ki=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Bi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ki([...vt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${n}.`}var pr=class extends Error{name="InvalidDocError";constructor(e){super(Bi(e)),this.doc=e}},hr=pr;function mr(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Fe(i)){case ze:return e(i.map(n));case ke:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case xe:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case Te:case be:case Be:case Qe:case Ke:return e({...i,contents:n(i.contents)});case we:case Ye:case je:case Xe:case j:case Le:return e(i);default:throw new hr(i)}}}function B(t,e=pn){return mr(t,r=>typeof r=="string"?H(e,r.split(`
|
||||
`)):r)}var fr=()=>{},re=fr,dr=fr,hn=fr;function k(t){return re(t),{type:be,contents:t}}function mn(t,e){return re(e),{type:Te,contents:e,n:t}}function E(t,e={}){return re(t),dr(e.expandedStates,!0),{type:xe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function fn(t){return mn(Number.NEGATIVE_INFINITY,t)}function dn(t){return mn({type:"root"},t)}function yt(t){return hn(t),{type:ke,parts:t}}function pe(t,e="",r={}){return re(t),e!==""&&re(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function gn(t,e){return re(t),{type:Be,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:Le};var Fi={type:j,hard:!0},Pi={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[Fi,ne],pn=[Pi,ne];function H(t,e){re(t),dr(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}var wt="'",Cn='"';function Ni(t,e){let r=e===!0||e===wt?wt:Cn,n=r===wt?Cn:wt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var Sn=Ni;function gr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,Cr=class{constructor(e){Dt(this,V);cn(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s<e.length&&r.has(e.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=e.length-1;s>=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${gr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var _n=Cr;var Ii=[" ",`
|
||||
`,"\f","\r"," "],Ri=new _n(Ii),O=Ri;var Sr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},En=Sr;function $i(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=$i;var Oi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Mi=new Set(["if","else if","for","switch","case"]);function An(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)Mi.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}An.ignoredProperties=Oi;var Dn=An;async function qi(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return dn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var vn=qi;function he(t,e=!0){return[k([v,t]),e?v:""]}function X(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):he(i)}function Hi(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},X)}var yn=Hi;var Vi=(t,e)=>{if(!(t&&e==null))return e.toReversed||!Array.isArray(e)?e.toReversed():[...e].reverse()},wn=Vi;function Ui(t){return Array.isArray(t)&&t.length>0}var me=Ui;var bn,Tn,xn,kn,Bn,Wi=((bn=globalThis.Deno)==null?void 0:bn.build.os)==="windows"||((xn=(Tn=globalThis.navigator)==null?void 0:Tn.platform)==null?void 0:xn.startsWith("Win"))||((Bn=(kn=globalThis.process)==null?void 0:kn.platform)==null?void 0:Bn.startsWith("win"))||!1;function Ln(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Gi(t){return t=Ln(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function zi(t){t=Ln(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Fn(t){return Wi?zi(t):Gi(t)}var Pn=Fn;var Yi=t=>String(t).split(/[/\\]/u).pop();function Nn(t,e){if(!e)return;let r=Yi(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function ji(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function In(t,e){if(e){if(String(e).startsWith("file:"))try{e=Pn(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r==null?void 0:r({filepath:e}))}}function Ki(t,e){let r=wn(!1,t.plugins).flatMap(s=>s.languages??[]),n=ji(r,e.language)??Nn(r,e.physicalFile)??Nn(r,e.file)??In(r,e.physicalFile)??In(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=Ki;var Rn="inline",_r={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter
Line truncated
|
||||
`)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<e&&(e=n)}return e===Number.POSITIVE_INFINITY?0:e}function wr(t,e=ca(t)){return e===0?t:t.split(`
|
||||
`).map(r=>r.slice(e)).join(`
|
||||
`)}function br(t){return w(!1,w(!1,t,"'","'"),""",'"')}function P(t){return br(t.value)}var pa=new Set(["template","style","script"]);function et(t,e){return Ce(t,e)&&!pa.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function kt(t,e){return Ce(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Jn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Zn(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function Bt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(wr(Ar(e)),S):H(_,O.split(e))}function Lt(t,e){return Ce(t,e)&&t.name==="script"}var Tr=/\{\{(.+?)\}\}/su;async function es(t,e){let r=[];for(let[n,s]of t.split(Tr).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function xr({parser:t}){return(e,r,n)=>T(P(n.node),e,{parser:t},X)}var ha=xr({parser:"__ng_action"}),ma=xr({parser:"__ng_binding"}),fa=xr({parser:"__ng_directive"});function da(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ha;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return ma;if(n.startsWith("*"))return fa;let s=P(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(yt(Bt(r,s.trim())),!s.includes("@@"));if(Tr.test(s))return i=>es(s,i)}var ts=da;function ga(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var rs=ga;function ns(t){return t===" "||t===`
|
||||
`||t==="\f"||t==="\r"||t===" "}var Ca=/^[ \t\n\r\u000c]+/,Sa=/^[, \t\n\r\u000c]+/,_a=/^[^ \t\n\r\u000c]+/,Ea=/[,]+$/,ss=/^\d+$/,Aa=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Da(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(Sa),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(_a),n=[],r.slice(-1)===","?(r=r.replace(Ea,""),f()):m()}function m(){for(p(Ca),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(ns(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),f();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),f();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),f();return}else s+=a;else if(i==="after descriptor"&&!ns(a))if(a===""){f();return}else i="in descriptor",o-=1;o+=1}}function f(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;F<n.length;F++)g=n[F],y=g[g.length-1],q=g.substring(0,g.length-1),x=parseInt(q,10),U=parseFloat(q),ss.test(q)&&y==="w"?((A||D)&&(C=!0),x===0?C=!0:A=x):Aa.test(q)&&y==="x"?((A||D||I)&&(C=!0),U<0?C=!0:D=U):ss.test(q)&&y==="h"?((I||D)&&(C=!0),x===0?C=!0:I=x):C=!0;if(!C)c.source={value:r,startOffset:u},A&&(c.width={value:A}),D&&(c.density={value:D}),I&&(c.height={value:I}),l.push(c);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${g}".`)}}var is=Da;function va(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>wa(P(t.node))}var as={width:"w",height:"h",density:"x"},ya=Object.keys(as);function wa(t){let e=is(t),r=ya.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=as[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return he(H([",",_],i.map((l,m)=>{let f=[l],C=o[m];if(C){let A=a-l.length+1,D=p-u[m],I=" ".repeat(A+D);f.push(pe(I," "),C+s)}return f})))}var os=va;function us(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var kr=new WeakMap;function ba(t,e){let{root:r}=t;return kr.has(r)||kr.set(r,r.children.some(n=>Lt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),kr.get(r)}var Ie=ba;function ls(t,e,r){let{node:n}=r,s=P(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},X)}function cs(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function ps(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=Ta(s),u=Ie(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function Ta(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function xa(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return ps;if(n==="generic"&&Lt(r.parent,e))return ls;let s=P(r),i=Ie(t,e);if(Jn(r)||Zn(r,e))return a=>cs(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ka(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>Ba(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>hs(s,a,{parseWithTs:i})}async function ka(t,e,{parseWithTs:r}){var n;try{return await hs(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},X)}function Ba(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},X)}function hs(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},X)}var ms=xa;function La(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[os,us,rs,ms,ts]){let s=n(t,e);if(s)return Fa(s)}}}function Fa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=mr(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var fs=La;var Pa=new Proxy(()=>{},{get:()=>Pa});function J(t){return t.sourceSpan.start.offset}fu
Line truncated
|
||||
|
||||
${t}`}var Ts=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function xs(t){let e=se(t);return t.type==="element"&&!t.endSourceSpan&&me(t.children)?Math.max(e,xs(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(ge(n)){let s=xs(n);return[z(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Pt(n).length:0),s-(n.next&&Q(n.next)?_e(n,e).length:0)))),G(n,e)]}return r()}function Rt(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?Tt(e)?S:_:"":Tt(e)?S:v:rt(t)&&(ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&Q(e)?"":!e.isLeadingSpaceSensitive||Tt(e)||Q(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(vr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?Rt(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=Rt(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],m=[],f=o.prev?Rt(o.prev,o):"",C=o.next?Rt(o,o.next):"";return f&&(Je(o.prev)?u.push(S,S):f===S?u.push(S):$(o.prev)?p.push(f):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&m.push(S,S):C===S?$(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...m]},"children")}function ks(t,e,r){let{node:n}=t,s=[];za(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Bs(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Bs(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=Ts.get(t.name))!=null&&r.has(t.next.name)))}function za(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!ge(e)&&!Bs(e)}function Ls(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function Fs(t,e,r){let{node:n}=t;return[De(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Se(n,e)]}function Ps(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function Ns(t,e,r){let{node:n}=t;if(bt(n,e))return[z(n,e),E(st(t,e,r)),B(It(n,e)),...tt(n,e),G(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?gn(l,{groupId:i}):(W(n,e)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?fn(v):v,p=()=>(n.next?Q(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Wn(n)?ne:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function $t(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function Is(t){return t>=97&&t<=102||t>=65&&t<=70||$t(t)}function Ot(t){return t===10||t===13}function Lr(t){return 48<=t&&t<=55}function Mt(t){return t===39||t===34||t===96}var Ya=/-+([a-z0-9])/g;function $s(t){return t.replace(Ya,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s<n&&e>0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(
Line truncated
|
||||
`&&++o==r)););for(a=0,o=0;a<e&&i<n.length-1&&(i++,a++,!(n[i]==`
|
||||
`&&++o==r)););return{before:n.substring(s,this.offset),after:n.substring(this.offset,i+1)}}return null}},ve=class{constructor(e,r){this.content=e,this.url=r}},h=class{constructor(e,r,n=e,s=null){this.start=e,this.end=r,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},qt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(qt||(qt={}));var Oe=class{constructor(e,r,n=qt.ERROR,s){this.span=e,this.msg=r,this.level=n,this.relatedError=s}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${qt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var ja=[Xa,Qa,Za,to,ro,io,no,so,ao,eo];function Ka(t,e){for(let r of ja)r(t,e);return t}function Xa(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===`
|
||||
`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Qa(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.firstChild;r.removeChild(i),n--;let o=new h(i.sourceSpan.start,a.sourceSpan.end),u=new h(o.start,s.sourceSpan.end);s.condition=i.condition,s.sourceSpan=u,s.startSourceSpan=o,s.removeChild(a)}})}function Ja(t,e,r){t.walk(n=>{if(n.children)for(let s=0;s<n.children.length;s++){let i=n.children[s];if(i.type!=="text"&&!e(i))continue;i.type!=="text"&&(i.type="text",i.value=r(i));let a=i.prev;!a||a.type!=="text"||(a.value+=i.value,a.sourceSpan=new h(a.sourceSpan.start,i.sourceSpan.end),n.removeChild(i),s--)}})}function Za(t){return Ja(t,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function eo(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.next;i.value+=`<${s.rawName}>`+s.firstChild.value+`</${s.rawName}>`+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function to(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(Mn(n,e))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u<o.length;u++,i=a){let p=o[u];if(u%2===0){a=i.moveBy(p.length),p.length>0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function ro(t,e){t.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].type==="text"&&O.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let s=qn(r,e),i=Dr(r);if(!s)for(let a=0;a<n.length;a++){let o=n[a];if(o.type!=="text")continue;let{leadingWhitespace:u,text:p,trailingWhitespace:l}=On(o.value),m=o.prev,f=o.next;p?(o.value=p,o.sourceSpan=new h(o.sourceSpan.start.moveBy(u.length),o.sourceSpan.end.moveBy(-l.length)),u&&(m&&(m.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),l&&(o.hasTrailingSpaces=!0,f&&(f.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(u||l)&&(m&&(m.hasTrailingSpaces=!0),f&&(f.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=s,r.isIndentationSensitive=i})}function no(t){t.walk(e=>{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function so(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function io(t,e){t.walk(r=>{r.cssDisplay=Xn(r,e)})}function ao(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Un(r,e);return}for(let s of n)s.isLeadingSpaceSensitive=Hn(s,e),s.isTrailingSpaceSensitive=Vn(s,e);for(let s=0;s<n.length;s++){let i=n[s];i.isLeadingSpaceSensitive=(s===0||i.prev.isTrailingSpaceSensitive)&&i.isLeadingSpaceSensitive,i.isTrailingSpaceSensitive=(s===n.length-1||i.next.isLeadingSpaceSensitive)&&i.isTrailingSpaceSensitive}}})}var Os=Ka;function oo(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return B(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Re(t,e,r)),S];case"element":case"ieConditionalComment":return Ns(t,e,r);case"angularControlFlowBlock":return ks(t,e,r);case"angularControlFlowBlockParameters":return Ls(t,e,r);case"angularControlFlowBlockParameter":return O.trim(n.expression);case"angularLetDeclaration":return E(["@let ",E([n.id," =",E(k([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Fs(t,e,r);case"angularIcuCase":return Ps(t,e,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[De(n),Se(n)];case"interpolation":return[De(n,e),...t.map(r,"children"),Se(n,e)];case"text":{if(n.parent.type==="interpolation"){let o=/\n[^\S\n]*$/u,u=o.test(n.value),p=u?n.value.replace(o,""):n.vaLine truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>go.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return $s(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Co(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Co(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var d=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=N.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},js,pt;function He(t){return pt||(js=new d({canSelfClose:!0}),pt=Object.assign(Object.create(null),{base:new d({isVoid:!0}),meta:new d({isVoid:!0}),area:new d({isVoid:!0}),embed:new d({isVoid:!0}),link:new d({isVoid:!0}),img:new d({isVoid:!0}),input:new d({isVoid:!0}),param:new d({isVoid:!0}),hr:new d({isVoid:!0}),br:new d({isVoid:!0}),source:new d({isVoid:!0}),track:new d({isVoid:!0}),wbr:new d({isVoid:!0}),p:new d({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new d({closedByChildren:["tbody","tfoot"]}),tbody:new d({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new d({closedByChildren:["tbody"],closedByParent:!0}),tr:new d({closedByChildren:["tr"],closedByParent:!0}),td:new d({closedByChildren:["td","th"],closedByParent:!0}),th:new d({closedByChildren:["td","th"],closedByParent:!0}),col:new d({isVoid:!0}),svg:new d({implicitNamespacePrefix:"svg"}),foreignObject:new d({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new d({implicitNamespacePrefix:"math"}),li:new d({closedByChildren:["li"],closedByParent:!0}),dt:new d({closedByChildren:["dt","dd"]}),dd:new d({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new d({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new d({closedByChildren:["optgroup"],closedByParent:!0}),option:new d({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new d({ignoreFirstLf:!0}),listing:new d({ignoreFirstLf:!0}),style:new d({contentType:N.RAW_TEXT}),script:new d({contentType:N.RAW_TEXT}),title:new d({contentType:{default:N.ESCAPABLE_RAW_TEXT,svg:N.PARSABLE_DATA}}),textarea:new d({contentType:N.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Wt().allKnownElementNames().forEach(e=>{!pt[e]&&Me(e)===null&&(pt[e]=new d({canSelfClose:!1}))})),pt[t]??js}var ae=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Gt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},zt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},Yt=class extends ae{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},jt=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpans
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>ut(n)?!e:ni(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(si);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Mt(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(si)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),ut(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!Ot(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>lt(n)||n===36||n===95||r&&$t(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;Mt(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Wo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new gt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new gt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new gt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new Ct(n)}handleError(e){if(e instanceof St&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof Ct)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Go(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptS
Line truncated
|
||||
`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===`
|
||||
`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,ci):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Gt(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof Y&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new Y(i,s,[],u,p,void 0,l),f=this._getContainer();this._pushContainer(m,f instanceof Y&&this.getTagDefinition(f.name).isClosedByChild(m.name)),a?this._popContainer(i,Y,u):e.type===4&&(this._popContainer(i,Y,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,Y,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof ee||a instanceof Y&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,ci):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Kt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,ee,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,ee,null),this.errors.push(L.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],n,s;if(this._peek.type!==31){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else
Line truncated
|
||||
`,_t);if(r===-1)return;let n=t.slice(_t,r).trim(),s=t.indexOf(`
|
||||
${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(`
|
||||
...`,r)),s===-1)return;let a=s+1+_t,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-_t),raw:u}}function Xo(t){let e=Ko(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var hi=Xo;var or={attrs:!0,children:!0,cases:!0,expression:!0},mi=new Set(["parent"]),le,Zr,en,Ge=class Ge{constructor(e={}){Dt(this,le);cr(this,"type");cr(this,"parent");for(let r of new Set([...mi,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in or&&(r=r.map(n=>this.createChild(n))),!mi.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in or){let s=this[n];if(s){let i=Qo(s,a=>a.map(e));r!==s&&(r||(r=new Ge({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in or||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in or){let n=this[r];if(n)for(let s=0;s<n.length;s++)n[s].walk(e)}e(this)}createChild(e){let r=e instanceof Ge?e.clone():new Ge(e);return r.setProperty("parent",this),r}insertChildBefore(e,r){let n=this.$children;n.splice(n.indexOf(e),0,this.createChild(r))}removeChild(e){let r=this.$children;r.splice(r.indexOf(e),1)}replaceChild(e,r){let n=this.$children;n[n.indexOf(e)]=this.createChild(r)}clone(){return new Ge(this)}get $children(){return this[R(this,le,Zr)]}set $children(e){this[R(this,le,Zr)]=e}get firstChild(){var e;return(e=this.$children)==null?void 0:e[0]}get lastChild(){return K(!0,this.$children,-1)}get prev(){let e=R(this,le,en);return e[e.indexOf(this)-1]}get next(){let e=R(this,le,en);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};le=new WeakSet,Zr=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},en=function(){var e;return((e=this.parent)==null?void 0:e.$children)??[]};var ur=Ge;function Qo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var Jo=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:Zo},{regex:/^\[if([^\]]*)\]><!$/u,parse:eu},{regex:/^<!\s*\[endif\]$/u,parse:tu}];function fi(t,e){if(t.value)for(let{regex:r,parse:n}of Jo){let s=t.value.match(r);if(s)return n(t,e,s)}return null}function Zo(t,e,r){let[,n,s,i]=r,a=4+n.length,o=t.sourceSpan.start.moveBy(a),u=o.moveBy(i.length),[p,l]=(()=>{try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function eu(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function tu(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var lr=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["
Line truncated
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
var on=Object.defineProperty;var un=t=>{throw TypeError(t)};var Ai=(t,e,r)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ln=(t,e)=>{for(var r in e)on(t,r,{get:e[r],enumerable:!0})};var lr=(t,e,r)=>Ai(t,typeof e!="symbol"?e+"":e,r),cn=(t,e,r)=>e.has(t)||un("Cannot "+r);var R=(t,e,r)=>(cn(t,e,"read from private field"),r?r.call(t):e.get(t)),At=(t,e,r)=>e.has(t)?un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),pn=(t,e,r,n)=>(cn(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var rn={};ln(rn,{languages:()=>Hs,options:()=>Us,parsers:()=>tn,printers:()=>uu});var Di=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=Di;var we="string",ze="array",Ye="cursor",be="indent",Te="align",je="trim",xe="group",ke="fill",ce="if-break",Be="indent-if-break",Ke="line-suffix",Xe="line-suffix-boundary",j="line",Qe="label",Le="break-parent",Dt=new Set([Ye,be,Te,je,xe,ke,ce,Be,Ke,Xe,j,Qe,Le]);var vi=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=vi;function yi(t){if(typeof t=="string")return we;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(Dt.has(e))return e}var Fe=yi;var wi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function bi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=wi([...Dt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${n}.`}var cr=class extends Error{name="InvalidDocError";constructor(e){super(bi(e)),this.doc=e}},pr=cr;function hr(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Fe(i)){case ze:return e(i.map(n));case ke:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case xe:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case Te:case be:case Be:case Qe:case Ke:return e({...i,contents:n(i.contents)});case we:case Ye:case je:case Xe:case j:case Le:return e(i);default:throw new pr(i)}}}function B(t,e=hn){return hr(t,r=>typeof r=="string"?H(e,r.split(`
|
||||
`)):r)}var mr=()=>{},re=mr,fr=mr,mn=mr;function k(t){return re(t),{type:be,contents:t}}function fn(t,e){return re(e),{type:Te,contents:e,n:t}}function E(t,e={}){return re(t),fr(e.expandedStates,!0),{type:xe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function dn(t){return fn(Number.NEGATIVE_INFINITY,t)}function gn(t){return fn({type:"root"},t)}function vt(t){return mn(t),{type:ke,parts:t}}function pe(t,e="",r={}){return re(t),e!==""&&re(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function Cn(t,e){return re(t),{type:Be,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:Le};var xi={type:j,hard:!0},ki={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[xi,ne],hn=[ki,ne];function H(t,e){re(t),fr(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}var yt="'",Sn='"';function Bi(t,e){let r=e===!0||e===yt?yt:Sn,n=r===yt?Sn:yt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var _n=Bi;function dr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,gr=class{constructor(e){At(this,V);pn(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s<e.length&&r.has(e.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=e.length-1;s>=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${dr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var En=gr;var Li=[" ",`
|
||||
`,"\f","\r"," "],Fi=new En(Li),O=Fi;var Cr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},An=Cr;function Pi(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=Pi;var Ni=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ii=new Set(["if","else if","for","switch","case"]);function Dn(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)Ii.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}Dn.ignoredProperties=Ni;var vn=Dn;async function Ri(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return gn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var yn=Ri;function he(t,e=!0){return[k([v,t]),e?v:""]}function X(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):he(i)}function $i(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},X)}var wn=$i;var Oi=(t,e)=>{if(!(t&&e==null))return e.toReversed||!Array.isArray(e)?e.toReversed():[...e].reverse()},bn=Oi;function Mi(t){return Array.isArray(t)&&t.length>0}var me=Mi;var Tn,xn,kn,Bn,Ln,qi=((Tn=globalThis.Deno)==null?void 0:Tn.build.os)==="windows"||((kn=(xn=globalThis.navigator)==null?void 0:xn.platform)==null?void 0:kn.startsWith("Win"))||((Ln=(Bn=globalThis.process)==null?void 0:Bn.platform)==null?void 0:Ln.startsWith("win"))||!1;function Fn(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Hi(t){return t=Fn(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Vi(t){t=Fn(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Pn(t){return qi?Vi(t):Hi(t)}var Nn=Pn;var Ui=t=>String(t).split(/[/\\]/u).pop();function In(t,e){if(!e)return;let r=Ui(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function Wi(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function Rn(t,e){if(e){if(String(e).startsWith("file:"))try{e=Nn(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r==null?void 0:r({filepath:e}))}}function Gi(t,e){let r=bn(!1,t.plugins).flatMap(s=>s.languages??[]),n=Wi(r,e.language)??In(r,e.physicalFile)??In(r,e.file)??Rn(r,e.physicalFile)??Rn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=Gi;var $n="inline",Sr={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter
Line truncated
|
||||
`)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<e&&(e=n)}return e===Number.POSITIVE_INFINITY?0:e}function yr(t,e=aa(t)){return e===0?t:t.split(`
|
||||
`).map(r=>r.slice(e)).join(`
|
||||
`)}function wr(t){return w(!1,w(!1,t,"'","'"),""",'"')}function P(t){return wr(t.value)}var oa=new Set(["template","style","script"]);function et(t,e){return Ce(t,e)&&!oa.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function xt(t,e){return Ce(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Zn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function es(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function kt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(yr(Er(e)),S):H(_,O.split(e))}function Bt(t,e){return Ce(t,e)&&t.name==="script"}var br=/\{\{(.+?)\}\}/su;async function ts(t,e){let r=[];for(let[n,s]of t.split(br).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function Tr({parser:t}){return(e,r,n)=>T(P(n.node),e,{parser:t},X)}var ua=Tr({parser:"__ng_action"}),la=Tr({parser:"__ng_binding"}),ca=Tr({parser:"__ng_directive"});function pa(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ua;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return la;if(n.startsWith("*"))return ca;let s=P(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(vt(kt(r,s.trim())),!s.includes("@@"));if(br.test(s))return i=>ts(s,i)}var rs=pa;function ha(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var ns=ha;function ss(t){return t===" "||t===`
|
||||
`||t==="\f"||t==="\r"||t===" "}var ma=/^[ \t\n\r\u000c]+/,fa=/^[, \t\n\r\u000c]+/,da=/^[^ \t\n\r\u000c]+/,ga=/[,]+$/,is=/^\d+$/,Ca=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Sa(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(fa),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(da),n=[],r.slice(-1)===","?(r=r.replace(ga,""),f()):m()}function m(){for(p(ma),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(ss(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),f();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),f();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),f();return}else s+=a;else if(i==="after descriptor"&&!ss(a))if(a===""){f();return}else i="in descriptor",o-=1;o+=1}}function f(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;F<n.length;F++)g=n[F],y=g[g.length-1],q=g.substring(0,g.length-1),x=parseInt(q,10),U=parseFloat(q),is.test(q)&&y==="w"?((A||D)&&(C=!0),x===0?C=!0:A=x):Ca.test(q)&&y==="x"?((A||D||I)&&(C=!0),U<0?C=!0:D=U):is.test(q)&&y==="h"?((I||D)&&(C=!0),x===0?C=!0:I=x):C=!0;if(!C)c.source={value:r,startOffset:u},A&&(c.width={value:A}),D&&(c.density={value:D}),I&&(c.height={value:I}),l.push(c);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${g}".`)}}var as=Sa;function _a(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>Aa(P(t.node))}var os={width:"w",height:"h",density:"x"},Ea=Object.keys(os);function Aa(t){let e=as(t),r=Ea.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=os[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return he(H([",",_],i.map((l,m)=>{let f=[l],C=o[m];if(C){let A=a-l.length+1,D=p-u[m],I=" ".repeat(A+D);f.push(pe(I," "),C+s)}return f})))}var us=_a;function ls(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var xr=new WeakMap;function Da(t,e){let{root:r}=t;return xr.has(r)||xr.set(r,r.children.some(n=>Bt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),xr.get(r)}var Ie=Da;function cs(t,e,r){let{node:n}=r,s=P(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},X)}function ps(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function hs(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=va(s),u=Ie(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function va(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function ya(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return hs;if(n==="generic"&&Bt(r.parent,e))return cs;let s=P(r),i=Ie(t,e);if(Zn(r)||es(r,e))return a=>ps(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>wa(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>ba(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>ms(s,a,{parseWithTs:i})}async function wa(t,e,{parseWithTs:r}){var n;try{return await ms(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},X)}function ba(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},X)}function ms(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},X)}var fs=ya;function Ta(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[us,ls,ns,fs,rs]){let s=n(t,e);if(s)return xa(s)}}}function xa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=hr(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var ds=Ta;var ka=new Proxy(()=>{},{get:()=>ka});function J(t){return t.sourceSpan.start.offset}fu
Line truncated
|
||||
|
||||
${t}`}var xs=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ks(t){let e=se(t);return t.type==="element"&&!t.endSourceSpan&&me(t.children)?Math.max(e,ks(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(ge(n)){let s=ks(n);return[z(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Ft(n).length:0),s-(n.next&&Q(n.next)?_e(n,e).length:0)))),G(n,e)]}return r()}function It(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?bt(e)?S:_:"":bt(e)?S:v:rt(t)&&(ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&Q(e)?"":!e.isLeadingSpaceSensitive||bt(e)||Q(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(Dr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?It(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=It(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],m=[],f=o.prev?It(o.prev,o):"",C=o.next?It(o,o.next):"";return f&&(Je(o.prev)?u.push(S,S):f===S?u.push(S):$(o.prev)?p.push(f):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&m.push(S,S):C===S?$(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...m]},"children")}function Bs(t,e,r){let{node:n}=t,s=[];Va(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Ls(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Ls(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=xs.get(t.name))!=null&&r.has(t.next.name)))}function Va(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!ge(e)&&!Ls(e)}function Fs(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function Ps(t,e,r){let{node:n}=t;return[De(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Se(n,e)]}function Ns(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function Is(t,e,r){let{node:n}=t;if(wt(n,e))return[z(n,e),E(st(t,e,r)),B(Nt(n,e)),...tt(n,e),G(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?Cn(l,{groupId:i}):(W(n,e)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?dn(v):v,p=()=>(n.next?Q(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Gn(n)?ne:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function Rt(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function Rs(t){return t>=97&&t<=102||t>=65&&t<=70||Rt(t)}function $t(t){return t===10||t===13}function Br(t){return 48<=t&&t<=55}function Ot(t){return t===39||t===34||t===96}var Ua=/-+([a-z0-9])/g;function Os(t){return t.replace(Ua,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s<n&&e>0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(
Line truncated
|
||||
`&&++o==r)););for(a=0,o=0;a<e&&i<n.length-1&&(i++,a++,!(n[i]==`
|
||||
`&&++o==r)););return{before:n.substring(s,this.offset),after:n.substring(this.offset,i+1)}}return null}},ve=class{constructor(e,r){this.content=e,this.url=r}},h=class{constructor(e,r,n=e,s=null){this.start=e,this.end=r,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Mt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(Mt||(Mt={}));var Oe=class{constructor(e,r,n=Mt.ERROR,s){this.span=e,this.msg=r,this.level=n,this.relatedError=s}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Mt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Wa=[za,Ya,Ka,Qa,Ja,to,Za,eo,ro,Xa];function Ga(t,e){for(let r of Wa)r(t,e);return t}function za(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===`
|
||||
`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Ya(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.firstChild;r.removeChild(i),n--;let o=new h(i.sourceSpan.start,a.sourceSpan.end),u=new h(o.start,s.sourceSpan.end);s.condition=i.condition,s.sourceSpan=u,s.startSourceSpan=o,s.removeChild(a)}})}function ja(t,e,r){t.walk(n=>{if(n.children)for(let s=0;s<n.children.length;s++){let i=n.children[s];if(i.type!=="text"&&!e(i))continue;i.type!=="text"&&(i.type="text",i.value=r(i));let a=i.prev;!a||a.type!=="text"||(a.value+=i.value,a.sourceSpan=new h(a.sourceSpan.start,i.sourceSpan.end),n.removeChild(i),s--)}})}function Ka(t){return ja(t,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function Xa(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.next;i.value+=`<${s.rawName}>`+s.firstChild.value+`</${s.rawName}>`+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Qa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(qn(n,e))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u<o.length;u++,i=a){let p=o[u];if(u%2===0){a=i.moveBy(p.length),p.length>0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Ja(t,e){t.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].type==="text"&&O.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let s=Hn(r,e),i=Ar(r);if(!s)for(let a=0;a<n.length;a++){let o=n[a];if(o.type!=="text")continue;let{leadingWhitespace:u,text:p,trailingWhitespace:l}=Mn(o.value),m=o.prev,f=o.next;p?(o.value=p,o.sourceSpan=new h(o.sourceSpan.start.moveBy(u.length),o.sourceSpan.end.moveBy(-l.length)),u&&(m&&(m.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),l&&(o.hasTrailingSpaces=!0,f&&(f.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(u||l)&&(m&&(m.hasTrailingSpaces=!0),f&&(f.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=s,r.isIndentationSensitive=i})}function Za(t){t.walk(e=>{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function eo(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function to(t,e){t.walk(r=>{r.cssDisplay=Qn(r,e)})}function ro(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Wn(r,e);return}for(let s of n)s.isLeadingSpaceSensitive=Vn(s,e),s.isTrailingSpaceSensitive=Un(s,e);for(let s=0;s<n.length;s++){let i=n[s];i.isLeadingSpaceSensitive=(s===0||i.prev.isTrailingSpaceSensitive)&&i.isLeadingSpaceSensitive,i.isTrailingSpaceSensitive=(s===n.length-1||i.next.isLeadingSpaceSensitive)&&i.isTrailingSpaceSensitive}}})}var Ms=Ga;function no(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return B(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Re(t,e,r)),S];case"element":case"ieConditionalComment":return Is(t,e,r);case"angularControlFlowBlock":return Bs(t,e,r);case"angularControlFlowBlockParameters":return Fs(t,e,r);case"angularControlFlowBlockParameter":return O.trim(n.expression);case"angularLetDeclaration":return E(["@let ",E([n.id," =",E(k([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Ps(t,e,r);case"angularIcuCase":return Ns(t,e,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[De(n),Se(n)];case"interpolation":return[De(n,e),...t.map(r,"children"),Se(n,e)];case"text":{if(n.parent.type==="interpolation"){let o=/\n[^\S\n]*$/u,u=o.test(n.value),p=u?n.value.replace(o,""):n.vaLine truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>po.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Os(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(ho(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function ho(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var d=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=N.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Ks,pt;function He(t){return pt||(Ks=new d({canSelfClose:!0}),pt=Object.assign(Object.create(null),{base:new d({isVoid:!0}),meta:new d({isVoid:!0}),area:new d({isVoid:!0}),embed:new d({isVoid:!0}),link:new d({isVoid:!0}),img:new d({isVoid:!0}),input:new d({isVoid:!0}),param:new d({isVoid:!0}),hr:new d({isVoid:!0}),br:new d({isVoid:!0}),source:new d({isVoid:!0}),track:new d({isVoid:!0}),wbr:new d({isVoid:!0}),p:new d({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new d({closedByChildren:["tbody","tfoot"]}),tbody:new d({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new d({closedByChildren:["tbody"],closedByParent:!0}),tr:new d({closedByChildren:["tr"],closedByParent:!0}),td:new d({closedByChildren:["td","th"],closedByParent:!0}),th:new d({closedByChildren:["td","th"],closedByParent:!0}),col:new d({isVoid:!0}),svg:new d({implicitNamespacePrefix:"svg"}),foreignObject:new d({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new d({implicitNamespacePrefix:"math"}),li:new d({closedByChildren:["li"],closedByParent:!0}),dt:new d({closedByChildren:["dt","dd"]}),dd:new d({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new d({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new d({closedByChildren:["optgroup"],closedByParent:!0}),option:new d({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new d({ignoreFirstLf:!0}),listing:new d({ignoreFirstLf:!0}),style:new d({contentType:N.RAW_TEXT}),script:new d({contentType:N.RAW_TEXT}),title:new d({contentType:{default:N.ESCAPABLE_RAW_TEXT,svg:N.PARSABLE_DATA}}),textarea:new d({contentType:N.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Ut().allKnownElementNames().forEach(e=>{!pt[e]&&Me(e)===null&&(pt[e]=new d({canSelfClose:!1}))})),pt[t]??Ks}var ae=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Wt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Gt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},zt=class extends ae{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Yt=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpans
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>ut(n)?!e:si(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(ii);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Ot(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(ii)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),ut(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!$t(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>lt(n)||n===36||n===95||r&&Rt(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;Ot(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(qo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new gt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new gt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new gt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new Ct(n)}handleError(e){if(e instanceof St&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof Ct)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Ho(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptS
Line truncated
|
||||
`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===`
|
||||
`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,pi):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Wt(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof Y&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new Y(i,s,[],u,p,void 0,l),f=this._getContainer();this._pushContainer(m,f instanceof Y&&this.getTagDefinition(f.name).isClosedByChild(m.name)),a?this._popContainer(i,Y,u):e.type===4&&(this._popContainer(i,Y,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,Y,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof ee||a instanceof Y&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,pi):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new jt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,ee,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,ee,null),this.errors.push(L.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],n,s;if(this._peek.type!==31){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else
Line truncated
|
||||
`,_t);if(r===-1)return;let n=t.slice(_t,r).trim(),s=t.indexOf(`
|
||||
${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(`
|
||||
...`,r)),s===-1)return;let a=s+1+_t,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-_t),raw:u}}function zo(t){let e=Go(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var mi=zo;var ar={attrs:!0,children:!0,cases:!0,expression:!0},fi=new Set(["parent"]),le,Jr,Zr,Ge=class Ge{constructor(e={}){At(this,le);lr(this,"type");lr(this,"parent");for(let r of new Set([...fi,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in ar&&(r=r.map(n=>this.createChild(n))),!fi.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in ar){let s=this[n];if(s){let i=Yo(s,a=>a.map(e));r!==s&&(r||(r=new Ge({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in ar||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in ar){let n=this[r];if(n)for(let s=0;s<n.length;s++)n[s].walk(e)}e(this)}createChild(e){let r=e instanceof Ge?e.clone():new Ge(e);return r.setProperty("parent",this),r}insertChildBefore(e,r){let n=this.$children;n.splice(n.indexOf(e),0,this.createChild(r))}removeChild(e){let r=this.$children;r.splice(r.indexOf(e),1)}replaceChild(e,r){let n=this.$children;n[n.indexOf(e)]=this.createChild(r)}clone(){return new Ge(this)}get $children(){return this[R(this,le,Jr)]}set $children(e){this[R(this,le,Jr)]=e}get firstChild(){var e;return(e=this.$children)==null?void 0:e[0]}get lastChild(){return K(!0,this.$children,-1)}get prev(){let e=R(this,le,Zr);return e[e.indexOf(this)-1]}get next(){let e=R(this,le,Zr);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};le=new WeakSet,Jr=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},Zr=function(){var e;return((e=this.parent)==null?void 0:e.$children)??[]};var or=Ge;function Yo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var jo=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:Ko},{regex:/^\[if([^\]]*)\]><!$/u,parse:Xo},{regex:/^<!\s*\[endif\]$/u,parse:Qo}];function di(t,e){if(t.value)for(let{regex:r,parse:n}of jo){let s=t.value.match(r);if(s)return n(t,e,s)}return null}function Ko(t,e,r){let[,n,s,i]=r,a=4+n.length,o=t.sourceSpan.start.moveBy(a),u=o.moveBy(i.length),[p,l]=(()=>{try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function Xo(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function Qo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var ur=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["
Line truncated
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
markdown: Parser;
|
||||
mdx: Parser;
|
||||
remark: Parser;
|
||||
};
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.markdown=e()}})(function(){"use strict";var yl=Object.create;var kr=Object.defineProperty;var wl=Object.getOwnPropertyDescriptor;var xl=Object.getOwnPropertyNames;var kl=Object.getPrototypeOf,Bl=Object.prototype.hasOwnProperty;var Gn=e=>{throw TypeError(e)};var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Yn=(e,r)=>{for(var t in r)kr(e,t,{get:r[t],enumerable:!0})},$n=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of xl(r))!Bl.call(e,a)&&a!==t&&kr(e,a,{get:()=>r[a],enumerable:!(n=wl(r,a))||n.enumerable});return e};var Me=(e,r,t)=>(t=e!=null?yl(kl(e)):{},$n(r||!e||!e.__esModule?kr(t,"default",{value:e,enumerable:!0}):t,e)),Tl=e=>$n(kr({},"__esModule",{value:!0}),e);var Vn=(e,r,t)=>r.has(e)||Gn("Cannot "+t);var ce=(e,r,t)=>(Vn(e,r,"read from private field"),t?t.call(e):r.get(e)),jn=(e,r,t)=>r.has(e)?Gn("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Wn=(e,r,t,n)=>(Vn(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t);var Br=C((cF,Hn)=>{"use strict";Hn.exports=Sl;function Sl(e){return String(e).replace(/\s+/g," ")}});var iu=C((cv,nu)=>{"use strict";nu.exports=Vf;var Dr=9,Gr=10,je=32,zf=33,Gf=58,We=91,Yf=92,Pt=93,pr=94,Yr=96,$r=4,$f=1024;function Vf(e){var r=this.Parser,t=this.Compiler;jf(r)&&Hf(r,e),Wf(t)&&Kf(t)}function jf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Wf(e){return!!(e&&e.prototype&&e.prototype.visitors)}function Hf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,i=n.inlineTokenizers,u=n.blockMethods,o=n.inlineMethods,s=a.definition,l=i.reference,c=[],f=-1,p=u.length,d;++f<p;)d=u[f],!(d==="newline"||d==="indentedCode"||d==="paragraph"||d==="footnoteDefinition")&&c.push([d]);c.push(["footnoteDefinition"]),t.inlineNotes&&(Ot(o,"reference","inlineNote"),i.inlineNote=m),Ot(u,"definition","footnoteDefinition"),Ot(o,"reference","footnoteCall"),a.definition=A,a.footnoteDefinition=D,i.footnoteCall=h,i.reference=F,n.interruptFootnoteDefinition=c,F.locator=l.locator,h.locator=v,m.locator=B;function D(b,g,y){for(var w=this,E=w.interruptFootnoteDefinition,x=w.offset,k=g.length+1,T=0,q=[],N,P,S,_,O,Be,W,I,ee,Z,Ee,ve,U;T<k&&(_=g.charCodeAt(T),!(_!==Dr&&_!==je));)T++;if(g.charCodeAt(T++)===We&&g.charCodeAt(T++)===pr){for(P=T;T<k;){if(_=g.charCodeAt(T),_!==_||_===Gr||_===Dr||_===je)return;if(_===Pt){S=T,T++;break}T++}if(!(S===void 0||P===S||g.charCodeAt(T++)!==Gf)){if(y)return!0;for(N=g.slice(P,S),O=b.now(),ee=0,Z=0,Ee=T,ve=[];T<k;){if(_=g.charCodeAt(T),_!==_||_===Gr)U={start:ee,contentStart:Ee||T,contentEnd:T,end:T},ve.push(U),_===Gr&&(ee=T+1,Z=0,Ee=void 0,U.end=ee);else if(Z!==void 0)if(_===je||_===Dr)Z+=_===je?1:$r-Z%$r,Z>$r&&(Z=void 0,Ee=T);else{if(Z<$r&&U&&(U.contentStart===U.contentEnd||Xf(E,a,w,[b,g.slice(T,$f),!0])))break;Z=void 0,Ee=T}T++}for(T=-1,k=ve.length;k>0&&(U=ve[k-1],U.contentStart===U.contentEnd);)k--;for(Be=b(g.slice(0,U.contentEnd));++T<k;)U=ve[T],x[O.line+T]=(x[O.line+T]||0)+(U.contentStart-U.start),q.push(g.slice(U.contentStart,U.end));return W=w.enterBlock(),I=w.tokenizeBlock(q.join(""),O),W(),Be({type:"footnoteDefinition",identifier:N.toLowerCase(),label:N,children:I})}}}function h(b,g,y){var w=g.length+1,E=0,x,k,T,q;if(g.charCodeAt(E++)===We&&g.charCodeAt(E++)===pr){for(k=E;E<w;){if(q=g.charCodeAt(E),q!==q||q===Gr||q===Dr||q===je)return;if(q===Pt){T=E,E++;break}E++}if(!(T===void 0||k===T))return y?!0:(x=g.slice(k,T),b(g.slice(0,E))({type:"footnoteReference",identifier:x.toLowerCase(),label:x}))}}function m(b,g,y){var w=this,E=g.length+1,x=0,k=0,T,q,N,P,S,_,O;if(g.charCodeAt(x++)===pr&&g.charCodeAt(x++)===We){for(N=x;x<E;){if(q=g.charCodeAt(x),q!==q)return;if(_===void 0)if(q===Yf)x+=2;else if(q===We)k++,x++;else if(q===Pt)if(k===0){P=x,x++;break}else k--,x++;else if(q===Yr){for(S=x,_=1;g.charCodeAt(S+_)===Yr;)_++;x+=_}else x++;else if(q===Yr){for(S=x,O=1;g.charCodeAt(S+O)===Yr;)O++;x+=O,_===O&&(_=void 0),O=void 0}else x++}if(P!==void 0)return y?!0:(T=b.now(),T.column+=2,T.offset+=2,b(g.slice(0,x))({type:"footnote",children:w.tokenizeInline(g.slice(N,P),T)}))}}function F(b,g,y){var w=0;if(g.charCodeAt(w)===zf&&w++,g.charCodeAt(w)===We&&g.charCodeAt(w+1)!==pr)return l.call(this,b,g,y)}function A(b,g,y){for(var w=0,E=g.charCodeAt(w);E===je||E===Dr;)E=g.charCodeAt(++w);if(E===We&&g.charCodeAt(w+1)!==pr)return s.call(this,b,g,y)}function v(b,g){return b.indexOf("[",g)}function B(b,g){return b.indexOf("^[",g)}}function Kf(e){var r=e.prototype.visitors,t=" ";r.footnote=n,r.footnoteReference=a,r.footnoteDefinition=i;function n(u){return"^["+this.all(u).join("")+"]"}function a(u){return"[^"+(u.label||u.identifier)+"]"}function i(u){for(var o=thLine truncated
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=t+c);return"[^"+(u.label||u.identifier)+"]: "+o.join(`
|
||||
`)}}function Ot(e,r,t){e.splice(e.indexOf(r),0,t)}function Xf(e,r,t,n){for(var a=e.length,i=-1;++i<a;)if(r[e[i][0]].apply(t,n))return!0;return!1}});var It=C(Lt=>{Lt.isRemarkParser=Jf;Lt.isRemarkCompiler=Qf;function Jf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Qf(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var fu=C((fv,lu)=>{var uu=It();lu.exports=tD;var au=9,ou=32,Vr=36,Zf=48,eD=57,su=92,rD=["math","math-inline"],cu="math-display";function tD(e){let r=this.Parser,t=this.Compiler;uu.isRemarkParser(r)&&nD(r,e),uu.isRemarkCompiler(t)&&iD(t,e)}function nD(e,r){let t=e.prototype,n=t.inlineMethods;i.locator=a,t.inlineTokenizers.math=i,n.splice(n.indexOf("text"),0,"math");function a(u,o){return u.indexOf("$",o)}function i(u,o,s){let l=o.length,c=!1,f=!1,p=0,d,D,h,m,F,A,v;if(o.charCodeAt(p)===su&&(f=!0,p++),o.charCodeAt(p)===Vr){if(p++,f)return s?!0:u(o.slice(0,p))({type:"text",value:"$"});if(o.charCodeAt(p)===Vr&&(c=!0,p++),h=o.charCodeAt(p),!(h===ou||h===au)){for(m=p;p<l;){if(D=h,h=o.charCodeAt(p+1),D===Vr){if(d=o.charCodeAt(p-1),d!==ou&&d!==au&&(h!==h||h<Zf||h>eD)&&(!c||h===Vr)){F=p-1,p++,c&&p++,A=p;break}}else D===su&&(p++,h=o.charCodeAt(p+1));p++}if(A!==void 0)return s?!0:(v=o.slice(m,F+1),u(o.slice(0,A))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:rD.concat(c&&r.inlineMathDouble?[cu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function iD(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(cu)&&(a="$$"),a+n.value+a}}});var mu=C((Dv,du)=>{var Du=It();du.exports=sD;var pu=10,hr=32,Rt=36,hu=`
|
||||
`,uD="$",aD=2,oD=["math","math-display"];function sD(){let e=this.Parser,r=this.Compiler;Du.isRemarkParser(e)&&cD(e),Du.isRemarkCompiler(r)&&lD(r)}function cD(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,i=r.interruptBlockquote;r.blockTokenizers.math=u,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),i.splice(i.indexOf("fencedCode")+1,0,["math"]);function u(o,s,l){var c=s.length,f=0;let p,d,D,h,m,F,A,v,B,b,g;for(;f<c&&s.charCodeAt(f)===hr;)f++;for(m=f;f<c&&s.charCodeAt(f)===Rt;)f++;if(F=f-m,!(F<aD)){for(;f<c&&s.charCodeAt(f)===hr;)f++;for(A=f;f<c;){if(p=s.charCodeAt(f),p===Rt)return;if(p===pu)break;f++}if(s.charCodeAt(f)===pu){if(l)return!0;for(d=[],A!==f&&d.push(s.slice(A,f)),f++,D=s.indexOf(hu,f+1),D=D===-1?c:D;f<c;){for(v=!1,b=f,g=D,h=D,B=0;h>b&&s.charCodeAt(h-1)===hr;)h--;for(;h>b&&s.charCodeAt(h-1)===Rt;)B++,h--;for(F<=B&&s.indexOf(uD,b)===h&&(v=!0,g=h);b<=g&&b-f<m&&s.charCodeAt(b)===hr;)b++;if(v)for(;g>b&&s.charCodeAt(g-1)===hr;)g--;if((!v||b!==g)&&d.push(s.slice(b,g)),v)break;f=D+1,D=s.indexOf(hu,f+1),D=D===-1?c:D}return d=d.join(`
|
||||
`),o(s.slice(0,D))({type:"math",value:d,data:{hName:"div",hProperties:{className:oD.concat()},hChildren:[{type:"text",value:d}]}})}}}}function lD(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var gu=C((pv,Fu)=>{var fD=fu(),DD=mu();Fu.exports=pD;function pD(e){var r=e||{};DD.call(this,r),fD.call(this,r)}});var Ie=C((hv,Eu)=>{Eu.exports=dD;var hD=Object.prototype.hasOwnProperty;function dD(){for(var e={},r=0;r<arguments.length;r++){var t=arguments[r];for(var n in t)hD.call(t,n)&&(e[n]=t[n])}return e}});var vu=C((dv,Nt)=>{typeof Object.create=="function"?Nt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Nt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Au=C((mv,bu)=>{"use strict";var mD=Ie(),Cu=vu();bu.exports=FD;function FD(e){var r,t,n;Cu(i,e),Cu(a,i),r=i.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():mD(n));return i;function a(u){return e.apply(this,u)}function i(){return this instanceof i?e.apply(this,arguments):new a(arguments)}}});var wu=C((Fv,yu)=>{"use strict";yu.exports=gD;function gD(e,r,t){return n;function n(){var a=t||this,i=a[e];return a[e]=!r,u;function u(){a[e]=i}}}});var ku=C((gv,xu)=>{"use strict";xu.exports=ED;function ED(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:i};function a(u){var o=-1;if(u>-1&&u<t[t.length-1]){for(;++o<t.length;)if(t[o]>u)return{line:o+1,column:u-(t[o-1]||0)+1,offset:u}}return{}}function i(u){var o=u&&u.line,s=u&&u.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l<t[t.length-1]?l:-1}}});var Tu=C((Ev,Bu)=>{"use strict";Bu.exports=vD;var Mt="\\";function vD(e,r){return t;function t(n){for(var a=0,i=n.indexOf(Mt),u=e[r],o=[],s;i!==-1;)o.push(n.slice(a,i)),a=i+1,s=n.charAt(a),(!s||u.indexOf(s)===-1)&&o.push(Mt),i=n.indexOf(Mt,a+1);return o.push(n.slice(a)),o.join("")}}});var qu=C((vv,CD)=>{CD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var _u=C((Cv,bD)=>{bD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Re=C((bv,Su)=>{"use strict";Su.exports=AD;function AD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Ou=C((Av,Pu)=>{"use strict";Pu.exports=yD;function yD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var He=C((yv,Lu)=>{"use strict";Lu.exports=wD;function wD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var Ru=C((wv,Iu)=>{"use strict";var xD=He(),kD=Re();Iu.exports=BD;function BD(e){return xD(e)||kD(e)}});var Nu=C((xv,TD)=>{TD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);k!==-1;)l++,x=k,k=E.indexOf(`
|
||||
`,k+1);x===-1?c+=E.length:c=E.length-x,l in i&&(x!==-1?c+=i[l]:c<=i[l]&&(c=i[l]+1))}function A(){var E=[],x=l+1;return function(){for(var k=l+1;x<k;)E.push((i[x]||0)+1),x++;return E}}function v(){var E={line:l,column:c};return E.offset=a.toOffset(E),E}function B(E){this.start=E,this.end=v()}function b(E){t.slice(0,E.length)!==E&&a.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),v())}function g(){var E=v();return x;function x(k,T){var q=k.position,N=q?q.start:E,P=[],S=q&&q.end.line,_=E.line;if(k.position=new B(N),q&&T&&q.indent){if(P=q.indent,S<_){for(;++S<_;)P.push((i[S]||0)+1);P.push(E.column)}T=P.concat(T)}return k.position.indent=T||[],k}}function y(E,x){var k=x?x.children:u,T=k[k.length-1],q;return T&&E.type===T.type&&(E.type==="text"||E.type==="blockquote")&&ia(T)&&ia(E)&&(q=E.type==="text"?ep:rp,E=q.call(a,T,E)),E!==T&&k.push(E),a.atStart&&u.length!==0&&a.exitStart(),E}function w(E){var x=A(),k=g(),T=v();return b(E),q.reset=N,N.test=P,q.test=P,t=t.slice(E.length),F(E),x=x(),q;function q(S,_){return k(y(k(S),_),x)}function N(){var S=q.apply(null,arguments);return l=T.line,c=T.column,t=E+t,S}function P(){var S=k({});return l=T.line,c=T.column,t=E+t,S.position}}}}function ia(e){var r,t;return e.type!=="text"||!e.position?!0:(r=e.position.start,t=e.position.end,r.line!==t.line||t.column-r.column===e.value.length)}function ep(e,r){return e.value+=r.value,e}function rp(e,r){return this.options.commonmark||this.options.gfm?r:(e.children=e.children.concat(r.children),e)}});var ca=C((_v,sa)=>{"use strict";sa.exports=Wr;var $t=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Vt=$t.concat(["~","|"]),oa=Vt.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Wr.default=$t;Wr.gfm=Vt;Wr.commonmark=oa;function Wr(e){var r=e||{};return r.commonmark?oa:r.gfm?Vt:$t}});var fa=C((Sv,la)=>{"use strict";la.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var jt=C((Pv,Da)=>{"use strict";Da.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:fa()}});var ha=C((Ov,pa)=>{"use strict";var tp=Ie(),np=ca(),ip=jt();pa.exports=up;function up(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=tp(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in ip){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=np(e),r}});var Fa=C((Lv,ma)=>{"use strict";ma.exports=da;function da(e){if(e==null)return cp;if(typeof e=="string")return sp(e);if(typeof e=="object")return"length"in e?op(e):ap(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function ap(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function op(e){for(var r=[],t=-1;++t<e.length;)r[t]=da(e[t]);return n;function n(){for(var a=-1;++a<r.length;)if(r[a].apply(this,arguments))return!0;return!1}}function sp(e){return r;function r(t){return!!(t&&t.type===e)}}function cp(){return!0}});var Ea=C((Iv,ga)=>{ga.exports=lp;function lp(e){return e}});var Aa=C((Rv,ba)=>{"use strict";ba.exports=Hr;var fp=Fa(),Dp=Ea(),va=!0,Ca="skip",Wt=!1;Hr.CONTINUE=va;Hr.SKIP=Ca;Hr.EXIT=Wt;function Hr(e,r,t,n){var a,i;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),i=fp(r),a=n?-1:1,u(e,null,[])();function u(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,p.displayName="node ("+Dp(c.type+(f?"<"+f+">":""))+")"),p;function p(){var d=l.concat(o),D=[],h,m;if((!r||i(o,s,l[l.length-1]||null))&&(D=pp(t(o,l)),D[0]===Wt))return D;if(o.children&&D[0]!==Ca)for(m=(n?o.children.length:-1)+a;m>-1&&m<o.children.length;){if(h=u(o.children[m],m,d)(),h[0]===Wt)return h;m=typeof h[1]=="number"?h[1]:m+a}return D}}}function pp(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[va,e]:[e]}});var wa=C((Nv,ya)=>{"use strict";ya.exports=Xr;var Kr=Aa(),hp=Kr.CONTINUE,dp=Kr.SKIP,mp=Kr.EXIT;Xr.CONTINUE=hp;Xr.SKIP=dp;Xr.EXIT=mp;function Xr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Kr(e,r,a,n);function a(i,u){var o=u[u.length-1],s=o?o.children.indexOf(i):null;return t(i,s,o)}}});var ka=C((Mv,xa)=>{"use strict";var Fp=wa();xa.exports=gp;function gp(e,r){return Fp(e,r?Ep:vp),e}function Ep(e){delete e.position}function vp(e){e.position=void 0}});var qa=C((Uv,Ta)=>{"use strict";var Ba=Ie(),Cp=ka();Ta.exports=yp;var bp=`
|
||||
`,Ap=/\r\n|\r/g;function yp(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=Ba(t),a;return r=r.replace(Ap,bp),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||Ba(t)}},e.options.position||Cp(a,!0),a}});var Sa=C((zv,_a)=>{"use strict";var wp=/^[ \t]*(\n|$)/;_a.exports=xp;function xp(e,r,t){for(var n,a="",i=0,u=r.length;i<u&&(n=wp.exec(r.slice(i)),n!=null);)i+=n[0].length,a+=n[0];if(a!==""){if(t)return!0;e(a)}}});var Jr=C((Gv,Pa)=>{"use strict";var me="",Ht;Pa.exports=kp;function kp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ht!==e||typeof Ht>"u")Ht=e,me="";else if(me.length>=t)return me.substr(0,t);for(;t>me.length&&r>1;)r&1&&(me+=e),r>>=1,e+=e;return me+=e,me=me.substr(0,t),me}});var Kt=C((Yv,Oa)=>{"use strict";Oa.exports=Bp;function Bp(e){return String(e).replace(/\n+$/,"")}});var Ra=C(($v,Ia)=>{"use strict";var Tp=Jr(),qp=Kt();Ia.exports=Pp;var Xt=`
|
||||
`,La=" ",Jt=" ",_p=4,Sp=Tp(Jt,_p);function Pp(e,r,t){for(var n=-1,a=r.length,i="",u="",o="",s="",l,c,f;++n<a;)if(l=r.charAt(n),f)if(f=!1,i+=o,u+=s,o="",s="",l===Xt)o=l,s=l;else for(i+=l,u+=l;++n<a;){if(l=r.charAt(n),!l||l===Xt){s=l,o=l;break}i+=l,u+=l}else if(l===Jt&&r.charAt(n+1)===l&&r.charAt(n+2)===l&&r.charAt(n+3)===l)o+=Sp,n+=3,f=!0;else if(l===La)o+=l,f=!0;else{for(c="";l===La||l===Jt;)c+=l,l=r.charAt(++n);if(l!==Xt)break;o+=c+l,s+=l}if(u)return t?!0:e(i)({type:"code",lang:null,meta:null,value:qp(u)})}});var Ua=C((Vv,Ma)=>{"use strict";Ma.exports=Rp;var Qr=`
|
||||
`,mr=" ",Je=" ",Op="~",Na="`",Lp=3,Ip=4;function Rp(e,r,t){var n=this,a=n.options.gfm,i=r.length+1,u=0,o="",s,l,c,f,p,d,D,h,m,F,A,v,B;if(a){for(;u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)o+=c,u++;if(v=u,c=r.charAt(u),!(c!==Op&&c!==Na)){for(u++,l=c,s=1,o+=c;u<i&&(c=r.charAt(u),c===l);)o+=c,s++,u++;if(!(s<Lp)){for(;u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)o+=c,u++;for(f="",D="";u<i&&(c=r.charAt(u),!(c===Qr||l===Na&&c===l));)c===Je||c===mr?D+=c:(f+=D+c,D=""),u++;if(c=r.charAt(u),!(c&&c!==Qr)){if(t)return!0;B=e.now(),B.column+=o.length,B.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),B),D&&(o+=D),D="",F="",A="",h="",m="";for(var b=!0;u<i;){if(c=r.charAt(u),h+=F,m+=A,F="",A="",c!==Qr){h+=c,A+=c,u++;continue}for(b?(o+=c,b=!1):(F+=c,A+=c),D="",u++;u<i&&(c=r.charAt(u),c===Je);)D+=c,u++;if(F+=D,A+=D.slice(v),!(D.length>=Ip)){for(D="";u<i&&(c=r.charAt(u),c===l);)D+=c,u++;if(F+=D,A+=D,!(D.length<s)){for(D="";u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)F+=c,A+=c,u++;if(!c||c===Qr)break}}}for(o+=h+F,u=-1,i=f.length;++u<i;)if(c=f.charAt(u),c===Je||c===mr)p||(p=f.slice(0,u));else if(p){d=f.slice(u);break}return e(o)({type:"code",lang:p||f||null,meta:d||null,value:m})}}}}}});var Ne=C((Qe,za)=>{Qe=za.exports=Np;function Np(e){return e.trim?e.trim():Qe.right(Qe.left(e))}Qe.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Qe.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Zr=C((jv,Ga)=>{"use strict";Ga.exports=Mp;function Mp(e,r,t,n){for(var a=e.length,i=-1,u,o;++i<a;)if(u=e[i],o=u[1]||{},!(o.pedantic!==void 0&&o.pedantic!==t.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==t.options.commonmark)&&r[u[0]].apply(t,n))return!0;return!1}});var ja=C((Wv,Va)=>{"use strict";var Up=Ne(),zp=Zr();Va.exports=Gp;var Qt=`
|
||||
`,Ya=" ",Zt=" ",$a=">";function Gp(e,r,t){for(var n=this,a=n.offset,i=n.blockTokenizers,u=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],p=[],d,D=0,h,m,F,A,v,B,b,g;D<l&&(h=r.charAt(D),!(h!==Zt&&h!==Ya));)D++;if(r.charAt(D)===$a){if(t)return!0;for(D=0;D<l;){for(F=r.indexOf(Qt,D),B=D,b=!1,F===-1&&(F=l);D<l&&(h=r.charAt(D),!(h!==Zt&&h!==Ya));)D++;if(r.charAt(D)===$a?(D++,b=!0,r.charAt(D)===Zt&&D++):D=B,A=r.slice(D,F),!b&&!Up(A)){D=B;break}if(!b&&(m=r.slice(D),zp(u,i,n,[e,m,!0])))break;v=B===D?A:r.slice(B,F),p.push(D-B),c.push(v),f.push(A),D=F+1}for(D=-1,l=p.length,d=e(c.join(Qt));++D<l;)a[s]=(a[s]||0)+p[D],s++;return g=n.enterBlock(),f=n.tokenizeBlock(f.join(Qt),o),g(),d({type:"blockquote",children:f})}}});var Ka=C((Hv,Ha)=>{"use strict";Ha.exports=$p;var Wa=`
|
||||
`,Fr=" ",gr=" ",Er="#",Yp=6;function $p(e,r,t){for(var n=this,a=n.options.pedantic,i=r.length+1,u=-1,o=e.now(),s="",l="",c,f,p;++u<i;){if(c=r.charAt(u),c!==gr&&c!==Fr){u--;break}s+=c}for(p=0;++u<=i;){if(c=r.charAt(u),c!==Er){u--;break}s+=c,p++}if(!(p>Yp)&&!(!p||!a&&r.charAt(u+1)===Er)){for(i=r.length+1,f="";++u<i;){if(c=r.charAt(u),c!==gr&&c!==Fr){u--;break}f+=c}if(!(!a&&f.length===0&&c&&c!==Wa)){if(t)return!0;for(s+=f,f="",l="";++u<i&&(c=r.charAt(u),!(!c||c===Wa));){if(c!==gr&&c!==Fr&&c!==Er){l+=f+c,f="";continue}for(;c===gr||c===Fr;)f+=c,c=r.charAt(++u);if(!a&&l&&!f&&c===Er){l+=c;continue}for(;c===Er;)f+=c,c=r.charAt(++u);for(;c===gr||c===Fr;)f+=c,c=r.charAt(++u);u--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:p,children:n.tokenizeInline(l,o)})}}}});var Qa=C((Kv,Ja)=>{"use strict";Ja.exports=Jp;var Vp=" ",jp=`
|
||||
`,Xa=" ",Wp="*",Hp="-",Kp="_",Xp=3;function Jp(e,r,t){for(var n=-1,a=r.length+1,i="",u,o,s,l;++n<a&&(u=r.charAt(n),!(u!==Vp&&u!==Xa));)i+=u;if(!(u!==Wp&&u!==Hp&&u!==Kp))for(o=u,i+=u,s=1,l="";++n<a;)if(u=r.charAt(n),u===o)s++,i+=l+o,l="";else if(u===Xa)l+=u;else return s>=Xp&&(!u||u===jp)?(i+=l,t?!0:e(i)({type:"thematicBreak"})):void 0}});var en=C((Xv,eo)=>{"use strict";eo.exports=rh;var Za=" ",Qp=" ",Zp=1,eh=4;function rh(e){for(var r=0,t=0,n=e.charAt(r),a={},i,u=0;n===Za||n===Qp;){for(i=n===Za?eh:Zp,t+=i,i>1&&(t=Math.floor(t/i)*i);u<t;)a[++u]=r;n=e.charAt(++r)}return{indent:t,stops:a}}});var no=C((Jv,to)=>{"use strict";var th=Ne(),nh=Jr(),ih=en();to.exports=oh;var ro=`
|
||||
`,uh=" ",ah="!";function oh(e,r){var t=e.split(ro),n=t.length+1,a=1/0,i=[],u,o,s;for(t.unshift(nh(uh,r)+ah);n--;)if(o=ih(t[n]),i[n]=o.stops,th(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent<a&&(a=o.indent);else{a=1/0;break}if(a!==1/0)for(n=t.length;n--;){for(s=i[n],u=a;u&&!(u in s);)u--;t[n]=t[n].slice(s[u]+1)}return t.shift(),t.join(ro)}});var co=C((Qv,so)=>{"use strict";var sh=Ne(),ch=Jr(),io=Re(),lh=en(),fh=no(),Dh=Zr();so.exports=vh;var rn="*",ph="_",uo="+",tn="-",ao=".",Fe=" ",ae=`
|
||||
`,et=" ",oo=")",hh="x",xe=4,dh=/\n\n(?!\s*$)/,mh=/^\[([ X\tx])][ \t]/,Fh=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,gh=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Eh=/^( {1,4}|\t)?/gm;function vh(e,r,t){for(var n=this,a=n.options.commonmark,i=n.options.pedantic,u=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,p,d,D,h,m,F,A,v,B,b,g,y,w,E,x,k,T,q,N=!1,P,S,_,O;s<l&&(D=r.charAt(s),!(D!==et&&D!==Fe));)s++;if(D=r.charAt(s),D===rn||D===uo||D===tn)h=D,d=!1;else{for(d=!0,p="";s<l&&(D=r.charAt(s),!!io(D));)p+=D,s++;if(D=r.charAt(s),!p||!(D===ao||a&&D===oo)||t&&p!=="1")return;c=parseInt(p,10),h=D}if(D=r.charAt(++s),!(D!==Fe&&D!==et&&(i||D!==ae&&D!==""))){if(t)return!0;for(s=0,w=[],E=[],x=[];s<l;){for(m=r.indexOf(ae,s),F=s,A=!1,O=!1,m===-1&&(m=l),f=0;s<l;){if(D=r.charAt(s),D===et)f+=xe-f%xe;else if(D===Fe)f++;else break;s++}if(k&&f>=k.indent&&(O=!0),D=r.charAt(s),v=null,!O){if(D===rn||D===uo||D===tn)v=D,s++,f++;else{for(p="";s<l&&(D=r.charAt(s),!!io(D));)p+=D,s++;D=r.charAt(s),s++,p&&(D===ao||a&&D===oo)&&(v=D,f+=p.length+1)}if(v)if(D=r.charAt(s),D===et)f+=xe-f%xe,s++;else if(D===Fe){for(_=s+xe;s<_&&r.charAt(s)===Fe;)s++,f++;s===_&&r.charAt(s)===Fe&&(s-=xe-1,f-=xe-1)}else D!==ae&&D!==""&&(v=null)}if(v){if(!i&&h!==v)break;A=!0}else!a&&!O&&r.charAt(F)===Fe?O=!0:a&&k&&(O=f>=k.indent||f>xe),A=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===rn||v===ph||v===tn)&&u.thematicBreak.call(n,e,b,!0))break;if(g=y,y=!A&&!sh(B).length,O&&k)k.value=k.value.concat(x,b),E=E.concat(x,b),x=[];else if(A)x.length!==0&&(N=!0,k.value.push(""),k.trail=x.concat()),k={value:[b],indent:f,trail:[]},w.push(k),E=E.concat(x,b),x=[];else if(y){if(g&&!a)break;x.push(b)}else{if(g||Dh(o,u,n,[e,b,!0]))break;k.value=k.value.concat(x,b),E=E.concat(x,b),x=[]}s=m+1}for(P=e(E.join(ae)).reset({type:"list",ordered:d,start:c,spread:N,children:[]}),T=n.enterList(),q=n.enterBlock(),s=-1,l=w.length;++s<l;)k=w[s].value.join(ae),S=e.now(),e(k)(Ch(n,k,S),P),k=w[s].trail.join(ae),s!==l-1&&(k+=ae),e(k);return T(),q(),P}}function Ch(e,r,t){var n=e.offset,a=e.options.pedantic?bh:Ah,i=null,u,o;return r=a.apply(null,arguments),e.options.gfm&&(u=r.match(mh),u&&(o=u[0].length,i=u[1].toLowerCase()===hh,n[t.line]+=o,r=r.slice(o))),{type:"listItem",spread:dh.test(r),checked:i,children:e.tokenizeBlock(r,t)}}function bh(e,r,t){var n=e.offset,a=t.line;return r=r.replace(gh,i),a=t.line,r.replace(Eh,i);function i(u){return n[a]=(n[a]||0)+u.length,a++,""}}function Ah(e,r,t){var n=e.offset,a=t.line,i,u,o,s,l,c,f;for(r=r.replace(Fh,p),s=r.split(ae),l=fh(r,lh(i).indent).split(ae),l[0]=o,n[a]=(n[a]||0)+u.length,a++,c=0,f=s.length;++c<f;)n[a]=(n[a]||0)+s[c].length-l[c].length,a++;return l.join(ae);function p(d,D,h,m,F){return u=D+h+m,o=F,Number(h)<10&&u.length%2===1&&(h=Fe+h),i=D+ch(Fe,h.length)+m,i+o}}});var po=C((Zv,Do)=>{"use strict";Do.exports=Th;var nn=`
|
||||
`,yh=" ",lo=" ",fo="=",wh="-",xh=3,kh=1,Bh=2;function Th(e,r,t){for(var n=this,a=e.now(),i=r.length,u=-1,o="",s,l,c,f,p;++u<i;){if(c=r.charAt(u),c!==lo||u>=xh){u--;break}o+=c}for(s="",l="";++u<i;){if(c=r.charAt(u),c===nn){u--;break}c===lo||c===yh?l+=c:(s+=l+c,l="")}if(a.column+=o.length,a.offset+=o.length,o+=s+l,c=r.charAt(++u),f=r.charAt(++u),!(c!==nn||f!==fo&&f!==wh)){for(o+=c,l=f,p=f===fo?kh:Bh;++u<i;){if(c=r.charAt(u),c!==f){if(c!==nn)return;u--;break}l+=c}return t?!0:e(o+l)({type:"heading",depth:p,children:n.tokenizeInline(s,a)})}}});var an=C(un=>{"use strict";var qh="[a-zA-Z_:][a-zA-Z0-9:._-]*",_h="[^\"'=<>`\\u0000-\\u0020]+",Sh="'[^']*'",Ph='"[^"]*"',Oh="(?:"+_h+"|"+Sh+"|"+Ph+")",Lh="(?:\\s+"+qh+"(?:\\s*=\\s*"+Oh+")?)",ho="<[A-Za-z][A-Za-z0-9\\-]*"+Lh+"*\\s*\\/?>",mo="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ih="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Rh="<[?].*?[?]>",Nh="<![A-Za-z]+\\s+[^>]*>",Mh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";un.openCloseTag=new RegExp("^(?:"+ho+"|"+mo+")");un.tag=new RegExp("^(?:"+ho+"|"+mo+"|"+Ih+"|"+Rh+"|"+Nh+"|"+Mh+")")});var vo=C((rC,Eo)=>{"use strict";var Uh=an().openCloseTag;Eo.exports=rd;var zh=" ",Gh=" ",Fo=`
|
||||
`,Yh="<",$h=/^<(script|pre|style)(?=(\s|>|$))/i,Vh=/<\/(script|pre|style)>/i,jh=/^<!--/,Wh=/-->/,Hh=/^<\?/,Kh=/\?>/,Xh=/^<![A-Za-z]/,Jh=/>/,Qh=/^<!\[CDATA\[/,Zh=/]]>/,go=/^$/,ed=new RegExp(Uh.source+"\\s*$");function rd(e,r,t){for(var n=this,a=n.options.blocks.join("|"),i=new RegExp("^</?("+a+")(?=(\\s|/?>|$))","i"),u=r.length,o=0,s,l,c,f,p,d,D,h=[[$h,Vh,!0],[jh,Wh,!0],[Hh,Kh,!0],[Xh,Jh,!0],[Qh,Zh,!0],[i,go,!0],[ed,go,!1]];o<u&&(f=r.charAt(o),!(f!==zh&&f!==Gh));)o++;if(r.charAt(o)===Yh){for(s=r.indexOf(Fo,o+1),s=s===-1?u:s,l=r.slice(o,s),c=-1,p=h.length;++c<p;)if(h[c][0].test(l)){d=h[c];break}if(d){if(t)return d[2];if(o=s,!d[1].test(l))for(;o<u;){if(s=r.indexOf(Fo,o+1),s=s===-1?u:s,l=r.slice(o+1,s),d[1].test(l)){l&&(o=s);break}o=s}return D=r.slice(0,o),e(D)({type:"html",value:D})}}}});var oe=C((tC,Co)=>{"use strict";Co.exports=id;var td=String.fromCharCode,nd=/\s/;function id(e){return nd.test(typeof e=="number"?td(e):e.charAt(0))}});var on=C((nC,bo)=>{"use strict";var ud=Br();bo.exports=ad;function ad(e){return ud(e).toLowerCase()}});var To=C((iC,Bo)=>{"use strict";var od=oe(),sd=on();Bo.exports=Dd;var Ao='"',yo="'",cd="\\",Ze=`
|
||||
`,rt=" ",tt=" ",cn="[",vr="]",ld="(",fd=")",wo=":",xo="<",ko=">";function Dd(e,r,t){for(var n=this,a=n.options.commonmark,i=0,u=r.length,o="",s,l,c,f,p,d,D,h;i<u&&(f=r.charAt(i),!(f!==tt&&f!==rt));)o+=f,i++;if(f=r.charAt(i),f===cn){for(i++,o+=f,c="";i<u&&(f=r.charAt(i),f!==vr);)f===cd&&(c+=f,i++,f=r.charAt(i)),c+=f,i++;if(!(!c||r.charAt(i)!==vr||r.charAt(i+1)!==wo)){for(d=c,o+=c+vr+wo,i=o.length,c="";i<u&&(f=r.charAt(i),!(f!==rt&&f!==tt&&f!==Ze));)o+=f,i++;if(f=r.charAt(i),c="",s=o,f===xo){for(i++;i<u&&(f=r.charAt(i),!!sn(f));)c+=f,i++;if(f=r.charAt(i),f===sn.delimiter)o+=xo+c+f,i++;else{if(a)return;i-=c.length+1,c=""}}if(!c){for(;i<u&&(f=r.charAt(i),!!pd(f));)c+=f,i++;o+=c}if(c){for(D=c,c="";i<u&&(f=r.charAt(i),!(f!==rt&&f!==tt&&f!==Ze));)c+=f,i++;if(f=r.charAt(i),p=null,f===Ao?p=Ao:f===yo?p=yo:f===ld&&(p=fd),!p)c="",i=o.length;else if(c){for(o+=c+f,i=o.length,c="";i<u&&(f=r.charAt(i),f!==p);){if(f===Ze){if(i++,f=r.charAt(i),f===Ze||f===p)return;c+=Ze}c+=f,i++}if(f=r.charAt(i),f!==p)return;l=o,o+=c+f,i++,h=c,c=""}else return;for(;i<u&&(f=r.charAt(i),!(f!==rt&&f!==tt));)o+=f,i++;if(f=r.charAt(i),!f||f===Ze)return t?!0:(s=e(s).test().end,D=n.decode.raw(n.unescape(D),s,{nonTerminated:!1}),h&&(l=e(l).test().end,h=n.decode.raw(n.unescape(h),l)),e(o)({type:"definition",identifier:sd(d),label:d,title:h||null,url:D}))}}}}function sn(e){return e!==ko&&e!==cn&&e!==vr}sn.delimiter=ko;function pd(e){return e!==cn&&e!==vr&&!od(e)}});var So=C((uC,_o)=>{"use strict";var hd=oe();_o.exports=yd;var dd=" ",nt=`
|
||||
`,md=" ",Fd="-",gd=":",Ed="\\",ln="|",vd=1,Cd=2,qo="left",bd="center",Ad="right";function yd(e,r,t){var n=this,a,i,u,o,s,l,c,f,p,d,D,h,m,F,A,v,B,b,g,y,w,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];a<l;){if(y=r.indexOf(nt,a),w=r.indexOf(ln,a+1),y===-1&&(y=r.length),w===-1||w>y){if(v<Cd)return;break}c.push(r.slice(a,y)),v++,a=y+1}for(o=c.join(nt),i=c.splice(1,1)[0]||[],a=0,l=i.length,v--,u=!1,D=[];a<l;){if(p=i.charAt(a),p===ln){if(d=null,u===!1){if(E===!1)return}else D.push(u),u=!1;E=!1}else if(p===Fd)d=!0,u=u||null;else if(p===gd)u===qo?u=bd:d&&u===null?u=Ad:u=qo;else if(!hd(p))return;a++}if(u!==!1&&D.push(u),!(D.length<vd)){if(t)return!0;for(A=-1,b=[],g=e(o).reset({type:"table",align:D,children:b});++A<v;){for(B=c[A],s={type:"tableRow",children:[]},A&&e(nt),e(B).reset(s,g),l=B.length+1,a=0,f="",h="",m=!0;a<l;){if(p=B.charAt(a),p===dd||p===md){h?f+=p:e(p),a++;continue}p===""||p===ln?m?e(p):((h||p)&&!m&&(o=h,f.length>1&&(p?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,F)},s)),e(f+p),f="",h=""):(f&&(h+=f,f=""),h+=p,p===Ed&&a!==l-2&&(h+=B.charAt(a+1),a++)),m=!1,a++}A||e(nt+i)}return g}}}});var Lo=C((aC,Oo)=>{"use strict";var wd=Ne(),xd=Kt(),kd=Zr();Oo.exports=qd;var Bd=" ",Cr=`
|
||||
`,Td=" ",Po=4;function qd(e,r,t){for(var n=this,a=n.options,i=a.commonmark,u=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Cr),l=r.length,c,f,p,d,D;s<l;){if(s===-1){s=l;break}if(r.charAt(s+1)===Cr)break;if(i){for(d=0,c=s+1;c<l;){if(p=r.charAt(c),p===Bd){d=Po;break}else if(p===Td)d++;else break;c++}if(d>=Po&&p!==Cr){s=r.indexOf(Cr,s+1);continue}}if(f=r.slice(s+1),kd(o,u,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Cr,s+1),s!==-1&&wd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(D=e.now(),f=xd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var Ro=C((oC,Io)=>{"use strict";Io.exports=_d;function _d(e,r){return e.indexOf("\\",r)}});var zo=C((sC,Uo)=>{"use strict";var Sd=Ro();Uo.exports=Mo;Mo.locator=Sd;var Pd=`
|
||||
`,No="\\";function Mo(e,r,t){var n=this,a,i;if(r.charAt(0)===No&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===Pd?i={type:"break"}:i={type:"text",value:a},e(No+a)(i))}});var fn=C((cC,Go)=>{"use strict";Go.exports=Od;function Od(e,r){return e.indexOf("<",r)}});var Wo=C((lC,jo)=>{"use strict";var Yo=oe(),Ld=dr(),Id=fn();jo.exports=dn;dn.locator=Id;dn.notInLink=!0;var $o="<",Dn=">",Vo="@",pn="/",hn="mailto:",it=hn.length;function dn(e,r,t){var n=this,a="",i=r.length,u=0,o="",s=!1,l="",c,f,p,d,D;if(r.charAt(0)===$o){for(u++,a=$o;u<i&&(c=r.charAt(u),!(Yo(c)||c===Dn||c===Vo||c===":"&&r.charAt(u+1)===pn));)o+=c,u++;if(o){if(l+=o,o="",c=r.charAt(u),l+=c,u++,c===Vo)s=!0;else{if(c!==":"||r.charAt(u+1)!==pn)return;l+=pn,u++}for(;u<i&&(c=r.charAt(u),!(Yo(c)||c===Dn));)o+=c,u++;if(c=r.charAt(u),!(!o||c!==Dn))return t?!0:(l+=o,p=l,a+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,it).toLowerCase()===hn?(p=p.slice(it),f.column+=it,f.offset+=it):l=hn+l),d=n.inlineTokenizers,n.inlineTokenizers={text:d.text},D=n.enterLink(),p=n.tokenizeInline(p,f),n.inlineTokenizers=d,D(),e(a)({type:"link",title:null,url:Ld(l,{nonTerminated:!1}),children:p}))}}}});var Ko=C((fC,Ho)=>{"use strict";Ho.exports=Rd;function Rd(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var Qo=C((DC,Jo)=>{"use strict";Jo.exports=Nd;var Xo=["www.","http://","https://"];function Nd(e,r){var t=-1,n,a,i;if(!this.options.gfm)return t;for(a=Xo.length,n=-1;++n<a;)i=e.indexOf(Xo[n],r),i!==-1&&(t===-1||i<t)&&(t=i);return t}});var ns=C((pC,ts)=>{"use strict";var Zo=Ko(),Md=dr(),Ud=Re(),mn=He(),zd=oe(),Gd=Qo();ts.exports=gn;gn.locator=Gd;gn.notInLink=!0;var Yd=33,$d=38,Vd=41,jd=42,Wd=44,Hd=45,Fn=46,Kd=58,Xd=59,Jd=63,Qd=60,es=95,Zd=126,e0="(",rs=")";function gn(e,r,t){var n=this,a=n.options.gfm,i=n.inlineTokenizers,u=r.length,o=-1,s=!1,l,c,f,p,d,D,h,m,F,A,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,p=4;else if(r.slice(0,7).toLowerCase()==="http://")p=7;else if(r.slice(0,8).toLowerCase()==="https://")p=8;else return;for(o=p-1,f=p,l=[];p<u;){if(h=r.charCodeAt(p),h===Fn){if(o===p-1)break;l.push(p),o=p,p++;continue}if(Ud(h)||mn(h)||h===Hd||h===es){p++;continue}break}if(h===Fn&&(l.pop(),p--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,r.slice(c,p).indexOf("_")===-1)){if(t)return!0;for(m=p,d=p;p<u&&(h=r.charCodeAt(p),!(zd(h)||h===Qd));)p++,h===Yd||h===jd||h===Wd||h===Fn||h===Kd||h===Jd||h===es||h===Zd||(m=p);if(p=m,r.charCodeAt(p-1)===Vd)for(D=r.slice(d,p),F=Zo(D,e0),A=Zo(D,rs);A>F;)p=d+D.lastIndexOf(rs),D=r.slice(d,p),A--;if(r.charCodeAt(p-1)===Xd&&(p--,mn(r.charCodeAt(p-1)))){for(m=p-2;mn(r.charCodeAt(m));)m--;r.charCodeAt(m)===$d&&(p=m)}return v=r.slice(0,p),b=Md(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:i.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=i,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var os=C((hC,as)=>{"use strict";var r0=Re(),t0=He(),n0=43,i0=45,u0=46,a0=95;as.exports=us;function us(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!is(e.charCodeAt(a-1)))return us.call(t,e,n+1);for(;a>r&&is(e.charCodeAt(a-1));)a--;return a}function is(e){return r0(e)||t0(e)||e===n0||e===i0||e===u0||e===a0}});var fs=C((dC,ls)=>{"use strict";var o0=dr(),ss=Re(),cs=He(),s0=os();ls.exports=Cn;Cn.locator=s0;Cn.notInLink=!0;var c0=43,En=45,ut=46,l0=64,vn=95;function Cn(e,r,t){var n=this,a=n.options.gfm,i=n.inlineTokenizers,u=0,o=r.length,s=-1,l,c,f,p;if(a){for(l=r.charCodeAt(u);ss(l)||cs(l)||l===c0||l===En||l===ut||l===vn;)l=r.charCodeAt(++u);if(u!==0&&l===l0){for(u++;u<o;){if(l=r.charCodeAt(u),ss(l)||cs(l)||l===En||l===ut||l===vn){u++,s===-1&&l===ut&&(s=u);continue}break}if(!(s===-1||s===u||l===En||l===vn))return l===ut&&u--,c=r.slice(0,u),t?!0:(p=n.enterLink(),n.inlineTokenizers={text:i.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=i,p(),e(c)({type:"link",title:null,url:"mailto:"+o0(c,{nonTerminated:!1}),children:f}))}}}});var hs=C((mC,ps)=>{"use strict";var f0=He(),D0=fn(),p0=an().tag;ps.exports=Ds;Ds.locator=D0;var h0="<",d0="?",m0="!",F0="/",g0=/^<a /i,E0=/^<\/a>/i;function Ds(e,r,t){var n=this,a=r.length,i,u;if(!(r.charAt(0)!==h0||a<3)&&(i=r.charAt(1),!(!f0(i)&&i!==d0&&i!==m0&&i!==F0)&&(u=r.match(p0),!!u)))return t?!0:(u=u[0],!n.inLink&&g0.test(u)?n.inLink=!0:n.inLink&&E0.test(u)&&(n.inLink=!1),e(u)({type:"html",value:u}))}});var bn=C((FC,ds)=>{"use strict";ds.exports=v0;function v0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t<n?t:n}});var bs=C((gC,Cs)=>{"use strict";var br=oe(),C0=bn();Cs.exports=vs;vs.locator=C0;var b0=`
|
||||
`,A0="!",ms='"',Fs="'",er="(",Ar=")",An="<",yn=">",gs="[",yr="\\",y0="]",Es="`";function vs(e,r,t){var n=this,a="",i=0,u=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,p,d,D,h,m,F,A,v,B,b,g,y,w,E,x,k;if(u===A0&&(F=!0,a=u,u=r.charAt(++i)),u===gs&&!(!F&&n.inLink)){for(a+=u,y="",i++,B=r.length,E=e.now(),g=0,E.column+=i,E.offset+=i;i<B;){if(u=r.charAt(i),h=u,u===Es){for(f=1;r.charAt(i+1)===Es;)h+=u,i++,f++;p?f>=p&&(p=0):p=f}else if(u===yr)i++,h+=r.charAt(i);else if((!p||l)&&u===gs)g++;else if((!p||l)&&u===y0)if(g)g--;else{if(r.charAt(i+1)!==er)return;h+=er,c=!0,i++;break}y+=h,h="",i++}if(c){for(A=y,a+=y+h,i++;i<B&&(u=r.charAt(i),!!br(u));)a+=u,i++;if(u=r.charAt(i),y="",d=a,u===An){for(i++,d+=An;i<B&&(u=r.charAt(i),u!==yn);){if(s&&u===b0)return;y+=u,i++}if(r.charAt(i)!==yn)return;a+=An+y+yn,w=y,i++}else{for(u=null,h="";i<B&&(u=r.charAt(i),!(h&&(u===ms||u===Fs||s&&u===er)));){if(br(u)){if(!o)break;h+=u}else{if(u===er)g++;else if(u===Ar){if(g===0)break;g--}y+=h,h="",u===yr&&(y+=yr,u=r.charAt(++i)),y+=u}i++}a+=y,w=y,i=a.length}for(y="";i<B&&(u=r.charAt(i),!!br(u));)y+=u,i++;if(u=r.charAt(i),a+=y,y&&(u===ms||u===Fs||s&&u===er))if(i++,a+=u,y="",v=u===er?Ar:u,D=a,s){for(;i<B&&(u=r.charAt(i),u!==v);)u===yr&&(y+=yr,u=r.charAt(++i)),i++,y+=u;if(u=r.charAt(i),u!==v)return;for(b=y,a+=y+u,i++;i<B&&(u=r.charAt(i),!!br(u));)a+=u,i++}else for(h="";i<B;){if(u=r.charAt(i),u===v)m&&(y+=v+h,h=""),m=!0;else if(!m)y+=u;else if(u===Ar){a+=y+v+h,b=y;break}else br(u)?h+=u:(y+=v+h+u,h="",m=!1);i++}if(r.charAt(i)===Ar)return t?!0:(a+=Ar,w=n.decode.raw(n.unescape(w),e(d).test().end,{nonTerminated:!1}),b&&(D=e(D).test().end,b=n.decode.raw(n.unescape(b),D)),k={type:F?"image":"link",title:b||null,url:w},F?k.alt=n.decode.raw(n.unescape(A),E)||null:(x=n.enterLink(),k.children=n.tokenizeInline(A,E),x()),e(a)(k))}}}});var ws=C((EC,ys)=>{"use strict";var w0=oe(),x0=bn(),k0=on();ys.exports=As;As.locator=x0;var wn="link",B0="image",T0="shortcut",q0="collapsed",xn="full",_0="!",at="[",ot="\\",st="]";function As(e,r,t){var n=this,a=n.options.commonmark,i=r.charAt(0),u=0,o=r.length,s="",l="",c=wn,f=T0,p,d,D,h,m,F,A,v;if(i===_0&&(c=B0,l=i,i=r.charAt(++u)),i===at){for(u++,l+=i,F="",v=0;u<o;){if(i=r.charAt(u),i===at)A=!0,v++;else if(i===st){if(!v)break;v--}i===ot&&(F+=ot,i=r.charAt(++u)),F+=i,u++}if(s=F,p=F,i=r.charAt(u),i===st){if(u++,s+=i,F="",!a)for(;u<o&&(i=r.charAt(u),!!w0(i));)F+=i,u++;if(i=r.charAt(u),i===at){for(d="",F+=i,u++;u<o&&(i=r.charAt(u),!(i===at||i===st));)i===ot&&(d+=ot,i=r.charAt(++u)),d+=i,u++;i=r.charAt(u),i===st?(f=d?xn:q0,F+=d+i,u++):d="",s+=F,F=""}else{if(!p)return;d=p}if(!(f!==xn&&A))return s=l+s,c===wn&&n.inLink?null:t?!0:(D=e.now(),D.column+=l.length,D.offset+=l.length,d=f===xn?d:p,h={type:c+"Reference",identifier:k0(d),label:d,referenceType:f},c===wn?(m=n.enterLink(),h.children=n.tokenizeInline(p,D),m()):h.alt=n.decode.raw(n.unescape(p),D)||null,e(s)(h))}}}});var ks=C((vC,xs)=>{"use strict";xs.exports=S0;function S0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n<t?n:t}});var _s=C((CC,qs)=>{"use strict";var P0=Ne(),Bs=oe(),O0=ks();qs.exports=Ts;Ts.locator=O0;var L0="\\",I0="*",R0="_";function Ts(e,r,t){var n=this,a=0,i=r.charAt(a),u,o,s,l,c,f,p;if(!(i!==I0&&i!==R0||r.charAt(++a)!==i)&&(o=n.options.pedantic,s=i,c=s+s,f=r.length,a++,l="",i="",!(o&&Bs(r.charAt(a)))))for(;a<f;){if(p=i,i=r.charAt(a),i===s&&r.charAt(a+1)===s&&(!o||!Bs(p))&&(i=r.charAt(a+2),i!==s))return P0(l)?t?!0:(u=e.now(),u.column+=2,u.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,u)})):void 0;!o&&i===L0&&(l+=i,i=r.charAt(++a)),l+=i,a++}}});var Ps=C((bC,Ss)=>{"use strict";Ss.exports=U0;var N0=String.fromCharCode,M0=/\w/;function U0(e){return M0.test(typeof e=="number"?N0(e):e.charAt(0))}});var Ls=C((AC,Os)=>{"use strict";Os.exports=z0;function z0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n<t?n:t}});var Us=C((yC,Ms)=>{"use strict";var G0=Ne(),Y0=Ps(),Is=oe(),$0=Ls();Ms.exports=Ns;Ns.locator=$0;var V0="*",Rs="_",j0="\\";function Ns(e,r,t){var n=this,a=0,i=r.charAt(a),u,o,s,l,c,f,p;if(!(i!==V0&&i!==Rs)&&(o=n.options.pedantic,c=i,s=i,f=r.length,a++,l="",i="",!(o&&Is(r.charAt(a)))))for(;a<f;){if(p=i,i=r.charAt(a),i===s&&(!o||!Is(p))){if(i=r.charAt(++a),i!==s){if(!G0(l)||p===s)return;if(!o&&s===Rs&&Y0(i)){l+=s;continue}return t?!0:(u=e.now(),u.column++,u.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,u)}))}l+=s}!o&&i===j0&&(l+=i,i=r.charAt(++a)),l+=i,a++}}});var Gs=C((wC,zs)=>{"use strict";zs.exports=W0;function W0(e,r){return e.indexOf("~~",r)}});var Ws=C((xC,js)=>{"use strict";var Ys=oe(),H0=Gs();js.exports=Vs;Vs.locator=H0;var ct="~",$s="~~";function Vs(e,r,t){var n=this,a="",i="",u="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==ct||r.charAt(1)!==ct||Ys(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(a=r.charAt(s),a===ct&&i===ct&&(!u||!Ys(u)))return t?!0:e($s+o+$s)({type:"delete",children:n.tokenizeInline(o,c)});o+=i,uLine truncated
|
||||
`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var nc=C((qC,tc)=>{"use strict";var Q0=ec();tc.exports=rc;rc.locator=Q0;var Z0=" ",em=`
|
||||
`,rm=2;function rc(e,r,t){for(var n=r.length,a=-1,i="",u;++a<n;){if(u=r.charAt(a),u===em)return a<rm?void 0:t?!0:(i+=u,e(i)({type:"break"}));if(u!==Z0)return;i+=u}}});var uc=C((_C,ic)=>{"use strict";ic.exports=tm;function tm(e,r,t){var n=this,a,i,u,o,s,l,c,f,p,d;if(t)return!0;for(a=n.inlineMethods,o=a.length,i=n.inlineTokenizers,u=-1,p=r.length;++u<o;)f=a[u],!(f==="text"||!i[f])&&(c=i[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,r,1),l!==-1&&l<p&&(p=l));s=r.slice(0,p),d=e.now(),n.decode(s,d,D);function D(h,m,F){e(F||h)({type:"text",value:h})}}});var cc=C((SC,sc)=>{"use strict";var nm=Ie(),lt=wu(),im=ku(),um=Tu(),am=na(),qn=aa();sc.exports=ac;function ac(e,r){this.file=r,this.offset={},this.options=nm(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=im(r).toOffset,this.unescape=um(this,"escape"),this.decode=am(this)}var M=ac.prototype;M.setOptions=ha();M.parse=qa();M.options=jt();M.exitStart=lt("atStart",!0);M.enterList=lt("inList",!1);M.enterLink=lt("inLink",!1);M.enterBlock=lt("inBlock",!1);M.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];M.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];M.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];M.blockTokenizers={blankLine:Sa(),indentedCode:Ra(),fencedCode:Ua(),blockquote:ja(),atxHeading:Ka(),thematicBreak:Qa(),list:co(),setextHeading:po(),html:vo(),definition:To(),table:So(),paragraph:Lo()};M.inlineTokenizers={escape:zo(),autoLink:Wo(),url:ns(),email:fs(),html:hs(),link:bs(),reference:ws(),strong:_s(),emphasis:Us(),deletion:Ws(),code:Qs(),break:nc(),text:uc()};M.blockMethods=oc(M.blockTokenizers);M.inlineMethods=oc(M.inlineTokenizers);M.tokenizeBlock=qn("block");M.tokenizeInline=qn("inline");M.tokenizeFactory=qn;function oc(e){var r=[],t;for(t in e)r.push(t);return r}});var pc=C((PC,Dc)=>{"use strict";var om=Au(),sm=Ie(),lc=cc();Dc.exports=fc;fc.Parser=lc;function fc(e){var r=this.data("settings"),t=om(lc);t.prototype.options=sm(t.prototype.options,r,e),this.Parser=t}});var dc=C((OC,hc)=>{"use strict";hc.exports=cm;function cm(e){if(e)throw e}});var _n=C((LC,mc)=>{mc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var wc=C((IC,yc)=>{"use strict";var ft=Object.prototype.hasOwnProperty,Ac=Object.prototype.toString,Fc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,Ec=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Ac.call(r)==="[object Array]"},vc=function(r){if(!r||Ac.call(r)!=="[object Object]")return!1;var t=ft.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&ft.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||ft.call(r,a)},Cc=function(r,t){Fc&&t.name==="__proto__"?Fc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},bc=function(r,t){if(t==="__proto__")if(ft.call(r,t)){if(gc)return gc(r,t).value}else return;return r[t]};yc.exports=function e(){var r,t,n,a,i,u,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(r=arguments[s],r!=null)for(t in r)n=bc(o,t),a=bc(r,t),o!==a&&(c&&a&&(vc(a)||(i=Ec(a)))?(i?(i=!1,u=n&&Ec(n)?n:[]):u=n&&vc(n)?n:{},Cc(o,{name:t,newValue:e(c,u,a)})):typeof a<"u"&&Cc(o,{name:t,newValue:a}));return o}});var kc=C((RC,xc)=>{"use strict";xc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var Tc=C((NC,Bc)=>{"use strict";var lm=[].slice;Bc.exports=fm;function fm(e,r){var t;return n;function n(){var u=lm.call(arguments,0),o=e.length>u.length,s;o&&u.push(a);try{s=e.apply(null,u)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(i,a):s instanceof Error?a(s):i(s))}function a(){t||(t=!0,r.apply(null,arguments))}function i(u){a(null,u)}}});var Oc=C((MC,Pc)=>{"use strict";var _c=Tc();Pc.exports=Sc;Sc.wrap=_c;var qc=[].slice;function Sc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,i=qc.call(arguments,0,-1),u=arguments[arguments.length-1];if(typeof u!="function")throw new Error("Expected function as last argument, not "+u);o.apply(null,[null].concat(i));function o(s){var l=e[++a],c=qc.call(arguments,0),f=c.slice(1),p=i.length,d=-1;if(s){u(s);return}for(;++d<p;)(f[d]===null||f[d]===void 0)&&(f[d]=i[d]);i=f,l?_c(l,o).apply(null,i):u.apply(null,[null].concat(i))}}funct
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(G(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=Ol([...Tr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var dt=class extends Error{name="InvalidDocError";constructor(r){super(Ll(r)),this.doc=r}},Te=dt;var Kn={};function Il(e,r,t,n){let a=[e];for(;a.length>0;){let i=a.pop();if(i===Kn){t(a.pop());continue}t&&a.push(i,Kn);let u=G(i);if(!u)throw new Te(i);if((r==null?void 0:r(i))!==!1)switch(u){case H:case J:{let o=u===H?i:i.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case K:a.push(i.flatContents,i.breakContents);break;case X:if(n&&i.expandedStates)for(let o=i.expandedStates.length,s=o-1;s>=0;--s)a.push(i.expandedStates[s]);else a.push(i.contents);break;case te:case re:case De:case de:case pe:a.push(i.contents);break;case Y:case Ce:case fe:case he:case $:case ne:break;default:throw new Te(i)}}}var mt=Il;function Rl(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(i){if(t.has(i))return t.get(i);let u=a(i);return t.set(i,u),u}function a(i){switch(G(i)){case H:return r(i.map(n));case J:return r({...i,parts:i.parts.map(n)});case K:return r({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case X:{let{expandedStates:u,contents:o}=i;return u?(u=u.map(n),o=u[0]):o=n(o),r({...i,contents:o,expandedStates:u})}case te:case re:case De:case de:case pe:return r({...i,contents:n(i.contents)});case Y:case Ce:case fe:case he:case $:case ne:return r(i);default:throw new Te(i)}}}function Xn(e){if(e.length>0){let r=z(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Jn(e){let r=new Set,t=[];function n(i){if(i.type===ne&&Xn(t),i.type===X){if(t.push(i),r.has(i))return!1;r.add(i)}}function a(i){i.type===X&&t.pop().break&&Xn(t)}mt(e,n,a,!0)}function be(e,r=nr){return Rl(e,t=>typeof t=="string"?qr(r,t.split(`
|
||||
`)):t)}var Ft=()=>{},qe=Ft,gt=Ft,Qn=Ft;function ir(e){return qe(e),{type:re,contents:e}}function Ae(e,r){return qe(r),{type:te,contents:r,n:e}}function Ue(e,r={}){return qe(e),gt(r.expandedStates,!0),{type:X,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function _e(e){return Ae({type:"root"},e)}function ze(e){return Qn(e),{type:J,parts:e}}function Zn(e,r="",t={}){return qe(e),r!==""&&qe(r),{type:K,breakContents:e,flatContents:r,groupId:t.groupId}}var ur={type:ne};var ar={type:$,hard:!0},Nl={type:$,hard:!0,literal:!0},_r={type:$},Sr={type:$,soft:!0},L=[ar,ur],nr=[Nl,ur];function qr(e,r){qe(e),gt(r);let t=[];for(let n=0;n<r.length;n++)n!==0&&t.push(e),t.push(r[n]);return t}function Ml(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));return t===null?0:t.reduce((n,a)=>Math.max(n,a.length/r.length),0)}var Pr=Ml;function Ul(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));if(t===null)return 0;let n=new Map,a=0;for(let i of t){let u=i.length/r.length;n.set(u,!0),u>a&&(a=u)}for(let i=1;i<a;i++)if(!n.get(i))return i;return a+1}var ei=Ul;var Or="'",ri='"';function zl(e,r){let t=r===!0||r===Or?Or:ri,n=t===Or?ri:Or,a=0,i=0;for(let u of e)u===t?a++:u===n&&i++;return a>i?n:t}var ti=zl;var Et=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},ni=Et;var li=Me(Br(),1);function Gl(e){return(e==null?void 0:e.type)==="front-matter"}var ii=Gl;var ui=["noformat","noprettier"],Lr=["format","prettier"],ai="format";var or=3;function Yl(e){let r=e.slice(0,or);if(r!=="---"&&r!=="+++")return;let t=e.indexOf(`
|
||||
`,or);if(t===-1)return;let n=e.slice(or,t).trim(),a=e.indexOf(`
|
||||
${r}`,t),i=n;if(i||(i=r==="+++"?"toml":"yaml"),a===-1&&r==="---"&&i==="yaml"&&(a=e.indexOf(`
|
||||
...`,t)),a===-1)return;let u=a+1+or,o=e.charAt(u+1);if(!/\s?/u.test(o))return;let s=e.slice(0,u);return{type:"front-matter",language:i,explicitLanguage:n,value:e.slice(t+1,a),startDelimiter:r,endDelimiter:s.slice(-or),raw:s}}function $l(e){let r=Yl(e);if(!r)return{content:e};let{raw:t}=r;return{frontMatter:r,content:R(!1,t,/[^\n]/gu," ")+e.slice(t.length)}}var Ge=$l;function Ir(e,r){let t=`@(${r.join("|")})`,n=new RegExp([`<!--\\s*${t}\\s*-->`,`\\{\\s*\\/\\*\\s*${t}\\s*\\*\\/\\s*\\}`,`<!--.*\r?
|
||||
[\\s\\S]*(^|
|
||||
)[^\\S
|
||||
]*${t}[^\\S
|
||||
]*($|
|
||||
)[\\s\\S]*
|
||||
.*-->`].join("|"),"mu"),a=e.match(n);return(a==null?void 0:a.index)===0}var oi=e=>Ir(Ge(e).content.trimStart(),Lr),si=e=>Ir(Ge(e).content.trimStart(),ui),ci=e=>{let r=Ge(e),t=`<!-- @${ai} -->`;return r.frontMatter?`${r.frontMatter.raw}
|
||||
|
||||
${t}
|
||||
|
||||
${r.content}`:`${t}
|
||||
|
||||
${r.content}`};var Vl=new Set(["position","raw"]);function fi(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=R(!1,e.value,`
|
||||
`," ")),e.type==="wikiLink"&&(r.value=R(!1,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,li.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=R(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=R(!1,e.title,/\\(?=["')])/gu,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||ii(t.children[0])&&t.children[1]===e)&&e.type==="html"&&Ir(e.value,Lr))return null}fi.ignoredProperties=Vl;var Di=fi;var pi=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Se=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;async function jl(e,r){if(e.language==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return _e([e.startDelimiter,e.explicitLanguage,L,n,n?L:"",e.endDelimiter])}}var hi=jl;var Wl=(e,r)=>{if(!(e&&r==null))return r.toReversed||!Array.isArray(r)?r.toReversed():[...r].reverse()},di=Wl;var mi,Fi,gi,Ei,vi,Hl=((mi=globalThis.Deno)==null?void 0:mi.build.os)==="windows"||((gi=(Fi=globalThis.navigator)==null?void 0:Fi.platform)==null?void 0:gi.startsWith("Win"))||((vi=(Ei=globalThis.process)==null?void 0:Ei.platform)==null?void 0:vi.startsWith("win"))||!1;function Ci(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Kl(e){return e=Ci(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Xl(e){e=Ci(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function bi(e){return Hl?Xl(e):Kl(e)}var Ai=bi;var Jl=e=>String(e).split(/[/\\]/u).pop();function yi(e,r){if(!r)return;let t=Jl(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Ql(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function wi(e,r){if(r){if(String(r).startsWith("file:"))try{r=Ai(r)}catch{return}if(typeof r=="string")return e.find(({isSupported:t})=>t==null?void 0:t({filepath:r}))}}function Zl(e,r){let t=di(!1,e.plugins).flatMap(a=>a.languages??[]),n=Ql(t,r.language)??yi(t,r.physicalFile)??yi(t,r.file)??wi(t,r.physicalFile)??wi(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var xi=Zl;var ef=new Proxy(()=>{},{get:()=>ef});function Pe(e){return e.position.start.offset}function Oe(e){return e.position.end.offset}var vt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Rr=new Set([...vt,"tableCell","paragraph","heading"]),$e="non-cjk",ie="cj-letter",Le="k-letter",sr="cjk-punctuation",rf=/\p{Script_Extensions=Hangul}/u;function Nr(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[a,i]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/u.test(i)?`
|
||||
`:" "});continue}if((a===0||a===t.length-1)&&i==="")continue;let u=i.split(new RegExp(`(${pi.source})`,"u"));for(let[o,s]of u.entries())if(!((o===0||o===u.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:$e,isCJ:!1,hasLeadingPunctuation:Se.test(s[0]),hasTrailingPunctuation:Se.test(z(!1,s,-1))});continue}if(Se.test(s)){n({type:"word",value:s,kind:sr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(rf.test(s)){n({type:"word",value:s,kind:Le,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ie,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let i=z(!1,r,-1);(i==null?void 0:i.type)==="word"&&!u($e,sr)&&![i.value,a.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function u(o,s){return i.kind===o&&a.kind===s||i.kind===s&&a.kind===o}}}function Ye(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:a}=t.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/u).groups;return{number:Number(n),leadingSpaces:a}}function ki(e,r){return!e.ordered||e.children.length<2||Ye(e.children[1],r).number!==1?!1:Ye(e.children[0],r).number!==0?!0:e.children.length>2&&Ye(e.children[2],r).number===1}function Mr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(`
|
||||
`)&&r.endsWith(`
|
||||
`)?t.slice(0,-1):t}function ye(e,r){return function t(n,a,i){let u={...r(n,a,i)};return u.children&&(u.children=u.children.map((o,s)=>t(o,s,[u,...i]))),u}(e,null,[])}function Ct(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Pe(e)===Pe(r)&&Oe(e)===Oe(r)}function tf(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=xi(r,{language:t.lang});if(n)return async a=>{let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Pr(t.value,i)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Mr(t,r.originalText),o);return _e([u,t.lang,t.meta?" "+t.meta:"",L,be(s),L,u])}}switch(t.type){case"front-matter":return n=>hi(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var Bi=tf;var cr=null;function lr(e){if(cr!==null&&typeof cr.property){let r=cr;return cr=lr.prototype=null,r}return cr=lr.prototype=e??Object.create(null),new lr}var nf=10;for(let e=0;e<=nf;e++)lr();function bt(e){return lr(e)}function uf(e,r="type"){bt(e);function t(n){let a=n[r],i=e[a];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return i}return t}var Ti=uf;var af={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},qi=af;var of=Ti(qi),_i=of;function Si(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
||||
`;default:return`
|
||||
`}}var Pi=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC
Line truncated
|
||||
`?R(!1,D,`
|
||||
`,a):D;o.push(h),u.length>0&&(i+=fr(h));break}case H:for(let h=D.length-1;h>=0;h--)u.push({ind:p,mode:d,doc:D[h]});break;case Ce:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Ve),c++;break;case re:u.push({ind:lf(p,r),mode:d,doc:D.contents});break;case te:u.push({ind:ff(p,D.n,r),mode:d,doc:D.contents});break;case fe:i-=wt(o);break;case X:switch(d){case ue:if(!s){u.push({ind:p,mode:D.break?V:ue,doc:D.contents});break}case V:{s=!1;let h={ind:p,mode:ue,doc:D.contents},m=n-i,F=l.length>0;if(!D.break&&Ur(h,u,m,F,t))u.push(h);else if(D.expandedStates){let A=z(!1,D.expandedStates,-1);if(D.break){u.push({ind:p,mode:V,doc:A});break}else for(let v=1;v<D.expandedStates.length+1;v++)if(v>=D.expandedStates.length){u.push({ind:p,mode:V,doc:A});break}else{let B=D.expandedStates[v],b={ind:p,mode:ue,doc:B};if(Ur(b,u,m,F,t)){u.push(b);break}}}else u.push({ind:p,mode:V,doc:D.contents});break}}D.id&&(t[D.id]=z(!1,u,-1).mode);break;case J:{let h=n-i,m=D[At]??0,{parts:F}=D,A=F.length-m;if(A===0)break;let v=F[m+0],B=F[m+1],b={ind:p,mode:ue,doc:v},g={ind:p,mode:V,doc:v},y=Ur(b,[],h,l.length>0,t,!0);if(A===1){y?u.push(b):u.push(g);break}let w={ind:p,mode:ue,doc:B},E={ind:p,mode:V,doc:B};if(A===2){y?u.push(w,b):u.push(E,g);break}let x=F[m+2],k={ind:p,mode:d,doc:{...D,[At]:m+2}};Ur({ind:p,mode:ue,doc:[v,B,x]},[],h,l.length>0,t,!0)?u.push(k,w,b):y?u.push(k,E,b):u.push(k,E,g);break}case K:case De:{let h=D.groupId?t[D.groupId]:d;if(h===V){let m=D.type===K?D.breakContents:D.negate?D.contents:ir(D.contents);m&&u.push({ind:p,mode:d,doc:m})}if(h===ue){let m=D.type===K?D.flatContents:D.negate?ir(D.contents):D.contents;m&&u.push({ind:p,mode:d,doc:m})}break}case pe:l.push({ind:p,mode:d,doc:D.contents});break;case he:l.length>0&&u.push({ind:p,mode:d,doc:ar});break;case $:switch(d){case ue:if(D.hard)s=!0;else{D.soft||(o.push(" "),i+=1);break}case V:if(l.length>0){u.push({ind:p,mode:d,doc:D},...l.reverse()),l.length=0;break}D.literal?p.root?(o.push(a,p.root.value),i=p.root.length):(o.push(a),i=0):(i-=wt(o),o.push(a+p.value),i=p.length);break}break;case de:u.push({ind:p,mode:d,doc:D.contents});break;case ne:break;default:throw new Te(D)}u.length===0&&l.length>0&&(u.push(...l.reverse()),l.length=0)}let f=o.indexOf(Ve);if(f!==-1){let p=o.indexOf(Ve,f+1);if(p===-1)return{formatted:o.filter(m=>m!==Ve).join("")};let d=o.slice(0,f).join(""),D=o.slice(f+1,p).join(""),h=o.slice(p+1).join("");return{formatted:d+D+h,cursorNodeStart:d.length,cursorNodeText:D}}return{formatted:o.join("")}}function Mi(e,r,t){let{node:n}=e,a=[],i=e.map(()=>e.map(({index:f})=>{let p=Ni(t(),r).formatted,d=fr(p);return a[f]=Math.max(a[f]??3,d),{text:p,width:d}},"children"),"children"),u=s(!1);if(r.proseWrap!=="never")return[ur,u];let o=s(!0);return[ur,Ue(Zn(o,u))];function s(f){return qr(ar,[c(i[0],f),l(f),...i.slice(1).map(p=>c(p,f))].map(p=>`| ${p.join(" | ")} |`))}function l(f){return a.map((p,d)=>{let D=n.align[d],h=D==="center"||D==="left"?":":"-",m=D==="center"||D==="right"?":":"-",F=f?"-":"-".repeat(p-2);return`${h}${F}${m}`})}function c(f,p){return f.map(({text:d,width:D},h)=>{if(p)return d;let m=a[h]-D,F=n.align[h],A=0;F==="right"?A=m:F==="center"&&(A=Math.floor(m/2));let v=m-A;return`${" ".repeat(A)}${d}${" ".repeat(v)}`})}}function Ui(e,r,t){let n=e.map(t,"children");return Df(n)}function Df(e){let r=[""];return function t(n){for(let a of n){let i=G(a);if(i===H){t(a);continue}let u=a,o=[];i===J&&([u,...o]=a.parts),r.push([r.pop(),u],...o)}}(e),ze(r)}var Q,xt=class{constructor(r){jn(this,Q);Wn(this,Q,new Set(r))}getLeadingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=0;a<r.length&&t.has(r.charAt(a));a++)n++;return n}getTrailingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=r.length-1;a>=0&&t.has(r.charAt(a));a--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return ce(this,Q).has(r.charAt(0))}hasTrailingWhitespace(r){return ce(this,Q).has(z(!1,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${le([...ce(this,Q)].join(""))}]+`,a=new RegExp(t?`(${n})`:n,"u");return r.split(a)}hasWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=ce(this,Q);return Array.prototype.every.call(r,n=>t.has(n))}};Q=new WeakMap;var zi=xt;var pf=[" ",`
|
||||
`,"\f","\r"," "],hf=new zi(pf),kt=hf;var df=/^\\?.$/su,mf=/^\n *>[ >]*$/u;function Ff(e,r){return e=gf(e,r),e=vf(e),e=bf(e,r),e=Af(e,r),e=Cf(e),e}function gf(e,r){return ye(e,t=>{if(t.type!=="text")return t;let{value:n}=t;if(n==="*"||n==="_"||!df.test(n)||t.position.end.offset-t.position.start.offset===n.length)return t;let a=r.originalText.slice(t.position.start.offset,t.position.end.offset);return mf.test(a)?t:{...t,value:a}})}function Ef(e,r,t){return ye(e,n=>{if(!n.children)return n;let a=n.children.reduce((i,u)=>{let o=z(!1,i,-1);return o&&r(o,u)?i.splice(-1,1,t(o,u)):i.push(u),i},[]);return{...n,children:a}})}function vf(e){return Ef(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Cf(e){return ye(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=kt.trimStart(a)),t===n.children.length-1&&(a=kt.trimEnd(a))),{type:"sentence",position:r.position,children:Nr(a)}})}function bf(e,r){return ye(e,(t,n,a)=>{if(t.type==="code"){let i=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=i,i)for(let u=0;u<a.length;u++){let o=a[u];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return t})}function Af(e,r){return ye(e,(a,i,u)=>{if(a.type==="list"&&a.children.length>0){for(let o=0;o<u.length;o++){let s=u[o];if(s.type==="list"&&!s.isAligned)return a.isAligned=!1,a}a.isAligned=n(a)}return a});function t(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[i,u]=a.children;if(Ye(i,r).leadingSpaces.length>1)return!0;let s=t(i);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(u);return s!==l?!1:s%r.tabWidth===0?!0:Ye(u,r).leadingSpaces.length>1}}var Gi=Ff;function Yi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,a=r();switch(n.type){case"whitespace":if(G(a)!==Y){t.push(a,"");break}default:t.push([t.pop(),a])}},"children"),ze(t)}var yf=new Set(["heading","tableCell","link","wikiLink"]),$i=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function wf({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;n<t.length-1;++n){let a=t[n];if(a.type==="whitespace"&&(a.value===" "||a.value==="")){let i=t[n-1].kind,u=t[n+1].kind;(i===ie&&u===$e||i===$e&&u===ie)&&++r[a.value]}}e.usesCJSpaces=r[" "]>r[""]}return e.usesCJSpaces}function xf(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,i=n.kind;return Vi(a)&&Vi(i)||a===Le&&i===ie||i===Le&&a===ie?!0:a===sr||i===sr||a===ie&&i===ie?!1:$i.has(n.value[0])||$i.has(z(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:wf(e)}function Vi(e){return e===$e||e===Le}function kf(e,r,t,n){if(t!=="always"||e.hasAncestor(u=>yf.has(u.type)))return!1;if(n)return r!=="";let{previous:a,next:i}=e;return!a||!i?!0:r===""?!1:a.kind===Le&&i.kind===ie||i.kind===Le&&a.kind===ie?!0:!(a.isCJ||i.isCJ)}function Bt(e,r,t,n){if(t==="preserve"&&r===`
|
||||
`)return L;let a=r===" "||r===`
|
||||
`&&xf(e,n);return kf(e,r,t,n)?a?_r:Sr:a?" ":""}var Bf=new Set(["listItem","definition"]);function ji(e){var a,i;let{previous:r,next:t}=e;return(r==null?void 0:r.type)==="sentence"&&((a=z(!1,r.children,-1))==null?void 0:a.type)==="word"&&!z(!1,r.children,-1).hasTrailingPunctuation||(t==null?void 0:t.type)==="sentence"&&((i=t.children[0])==null?void 0:i.type)==="word"&&!t.children[0].hasLeadingPunctuation}function Tf(e,r,t){var a;let{node:n}=e;if(Lf(e)){let i=[""],u=Nr(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let o of u){if(o.type==="word"){i.push([i.pop(),o.value]);continue}let s=Bt(e,o.value,r.proseWrap,!0);if(G(s)===Y){i.push([i.pop(),s]);continue}i.push(s,"")}return ze(i)}switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Sf(e,r,t),L];case"paragraph":return Ui(e,r,t);case"sentence":return Yi(e,t);case"word":{let i=R(!1,R(!1,n.value,"*",String.raw`\*`),new RegExp([`(^|${Se.source})(_+)`,`(_+)(${Se.source}|$)`].join("|"),"gu"),(s,l,c,f,p)=>R(!1,c?`${l}${c}`:`${f}${p}`,"_",String.raw`\_`)),u=(s,l,c)=>s.type==="sentence"&&c===0,o=(s,l,c)=>Ct(s.children[c-1]);return i!==n.value&&(e.match(void 0,u,o)||e.match(void 0,u,(s,l,c)=>s.type==="emphasis"&&c===0,o))&&(i=i.replace(/^(\\?[*_])+/u,s=>R(!1,s,"\\",""))),i}case"whitespace":{let{next:i}=e,u=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return Bt(e,n.value,u)}case"emphasis":{let i;if(Ct(n.children[0]))i=r.originalText[n.position.start.offset];else{let u=ji(e),o=((a=e.parent)==null?void 0:a.type)==="strong"&&ji(e.ancestors);i=u||o||e.hasAncestor(s=>s.type==="emphasis")?"*":"_"}return[i,j(e,r,t),i]}case"strong":return["**",j(e,r,t),"**"];case"delete":return["~~",j(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:R(!1,n.value,`
|
||||
`," "),u=ei(i,"`"),o="`".repeat(u||1),s=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[o,s,i,s,o]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=R(!1,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",j(e,r,t),"](",Tt(n.url,")"),zr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),zr(n.title,r),")"];case"blockquote":return["> ",Ae("> ",j(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",j(e,r,t)];case"code":{if(n.isIndented){let o=" ".repeat(4);return Ae(o,[o,be(n.value,L)])}let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Pr(n.value,i)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",L,be(Mr(n,r.originalText),L),L,u]}case"html":{let{parent:i,isLast:u}=e,o=i.type==="root"&&u?n.value.trimEnd():n.value,s=/^<!--.*-->$/su.test(o);return be(o,s?L:_e(nr))}case"list":{let i=Hi(n,e.parent),u=ki(n,r);return j(e,r,t,{processor(o){let s=c(),l=o.node;if(l.children.length===2&&l.children[1].type==="html"&&l.children[0].position.start.column!==l.children[1].position.start.column)return[s,Wi(o,r,t,s)];return[s,Ae(" ".repeat(s.length),Wi(o,r,t,s))];function c(){let f=n.ordered?(o.isFirst?n.start:u?1:n.start+o.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?qf(f,r):f}}})}case"thematicBreak":{let{ancestors:i}=e,u=i.findIndex(s=>s.type==="list");return u===-1?"---":Hi(i[u],i[u+1])%2===0?"***":"---"}case"linkReference":return["[",j(e,r,t),"]",n.referenceType==="full"?qt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",qt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?_r:" ";return Ue([qt(n),":",ir([i,Tt(n.url),n.title===null?"":[i,zr(n.title,r,!1)]])])}case"footnote":return["[^",j(e,r,t),"]"];case"footnoteReference":return Qi(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Qi(n),": ",i?j(e,r,t):Ue([Ae(" ".repeat(4),j(e,r,t,{processor:({isFirst:u})=>u?Ue([Sr,t()]):t()}))])]}case"table":return Mi(e,r,t);case"tableCell":return j(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",_e(nr)]:["\\",L];case"liquidNode":return be(n.value,L);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",L,n.value?[be(n.value,L),L]:"","$$"];case"inlineMath":return r.originalText.slice(Pe(n),Oe(n));case"tableRow":case"listItem":case"text":default:throw new ni(n,"Markdown")}}function Wi(e,r,t,n){let{node:a}=e,i=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[i,j(e,r,t,{processor({node:u,isFirst:o}){if(o&&u.type!=="list")return Ae(" ".repeat(i.length),t());let s=" ".repeat(Rf(r.tabWidth-n.length,0,3));return[s,Ae(s,t())]}})]}function qf(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function Hi(e,r){return _f(e,r,t=>t.ordered===e.ordered)}function _f(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function Sf(e,r,t){let n=[],a=null,{children:i}=e.node;for(let[u,o]of i.entries())switch(_t(o)){case"start":a===null&&(a={index:u,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:u,offset:o.position.start.offset}}),a=null);break;default:break}return j(e,r,t,{processor({index:u}){if(n.length>0){let o=n[0];if(u===o.start.index)return[Ki(i[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),Ki(i[o.end.index])];if(o.start.index<u&&u<o.end.index)return!1;if(u===o.end.index)return n.shift(),!1}return t()}})}function j(e,r,t,n={}){let{processor:a=t}=n,i=[];return e.each(()=>{let u=a(e);u!==!1&&(i.length>0&&Pf(e)&&(i.push(L),(Of(e,r)||Ji(e))&&i.push(L),Ji(e)&&i.push(L)),i.push(u))},"children"),i}function Ki(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function _t(e){let r;if(e.type==="html")r=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function Pf({node:e,parent:r}){let t=vt.has(e.type),n=e.type==="html"&&Rr.has(r.type);return!t&&!n}function Xi(e,r){retLine truncated
|
||||
`)}function Of({node:e,previous:r,parent:t},n){if(Xi(r,n)||e.type==="list"&&t.type==="listItem"&&r.type==="code")return!0;let i=r.type===e.type&&Bf.has(e.type),u=t.type==="listItem"&&(e.type==="list"||!Xi(t,n)),o=_t(r)==="next",s=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,l=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||u||o||s||l)}function Ji({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function Lf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var If=(e,r)=>{for(let t of r)e=R(!1,e,t,encodeURIComponent(t));return e};function Tt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>le(n)).join("|"),"u").test(e)?`<${If(e,"<>")}>`:e}function zr(e,r,t=!0){if(!e)return"";if(t)return" "+zr(e,r,!1);if(e=R(!1,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ti(e,r.singleQuote);return e=R(!1,e,"\\","\\\\"),e=R(!1,e,n,`\\${n}`),`${n}${e}${n}`}function Rf(e,r,t){return Math.max(r,Math.min(e,t))}function Nf(e){return e.index>0&&_t(e.previous)==="next"}function qt(e){return`[${(0,Zi.default)(e.label)}]`}function Qi(e){return`[^${e.label}]`}var Mf={preprocess:Gi,print:Tf,embed:Bi,massageAstNode:Di,hasPrettierIgnore:Nf,insertPragma:ci,getVisitorKeys:_i},eu=Mf;var ru=[{name:"Markdown",type:"prose",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:["contents.lr","README"],wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",extensions:[".mdx"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:[],wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}];var St={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Uf={proseWrap:St.proseWrap,singleQuote:St.singleQuote},tu=Uf;var zn={};Yn(zn,{markdown:()=>tF,mdx:()=>nF,remark:()=>tF});var gl=Me(iu(),1),El=Me(gu(),1),vl=Me(pc(),1),Cl=Me(al(),1);var Hm=/^import\s/u,Km=/^export\s/u,ol=String.raw`[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*|`,sl=/<!---->|<!---?[^>-](?:-?[^-])*-->/u,Xm=/^\{\s*\/\*(.*)\*\/\s*\}/u,Jm=`
|
||||
|
||||
`,cl=e=>Hm.test(e),Un=e=>Km.test(e),ll=(e,r)=>{let t=r.indexOf(Jm),n=r.slice(0,t);if(Un(n)||cl(n))return e(n)({type:Un(n)?"export":"import",value:n})},fl=(e,r)=>{let t=Xm.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};ll.locator=e=>Un(e)||cl(e)?-1:1;fl.locator=(e,r)=>e.indexOf("{",r);var Dl=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=ll,n.esComment=fl,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var Qm=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=Ge(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},pl=Qm;function Zm(){return e=>ye(e,(r,t,[n])=>r.type!=="html"||sl.test(r.value)||Rr.has(n.type)?r:{...r,type:"jsx"})}var hl=Zm;var eF=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let i=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(i)return n(i[0])({type:"liquidNode",value:i[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},dl=eF;var rF=function(){let e="wikiLink",r=/^\[\[(?<linkContents>.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(i,u){let o=r.exec(u);if(o){let s=o.groups.linkContents.trim();return i(o[0])({type:e,value:s})}}a.locator=function(i,u){return i.indexOf("[",u)}},ml=rF;function bl({isMDX:e}){return r=>{let t=(0,Cl.default)().use(vl.default,{commonmark:!0,...e&&{blocks:[ol]}}).use(gl.default).use(pl).use(El.default).use(e?Dl:Fl).use(dl).use(e?hl:Fl).use(ml);return t.run(t.parse(r))}}function Fl(){}var Al={astFormat:"mdast",hasPragma:oi,hasIgnorePragma:si,locStart:Pe,locEnd:Oe},tF={...Al,parse:bl({isMDX:!1})},nF={...Al,parse:bl({isMDX:!0})};var iF={mdast:eu};return Tl(uF);});
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
var yl=Object.create;var ht=Object.defineProperty;var xl=Object.getOwnPropertyDescriptor;var wl=Object.getOwnPropertyNames;var kl=Object.getPrototypeOf,Bl=Object.prototype.hasOwnProperty;var Yn=e=>{throw TypeError(e)};var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),$n=(e,r)=>{for(var t in r)ht(e,t,{get:r[t],enumerable:!0})},Tl=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of wl(r))!Bl.call(e,a)&&a!==t&&ht(e,a,{get:()=>r[a],enumerable:!(n=xl(r,a))||n.enumerable});return e};var Me=(e,r,t)=>(t=e!=null?yl(kl(e)):{},Tl(r||!e||!e.__esModule?ht(t,"default",{value:e,enumerable:!0}):t,e));var Vn=(e,r,t)=>r.has(e)||Yn("Cannot "+t);var ce=(e,r,t)=>(Vn(e,r,"read from private field"),t?t.call(e):r.get(e)),jn=(e,r,t)=>r.has(e)?Yn("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),Wn=(e,r,t,n)=>(Vn(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t);var kr=C((sF,Hn)=>{"use strict";Hn.exports=Sl;function Sl(e){return String(e).replace(/\s+/g," ")}});var iu=C((sv,nu)=>{"use strict";nu.exports=Vf;var Dr=9,zr=10,je=32,zf=33,Gf=58,We=91,Yf=92,Pt=93,pr=94,Gr=96,Yr=4,$f=1024;function Vf(e){var r=this.Parser,t=this.Compiler;jf(r)&&Hf(r,e),Wf(t)&&Kf(t)}function jf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Wf(e){return!!(e&&e.prototype&&e.prototype.visitors)}function Hf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,i=n.inlineTokenizers,u=n.blockMethods,o=n.inlineMethods,s=a.definition,l=i.reference,c=[],f=-1,p=u.length,d;++f<p;)d=u[f],!(d==="newline"||d==="indentedCode"||d==="paragraph"||d==="footnoteDefinition")&&c.push([d]);c.push(["footnoteDefinition"]),t.inlineNotes&&(Ot(o,"reference","inlineNote"),i.inlineNote=m),Ot(u,"definition","footnoteDefinition"),Ot(o,"reference","footnoteCall"),a.definition=A,a.footnoteDefinition=D,i.footnoteCall=h,i.reference=F,n.interruptFootnoteDefinition=c,F.locator=l.locator,h.locator=v,m.locator=B;function D(b,g,y){for(var x=this,E=x.interruptFootnoteDefinition,w=x.offset,k=g.length+1,T=0,q=[],N,P,S,_,O,Be,W,I,ee,Z,Ee,ve,U;T<k&&(_=g.charCodeAt(T),!(_!==Dr&&_!==je));)T++;if(g.charCodeAt(T++)===We&&g.charCodeAt(T++)===pr){for(P=T;T<k;){if(_=g.charCodeAt(T),_!==_||_===zr||_===Dr||_===je)return;if(_===Pt){S=T,T++;break}T++}if(!(S===void 0||P===S||g.charCodeAt(T++)!==Gf)){if(y)return!0;for(N=g.slice(P,S),O=b.now(),ee=0,Z=0,Ee=T,ve=[];T<k;){if(_=g.charCodeAt(T),_!==_||_===zr)U={start:ee,contentStart:Ee||T,contentEnd:T,end:T},ve.push(U),_===zr&&(ee=T+1,Z=0,Ee=void 0,U.end=ee);else if(Z!==void 0)if(_===je||_===Dr)Z+=_===je?1:Yr-Z%Yr,Z>Yr&&(Z=void 0,Ee=T);else{if(Z<Yr&&U&&(U.contentStart===U.contentEnd||Xf(E,a,x,[b,g.slice(T,$f),!0])))break;Z=void 0,Ee=T}T++}for(T=-1,k=ve.length;k>0&&(U=ve[k-1],U.contentStart===U.contentEnd);)k--;for(Be=b(g.slice(0,U.contentEnd));++T<k;)U=ve[T],w[O.line+T]=(w[O.line+T]||0)+(U.contentStart-U.start),q.push(g.slice(U.contentStart,U.end));return W=x.enterBlock(),I=x.tokenizeBlock(q.join(""),O),W(),Be({type:"footnoteDefinition",identifier:N.toLowerCase(),label:N,children:I})}}}function h(b,g,y){var x=g.length+1,E=0,w,k,T,q;if(g.charCodeAt(E++)===We&&g.charCodeAt(E++)===pr){for(k=E;E<x;){if(q=g.charCodeAt(E),q!==q||q===zr||q===Dr||q===je)return;if(q===Pt){T=E,E++;break}E++}if(!(T===void 0||k===T))return y?!0:(w=g.slice(k,T),b(g.slice(0,E))({type:"footnoteReference",identifier:w.toLowerCase(),label:w}))}}function m(b,g,y){var x=this,E=g.length+1,w=0,k=0,T,q,N,P,S,_,O;if(g.charCodeAt(w++)===pr&&g.charCodeAt(w++)===We){for(N=w;w<E;){if(q=g.charCodeAt(w),q!==q)return;if(_===void 0)if(q===Yf)w+=2;else if(q===We)k++,w++;else if(q===Pt)if(k===0){P=w,w++;break}else k--,w++;else if(q===Gr){for(S=w,_=1;g.charCodeAt(S+_)===Gr;)_++;w+=_}else w++;else if(q===Gr){for(S=w,O=1;g.charCodeAt(S+O)===Gr;)O++;w+=O,_===O&&(_=void 0),O=void 0}else w++}if(P!==void 0)return y?!0:(T=b.now(),T.column+=2,T.offset+=2,b(g.slice(0,w))({type:"footnote",children:x.tokenizeInline(g.slice(N,P),T)}))}}function F(b,g,y){var x=0;if(g.charCodeAt(x)===zf&&x++,g.charCodeAt(x)===We&&g.charCodeAt(x+1)!==pr)return l.call(this,b,g,y)}function A(b,g,y){for(var x=0,E=g.charCodeAt(x);E===je||E===Dr;)E=g.charCodeAt(++x);if(E===We&&g.charCodeAt(x+1)!==pr)return s.call(this,b,g,y)}function v(b,g){return b.indexOf("[",g)}function B(b,g){return b.indexOf("^[",g)}}function Kf(e){var r=e.prototype.visitors,t=" ";r.footnote=n,r.footnoteReference=a,r.footnoteDefinition=i;function n(u){return"^["+this.all(u).join("")+"]"}function a(u){return"[^"+(u.label||u.identifier)+"]"}function i(u){for(var o=this.all(u).join(`
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=t+c);return"[^"+(u.label||u.identifier)+"]: "+o.join(`
|
||||
`)}}function Ot(e,r,t){e.splice(e.indexOf(r),0,t)}function Xf(e,r,t,n){for(var a=e.length,i=-1;++i<a;)if(r[e[i][0]].apply(t,n))return!0;return!1}});var It=C(Lt=>{Lt.isRemarkParser=Jf;Lt.isRemarkCompiler=Qf;function Jf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Qf(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var fu=C((lv,lu)=>{var uu=It();lu.exports=tD;var au=9,ou=32,$r=36,Zf=48,eD=57,su=92,rD=["math","math-inline"],cu="math-display";function tD(e){let r=this.Parser,t=this.Compiler;uu.isRemarkParser(r)&&nD(r,e),uu.isRemarkCompiler(t)&&iD(t,e)}function nD(e,r){let t=e.prototype,n=t.inlineMethods;i.locator=a,t.inlineTokenizers.math=i,n.splice(n.indexOf("text"),0,"math");function a(u,o){return u.indexOf("$",o)}function i(u,o,s){let l=o.length,c=!1,f=!1,p=0,d,D,h,m,F,A,v;if(o.charCodeAt(p)===su&&(f=!0,p++),o.charCodeAt(p)===$r){if(p++,f)return s?!0:u(o.slice(0,p))({type:"text",value:"$"});if(o.charCodeAt(p)===$r&&(c=!0,p++),h=o.charCodeAt(p),!(h===ou||h===au)){for(m=p;p<l;){if(D=h,h=o.charCodeAt(p+1),D===$r){if(d=o.charCodeAt(p-1),d!==ou&&d!==au&&(h!==h||h<Zf||h>eD)&&(!c||h===$r)){F=p-1,p++,c&&p++,A=p;break}}else D===su&&(p++,h=o.charCodeAt(p+1));p++}if(A!==void 0)return s?!0:(v=o.slice(m,F+1),u(o.slice(0,A))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:rD.concat(c&&r.inlineMathDouble?[cu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function iD(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(cu)&&(a="$$"),a+n.value+a}}});var mu=C((fv,du)=>{var Du=It();du.exports=sD;var pu=10,hr=32,Rt=36,hu=`
|
||||
`,uD="$",aD=2,oD=["math","math-display"];function sD(){let e=this.Parser,r=this.Compiler;Du.isRemarkParser(e)&&cD(e),Du.isRemarkCompiler(r)&&lD(r)}function cD(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,i=r.interruptBlockquote;r.blockTokenizers.math=u,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),i.splice(i.indexOf("fencedCode")+1,0,["math"]);function u(o,s,l){var c=s.length,f=0;let p,d,D,h,m,F,A,v,B,b,g;for(;f<c&&s.charCodeAt(f)===hr;)f++;for(m=f;f<c&&s.charCodeAt(f)===Rt;)f++;if(F=f-m,!(F<aD)){for(;f<c&&s.charCodeAt(f)===hr;)f++;for(A=f;f<c;){if(p=s.charCodeAt(f),p===Rt)return;if(p===pu)break;f++}if(s.charCodeAt(f)===pu){if(l)return!0;for(d=[],A!==f&&d.push(s.slice(A,f)),f++,D=s.indexOf(hu,f+1),D=D===-1?c:D;f<c;){for(v=!1,b=f,g=D,h=D,B=0;h>b&&s.charCodeAt(h-1)===hr;)h--;for(;h>b&&s.charCodeAt(h-1)===Rt;)B++,h--;for(F<=B&&s.indexOf(uD,b)===h&&(v=!0,g=h);b<=g&&b-f<m&&s.charCodeAt(b)===hr;)b++;if(v)for(;g>b&&s.charCodeAt(g-1)===hr;)g--;if((!v||b!==g)&&d.push(s.slice(b,g)),v)break;f=D+1,D=s.indexOf(hu,f+1),D=D===-1?c:D}return d=d.join(`
|
||||
`),o(s.slice(0,D))({type:"math",value:d,data:{hName:"div",hProperties:{className:oD.concat()},hChildren:[{type:"text",value:d}]}})}}}}function lD(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var gu=C((Dv,Fu)=>{var fD=fu(),DD=mu();Fu.exports=pD;function pD(e){var r=e||{};DD.call(this,r),fD.call(this,r)}});var Ie=C((pv,Eu)=>{Eu.exports=dD;var hD=Object.prototype.hasOwnProperty;function dD(){for(var e={},r=0;r<arguments.length;r++){var t=arguments[r];for(var n in t)hD.call(t,n)&&(e[n]=t[n])}return e}});var vu=C((hv,Nt)=>{typeof Object.create=="function"?Nt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Nt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Au=C((dv,bu)=>{"use strict";var mD=Ie(),Cu=vu();bu.exports=FD;function FD(e){var r,t,n;Cu(i,e),Cu(a,i),r=i.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():mD(n));return i;function a(u){return e.apply(this,u)}function i(){return this instanceof i?e.apply(this,arguments):new a(arguments)}}});var xu=C((mv,yu)=>{"use strict";yu.exports=gD;function gD(e,r,t){return n;function n(){var a=t||this,i=a[e];return a[e]=!r,u;function u(){a[e]=i}}}});var ku=C((Fv,wu)=>{"use strict";wu.exports=ED;function ED(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:i};function a(u){var o=-1;if(u>-1&&u<t[t.length-1]){for(;++o<t.length;)if(t[o]>u)return{line:o+1,column:u-(t[o-1]||0)+1,offset:u}}return{}}function i(u){var o=u&&u.line,s=u&&u.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l<t[t.length-1]?l:-1}}});var Tu=C((gv,Bu)=>{"use strict";Bu.exports=vD;var Mt="\\";function vD(e,r){return t;function t(n){for(var a=0,i=n.indexOf(Mt),u=e[r],o=[],s;i!==-1;)o.push(n.slice(a,i)),a=i+1,s=n.charAt(a),(!s||u.indexOf(s)===-1)&&o.push(Mt),i=n.indexOf(Mt,a+1);return o.push(n.slice(a)),o.join("")}}});var qu=C((Ev,CD)=>{CD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var _u=C((vv,bD)=>{bD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Re=C((Cv,Su)=>{"use strict";Su.exports=AD;function AD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Ou=C((bv,Pu)=>{"use strict";Pu.exports=yD;function yD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var He=C((Av,Lu)=>{"use strict";Lu.exports=xD;function xD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var Ru=C((yv,Iu)=>{"use strict";var wD=He(),kD=Re();Iu.exports=BD;function BD(e){return wD(e)||kD(e)}});var Nu=C((xv,TD)=>{TD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);k!==-1;)l++,w=k,k=E.indexOf(`
|
||||
`,k+1);w===-1?c+=E.length:c=E.length-w,l in i&&(w!==-1?c+=i[l]:c<=i[l]&&(c=i[l]+1))}function A(){var E=[],w=l+1;return function(){for(var k=l+1;w<k;)E.push((i[w]||0)+1),w++;return E}}function v(){var E={line:l,column:c};return E.offset=a.toOffset(E),E}function B(E){this.start=E,this.end=v()}function b(E){t.slice(0,E.length)!==E&&a.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),v())}function g(){var E=v();return w;function w(k,T){var q=k.position,N=q?q.start:E,P=[],S=q&&q.end.line,_=E.line;if(k.position=new B(N),q&&T&&q.indent){if(P=q.indent,S<_){for(;++S<_;)P.push((i[S]||0)+1);P.push(E.column)}T=P.concat(T)}return k.position.indent=T||[],k}}function y(E,w){var k=w?w.children:u,T=k[k.length-1],q;return T&&E.type===T.type&&(E.type==="text"||E.type==="blockquote")&&ia(T)&&ia(E)&&(q=E.type==="text"?ep:rp,E=q.call(a,T,E)),E!==T&&k.push(E),a.atStart&&u.length!==0&&a.exitStart(),E}function x(E){var w=A(),k=g(),T=v();return b(E),q.reset=N,N.test=P,q.test=P,t=t.slice(E.length),F(E),w=w(),q;function q(S,_){return k(y(k(S),_),w)}function N(){var S=q.apply(null,arguments);return l=T.line,c=T.column,t=E+t,S}function P(){var S=k({});return l=T.line,c=T.column,t=E+t,S.position}}}}function ia(e){var r,t;return e.type!=="text"||!e.position?!0:(r=e.position.start,t=e.position.end,r.line!==t.line||t.column-r.column===e.value.length)}function ep(e,r){return e.value+=r.value,e}function rp(e,r){return this.options.commonmark||this.options.gfm?r:(e.children=e.children.concat(r.children),e)}});var ca=C((qv,sa)=>{"use strict";sa.exports=jr;var $t=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Vt=$t.concat(["~","|"]),oa=Vt.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);jr.default=$t;jr.gfm=Vt;jr.commonmark=oa;function jr(e){var r=e||{};return r.commonmark?oa:r.gfm?Vt:$t}});var fa=C((_v,la)=>{"use strict";la.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var jt=C((Sv,Da)=>{"use strict";Da.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:fa()}});var ha=C((Pv,pa)=>{"use strict";var tp=Ie(),np=ca(),ip=jt();pa.exports=up;function up(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=tp(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in ip){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=np(e),r}});var Fa=C((Ov,ma)=>{"use strict";ma.exports=da;function da(e){if(e==null)return cp;if(typeof e=="string")return sp(e);if(typeof e=="object")return"length"in e?op(e):ap(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function ap(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function op(e){for(var r=[],t=-1;++t<e.length;)r[t]=da(e[t]);return n;function n(){for(var a=-1;++a<r.length;)if(r[a].apply(this,arguments))return!0;return!1}}function sp(e){return r;function r(t){return!!(t&&t.type===e)}}function cp(){return!0}});var Ea=C((Lv,ga)=>{ga.exports=lp;function lp(e){return e}});var Aa=C((Iv,ba)=>{"use strict";ba.exports=Wr;var fp=Fa(),Dp=Ea(),va=!0,Ca="skip",Wt=!1;Wr.CONTINUE=va;Wr.SKIP=Ca;Wr.EXIT=Wt;function Wr(e,r,t,n){var a,i;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),i=fp(r),a=n?-1:1,u(e,null,[])();function u(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,p.displayName="node ("+Dp(c.type+(f?"<"+f+">":""))+")"),p;function p(){var d=l.concat(o),D=[],h,m;if((!r||i(o,s,l[l.length-1]||null))&&(D=pp(t(o,l)),D[0]===Wt))return D;if(o.children&&D[0]!==Ca)for(m=(n?o.children.length:-1)+a;m>-1&&m<o.children.length;){if(h=u(o.children[m],m,d)(),h[0]===Wt)return h;m=typeof h[1]=="number"?h[1]:m+a}return D}}}function pp(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[va,e]:[e]}});var xa=C((Rv,ya)=>{"use strict";ya.exports=Kr;var Hr=Aa(),hp=Hr.CONTINUE,dp=Hr.SKIP,mp=Hr.EXIT;Kr.CONTINUE=hp;Kr.SKIP=dp;Kr.EXIT=mp;function Kr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Hr(e,r,a,n);function a(i,u){var o=u[u.length-1],s=o?o.children.indexOf(i):null;return t(i,s,o)}}});var ka=C((Nv,wa)=>{"use strict";var Fp=xa();wa.exports=gp;function gp(e,r){return Fp(e,r?Ep:vp),e}function Ep(e){delete e.position}function vp(e){e.position=void 0}});var qa=C((Mv,Ta)=>{"use strict";var Ba=Ie(),Cp=ka();Ta.exports=yp;var bp=`
|
||||
`,Ap=/\r\n|\r/g;function yp(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=Ba(t),a;return r=r.replace(Ap,bp),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||Ba(t)}},e.options.position||Cp(a,!0),a}});var Sa=C((Uv,_a)=>{"use strict";var xp=/^[ \t]*(\n|$)/;_a.exports=wp;function wp(e,r,t){for(var n,a="",i=0,u=r.length;i<u&&(n=xp.exec(r.slice(i)),n!=null);)i+=n[0].length,a+=n[0];if(a!==""){if(t)return!0;e(a)}}});var Xr=C((zv,Pa)=>{"use strict";var me="",Ht;Pa.exports=kp;function kp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ht!==e||typeof Ht>"u")Ht=e,me="";else if(me.length>=t)return me.substr(0,t);for(;t>me.length&&r>1;)r&1&&(me+=e),r>>=1,e+=e;return me+=e,me=me.substr(0,t),me}});var Kt=C((Gv,Oa)=>{"use strict";Oa.exports=Bp;function Bp(e){return String(e).replace(/\n+$/,"")}});var Ra=C((Yv,Ia)=>{"use strict";var Tp=Xr(),qp=Kt();Ia.exports=Pp;var Xt=`
|
||||
`,La=" ",Jt=" ",_p=4,Sp=Tp(Jt,_p);function Pp(e,r,t){for(var n=-1,a=r.length,i="",u="",o="",s="",l,c,f;++n<a;)if(l=r.charAt(n),f)if(f=!1,i+=o,u+=s,o="",s="",l===Xt)o=l,s=l;else for(i+=l,u+=l;++n<a;){if(l=r.charAt(n),!l||l===Xt){s=l,o=l;break}i+=l,u+=l}else if(l===Jt&&r.charAt(n+1)===l&&r.charAt(n+2)===l&&r.charAt(n+3)===l)o+=Sp,n+=3,f=!0;else if(l===La)o+=l,f=!0;else{for(c="";l===La||l===Jt;)c+=l,l=r.charAt(++n);if(l!==Xt)break;o+=c+l,s+=l}if(u)return t?!0:e(i)({type:"code",lang:null,meta:null,value:qp(u)})}});var Ua=C(($v,Ma)=>{"use strict";Ma.exports=Rp;var Jr=`
|
||||
`,mr=" ",Je=" ",Op="~",Na="`",Lp=3,Ip=4;function Rp(e,r,t){var n=this,a=n.options.gfm,i=r.length+1,u=0,o="",s,l,c,f,p,d,D,h,m,F,A,v,B;if(a){for(;u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)o+=c,u++;if(v=u,c=r.charAt(u),!(c!==Op&&c!==Na)){for(u++,l=c,s=1,o+=c;u<i&&(c=r.charAt(u),c===l);)o+=c,s++,u++;if(!(s<Lp)){for(;u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)o+=c,u++;for(f="",D="";u<i&&(c=r.charAt(u),!(c===Jr||l===Na&&c===l));)c===Je||c===mr?D+=c:(f+=D+c,D=""),u++;if(c=r.charAt(u),!(c&&c!==Jr)){if(t)return!0;B=e.now(),B.column+=o.length,B.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),B),D&&(o+=D),D="",F="",A="",h="",m="";for(var b=!0;u<i;){if(c=r.charAt(u),h+=F,m+=A,F="",A="",c!==Jr){h+=c,A+=c,u++;continue}for(b?(o+=c,b=!1):(F+=c,A+=c),D="",u++;u<i&&(c=r.charAt(u),c===Je);)D+=c,u++;if(F+=D,A+=D.slice(v),!(D.length>=Ip)){for(D="";u<i&&(c=r.charAt(u),c===l);)D+=c,u++;if(F+=D,A+=D,!(D.length<s)){for(D="";u<i&&(c=r.charAt(u),!(c!==Je&&c!==mr));)F+=c,A+=c,u++;if(!c||c===Jr)break}}}for(o+=h+F,u=-1,i=f.length;++u<i;)if(c=f.charAt(u),c===Je||c===mr)p||(p=f.slice(0,u));else if(p){d=f.slice(u);break}return e(o)({type:"code",lang:p||f||null,meta:d||null,value:m})}}}}}});var Ne=C((Qe,za)=>{Qe=za.exports=Np;function Np(e){return e.trim?e.trim():Qe.right(Qe.left(e))}Qe.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Qe.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Qr=C((Vv,Ga)=>{"use strict";Ga.exports=Mp;function Mp(e,r,t,n){for(var a=e.length,i=-1,u,o;++i<a;)if(u=e[i],o=u[1]||{},!(o.pedantic!==void 0&&o.pedantic!==t.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==t.options.commonmark)&&r[u[0]].apply(t,n))return!0;return!1}});var ja=C((jv,Va)=>{"use strict";var Up=Ne(),zp=Qr();Va.exports=Gp;var Qt=`
|
||||
`,Ya=" ",Zt=" ",$a=">";function Gp(e,r,t){for(var n=this,a=n.offset,i=n.blockTokenizers,u=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],p=[],d,D=0,h,m,F,A,v,B,b,g;D<l&&(h=r.charAt(D),!(h!==Zt&&h!==Ya));)D++;if(r.charAt(D)===$a){if(t)return!0;for(D=0;D<l;){for(F=r.indexOf(Qt,D),B=D,b=!1,F===-1&&(F=l);D<l&&(h=r.charAt(D),!(h!==Zt&&h!==Ya));)D++;if(r.charAt(D)===$a?(D++,b=!0,r.charAt(D)===Zt&&D++):D=B,A=r.slice(D,F),!b&&!Up(A)){D=B;break}if(!b&&(m=r.slice(D),zp(u,i,n,[e,m,!0])))break;v=B===D?A:r.slice(B,F),p.push(D-B),c.push(v),f.push(A),D=F+1}for(D=-1,l=p.length,d=e(c.join(Qt));++D<l;)a[s]=(a[s]||0)+p[D],s++;return g=n.enterBlock(),f=n.tokenizeBlock(f.join(Qt),o),g(),d({type:"blockquote",children:f})}}});var Ka=C((Wv,Ha)=>{"use strict";Ha.exports=$p;var Wa=`
|
||||
`,Fr=" ",gr=" ",Er="#",Yp=6;function $p(e,r,t){for(var n=this,a=n.options.pedantic,i=r.length+1,u=-1,o=e.now(),s="",l="",c,f,p;++u<i;){if(c=r.charAt(u),c!==gr&&c!==Fr){u--;break}s+=c}for(p=0;++u<=i;){if(c=r.charAt(u),c!==Er){u--;break}s+=c,p++}if(!(p>Yp)&&!(!p||!a&&r.charAt(u+1)===Er)){for(i=r.length+1,f="";++u<i;){if(c=r.charAt(u),c!==gr&&c!==Fr){u--;break}f+=c}if(!(!a&&f.length===0&&c&&c!==Wa)){if(t)return!0;for(s+=f,f="",l="";++u<i&&(c=r.charAt(u),!(!c||c===Wa));){if(c!==gr&&c!==Fr&&c!==Er){l+=f+c,f="";continue}for(;c===gr||c===Fr;)f+=c,c=r.charAt(++u);if(!a&&l&&!f&&c===Er){l+=c;continue}for(;c===Er;)f+=c,c=r.charAt(++u);for(;c===gr||c===Fr;)f+=c,c=r.charAt(++u);u--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:p,children:n.tokenizeInline(l,o)})}}}});var Qa=C((Hv,Ja)=>{"use strict";Ja.exports=Jp;var Vp=" ",jp=`
|
||||
`,Xa=" ",Wp="*",Hp="-",Kp="_",Xp=3;function Jp(e,r,t){for(var n=-1,a=r.length+1,i="",u,o,s,l;++n<a&&(u=r.charAt(n),!(u!==Vp&&u!==Xa));)i+=u;if(!(u!==Wp&&u!==Hp&&u!==Kp))for(o=u,i+=u,s=1,l="";++n<a;)if(u=r.charAt(n),u===o)s++,i+=l+o,l="";else if(u===Xa)l+=u;else return s>=Xp&&(!u||u===jp)?(i+=l,t?!0:e(i)({type:"thematicBreak"})):void 0}});var en=C((Kv,eo)=>{"use strict";eo.exports=rh;var Za=" ",Qp=" ",Zp=1,eh=4;function rh(e){for(var r=0,t=0,n=e.charAt(r),a={},i,u=0;n===Za||n===Qp;){for(i=n===Za?eh:Zp,t+=i,i>1&&(t=Math.floor(t/i)*i);u<t;)a[++u]=r;n=e.charAt(++r)}return{indent:t,stops:a}}});var no=C((Xv,to)=>{"use strict";var th=Ne(),nh=Xr(),ih=en();to.exports=oh;var ro=`
|
||||
`,uh=" ",ah="!";function oh(e,r){var t=e.split(ro),n=t.length+1,a=1/0,i=[],u,o,s;for(t.unshift(nh(uh,r)+ah);n--;)if(o=ih(t[n]),i[n]=o.stops,th(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent<a&&(a=o.indent);else{a=1/0;break}if(a!==1/0)for(n=t.length;n--;){for(s=i[n],u=a;u&&!(u in s);)u--;t[n]=t[n].slice(s[u]+1)}return t.shift(),t.join(ro)}});var co=C((Jv,so)=>{"use strict";var sh=Ne(),ch=Xr(),io=Re(),lh=en(),fh=no(),Dh=Qr();so.exports=vh;var rn="*",ph="_",uo="+",tn="-",ao=".",Fe=" ",ae=`
|
||||
`,Zr=" ",oo=")",hh="x",we=4,dh=/\n\n(?!\s*$)/,mh=/^\[([ X\tx])][ \t]/,Fh=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,gh=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Eh=/^( {1,4}|\t)?/gm;function vh(e,r,t){for(var n=this,a=n.options.commonmark,i=n.options.pedantic,u=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,p,d,D,h,m,F,A,v,B,b,g,y,x,E,w,k,T,q,N=!1,P,S,_,O;s<l&&(D=r.charAt(s),!(D!==Zr&&D!==Fe));)s++;if(D=r.charAt(s),D===rn||D===uo||D===tn)h=D,d=!1;else{for(d=!0,p="";s<l&&(D=r.charAt(s),!!io(D));)p+=D,s++;if(D=r.charAt(s),!p||!(D===ao||a&&D===oo)||t&&p!=="1")return;c=parseInt(p,10),h=D}if(D=r.charAt(++s),!(D!==Fe&&D!==Zr&&(i||D!==ae&&D!==""))){if(t)return!0;for(s=0,x=[],E=[],w=[];s<l;){for(m=r.indexOf(ae,s),F=s,A=!1,O=!1,m===-1&&(m=l),f=0;s<l;){if(D=r.charAt(s),D===Zr)f+=we-f%we;else if(D===Fe)f++;else break;s++}if(k&&f>=k.indent&&(O=!0),D=r.charAt(s),v=null,!O){if(D===rn||D===uo||D===tn)v=D,s++,f++;else{for(p="";s<l&&(D=r.charAt(s),!!io(D));)p+=D,s++;D=r.charAt(s),s++,p&&(D===ao||a&&D===oo)&&(v=D,f+=p.length+1)}if(v)if(D=r.charAt(s),D===Zr)f+=we-f%we,s++;else if(D===Fe){for(_=s+we;s<_&&r.charAt(s)===Fe;)s++,f++;s===_&&r.charAt(s)===Fe&&(s-=we-1,f-=we-1)}else D!==ae&&D!==""&&(v=null)}if(v){if(!i&&h!==v)break;A=!0}else!a&&!O&&r.charAt(F)===Fe?O=!0:a&&k&&(O=f>=k.indent||f>we),A=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===rn||v===ph||v===tn)&&u.thematicBreak.call(n,e,b,!0))break;if(g=y,y=!A&&!sh(B).length,O&&k)k.value=k.value.concat(w,b),E=E.concat(w,b),w=[];else if(A)w.length!==0&&(N=!0,k.value.push(""),k.trail=w.concat()),k={value:[b],indent:f,trail:[]},x.push(k),E=E.concat(w,b),w=[];else if(y){if(g&&!a)break;w.push(b)}else{if(g||Dh(o,u,n,[e,b,!0]))break;k.value=k.value.concat(w,b),E=E.concat(w,b),w=[]}s=m+1}for(P=e(E.join(ae)).reset({type:"list",ordered:d,start:c,spread:N,children:[]}),T=n.enterList(),q=n.enterBlock(),s=-1,l=x.length;++s<l;)k=x[s].value.join(ae),S=e.now(),e(k)(Ch(n,k,S),P),k=x[s].trail.join(ae),s!==l-1&&(k+=ae),e(k);return T(),q(),P}}function Ch(e,r,t){var n=e.offset,a=e.options.pedantic?bh:Ah,i=null,u,o;return r=a.apply(null,arguments),e.options.gfm&&(u=r.match(mh),u&&(o=u[0].length,i=u[1].toLowerCase()===hh,n[t.line]+=o,r=r.slice(o))),{type:"listItem",spread:dh.test(r),checked:i,children:e.tokenizeBlock(r,t)}}function bh(e,r,t){var n=e.offset,a=t.line;return r=r.replace(gh,i),a=t.line,r.replace(Eh,i);function i(u){return n[a]=(n[a]||0)+u.length,a++,""}}function Ah(e,r,t){var n=e.offset,a=t.line,i,u,o,s,l,c,f;for(r=r.replace(Fh,p),s=r.split(ae),l=fh(r,lh(i).indent).split(ae),l[0]=o,n[a]=(n[a]||0)+u.length,a++,c=0,f=s.length;++c<f;)n[a]=(n[a]||0)+s[c].length-l[c].length,a++;return l.join(ae);function p(d,D,h,m,F){return u=D+h+m,o=F,Number(h)<10&&u.length%2===1&&(h=Fe+h),i=D+ch(Fe,h.length)+m,i+o}}});var po=C((Qv,Do)=>{"use strict";Do.exports=Th;var nn=`
|
||||
`,yh=" ",lo=" ",fo="=",xh="-",wh=3,kh=1,Bh=2;function Th(e,r,t){for(var n=this,a=e.now(),i=r.length,u=-1,o="",s,l,c,f,p;++u<i;){if(c=r.charAt(u),c!==lo||u>=wh){u--;break}o+=c}for(s="",l="";++u<i;){if(c=r.charAt(u),c===nn){u--;break}c===lo||c===yh?l+=c:(s+=l+c,l="")}if(a.column+=o.length,a.offset+=o.length,o+=s+l,c=r.charAt(++u),f=r.charAt(++u),!(c!==nn||f!==fo&&f!==xh)){for(o+=c,l=f,p=f===fo?kh:Bh;++u<i;){if(c=r.charAt(u),c!==f){if(c!==nn)return;u--;break}l+=c}return t?!0:e(o+l)({type:"heading",depth:p,children:n.tokenizeInline(s,a)})}}});var an=C(un=>{"use strict";var qh="[a-zA-Z_:][a-zA-Z0-9:._-]*",_h="[^\"'=<>`\\u0000-\\u0020]+",Sh="'[^']*'",Ph='"[^"]*"',Oh="(?:"+_h+"|"+Sh+"|"+Ph+")",Lh="(?:\\s+"+qh+"(?:\\s*=\\s*"+Oh+")?)",ho="<[A-Za-z][A-Za-z0-9\\-]*"+Lh+"*\\s*\\/?>",mo="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ih="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Rh="<[?].*?[?]>",Nh="<![A-Za-z]+\\s+[^>]*>",Mh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";un.openCloseTag=new RegExp("^(?:"+ho+"|"+mo+")");un.tag=new RegExp("^(?:"+ho+"|"+mo+"|"+Ih+"|"+Rh+"|"+Nh+"|"+Mh+")")});var vo=C((eC,Eo)=>{"use strict";var Uh=an().openCloseTag;Eo.exports=rd;var zh=" ",Gh=" ",Fo=`
|
||||
`,Yh="<",$h=/^<(script|pre|style)(?=(\s|>|$))/i,Vh=/<\/(script|pre|style)>/i,jh=/^<!--/,Wh=/-->/,Hh=/^<\?/,Kh=/\?>/,Xh=/^<![A-Za-z]/,Jh=/>/,Qh=/^<!\[CDATA\[/,Zh=/]]>/,go=/^$/,ed=new RegExp(Uh.source+"\\s*$");function rd(e,r,t){for(var n=this,a=n.options.blocks.join("|"),i=new RegExp("^</?("+a+")(?=(\\s|/?>|$))","i"),u=r.length,o=0,s,l,c,f,p,d,D,h=[[$h,Vh,!0],[jh,Wh,!0],[Hh,Kh,!0],[Xh,Jh,!0],[Qh,Zh,!0],[i,go,!0],[ed,go,!1]];o<u&&(f=r.charAt(o),!(f!==zh&&f!==Gh));)o++;if(r.charAt(o)===Yh){for(s=r.indexOf(Fo,o+1),s=s===-1?u:s,l=r.slice(o,s),c=-1,p=h.length;++c<p;)if(h[c][0].test(l)){d=h[c];break}if(d){if(t)return d[2];if(o=s,!d[1].test(l))for(;o<u;){if(s=r.indexOf(Fo,o+1),s=s===-1?u:s,l=r.slice(o+1,s),d[1].test(l)){l&&(o=s);break}o=s}return D=r.slice(0,o),e(D)({type:"html",value:D})}}}});var oe=C((rC,Co)=>{"use strict";Co.exports=id;var td=String.fromCharCode,nd=/\s/;function id(e){return nd.test(typeof e=="number"?td(e):e.charAt(0))}});var on=C((tC,bo)=>{"use strict";var ud=kr();bo.exports=ad;function ad(e){return ud(e).toLowerCase()}});var To=C((nC,Bo)=>{"use strict";var od=oe(),sd=on();Bo.exports=Dd;var Ao='"',yo="'",cd="\\",Ze=`
|
||||
`,et=" ",rt=" ",cn="[",vr="]",ld="(",fd=")",xo=":",wo="<",ko=">";function Dd(e,r,t){for(var n=this,a=n.options.commonmark,i=0,u=r.length,o="",s,l,c,f,p,d,D,h;i<u&&(f=r.charAt(i),!(f!==rt&&f!==et));)o+=f,i++;if(f=r.charAt(i),f===cn){for(i++,o+=f,c="";i<u&&(f=r.charAt(i),f!==vr);)f===cd&&(c+=f,i++,f=r.charAt(i)),c+=f,i++;if(!(!c||r.charAt(i)!==vr||r.charAt(i+1)!==xo)){for(d=c,o+=c+vr+xo,i=o.length,c="";i<u&&(f=r.charAt(i),!(f!==et&&f!==rt&&f!==Ze));)o+=f,i++;if(f=r.charAt(i),c="",s=o,f===wo){for(i++;i<u&&(f=r.charAt(i),!!sn(f));)c+=f,i++;if(f=r.charAt(i),f===sn.delimiter)o+=wo+c+f,i++;else{if(a)return;i-=c.length+1,c=""}}if(!c){for(;i<u&&(f=r.charAt(i),!!pd(f));)c+=f,i++;o+=c}if(c){for(D=c,c="";i<u&&(f=r.charAt(i),!(f!==et&&f!==rt&&f!==Ze));)c+=f,i++;if(f=r.charAt(i),p=null,f===Ao?p=Ao:f===yo?p=yo:f===ld&&(p=fd),!p)c="",i=o.length;else if(c){for(o+=c+f,i=o.length,c="";i<u&&(f=r.charAt(i),f!==p);){if(f===Ze){if(i++,f=r.charAt(i),f===Ze||f===p)return;c+=Ze}c+=f,i++}if(f=r.charAt(i),f!==p)return;l=o,o+=c+f,i++,h=c,c=""}else return;for(;i<u&&(f=r.charAt(i),!(f!==et&&f!==rt));)o+=f,i++;if(f=r.charAt(i),!f||f===Ze)return t?!0:(s=e(s).test().end,D=n.decode.raw(n.unescape(D),s,{nonTerminated:!1}),h&&(l=e(l).test().end,h=n.decode.raw(n.unescape(h),l)),e(o)({type:"definition",identifier:sd(d),label:d,title:h||null,url:D}))}}}}function sn(e){return e!==ko&&e!==cn&&e!==vr}sn.delimiter=ko;function pd(e){return e!==cn&&e!==vr&&!od(e)}});var So=C((iC,_o)=>{"use strict";var hd=oe();_o.exports=yd;var dd=" ",tt=`
|
||||
`,md=" ",Fd="-",gd=":",Ed="\\",ln="|",vd=1,Cd=2,qo="left",bd="center",Ad="right";function yd(e,r,t){var n=this,a,i,u,o,s,l,c,f,p,d,D,h,m,F,A,v,B,b,g,y,x,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];a<l;){if(y=r.indexOf(tt,a),x=r.indexOf(ln,a+1),y===-1&&(y=r.length),x===-1||x>y){if(v<Cd)return;break}c.push(r.slice(a,y)),v++,a=y+1}for(o=c.join(tt),i=c.splice(1,1)[0]||[],a=0,l=i.length,v--,u=!1,D=[];a<l;){if(p=i.charAt(a),p===ln){if(d=null,u===!1){if(E===!1)return}else D.push(u),u=!1;E=!1}else if(p===Fd)d=!0,u=u||null;else if(p===gd)u===qo?u=bd:d&&u===null?u=Ad:u=qo;else if(!hd(p))return;a++}if(u!==!1&&D.push(u),!(D.length<vd)){if(t)return!0;for(A=-1,b=[],g=e(o).reset({type:"table",align:D,children:b});++A<v;){for(B=c[A],s={type:"tableRow",children:[]},A&&e(tt),e(B).reset(s,g),l=B.length+1,a=0,f="",h="",m=!0;a<l;){if(p=B.charAt(a),p===dd||p===md){h?f+=p:e(p),a++;continue}p===""||p===ln?m?e(p):((h||p)&&!m&&(o=h,f.length>1&&(p?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,F)},s)),e(f+p),f="",h=""):(f&&(h+=f,f=""),h+=p,p===Ed&&a!==l-2&&(h+=B.charAt(a+1),a++)),m=!1,a++}A||e(tt+i)}return g}}}});var Lo=C((uC,Oo)=>{"use strict";var xd=Ne(),wd=Kt(),kd=Qr();Oo.exports=qd;var Bd=" ",Cr=`
|
||||
`,Td=" ",Po=4;function qd(e,r,t){for(var n=this,a=n.options,i=a.commonmark,u=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Cr),l=r.length,c,f,p,d,D;s<l;){if(s===-1){s=l;break}if(r.charAt(s+1)===Cr)break;if(i){for(d=0,c=s+1;c<l;){if(p=r.charAt(c),p===Bd){d=Po;break}else if(p===Td)d++;else break;c++}if(d>=Po&&p!==Cr){s=r.indexOf(Cr,s+1);continue}}if(f=r.slice(s+1),kd(o,u,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Cr,s+1),s!==-1&&xd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(D=e.now(),f=wd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var Ro=C((aC,Io)=>{"use strict";Io.exports=_d;function _d(e,r){return e.indexOf("\\",r)}});var zo=C((oC,Uo)=>{"use strict";var Sd=Ro();Uo.exports=Mo;Mo.locator=Sd;var Pd=`
|
||||
`,No="\\";function Mo(e,r,t){var n=this,a,i;if(r.charAt(0)===No&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===Pd?i={type:"break"}:i={type:"text",value:a},e(No+a)(i))}});var fn=C((sC,Go)=>{"use strict";Go.exports=Od;function Od(e,r){return e.indexOf("<",r)}});var Wo=C((cC,jo)=>{"use strict";var Yo=oe(),Ld=dr(),Id=fn();jo.exports=dn;dn.locator=Id;dn.notInLink=!0;var $o="<",Dn=">",Vo="@",pn="/",hn="mailto:",nt=hn.length;function dn(e,r,t){var n=this,a="",i=r.length,u=0,o="",s=!1,l="",c,f,p,d,D;if(r.charAt(0)===$o){for(u++,a=$o;u<i&&(c=r.charAt(u),!(Yo(c)||c===Dn||c===Vo||c===":"&&r.charAt(u+1)===pn));)o+=c,u++;if(o){if(l+=o,o="",c=r.charAt(u),l+=c,u++,c===Vo)s=!0;else{if(c!==":"||r.charAt(u+1)!==pn)return;l+=pn,u++}for(;u<i&&(c=r.charAt(u),!(Yo(c)||c===Dn));)o+=c,u++;if(c=r.charAt(u),!(!o||c!==Dn))return t?!0:(l+=o,p=l,a+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,nt).toLowerCase()===hn?(p=p.slice(nt),f.column+=nt,f.offset+=nt):l=hn+l),d=n.inlineTokenizers,n.inlineTokenizers={text:d.text},D=n.enterLink(),p=n.tokenizeInline(p,f),n.inlineTokenizers=d,D(),e(a)({type:"link",title:null,url:Ld(l,{nonTerminated:!1}),children:p}))}}}});var Ko=C((lC,Ho)=>{"use strict";Ho.exports=Rd;function Rd(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var Qo=C((fC,Jo)=>{"use strict";Jo.exports=Nd;var Xo=["www.","http://","https://"];function Nd(e,r){var t=-1,n,a,i;if(!this.options.gfm)return t;for(a=Xo.length,n=-1;++n<a;)i=e.indexOf(Xo[n],r),i!==-1&&(t===-1||i<t)&&(t=i);return t}});var ns=C((DC,ts)=>{"use strict";var Zo=Ko(),Md=dr(),Ud=Re(),mn=He(),zd=oe(),Gd=Qo();ts.exports=gn;gn.locator=Gd;gn.notInLink=!0;var Yd=33,$d=38,Vd=41,jd=42,Wd=44,Hd=45,Fn=46,Kd=58,Xd=59,Jd=63,Qd=60,es=95,Zd=126,e0="(",rs=")";function gn(e,r,t){var n=this,a=n.options.gfm,i=n.inlineTokenizers,u=r.length,o=-1,s=!1,l,c,f,p,d,D,h,m,F,A,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,p=4;else if(r.slice(0,7).toLowerCase()==="http://")p=7;else if(r.slice(0,8).toLowerCase()==="https://")p=8;else return;for(o=p-1,f=p,l=[];p<u;){if(h=r.charCodeAt(p),h===Fn){if(o===p-1)break;l.push(p),o=p,p++;continue}if(Ud(h)||mn(h)||h===Hd||h===es){p++;continue}break}if(h===Fn&&(l.pop(),p--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,r.slice(c,p).indexOf("_")===-1)){if(t)return!0;for(m=p,d=p;p<u&&(h=r.charCodeAt(p),!(zd(h)||h===Qd));)p++,h===Yd||h===jd||h===Wd||h===Fn||h===Kd||h===Jd||h===es||h===Zd||(m=p);if(p=m,r.charCodeAt(p-1)===Vd)for(D=r.slice(d,p),F=Zo(D,e0),A=Zo(D,rs);A>F;)p=d+D.lastIndexOf(rs),D=r.slice(d,p),A--;if(r.charCodeAt(p-1)===Xd&&(p--,mn(r.charCodeAt(p-1)))){for(m=p-2;mn(r.charCodeAt(m));)m--;r.charCodeAt(m)===$d&&(p=m)}return v=r.slice(0,p),b=Md(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:i.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=i,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var os=C((pC,as)=>{"use strict";var r0=Re(),t0=He(),n0=43,i0=45,u0=46,a0=95;as.exports=us;function us(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!is(e.charCodeAt(a-1)))return us.call(t,e,n+1);for(;a>r&&is(e.charCodeAt(a-1));)a--;return a}function is(e){return r0(e)||t0(e)||e===n0||e===i0||e===u0||e===a0}});var fs=C((hC,ls)=>{"use strict";var o0=dr(),ss=Re(),cs=He(),s0=os();ls.exports=Cn;Cn.locator=s0;Cn.notInLink=!0;var c0=43,En=45,it=46,l0=64,vn=95;function Cn(e,r,t){var n=this,a=n.options.gfm,i=n.inlineTokenizers,u=0,o=r.length,s=-1,l,c,f,p;if(a){for(l=r.charCodeAt(u);ss(l)||cs(l)||l===c0||l===En||l===it||l===vn;)l=r.charCodeAt(++u);if(u!==0&&l===l0){for(u++;u<o;){if(l=r.charCodeAt(u),ss(l)||cs(l)||l===En||l===it||l===vn){u++,s===-1&&l===it&&(s=u);continue}break}if(!(s===-1||s===u||l===En||l===vn))return l===it&&u--,c=r.slice(0,u),t?!0:(p=n.enterLink(),n.inlineTokenizers={text:i.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=i,p(),e(c)({type:"link",title:null,url:"mailto:"+o0(c,{nonTerminated:!1}),children:f}))}}}});var hs=C((dC,ps)=>{"use strict";var f0=He(),D0=fn(),p0=an().tag;ps.exports=Ds;Ds.locator=D0;var h0="<",d0="?",m0="!",F0="/",g0=/^<a /i,E0=/^<\/a>/i;function Ds(e,r,t){var n=this,a=r.length,i,u;if(!(r.charAt(0)!==h0||a<3)&&(i=r.charAt(1),!(!f0(i)&&i!==d0&&i!==m0&&i!==F0)&&(u=r.match(p0),!!u)))return t?!0:(u=u[0],!n.inLink&&g0.test(u)?n.inLink=!0:n.inLink&&E0.test(u)&&(n.inLink=!1),e(u)({type:"html",value:u}))}});var bn=C((mC,ds)=>{"use strict";ds.exports=v0;function v0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t<n?t:n}});var bs=C((FC,Cs)=>{"use strict";var br=oe(),C0=bn();Cs.exports=vs;vs.locator=C0;var b0=`
|
||||
`,A0="!",ms='"',Fs="'",er="(",Ar=")",An="<",yn=">",gs="[",yr="\\",y0="]",Es="`";function vs(e,r,t){var n=this,a="",i=0,u=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,p,d,D,h,m,F,A,v,B,b,g,y,x,E,w,k;if(u===A0&&(F=!0,a=u,u=r.charAt(++i)),u===gs&&!(!F&&n.inLink)){for(a+=u,y="",i++,B=r.length,E=e.now(),g=0,E.column+=i,E.offset+=i;i<B;){if(u=r.charAt(i),h=u,u===Es){for(f=1;r.charAt(i+1)===Es;)h+=u,i++,f++;p?f>=p&&(p=0):p=f}else if(u===yr)i++,h+=r.charAt(i);else if((!p||l)&&u===gs)g++;else if((!p||l)&&u===y0)if(g)g--;else{if(r.charAt(i+1)!==er)return;h+=er,c=!0,i++;break}y+=h,h="",i++}if(c){for(A=y,a+=y+h,i++;i<B&&(u=r.charAt(i),!!br(u));)a+=u,i++;if(u=r.charAt(i),y="",d=a,u===An){for(i++,d+=An;i<B&&(u=r.charAt(i),u!==yn);){if(s&&u===b0)return;y+=u,i++}if(r.charAt(i)!==yn)return;a+=An+y+yn,x=y,i++}else{for(u=null,h="";i<B&&(u=r.charAt(i),!(h&&(u===ms||u===Fs||s&&u===er)));){if(br(u)){if(!o)break;h+=u}else{if(u===er)g++;else if(u===Ar){if(g===0)break;g--}y+=h,h="",u===yr&&(y+=yr,u=r.charAt(++i)),y+=u}i++}a+=y,x=y,i=a.length}for(y="";i<B&&(u=r.charAt(i),!!br(u));)y+=u,i++;if(u=r.charAt(i),a+=y,y&&(u===ms||u===Fs||s&&u===er))if(i++,a+=u,y="",v=u===er?Ar:u,D=a,s){for(;i<B&&(u=r.charAt(i),u!==v);)u===yr&&(y+=yr,u=r.charAt(++i)),i++,y+=u;if(u=r.charAt(i),u!==v)return;for(b=y,a+=y+u,i++;i<B&&(u=r.charAt(i),!!br(u));)a+=u,i++}else for(h="";i<B;){if(u=r.charAt(i),u===v)m&&(y+=v+h,h=""),m=!0;else if(!m)y+=u;else if(u===Ar){a+=y+v+h,b=y;break}else br(u)?h+=u:(y+=v+h+u,h="",m=!1);i++}if(r.charAt(i)===Ar)return t?!0:(a+=Ar,x=n.decode.raw(n.unescape(x),e(d).test().end,{nonTerminated:!1}),b&&(D=e(D).test().end,b=n.decode.raw(n.unescape(b),D)),k={type:F?"image":"link",title:b||null,url:x},F?k.alt=n.decode.raw(n.unescape(A),E)||null:(w=n.enterLink(),k.children=n.tokenizeInline(A,E),w()),e(a)(k))}}}});var xs=C((gC,ys)=>{"use strict";var x0=oe(),w0=bn(),k0=on();ys.exports=As;As.locator=w0;var xn="link",B0="image",T0="shortcut",q0="collapsed",wn="full",_0="!",ut="[",at="\\",ot="]";function As(e,r,t){var n=this,a=n.options.commonmark,i=r.charAt(0),u=0,o=r.length,s="",l="",c=xn,f=T0,p,d,D,h,m,F,A,v;if(i===_0&&(c=B0,l=i,i=r.charAt(++u)),i===ut){for(u++,l+=i,F="",v=0;u<o;){if(i=r.charAt(u),i===ut)A=!0,v++;else if(i===ot){if(!v)break;v--}i===at&&(F+=at,i=r.charAt(++u)),F+=i,u++}if(s=F,p=F,i=r.charAt(u),i===ot){if(u++,s+=i,F="",!a)for(;u<o&&(i=r.charAt(u),!!x0(i));)F+=i,u++;if(i=r.charAt(u),i===ut){for(d="",F+=i,u++;u<o&&(i=r.charAt(u),!(i===ut||i===ot));)i===at&&(d+=at,i=r.charAt(++u)),d+=i,u++;i=r.charAt(u),i===ot?(f=d?wn:q0,F+=d+i,u++):d="",s+=F,F=""}else{if(!p)return;d=p}if(!(f!==wn&&A))return s=l+s,c===xn&&n.inLink?null:t?!0:(D=e.now(),D.column+=l.length,D.offset+=l.length,d=f===wn?d:p,h={type:c+"Reference",identifier:k0(d),label:d,referenceType:f},c===xn?(m=n.enterLink(),h.children=n.tokenizeInline(p,D),m()):h.alt=n.decode.raw(n.unescape(p),D)||null,e(s)(h))}}}});var ks=C((EC,ws)=>{"use strict";ws.exports=S0;function S0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n<t?n:t}});var _s=C((vC,qs)=>{"use strict";var P0=Ne(),Bs=oe(),O0=ks();qs.exports=Ts;Ts.locator=O0;var L0="\\",I0="*",R0="_";function Ts(e,r,t){var n=this,a=0,i=r.charAt(a),u,o,s,l,c,f,p;if(!(i!==I0&&i!==R0||r.charAt(++a)!==i)&&(o=n.options.pedantic,s=i,c=s+s,f=r.length,a++,l="",i="",!(o&&Bs(r.charAt(a)))))for(;a<f;){if(p=i,i=r.charAt(a),i===s&&r.charAt(a+1)===s&&(!o||!Bs(p))&&(i=r.charAt(a+2),i!==s))return P0(l)?t?!0:(u=e.now(),u.column+=2,u.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,u)})):void 0;!o&&i===L0&&(l+=i,i=r.charAt(++a)),l+=i,a++}}});var Ps=C((CC,Ss)=>{"use strict";Ss.exports=U0;var N0=String.fromCharCode,M0=/\w/;function U0(e){return M0.test(typeof e=="number"?N0(e):e.charAt(0))}});var Ls=C((bC,Os)=>{"use strict";Os.exports=z0;function z0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n<t?n:t}});var Us=C((AC,Ms)=>{"use strict";var G0=Ne(),Y0=Ps(),Is=oe(),$0=Ls();Ms.exports=Ns;Ns.locator=$0;var V0="*",Rs="_",j0="\\";function Ns(e,r,t){var n=this,a=0,i=r.charAt(a),u,o,s,l,c,f,p;if(!(i!==V0&&i!==Rs)&&(o=n.options.pedantic,c=i,s=i,f=r.length,a++,l="",i="",!(o&&Is(r.charAt(a)))))for(;a<f;){if(p=i,i=r.charAt(a),i===s&&(!o||!Is(p))){if(i=r.charAt(++a),i!==s){if(!G0(l)||p===s)return;if(!o&&s===Rs&&Y0(i)){l+=s;continue}return t?!0:(u=e.now(),u.column++,u.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,u)}))}l+=s}!o&&i===j0&&(l+=i,i=r.charAt(++a)),l+=i,a++}}});var Gs=C((yC,zs)=>{"use strict";zs.exports=W0;function W0(e,r){return e.indexOf("~~",r)}});var Ws=C((xC,js)=>{"use strict";var Ys=oe(),H0=Gs();js.exports=Vs;Vs.locator=H0;var st="~",$s="~~";function Vs(e,r,t){var n=this,a="",i="",u="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==st||r.charAt(1)!==st||Ys(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(a=r.charAt(s),a===st&&i===st&&(!u||!Ys(u)))return t?!0:e($s+o+$s)({type:"delete",children:n.tokenizeInline(o,c)});o+=i,uLine truncated
|
||||
`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var nc=C((TC,tc)=>{"use strict";var Q0=ec();tc.exports=rc;rc.locator=Q0;var Z0=" ",em=`
|
||||
`,rm=2;function rc(e,r,t){for(var n=r.length,a=-1,i="",u;++a<n;){if(u=r.charAt(a),u===em)return a<rm?void 0:t?!0:(i+=u,e(i)({type:"break"}));if(u!==Z0)return;i+=u}}});var uc=C((qC,ic)=>{"use strict";ic.exports=tm;function tm(e,r,t){var n=this,a,i,u,o,s,l,c,f,p,d;if(t)return!0;for(a=n.inlineMethods,o=a.length,i=n.inlineTokenizers,u=-1,p=r.length;++u<o;)f=a[u],!(f==="text"||!i[f])&&(c=i[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,r,1),l!==-1&&l<p&&(p=l));s=r.slice(0,p),d=e.now(),n.decode(s,d,D);function D(h,m,F){e(F||h)({type:"text",value:h})}}});var cc=C((_C,sc)=>{"use strict";var nm=Ie(),ct=xu(),im=ku(),um=Tu(),am=na(),qn=aa();sc.exports=ac;function ac(e,r){this.file=r,this.offset={},this.options=nm(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=im(r).toOffset,this.unescape=um(this,"escape"),this.decode=am(this)}var M=ac.prototype;M.setOptions=ha();M.parse=qa();M.options=jt();M.exitStart=ct("atStart",!0);M.enterList=ct("inList",!1);M.enterLink=ct("inLink",!1);M.enterBlock=ct("inBlock",!1);M.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];M.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];M.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];M.blockTokenizers={blankLine:Sa(),indentedCode:Ra(),fencedCode:Ua(),blockquote:ja(),atxHeading:Ka(),thematicBreak:Qa(),list:co(),setextHeading:po(),html:vo(),definition:To(),table:So(),paragraph:Lo()};M.inlineTokenizers={escape:zo(),autoLink:Wo(),url:ns(),email:fs(),html:hs(),link:bs(),reference:xs(),strong:_s(),emphasis:Us(),deletion:Ws(),code:Qs(),break:nc(),text:uc()};M.blockMethods=oc(M.blockTokenizers);M.inlineMethods=oc(M.inlineTokenizers);M.tokenizeBlock=qn("block");M.tokenizeInline=qn("inline");M.tokenizeFactory=qn;function oc(e){var r=[],t;for(t in e)r.push(t);return r}});var pc=C((SC,Dc)=>{"use strict";var om=Au(),sm=Ie(),lc=cc();Dc.exports=fc;fc.Parser=lc;function fc(e){var r=this.data("settings"),t=om(lc);t.prototype.options=sm(t.prototype.options,r,e),this.Parser=t}});var dc=C((PC,hc)=>{"use strict";hc.exports=cm;function cm(e){if(e)throw e}});var _n=C((OC,mc)=>{mc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var xc=C((LC,yc)=>{"use strict";var lt=Object.prototype.hasOwnProperty,Ac=Object.prototype.toString,Fc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,Ec=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Ac.call(r)==="[object Array]"},vc=function(r){if(!r||Ac.call(r)!=="[object Object]")return!1;var t=lt.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&<.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||lt.call(r,a)},Cc=function(r,t){Fc&&t.name==="__proto__"?Fc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},bc=function(r,t){if(t==="__proto__")if(lt.call(r,t)){if(gc)return gc(r,t).value}else return;return r[t]};yc.exports=function e(){var r,t,n,a,i,u,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(r=arguments[s],r!=null)for(t in r)n=bc(o,t),a=bc(r,t),o!==a&&(c&&a&&(vc(a)||(i=Ec(a)))?(i?(i=!1,u=n&&Ec(n)?n:[]):u=n&&vc(n)?n:{},Cc(o,{name:t,newValue:e(c,u,a)})):typeof a<"u"&&Cc(o,{name:t,newValue:a}));return o}});var kc=C((IC,wc)=>{"use strict";wc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var Tc=C((RC,Bc)=>{"use strict";var lm=[].slice;Bc.exports=fm;function fm(e,r){var t;return n;function n(){var u=lm.call(arguments,0),o=e.length>u.length,s;o&&u.push(a);try{s=e.apply(null,u)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(i,a):s instanceof Error?a(s):i(s))}function a(){t||(t=!0,r.apply(null,arguments))}function i(u){a(null,u)}}});var Oc=C((NC,Pc)=>{"use strict";var _c=Tc();Pc.exports=Sc;Sc.wrap=_c;var qc=[].slice;function Sc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,i=qc.call(arguments,0,-1),u=arguments[arguments.length-1];if(typeof u!="function")throw new Error("Expected function as last argument, not "+u);o.apply(null,[null].concat(i));function o(s){var l=e[++a],c=qc.call(arguments,0),f=c.slice(1),p=i.length,d=-1;if(s){u(s);return}for(;++d<p;)(f[d]===null||f[d]===void 0)&&(f[d]=i[d]);i=f,l?_c(l,o).apply(null,i):u.apply(null,[null].concat(i))}}funct
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(G(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=Ol([...Br].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var dt=class extends Error{name="InvalidDocError";constructor(r){super(Ll(r)),this.doc=r}},Te=dt;var Kn={};function Il(e,r,t,n){let a=[e];for(;a.length>0;){let i=a.pop();if(i===Kn){t(a.pop());continue}t&&a.push(i,Kn);let u=G(i);if(!u)throw new Te(i);if((r==null?void 0:r(i))!==!1)switch(u){case H:case J:{let o=u===H?i:i.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case K:a.push(i.flatContents,i.breakContents);break;case X:if(n&&i.expandedStates)for(let o=i.expandedStates.length,s=o-1;s>=0;--s)a.push(i.expandedStates[s]);else a.push(i.contents);break;case te:case re:case De:case de:case pe:a.push(i.contents);break;case Y:case Ce:case fe:case he:case $:case ne:break;default:throw new Te(i)}}}var mt=Il;function Rl(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(i){if(t.has(i))return t.get(i);let u=a(i);return t.set(i,u),u}function a(i){switch(G(i)){case H:return r(i.map(n));case J:return r({...i,parts:i.parts.map(n)});case K:return r({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case X:{let{expandedStates:u,contents:o}=i;return u?(u=u.map(n),o=u[0]):o=n(o),r({...i,contents:o,expandedStates:u})}case te:case re:case De:case de:case pe:return r({...i,contents:n(i.contents)});case Y:case Ce:case fe:case he:case $:case ne:return r(i);default:throw new Te(i)}}}function Xn(e){if(e.length>0){let r=z(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Jn(e){let r=new Set,t=[];function n(i){if(i.type===ne&&Xn(t),i.type===X){if(t.push(i),r.has(i))return!1;r.add(i)}}function a(i){i.type===X&&t.pop().break&&Xn(t)}mt(e,n,a,!0)}function be(e,r=nr){return Rl(e,t=>typeof t=="string"?Tr(r,t.split(`
|
||||
`)):t)}var Ft=()=>{},qe=Ft,gt=Ft,Qn=Ft;function ir(e){return qe(e),{type:re,contents:e}}function Ae(e,r){return qe(r),{type:te,contents:r,n:e}}function Ue(e,r={}){return qe(e),gt(r.expandedStates,!0),{type:X,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function _e(e){return Ae({type:"root"},e)}function ze(e){return Qn(e),{type:J,parts:e}}function Zn(e,r="",t={}){return qe(e),r!==""&&qe(r),{type:K,breakContents:e,flatContents:r,groupId:t.groupId}}var ur={type:ne};var ar={type:$,hard:!0},Nl={type:$,hard:!0,literal:!0},qr={type:$},_r={type:$,soft:!0},L=[ar,ur],nr=[Nl,ur];function Tr(e,r){qe(e),gt(r);let t=[];for(let n=0;n<r.length;n++)n!==0&&t.push(e),t.push(r[n]);return t}function Ml(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));return t===null?0:t.reduce((n,a)=>Math.max(n,a.length/r.length),0)}var Sr=Ml;function Ul(e,r){let t=e.match(new RegExp(`(${le(r)})+`,"gu"));if(t===null)return 0;let n=new Map,a=0;for(let i of t){let u=i.length/r.length;n.set(u,!0),u>a&&(a=u)}for(let i=1;i<a;i++)if(!n.get(i))return i;return a+1}var ei=Ul;var Pr="'",ri='"';function zl(e,r){let t=r===!0||r===Pr?Pr:ri,n=t===Pr?ri:Pr,a=0,i=0;for(let u of e)u===t?a++:u===n&&i++;return a>i?n:t}var ti=zl;var Et=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},ni=Et;var li=Me(kr(),1);function Gl(e){return(e==null?void 0:e.type)==="front-matter"}var ii=Gl;var ui=["noformat","noprettier"],Or=["format","prettier"],ai="format";var or=3;function Yl(e){let r=e.slice(0,or);if(r!=="---"&&r!=="+++")return;let t=e.indexOf(`
|
||||
`,or);if(t===-1)return;let n=e.slice(or,t).trim(),a=e.indexOf(`
|
||||
${r}`,t),i=n;if(i||(i=r==="+++"?"toml":"yaml"),a===-1&&r==="---"&&i==="yaml"&&(a=e.indexOf(`
|
||||
...`,t)),a===-1)return;let u=a+1+or,o=e.charAt(u+1);if(!/\s?/u.test(o))return;let s=e.slice(0,u);return{type:"front-matter",language:i,explicitLanguage:n,value:e.slice(t+1,a),startDelimiter:r,endDelimiter:s.slice(-or),raw:s}}function $l(e){let r=Yl(e);if(!r)return{content:e};let{raw:t}=r;return{frontMatter:r,content:R(!1,t,/[^\n]/gu," ")+e.slice(t.length)}}var Ge=$l;function Lr(e,r){let t=`@(${r.join("|")})`,n=new RegExp([`<!--\\s*${t}\\s*-->`,`\\{\\s*\\/\\*\\s*${t}\\s*\\*\\/\\s*\\}`,`<!--.*\r?
|
||||
[\\s\\S]*(^|
|
||||
)[^\\S
|
||||
]*${t}[^\\S
|
||||
]*($|
|
||||
)[\\s\\S]*
|
||||
.*-->`].join("|"),"mu"),a=e.match(n);return(a==null?void 0:a.index)===0}var oi=e=>Lr(Ge(e).content.trimStart(),Or),si=e=>Lr(Ge(e).content.trimStart(),ui),ci=e=>{let r=Ge(e),t=`<!-- @${ai} -->`;return r.frontMatter?`${r.frontMatter.raw}
|
||||
|
||||
${t}
|
||||
|
||||
${r.content}`:`${t}
|
||||
|
||||
${r.content}`};var Vl=new Set(["position","raw"]);function fi(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=R(!1,e.value,`
|
||||
`," ")),e.type==="wikiLink"&&(r.value=R(!1,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,li.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=R(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=R(!1,e.title,/\\(?=["')])/gu,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||ii(t.children[0])&&t.children[1]===e)&&e.type==="html"&&Lr(e.value,Or))return null}fi.ignoredProperties=Vl;var Di=fi;var pi=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Se=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;async function jl(e,r){if(e.language==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return _e([e.startDelimiter,e.explicitLanguage,L,n,n?L:"",e.endDelimiter])}}var hi=jl;var Wl=(e,r)=>{if(!(e&&r==null))return r.toReversed||!Array.isArray(r)?r.toReversed():[...r].reverse()},di=Wl;var mi,Fi,gi,Ei,vi,Hl=((mi=globalThis.Deno)==null?void 0:mi.build.os)==="windows"||((gi=(Fi=globalThis.navigator)==null?void 0:Fi.platform)==null?void 0:gi.startsWith("Win"))||((vi=(Ei=globalThis.process)==null?void 0:Ei.platform)==null?void 0:vi.startsWith("win"))||!1;function Ci(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Kl(e){return e=Ci(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Xl(e){e=Ci(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function bi(e){return Hl?Xl(e):Kl(e)}var Ai=bi;var Jl=e=>String(e).split(/[/\\]/u).pop();function yi(e,r){if(!r)return;let t=Jl(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Ql(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function xi(e,r){if(r){if(String(r).startsWith("file:"))try{r=Ai(r)}catch{return}if(typeof r=="string")return e.find(({isSupported:t})=>t==null?void 0:t({filepath:r}))}}function Zl(e,r){let t=di(!1,e.plugins).flatMap(a=>a.languages??[]),n=Ql(t,r.language)??yi(t,r.physicalFile)??yi(t,r.file)??xi(t,r.physicalFile)??xi(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var wi=Zl;var ef=new Proxy(()=>{},{get:()=>ef});function Pe(e){return e.position.start.offset}function Oe(e){return e.position.end.offset}var vt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Ir=new Set([...vt,"tableCell","paragraph","heading"]),$e="non-cjk",ie="cj-letter",Le="k-letter",sr="cjk-punctuation",rf=/\p{Script_Extensions=Hangul}/u;function Rr(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[a,i]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/u.test(i)?`
|
||||
`:" "});continue}if((a===0||a===t.length-1)&&i==="")continue;let u=i.split(new RegExp(`(${pi.source})`,"u"));for(let[o,s]of u.entries())if(!((o===0||o===u.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:$e,isCJ:!1,hasLeadingPunctuation:Se.test(s[0]),hasTrailingPunctuation:Se.test(z(!1,s,-1))});continue}if(Se.test(s)){n({type:"word",value:s,kind:sr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(rf.test(s)){n({type:"word",value:s,kind:Le,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ie,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let i=z(!1,r,-1);(i==null?void 0:i.type)==="word"&&!u($e,sr)&&![i.value,a.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function u(o,s){return i.kind===o&&a.kind===s||i.kind===s&&a.kind===o}}}function Ye(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:a}=t.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/u).groups;return{number:Number(n),leadingSpaces:a}}function ki(e,r){return!e.ordered||e.children.length<2||Ye(e.children[1],r).number!==1?!1:Ye(e.children[0],r).number!==0?!0:e.children.length>2&&Ye(e.children[2],r).number===1}function Nr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(`
|
||||
`)&&r.endsWith(`
|
||||
`)?t.slice(0,-1):t}function ye(e,r){return function t(n,a,i){let u={...r(n,a,i)};return u.children&&(u.children=u.children.map((o,s)=>t(o,s,[u,...i]))),u}(e,null,[])}function Ct(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Pe(e)===Pe(r)&&Oe(e)===Oe(r)}function tf(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=wi(r,{language:t.lang});if(n)return async a=>{let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Sr(t.value,i)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Nr(t,r.originalText),o);return _e([u,t.lang,t.meta?" "+t.meta:"",L,be(s),L,u])}}switch(t.type){case"front-matter":return n=>hi(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var Bi=tf;var cr=null;function lr(e){if(cr!==null&&typeof cr.property){let r=cr;return cr=lr.prototype=null,r}return cr=lr.prototype=e??Object.create(null),new lr}var nf=10;for(let e=0;e<=nf;e++)lr();function bt(e){return lr(e)}function uf(e,r="type"){bt(e);function t(n){let a=n[r],i=e[a];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return i}return t}var Ti=uf;var af={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},qi=af;var of=Ti(qi),_i=of;function Si(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
||||
`;default:return`
|
||||
`}}var Pi=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC
Line truncated
|
||||
`?R(!1,D,`
|
||||
`,a):D;o.push(h),u.length>0&&(i+=fr(h));break}case H:for(let h=D.length-1;h>=0;h--)u.push({ind:p,mode:d,doc:D[h]});break;case Ce:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Ve),c++;break;case re:u.push({ind:lf(p,r),mode:d,doc:D.contents});break;case te:u.push({ind:ff(p,D.n,r),mode:d,doc:D.contents});break;case fe:i-=xt(o);break;case X:switch(d){case ue:if(!s){u.push({ind:p,mode:D.break?V:ue,doc:D.contents});break}case V:{s=!1;let h={ind:p,mode:ue,doc:D.contents},m=n-i,F=l.length>0;if(!D.break&&Mr(h,u,m,F,t))u.push(h);else if(D.expandedStates){let A=z(!1,D.expandedStates,-1);if(D.break){u.push({ind:p,mode:V,doc:A});break}else for(let v=1;v<D.expandedStates.length+1;v++)if(v>=D.expandedStates.length){u.push({ind:p,mode:V,doc:A});break}else{let B=D.expandedStates[v],b={ind:p,mode:ue,doc:B};if(Mr(b,u,m,F,t)){u.push(b);break}}}else u.push({ind:p,mode:V,doc:D.contents});break}}D.id&&(t[D.id]=z(!1,u,-1).mode);break;case J:{let h=n-i,m=D[At]??0,{parts:F}=D,A=F.length-m;if(A===0)break;let v=F[m+0],B=F[m+1],b={ind:p,mode:ue,doc:v},g={ind:p,mode:V,doc:v},y=Mr(b,[],h,l.length>0,t,!0);if(A===1){y?u.push(b):u.push(g);break}let x={ind:p,mode:ue,doc:B},E={ind:p,mode:V,doc:B};if(A===2){y?u.push(x,b):u.push(E,g);break}let w=F[m+2],k={ind:p,mode:d,doc:{...D,[At]:m+2}};Mr({ind:p,mode:ue,doc:[v,B,w]},[],h,l.length>0,t,!0)?u.push(k,x,b):y?u.push(k,E,b):u.push(k,E,g);break}case K:case De:{let h=D.groupId?t[D.groupId]:d;if(h===V){let m=D.type===K?D.breakContents:D.negate?D.contents:ir(D.contents);m&&u.push({ind:p,mode:d,doc:m})}if(h===ue){let m=D.type===K?D.flatContents:D.negate?ir(D.contents):D.contents;m&&u.push({ind:p,mode:d,doc:m})}break}case pe:l.push({ind:p,mode:d,doc:D.contents});break;case he:l.length>0&&u.push({ind:p,mode:d,doc:ar});break;case $:switch(d){case ue:if(D.hard)s=!0;else{D.soft||(o.push(" "),i+=1);break}case V:if(l.length>0){u.push({ind:p,mode:d,doc:D},...l.reverse()),l.length=0;break}D.literal?p.root?(o.push(a,p.root.value),i=p.root.length):(o.push(a),i=0):(i-=xt(o),o.push(a+p.value),i=p.length);break}break;case de:u.push({ind:p,mode:d,doc:D.contents});break;case ne:break;default:throw new Te(D)}u.length===0&&l.length>0&&(u.push(...l.reverse()),l.length=0)}let f=o.indexOf(Ve);if(f!==-1){let p=o.indexOf(Ve,f+1);if(p===-1)return{formatted:o.filter(m=>m!==Ve).join("")};let d=o.slice(0,f).join(""),D=o.slice(f+1,p).join(""),h=o.slice(p+1).join("");return{formatted:d+D+h,cursorNodeStart:d.length,cursorNodeText:D}}return{formatted:o.join("")}}function Mi(e,r,t){let{node:n}=e,a=[],i=e.map(()=>e.map(({index:f})=>{let p=Ni(t(),r).formatted,d=fr(p);return a[f]=Math.max(a[f]??3,d),{text:p,width:d}},"children"),"children"),u=s(!1);if(r.proseWrap!=="never")return[ur,u];let o=s(!0);return[ur,Ue(Zn(o,u))];function s(f){return Tr(ar,[c(i[0],f),l(f),...i.slice(1).map(p=>c(p,f))].map(p=>`| ${p.join(" | ")} |`))}function l(f){return a.map((p,d)=>{let D=n.align[d],h=D==="center"||D==="left"?":":"-",m=D==="center"||D==="right"?":":"-",F=f?"-":"-".repeat(p-2);return`${h}${F}${m}`})}function c(f,p){return f.map(({text:d,width:D},h)=>{if(p)return d;let m=a[h]-D,F=n.align[h],A=0;F==="right"?A=m:F==="center"&&(A=Math.floor(m/2));let v=m-A;return`${" ".repeat(A)}${d}${" ".repeat(v)}`})}}function Ui(e,r,t){let n=e.map(t,"children");return Df(n)}function Df(e){let r=[""];return function t(n){for(let a of n){let i=G(a);if(i===H){t(a);continue}let u=a,o=[];i===J&&([u,...o]=a.parts),r.push([r.pop(),u],...o)}}(e),ze(r)}var Q,wt=class{constructor(r){jn(this,Q);Wn(this,Q,new Set(r))}getLeadingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=0;a<r.length&&t.has(r.charAt(a));a++)n++;return n}getTrailingWhitespaceCount(r){let t=ce(this,Q),n=0;for(let a=r.length-1;a>=0&&t.has(r.charAt(a));a--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return ce(this,Q).has(r.charAt(0))}hasTrailingWhitespace(r){return ce(this,Q).has(z(!1,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${le([...ce(this,Q)].join(""))}]+`,a=new RegExp(t?`(${n})`:n,"u");return r.split(a)}hasWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=ce(this,Q);return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=ce(this,Q);return Array.prototype.every.call(r,n=>t.has(n))}};Q=new WeakMap;var zi=wt;var pf=[" ",`
|
||||
`,"\f","\r"," "],hf=new zi(pf),kt=hf;var df=/^\\?.$/su,mf=/^\n *>[ >]*$/u;function Ff(e,r){return e=gf(e,r),e=vf(e),e=bf(e,r),e=Af(e,r),e=Cf(e),e}function gf(e,r){return ye(e,t=>{if(t.type!=="text")return t;let{value:n}=t;if(n==="*"||n==="_"||!df.test(n)||t.position.end.offset-t.position.start.offset===n.length)return t;let a=r.originalText.slice(t.position.start.offset,t.position.end.offset);return mf.test(a)?t:{...t,value:a}})}function Ef(e,r,t){return ye(e,n=>{if(!n.children)return n;let a=n.children.reduce((i,u)=>{let o=z(!1,i,-1);return o&&r(o,u)?i.splice(-1,1,t(o,u)):i.push(u),i},[]);return{...n,children:a}})}function vf(e){return Ef(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Cf(e){return ye(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=kt.trimStart(a)),t===n.children.length-1&&(a=kt.trimEnd(a))),{type:"sentence",position:r.position,children:Rr(a)}})}function bf(e,r){return ye(e,(t,n,a)=>{if(t.type==="code"){let i=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=i,i)for(let u=0;u<a.length;u++){let o=a[u];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return t})}function Af(e,r){return ye(e,(a,i,u)=>{if(a.type==="list"&&a.children.length>0){for(let o=0;o<u.length;o++){let s=u[o];if(s.type==="list"&&!s.isAligned)return a.isAligned=!1,a}a.isAligned=n(a)}return a});function t(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[i,u]=a.children;if(Ye(i,r).leadingSpaces.length>1)return!0;let s=t(i);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(u);return s!==l?!1:s%r.tabWidth===0?!0:Ye(u,r).leadingSpaces.length>1}}var Gi=Ff;function Yi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,a=r();switch(n.type){case"whitespace":if(G(a)!==Y){t.push(a,"");break}default:t.push([t.pop(),a])}},"children"),ze(t)}var yf=new Set(["heading","tableCell","link","wikiLink"]),$i=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function xf({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;n<t.length-1;++n){let a=t[n];if(a.type==="whitespace"&&(a.value===" "||a.value==="")){let i=t[n-1].kind,u=t[n+1].kind;(i===ie&&u===$e||i===$e&&u===ie)&&++r[a.value]}}e.usesCJSpaces=r[" "]>r[""]}return e.usesCJSpaces}function wf(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,i=n.kind;return Vi(a)&&Vi(i)||a===Le&&i===ie||i===Le&&a===ie?!0:a===sr||i===sr||a===ie&&i===ie?!1:$i.has(n.value[0])||$i.has(z(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:xf(e)}function Vi(e){return e===$e||e===Le}function kf(e,r,t,n){if(t!=="always"||e.hasAncestor(u=>yf.has(u.type)))return!1;if(n)return r!=="";let{previous:a,next:i}=e;return!a||!i?!0:r===""?!1:a.kind===Le&&i.kind===ie||i.kind===Le&&a.kind===ie?!0:!(a.isCJ||i.isCJ)}function Bt(e,r,t,n){if(t==="preserve"&&r===`
|
||||
`)return L;let a=r===" "||r===`
|
||||
`&&wf(e,n);return kf(e,r,t,n)?a?qr:_r:a?" ":""}var Bf=new Set(["listItem","definition"]);function ji(e){var a,i;let{previous:r,next:t}=e;return(r==null?void 0:r.type)==="sentence"&&((a=z(!1,r.children,-1))==null?void 0:a.type)==="word"&&!z(!1,r.children,-1).hasTrailingPunctuation||(t==null?void 0:t.type)==="sentence"&&((i=t.children[0])==null?void 0:i.type)==="word"&&!t.children[0].hasLeadingPunctuation}function Tf(e,r,t){var a;let{node:n}=e;if(Lf(e)){let i=[""],u=Rr(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let o of u){if(o.type==="word"){i.push([i.pop(),o.value]);continue}let s=Bt(e,o.value,r.proseWrap,!0);if(G(s)===Y){i.push([i.pop(),s]);continue}i.push(s,"")}return ze(i)}switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Sf(e,r,t),L];case"paragraph":return Ui(e,r,t);case"sentence":return Yi(e,t);case"word":{let i=R(!1,R(!1,n.value,"*",String.raw`\*`),new RegExp([`(^|${Se.source})(_+)`,`(_+)(${Se.source}|$)`].join("|"),"gu"),(s,l,c,f,p)=>R(!1,c?`${l}${c}`:`${f}${p}`,"_",String.raw`\_`)),u=(s,l,c)=>s.type==="sentence"&&c===0,o=(s,l,c)=>Ct(s.children[c-1]);return i!==n.value&&(e.match(void 0,u,o)||e.match(void 0,u,(s,l,c)=>s.type==="emphasis"&&c===0,o))&&(i=i.replace(/^(\\?[*_])+/u,s=>R(!1,s,"\\",""))),i}case"whitespace":{let{next:i}=e,u=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return Bt(e,n.value,u)}case"emphasis":{let i;if(Ct(n.children[0]))i=r.originalText[n.position.start.offset];else{let u=ji(e),o=((a=e.parent)==null?void 0:a.type)==="strong"&&ji(e.ancestors);i=u||o||e.hasAncestor(s=>s.type==="emphasis")?"*":"_"}return[i,j(e,r,t),i]}case"strong":return["**",j(e,r,t),"**"];case"delete":return["~~",j(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:R(!1,n.value,`
|
||||
`," "),u=ei(i,"`"),o="`".repeat(u||1),s=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[o,s,i,s,o]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=R(!1,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",j(e,r,t),"](",Tt(n.url,")"),Ur(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),Ur(n.title,r),")"];case"blockquote":return["> ",Ae("> ",j(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",j(e,r,t)];case"code":{if(n.isIndented){let o=" ".repeat(4);return Ae(o,[o,be(n.value,L)])}let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Sr(n.value,i)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",L,be(Nr(n,r.originalText),L),L,u]}case"html":{let{parent:i,isLast:u}=e,o=i.type==="root"&&u?n.value.trimEnd():n.value,s=/^<!--.*-->$/su.test(o);return be(o,s?L:_e(nr))}case"list":{let i=Hi(n,e.parent),u=ki(n,r);return j(e,r,t,{processor(o){let s=c(),l=o.node;if(l.children.length===2&&l.children[1].type==="html"&&l.children[0].position.start.column!==l.children[1].position.start.column)return[s,Wi(o,r,t,s)];return[s,Ae(" ".repeat(s.length),Wi(o,r,t,s))];function c(){let f=n.ordered?(o.isFirst?n.start:u?1:n.start+o.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?qf(f,r):f}}})}case"thematicBreak":{let{ancestors:i}=e,u=i.findIndex(s=>s.type==="list");return u===-1?"---":Hi(i[u],i[u+1])%2===0?"***":"---"}case"linkReference":return["[",j(e,r,t),"]",n.referenceType==="full"?qt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",qt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?qr:" ";return Ue([qt(n),":",ir([i,Tt(n.url),n.title===null?"":[i,Ur(n.title,r,!1)]])])}case"footnote":return["[^",j(e,r,t),"]"];case"footnoteReference":return Qi(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Qi(n),": ",i?j(e,r,t):Ue([Ae(" ".repeat(4),j(e,r,t,{processor:({isFirst:u})=>u?Ue([_r,t()]):t()}))])]}case"table":return Mi(e,r,t);case"tableCell":return j(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",_e(nr)]:["\\",L];case"liquidNode":return be(n.value,L);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",L,n.value?[be(n.value,L),L]:"","$$"];case"inlineMath":return r.originalText.slice(Pe(n),Oe(n));case"tableRow":case"listItem":case"text":default:throw new ni(n,"Markdown")}}function Wi(e,r,t,n){let{node:a}=e,i=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[i,j(e,r,t,{processor({node:u,isFirst:o}){if(o&&u.type!=="list")return Ae(" ".repeat(i.length),t());let s=" ".repeat(Rf(r.tabWidth-n.length,0,3));return[s,Ae(s,t())]}})]}function qf(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function Hi(e,r){return _f(e,r,t=>t.ordered===e.ordered)}function _f(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function Sf(e,r,t){let n=[],a=null,{children:i}=e.node;for(let[u,o]of i.entries())switch(_t(o)){case"start":a===null&&(a={index:u,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:u,offset:o.position.start.offset}}),a=null);break;default:break}return j(e,r,t,{processor({index:u}){if(n.length>0){let o=n[0];if(u===o.start.index)return[Ki(i[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),Ki(i[o.end.index])];if(o.start.index<u&&u<o.end.index)return!1;if(u===o.end.index)return n.shift(),!1}return t()}})}function j(e,r,t,n={}){let{processor:a=t}=n,i=[];return e.each(()=>{let u=a(e);u!==!1&&(i.length>0&&Pf(e)&&(i.push(L),(Of(e,r)||Ji(e))&&i.push(L),Ji(e)&&i.push(L)),i.push(u))},"children"),i}function Ki(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function _t(e){let r;if(e.type==="html")r=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function Pf({node:e,parent:r}){let t=vt.has(e.type),n=e.type==="html"&&Ir.has(r.type);return!t&&!n}function Xi(e,r){retLine truncated
|
||||
`)}function Of({node:e,previous:r,parent:t},n){if(Xi(r,n)||e.type==="list"&&t.type==="listItem"&&r.type==="code")return!0;let i=r.type===e.type&&Bf.has(e.type),u=t.type==="listItem"&&(e.type==="list"||!Xi(t,n)),o=_t(r)==="next",s=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,l=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||u||o||s||l)}function Ji({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function Lf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var If=(e,r)=>{for(let t of r)e=R(!1,e,t,encodeURIComponent(t));return e};function Tt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>le(n)).join("|"),"u").test(e)?`<${If(e,"<>")}>`:e}function Ur(e,r,t=!0){if(!e)return"";if(t)return" "+Ur(e,r,!1);if(e=R(!1,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ti(e,r.singleQuote);return e=R(!1,e,"\\","\\\\"),e=R(!1,e,n,`\\${n}`),`${n}${e}${n}`}function Rf(e,r,t){return Math.max(r,Math.min(e,t))}function Nf(e){return e.index>0&&_t(e.previous)==="next"}function qt(e){return`[${(0,Zi.default)(e.label)}]`}function Qi(e){return`[^${e.label}]`}var Mf={preprocess:Gi,print:Tf,embed:Bi,massageAstNode:Di,hasPrettierIgnore:Nf,insertPragma:ci,getVisitorKeys:_i},eu=Mf;var ru=[{name:"Markdown",type:"prose",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:["contents.lr","README"],wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",extensions:[".mdx"],tmScope:"text.md",aceMode:"markdown",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",filenames:[],wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}];var St={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Uf={proseWrap:St.proseWrap,singleQuote:St.singleQuote},tu=Uf;var zn={};$n(zn,{markdown:()=>tF,mdx:()=>nF,remark:()=>tF});var gl=Me(iu(),1),El=Me(gu(),1),vl=Me(pc(),1),Cl=Me(al(),1);var Hm=/^import\s/u,Km=/^export\s/u,ol=String.raw`[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*|`,sl=/<!---->|<!---?[^>-](?:-?[^-])*-->/u,Xm=/^\{\s*\/\*(.*)\*\/\s*\}/u,Jm=`
|
||||
|
||||
`,cl=e=>Hm.test(e),Un=e=>Km.test(e),ll=(e,r)=>{let t=r.indexOf(Jm),n=r.slice(0,t);if(Un(n)||cl(n))return e(n)({type:Un(n)?"export":"import",value:n})},fl=(e,r)=>{let t=Xm.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};ll.locator=e=>Un(e)||cl(e)?-1:1;fl.locator=(e,r)=>e.indexOf("{",r);var Dl=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=ll,n.esComment=fl,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var Qm=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=Ge(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},pl=Qm;function Zm(){return e=>ye(e,(r,t,[n])=>r.type!=="html"||sl.test(r.value)||Ir.has(n.type)?r:{...r,type:"jsx"})}var hl=Zm;var eF=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let i=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(i)return n(i[0])({type:"liquidNode",value:i[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},dl=eF;var rF=function(){let e="wikiLink",r=/^\[\[(?<linkContents>.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(i,u){let o=r.exec(u);if(o){let s=o.groups.linkContents.trim();return i(o[0])({type:e,value:s})}}a.locator=function(i,u){return i.indexOf("[",u)}},ml=rF;function bl({isMDX:e}){return r=>{let t=(0,Cl.default)().use(vl.default,{commonmark:!0,...e&&{blocks:[ol]}}).use(gl.default).use(pl).use(El.default).use(e?Dl:Fl).use(dl).use(e?hl:Fl).use(ml);return t.run(t.parse(r))}}function Fl(){}var Al={astFormat:"mdast",hasPragma:oi,hasIgnorePragma:si,locStart:Pe,locEnd:Oe},tF={...Al,parse:bl({isMDX:!1})},nF={...Al,parse:bl({isMDX:!0})};var iF={mdast:eu};var p2=Gn;export{p2 as default,ru as languages,tu as options,zn as parsers,iF as printers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
meriyah: Parser;
|
||||
};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var K2=Object.defineProperty;var Jn=Object.getOwnPropertyDescriptor;var _n=Object.getOwnPropertyNames;var jn=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var t in n)K2(e,t,{get:n[t],enumerable:!0})},Xn=(e,n,t,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of _n(n))!jn.call(e,o)&&o!==t&&K2(e,o,{get:()=>n[o],enumerable:!(u=Jn(n,o))||u.enumerable});return e};var Hn=e=>Xn(K2({},"__esModule",{value:!0}),e);var u1={};Ce(u1,{parsers:()=>De});var De={};Ce(De,{meriyah:()=>t1});var zn=(e,n,t,u)=>{if(!(e&&n==null))return n.replaceAll?n.replaceAll(t,u):t.global?n.replace(t,u):n.split(t).join(u)},G=zn;var Kn={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must thLine truncated
|
||||
`);return n.length>1&&n.every(t=>t.trimStart()[0]==="*")}var he=new WeakMap;function Mu(e){return he.has(e)||he.set(e,Vu(e)),he.get(e)}var ye=Mu;function Uu(e){if(e.length<2)return;let n;for(let t=e.length-1;t>=0;t--){let u=e[t];if(n&&O(u)===M(n)&&ye(u)&&ye(n)&&(e.splice(t+1,1),u.value+="*//*"+n.value,u.range=[M(u),O(n)]),!me(u)&&!f2(u))throw new TypeError(`Unknown comment type: "${u.type}".`);n=u}}var An=Uu;var r2=null;function w2(e){if(r2!==null&&typeof r2.property){let n=r2;return r2=w2.prototype=null,n}return r2=w2.prototype=e??Object.create(null),new w2}var Ju=10;for(let e=0;e<=Ju;e++)w2();function Ae(e){return w2(e)}function _u(e,n="type"){Ae(e);function t(u){let o=u[n],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return t}var Tn=_u;var bn={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","
Line truncated
|
||||
`;e=G(!1,e.replace(zu,"").replace(Hu,""),Yu,"$1");let t="";for(;t!==e;)t=e,e=G(!1,e,Wu,`${n}$1 $2${n}`);e=e.replace(Bn,"").trimEnd();let u=Object.create(null),o=G(!1,e,Sn,"").replace(Bn,"").trimEnd(),i;for(;i=Sn.exec(e);){let l=G(!1,i[2],$u,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let c=u[i[1]];u[i[1]]=[...Qu,...Array.isArray(c)?c:[c],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var Ln=["noformat","noprettier"],In=["format","prettier"];function Zu(e){if(!e.startsWith("#!"))return"";let n=e.indexOf(`
|
||||
`);return n===-1?e:e.slice(0,n)}var qn=Zu;function Pn(e){let n=qn(e);n&&(e=e.slice(n.length+1));let t=Fn(e),{pragmas:u,comments:o}=Nn(t);return{shebang:n,text:e,pragmas:u,comments:o}}function vn(e){let{pragmas:n}=Pn(e);return In.some(t=>Object.prototype.hasOwnProperty.call(n,t))}function On(e){let{pragmas:n}=Pn(e);return Ln.some(t=>Object.prototype.hasOwnProperty.call(n,t))}function Gu(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:vn,hasIgnorePragma:On,locStart:M,locEnd:O,...e}}var Rn=Gu;var z2="module",Vn="script",Mn=[z2,Vn];function Un(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return z2;if(/\.(?:cjs|cts)$/iu.test(e))return Vn}}var xu={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,uniqueKeyInPattern:!1};function pu(e,n){let t=[],u=an(e,{...xu,module:n===z2,onComment:t});return u.comments=t,u}function e1(e){let{description:n,loc:t}=e;return t?sn(n,{loc:{start:{line:t.start.line,column:t.start.column+1},end:{line:t.end.line,column:t.end.column+1}},cause:e}):e}function n1(e,n){let t=Un(n==null?void 0:n.filepath),u=(t?[t]:Mn).map(i=>()=>pu(e,i)),o;try{o=gn(u)}catch({errors:[i]}){throw e1(i)}return wn(o,{parser:"meriyah",text:e})}var t1=Rn(n1);return Hn(u1);});
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
var Jn=Object.defineProperty;var Ce=(e,n)=>{for(var t in n)Jn(e,t,{get:n[t],enumerable:!0})};var De={};Ce(De,{parsers:()=>be});var be={};Ce(be,{meriyah:()=>xu});var _n=(e,n,t,u)=>{if(!(e&&n==null))return n.replaceAll?n.replaceAll(t,u):t.global?n.replace(t,u):n.split(t).join(u)},G=_n;var jn={0:"Unexpected token",30:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"\\8 and \\9 are not allowed in template strings",4:"Private identifier #%0 is not defined",5:"Illegal Unicode escape sequence",6:"Invalid code point %0",7:"Invalid hexadecimal escape sequence",9:"Octal literals are not allowed in strict mode",8:"Decimal integer literals with a leading zero are forbidden in strict mode",10:"Expected number in radix %0",151:"Invalid left-hand side assignment to a destructible right-hand side",11:"Non-number found after exponent indicator",12:"Invalid BigIntLiteral",13:"No identifiers allowed directly after numeric literal",14:"Escapes \\8 or \\9 are not syntactically valid escapes",15:"Escapes \\8 or \\9 are not allowed in strict mode",16:"Unterminated string literal",17:"Unterminated template literal",18:"Multiline comment was not closed properly",19:"The identifier contained dynamic unicode escape that was not closed",20:"Illegal character '%0'",21:"Missing hexadecimal digits",22:"Invalid implicit octal",23:"Invalid line break in string literal",24:"Only unicode escapes are legal in identifier names",25:"Expected '%0'",26:"Invalid left-hand side in assignment",27:"Invalid left-hand side in async arrow",28:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',29:"Member access on super must be in a method",31:"Await expression not allowed in formal parameter",32:"Yield expression not allowed in formal parameter",95:"Unexpected token: 'escaped keyword'",33:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",123:"Async functions can only be declared at the top level or inside a block",34:"Unterminated regular expression",35:"Unexpected regular expression flag",36:"Duplicate regular expression flag '%0'",37:"%0 functions must have exactly %1 argument%2",38:"Setter function argument must not be a rest parameter",39:"%0 declaration must have a name in this context",40:"Function name may not contain any reserved words or be eval or arguments in strict mode",41:"The rest operator is missing an argument",42:"A getter cannot be a generator",43:"A setter cannot be a generator",44:"A computed property name must be followed by a colon or paren",134:"Object literal keys that are strings or numbers must be a method or have a colon",46:"Found `* async x(){}` but this should be `async * x(){}`",45:"Getters and setters can not be generators",47:"'%0' can not be generator method",48:"No line break is allowed after '=>'",49:"The left-hand side of the arrow can only be destructed through assignment",50:"The binding declaration is not destructible",51:"Async arrow can not be followed by new expression",52:"Classes may not have a static property named 'prototype'",53:"Class constructor may not be a %0",54:"Duplicate constructor method in class",55:"Invalid increment/decrement operand",56:"Invalid use of `new` keyword on an increment/decrement expression",57:"`=>` is an invalid assignment target",58:"Rest element may not have a trailing comma",59:"Missing initializer in %0 declaration",60:"'for-%0' loop head declarations can not have an initializer",61:"Invalid left-hand side in for-%0 loop: Must have a single binding",62:"Invalid shorthand property initializer",63:"Property name __proto__ appears more than once in object literal",64:"Let is disallowed as a lexically bound name",65:"Invalid use of '%0' inside new expression",66:"Illegal 'use strict' directive in function with non-simple parameter list",67:'Identifier "let" disallowed as left-hand side expression in strict mode',68:"Illegal continue statement",69:"Illegal break statement",70:"Cannot have `let[...]` as a var name in strict mode",71:"Invalid destructuring assignment target",72:"Rest parameter may not have a default initializer",73:"The rest argument must the be last parameter",74:"Invalid rest argument",76:"In strict mode code, functions can only be declared at top level or inside a block",77:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",78:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",79:"Class declaration can't appear in single-statement context",80:"Invalid left-hand side in for-%0",81:"Invalid assignment in for-%0",82:"for await (... of ...) is only valid in async functions and async generators",83:"The first token after the template expression should be a continuation of the template",85:"`let`Line truncated
|
||||
`);return n.length>1&&n.every(t=>t.trimStart()[0]==="*")}var ke=new WeakMap;function vu(e){return ke.has(e)||ke.set(e,Pu(e)),ke.get(e)}var he=vu;function Ou(e){if(e.length<2)return;let n;for(let t=e.length-1;t>=0;t--){let u=e[t];if(n&&O(u)===M(n)&&he(u)&&he(n)&&(e.splice(t+1,1),u.value+="*//*"+n.value,u.range=[M(u),O(n)]),!ge(u)&&!f2(u))throw new TypeError(`Unknown comment type: "${u.type}".`);n=u}}var An=Ou;var r2=null;function w2(e){if(r2!==null&&typeof r2.property){let n=r2;return r2=w2.prototype=null,n}return r2=w2.prototype=e??Object.create(null),new w2}var Ru=10;for(let e=0;e<=Ru;e++)w2();function ye(e){return w2(e)}function Vu(e,n="type"){ye(e);function t(u){let o=u[n],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return t}var Tn=Vu;var bn={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","
Line truncated
|
||||
`;e=G(!1,e.replace(_u,"").replace(Ju,""),zu,"$1");let t="";for(;t!==e;)t=e,e=G(!1,e,Hu,`${n}$1 $2${n}`);e=e.replace(Bn,"").trimEnd();let u=Object.create(null),o=G(!1,e,Sn,"").replace(Bn,"").trimEnd(),i;for(;i=Sn.exec(e);){let l=G(!1,i[2],Xu,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let c=u[i[1]];u[i[1]]=[...Ku,...Array.isArray(c)?c:[c],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var Ln=["noformat","noprettier"],In=["format","prettier"];function $u(e){if(!e.startsWith("#!"))return"";let n=e.indexOf(`
|
||||
`);return n===-1?e:e.slice(0,n)}var qn=$u;function Pn(e){let n=qn(e);n&&(e=e.slice(n.length+1));let t=Fn(e),{pragmas:u,comments:o}=Nn(t);return{shebang:n,text:e,pragmas:u,comments:o}}function vn(e){let{pragmas:n}=Pn(e);return In.some(t=>Object.prototype.hasOwnProperty.call(n,t))}function On(e){let{pragmas:n}=Pn(e);return Ln.some(t=>Object.prototype.hasOwnProperty.call(n,t))}function Wu(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:vn,hasIgnorePragma:On,locStart:M,locEnd:O,...e}}var Rn=Wu;var z2="module",Vn="script",Mn=[z2,Vn];function Un(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return z2;if(/\.(?:cjs|cts)$/iu.test(e))return Vn}}var Yu={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,uniqueKeyInPattern:!1};function Qu(e,n){let t=[],u=an(e,{...Yu,module:n===z2,onComment:t});return u.comments=t,u}function Zu(e){let{description:n,loc:t}=e;return t?sn(n,{loc:{start:{line:t.start.line,column:t.start.column+1},end:{line:t.end.line,column:t.end.column+1}},cause:e}):e}function Gu(e,n){let t=Un(n==null?void 0:n.filepath),u=(t?[t]:Mn).map(i=>()=>Qu(e,i)),o;try{o=gn(u)}catch({errors:[i]}){throw Zu(i)}return wn(o,{parser:"meriyah",text:e})}var xu=Rn(Gu);var w0=De;export{w0 as default,be as parsers};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
css: Parser;
|
||||
less: Parser;
|
||||
scss: Parser;
|
||||
};
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var xl=Object.create;var Tt=Object.defineProperty;var bl=Object.getOwnPropertyDescriptor;var _l=Object.getOwnPropertyNames;var El=Object.getPrototypeOf,kl=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tn=(t,e)=>{for(var s in e)Tt(t,s,{get:e[s],enumerable:!0})},rn=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _l(e))!kl.call(t,n)&&n!==s&&Tt(t,n,{get:()=>e[n],enumerable:!(r=bl(e,n))||r.enumerable});return t};var be=(t,e,s)=>(s=t!=null?xl(El(t)):{},rn(e||!t||!t.__esModule?Tt(s,"default",{value:t,enumerable:!0}):s,t)),Sl=t=>rn(Tt({},"__esModule",{value:!0}),t);var Oi=g((Rv,is)=>{var _=String,Ti=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};is.exports=Ti();is.exports.createColors=Ti});var os=g(()=>{});var Yt=g((Lv,Ni)=>{"use strict";var Ci=Oi(),Ai=os(),at=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Ci.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:p,red:l}=Ci.createColors(!0);n=d=>f(l(d)),r=d=>p(d),Ai&&(i=d=>Ai(d))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,p)=>{let l=u+1+p,d=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let h=20,m=Math.max(0,this.column-h),y=Math.max(this.column+h,this.endColumn+h),b=f.slice(m,y),w=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+r(d)+i(b)+`
|
||||
`+w+n("^")}let x=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+i(f)+`
|
||||
`+x+n("^")}return" "+r(d)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};Ni.exports=at;at.default=at});var Vt=g((Dv,Ri)=>{"use strict";var Pi={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Sc(t){return t[0].toUpperCase()+t.slice(1)}var ut=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(s+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let s=e.nodes.length-1;for(;s>0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,s!==n||r)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+s+e.text+r+"*/",e)}decl(e,s){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),s&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Pi[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Sc(r);this[u]?n=this[u](o,e):o.walk(a=>{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Pi[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ri.exports=ut;ut.default=ut});var lt=g((Mv,Ii)=>{"use strict";var Tc=Vt();function as(t,e){new Tc(e).stringify(t)}Ii.exports=as;as.default=as});var zt=g((Bv,us)=>{"use strict";us.exports.isClean=Symbol("isClean");us.exports.my=Symbol("my")});var pt=g((Uv,qi)=>{"use strict";var Oc=Yt(),Cc=Vt(),Ac=lt(),{isClean:ct,my:Nc}=zt();function ls(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>ls(o,s)):(i==="object"&&n!==null&&(n=ls(n)),s[r]=n)}return s}function J(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var ft=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ct]=!1,this[Nc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=ls(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new Oc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[ct]=!0}markDirty(){if(this[ct]){this[ct]=!1;let e=this;for(;e=e.parent;)e[ct]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(J(r,this.source.start),J(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=J(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:J(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:J(s,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:J(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new Cc().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ac){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};qi.exports=ft;ft.default=ft});var qe=g((Fv,Li)=>{"use strict";var Pc=pt(),ht=class extends Pc{constructor(e){super(e),this.type="comment"}};Li.exports=ht;ht.default=ht});var mt=g(($v,Di)=>{"use strict";var Rc=pt(),dt=class extends Rc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Di.exports=dt;dt.default=dt});var le=g((Wv,Vi)=>{"use strict";var Mi=qe(),Bi=mt(),Ic=pt(),{isClean:Ui,my:Fi}=zt(),cs,$i,Wi,fs;function Gi(t){return t.map(e=>(e.nodes&&(e.nodes=Gi(e.nodes)),delete e.source,e))}function Yi(t){if(t[Ui]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Yi(e)}var V=class t extends Ic{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=Gi($i(e).no
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[ds]=s,s}var Le=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!Ji||/^\w+:\/\//.test(s.from)||ms(s.from)?this.file=s.from:this.file=ys(s.from)),Ji&&$c){let r=new Fc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Mc(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,c;if(s&&typeof s=="object"){let p=s,l=r;if(typeof p.offset=="number"){a=p.offset;let d=this.fromOffset(a);s=d.line,r=d.col}else s=p.line,r=p.column,a=this.fromLineAndColumn(s,r);if(typeof l.offset=="number"){u=l.offset;let d=this.fromOffset(u);o=d.line,i=d.col}else o=l.line,i=l.column,u=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let p=this.fromOffset(a);s=p.line,r=p.col}let f=this.origin(s,r,o,i);return f?c=new Xi(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):c=new Xi(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),c.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(Ht&&(c.input.url=Ht(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,s){return Zi(this)[e-1]+s-1}fromOffset(e){let s=Zi(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;ms(o.source)?a=Ht(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));let c={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Qi)c.file=Qi(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};eo.exports=Le;Le.default=Le;hs&&hs.registerInput&&hs.registerInput(Le)});var jt=g((Kv,ro)=>{"use strict";var to=le(),Me=class extends to{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};ro.exports=Me;Me.default=Me;to.registerAtRule(Me)});var Be=g((Qv,oo)=>{"use strict";var so=le(),no,io,ce=class extends so{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new no(new io,this,e).stringify()}};ce.registerLazyResult=t=>{no=t};ce.registerProcessor=t=>{io=t};oo.exports=ce;ce.default=ce;so.registerRoot(ce)});var gs=g((Xv,ao)=>{"use strict";var yt={comma(t){return yt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return yt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};ao.exports=yt;yt.default=yt});var Kt=g((Jv,lo)=>{"use strict";var uo=le(),Wc=gs(),Ue=class extends uo{get selectors(){return Wc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};lo.exports=Ue;Ue.default=Ue;uo.registerRule(Ue)});var Jt=g((Zv,fo)=>{"use strict";var Qt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Xt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gc=/.[\r\n"'(/\\]/,co=/[\da-f]/i;fo.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,d,x,h=r.length,m=0,y=[],b=[];function w(){return m}function v(W){throw e.error("Unclosed "+W,m)}function R(){return b.length===0&&m>=h}function F(W){if(b.length)return b.pop();if(m>=h)return;let T=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(m),i){case 10:case 32:case 9:case 13:case 12:{a=m;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(m,a)],m=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let O=String.fromCharCode(i);f=[O,O,m];break}case 40:{if(x=y.length?y.pop()[1]:"",d=r.charCodeAt(m+1),x==="url"&&d!==39&&d!==34&&d!==32&&d!==10&&d!==9&&d!==12&&d!==13){a=m;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(n||T){a=m;break}else v("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["brackets",r.slice(m,a+1),m,a],m=a}else a=r.indexOf(")",m+1),o=r.slice(m,a+1),a===-1||Gc.test(o)?f=["(","(",m]:(f=["brackets",o,m,a],m=a);break}case 39:case 34:{c=i===39?"'":'"',a=m;do{if(p=!1,a=r.indexOf(c,a+1),a===-1)if(n||T){a=m+1;break}else v("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["string",r.slice(m,a+1),m,a],m=a;break}case 64:{Qt.lastIndex=m+1,Qt.test(r),Qt.lastIndex===0?a=r.length-1:a=Qt.lastIndex-2,f=["at-word",r.slice(m,a+1),m,a],m=a;break}case 92:{for(a=m,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,co.test(r.charAt(a)))){for(;co.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(m,a+1),m,a],m=a;break}default:{i===47&&r.charCodeAt(m+1)===42?(a=r.indexOf("*/",m+2)+1,a===0&&(n||T?a=r.length:v("comment")),f=["comment",r.slice(m,a+1),m,a],m=a):(Xt.lastIndex=m+1,Xt.test(r),Xt.lastIndex===0?a=r.length-1:a=Xt.lastIndex-2,f=["word",r.slice(m,a+1),m,a],y.push(f),m=a);break}}return m++,f}function Q(W){b.push(W)}return{back:Q,endOfFile:R,nextToken:F,position:w}}});var Zt=g((ex,mo)=>{"use strict";var Yc=jt(),Vc=qe(),zc=mt(),Hc=Be(),po=Kt(),jc=Jt(),ho={empty:!0,space:!0};function Kc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var ws=class{constructor(e){this.input=e,this.root=new Hc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Yc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Vc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=jc(this.input)}decl(e,s){let r=new zc;this.init(r,e[0][2]);let n=e[e.le
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new ef(n),this.tokenizer=Zc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),vs.exports.isInlineComment.bind(this)(t)}return!1}}});var vo=g((sx,wo)=>{wo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var bo=g((nx,xo)=>{var tf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,rf=/\.[0-9]/,sf=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&tf.test(e)===!1&&rf.test(e)===!1};xo.exports={isMixinToken:sf}});var Eo=g((ix,_o)=>{var nf=Jt(),of=/^url\((.+)\)/;_o.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=nf({css:s});for(t.filename=s.replace(of,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Oo=g((ox,To)=>{var ko=/:$/,So=/^:(\s+)?/;To.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(ko.test(e)){let[r]=e.match(ko);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(So.test(s)){let[r]=s.match(So);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var No=g((ux,Ao)=>{var af=qe(),uf=Zt(),{isInlineComment:lf}=go(),{interpolation:Co}=vo(),{isMixinToken:cf}=bo(),ff=Eo(),pf=Oo(),hf=/(!\s*important)$/i;Ao.exports=class extends uf{constructor(...e){super(...e),this.lastNode=null}atrule(e){Co.bind(this)(e)||(super.atrule(e),ff(this.lastNode),pf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new af,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),d=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],m=["brackets",p].concat(d,h),y=e.slice(0,i),b=e.slice(c+1);e=y,e.push(m),e=e.concat(b)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),p=u[u.length-1],l=[c[2],c[3]],d=[p[4],p[5]],h=["word",u.map(m=>m[1]).join("")].concat(l,d);e.splice(f,u.length,h)}let a=e.findIndex(c=>hf.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){lf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),Co.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(cf(s)){this.mixin(e);return}super.unknownWord(e)}}});var Ro=g((cx,Po)=>{var df=Vt();Po.exports=class extends df{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Io=g((fx,xs)=>{var mf=De(),yf=No(),gf=Ro();xs.exports={parse(t,e){let s=new mf(t,e),r=new yf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Os().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return k([n(a)]).process(o,u)},n};k.stringify=ep;k.parse=Jf;k.fromJSON=Hf;k.list=Qf;k.comment=t=>new Zo(t);k.atRule=t=>new Jo(t);k.decl=t=>new ea(t);k.rule=t=>new sa(t);k.root=t=>new ra(t);k.document=t=>new ta(t);k.CssSyntaxError=zf;k.Declaration=ea;k.Container=Vf;k.Processor=Os;k.Document=ta;k.Comment=Zo;k.Warning=tp;k.AtRule=Jo;k.Result=Zf;k.Input=jf;k.Rule=sa;k.Root=ra;k.Node=Xf;Kf.registerPostcss(k);na.exports=k;k.default=k});var oa=g((Sx,ia)=>{var{Container:rp}=sr(),Cs=class extends rp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};ia.exports=Cs});var la=g((Tx,ua)=>{"use strict";var nr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ir=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sp=/.[\r\n"'(/\\]/,aa=/[\da-f]/i,or=/[\n\f\r]/g;ua.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,d,x=r.length,h=0,m=[],y=[],b;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function R(){return y.length===0&&h>=x}function F(){let T=1,O=!1,C=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),O?!C&&i===O?(O=!1,C=!1):i===92?C=!C:C&&(C=!1):i===39||i===34?O=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function Q(T){if(y.length)return y.pop();if(h>=x)return;let O=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);d=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);d=[C,C,h];break}case 44:{d=["word",",",h,h+1];break}case 40:{if(p=m.length?m.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)b+=1;else if(l===41&&(b-=1,b===0))break;o+=1}a=r.slice(h,o+1),d=["brackets",a,h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||sp.test(a)?d=["(","(",h]:(d=["brackets",a,h,o],h=o);break}case 39:case 34:{for(u=i,o=h,f=!1;o<x&&(o++,o===x&&v("string"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&l===123&&F();d=["string",r.slice(h,o+1),h,o],h=o;break}case 64:{nr.lastIndex=h+1,nr.test(r),nr.lastIndex===0?o=r.length-1:o=nr.lastIndex-2,d=["at-word",r.slice(h,o+1),h,o],h=o;break}case 92:{for(o=h,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,aa.test(r.charAt(o)))){for(;aa.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}d=["word",r.slice(h,o+1),h,o],h=o;break}default:l=r.charCodeAt(h+1),i===35&&l===123?(o=h,F(),a=r.slice(h,o+1),d=["word",a,h,o],h=o):i===47&&l===42?(o=r.indexOf("*/",h+2)+1,o===0&&(n||O?o=r.length:v("comment")),d=["comment",r.slice(h,o+1),h,o],h=o):i===47&&l===47?(or.lastIndex=h+1,or.test(r),or.lastIndex===0?o=r.length-1:o=or.lastIndex-2,a=r.slice(h,o+1),d=["comment",a,h,o,"inline"],h=o):(ir.lastIndex=h+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,d=["word",r.slice(h,o+1),h,o],m.push(d),h=o);break}return h++,d}function W(T){y.push(T)}return{back:W,endOfFile:R,nextToken:Q,position:w}}});var fa=g((Ox,ca)=>{var{Comment:np}=sr(),ip=Zt(),op=oa(),ap=la(),As=class extends ip{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new np;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=ap(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new op;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let p=a;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};ca.exports=As});var ha=g((Cx,pa)=>{var{Input:up}=sr(),lp=fa();pa.exports=function(e,s){let r=new up(e,s),n=new lp(r);return n.parse(),n.root}});var Ps=g(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});function fp(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Ns.default=fp});var Is=g(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var pp=Ps(),ma=hp(pp);function hp(t){return t&&t.__esModule?t:{default:t}}function Et(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}Et.prototype=Object.create(ma.default.prototype);Et.constructor=ma.default;Et.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};Et.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};Rs.default=Et});var va=g(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.parseMediaFeature=wa;kt.parseMediaQuery=Ls;kt.parseMediaList=yp;var dp=Ps(),ya=ga(dp),mp=Is(),qs=ga(mp);function ga(t){return t&&t.__esModule?t:{default:t}}function wa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f<c.length;f++){var p=c[f];if((p==="'"||p==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:p}),n++):s[n].mode==="string"&&s[n].character===p&&c[f-1]!=="\\"&&(s.pop(),n--)),p==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):p==="}"&&(s.pop(),n--),s[n].mode==="normal"&&p===":"){var l=c.substring(f+1);u={type:"value",before:/^(\s*)/.exec(l)[1],after:/(\s*)$/.exec(l)[1],value:l.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=p}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Ls(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=wa(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new qs.default(i):new ya.default(i)),i=o(),n=!1)}for(var c=0;c<s.length;c++)if(i=s[c],c>0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=m+u,p=n-o[u].length):(f=m,p=h),e.push(["comment",a,m,y-h,f,n-p,y]),h=p,m=f,y=n):(Sr.lastIndex=y+1,Sr.test(s),Sr.lastIndex===0?n=s.length-1:n=Sr.lastIndex-2,e.push(["word",s.slice(y,n+1),m,y-h,m,n-h,y]),y=n);break}y++}return e}lu.exports=Tr.default});var hu=g((Or,pu)=>{"use strict";Or.__esModule=!0;var jd=function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}}(),Kd=Bs(),Qd=I(Kd),Xd=Us(),zs=I(Xd),Jd=Fs(),Zd=I(Jd),em=Na(),tm=I(em),rm=Ra(),Hs=I(rm),sm=La(),nm=I(sm),im=Ma(),om=I(im),am=Ua(),um=I(am),lm=$a(),cm=I(lm),fm=Ga(),pm=I(fm),hm=Va(),dm=I(hm),mm=Ha(),ym=I(mm),gm=Ka(),wm=I(gm),vm=Xa(),xm=I(vm),bm=Za(),_m=I(bm),Em=tu(),km=I(Em),Sm=cu(),fu=I(Sm),Tm=M(),Om=Cm(Tm);function Cm(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function Am(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Nm=function(){function t(e){Am(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new tm.default;var s=new Hs.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,fu.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,fu.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new ym.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new xm.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new Hs.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new om.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new _m.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===Om.PSEUDO){var r=new Hs.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column=th
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var U=g((sb,wu)=>{"use strict";var Bm=z(),We=class extends Bm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};We.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!We.prototype[e]&&(We.prototype[e]=function(s){return this.walkType(t,s)})};wu.exports=We});var xu=g((ib,vu)=>{"use strict";var Um=U();vu.exports=class extends Um{constructor(e){super(e),this.type="root"}}});var _u=g((ab,bu)=>{"use strict";var Fm=U();bu.exports=class extends Fm{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var Su=g((ub,ku)=>{"use strict";var Eu=U(),Ar=class extends Eu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Eu.registerWalker(Ar);ku.exports=Ar});var Ou=g((lb,Tu)=>{"use strict";var $m=U(),Wm=z(),Nr=class extends Wm{constructor(e){super(e),this.type="colon"}};$m.registerWalker(Nr);Tu.exports=Nr});var Au=g((cb,Cu)=>{"use strict";var Gm=U(),Ym=z(),Pr=class extends Ym{constructor(e){super(e),this.type="comma"}};Gm.registerWalker(Pr);Cu.exports=Pr});var Pu=g((fb,Nu)=>{"use strict";var Vm=U(),zm=z(),Rr=class extends zm{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Vm.registerWalker(Rr);Nu.exports=Rr});var qu=g((pb,Iu)=>{"use strict";var Ru=U(),Ir=class extends Ru{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Ru.registerWalker(Ir);Iu.exports=Ir});var Du=g((hb,Lu)=>{"use strict";var Hm=U(),jm=z(),qr=class extends jm{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Hm.registerWalker(qr);Lu.exports=qr});var Bu=g((db,Mu)=>{"use strict";var Km=U(),Qm=z(),Lr=class extends Qm{constructor(e){super(e),this.type="operator"}};Km.registerWalker(Lr);Mu.exports=Lr});var Fu=g((mb,Uu)=>{"use strict";var Xm=U(),Jm=z(),Dr=class extends Jm{constructor(e){super(e),this.type="paren",this.parenType=""}};Xm.registerWalker(Dr);Uu.exports=Dr});var Wu=g((yb,$u)=>{"use strict";var Zm=U(),ey=z(),Mr=class extends ey{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Zm.registerWalker(Mr);$u.exports=Mr});var Yu=g((gb,Gu)=>{"use strict";var ty=U(),ry=z(),Br=class extends ry{constructor(e){super(e),this.type="word"}};ty.registerWalker(Br);Gu.exports=Br});var zu=g((wb,Vu)=>{"use strict";var sy=U(),ny=z(),Ur=class extends ny{constructor(e){super(e),this.type="unicode-range"}};sy.registerWalker(Ur);Vu.exports=Ur});var ju=g((vb,Hu)=>{"use strict";var Ks=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);l=C!==-1?C-1:i}m=n.slice(a,l+1),x=m.split(`
|
||||
`),h=x.length-1,h>0?(b=u+h,w=l-x[h].length):(b=u,w=o),r.push(["comment",m,u,a-o,b,l-w,a]),o=w,u=b,a=l}else if(p===35&&!oy.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((p===117||p===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,p=n.charCodeAt(l);while(l<i&&ay.test(n.slice(l,l+1)));r.push(["unicoderange",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1}else if(p===47)l=a+1,r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else{let O=iy;if(p>=48&&p<=57&&(O=Ge),O.lastIndex=a+1,O.test(n),O.lastIndex===0?l=n.length-1:l=O.lastIndex-2,O===Ge||p===46){let C=n.charCodeAt(l),xe=n.charCodeAt(l+1),en=n.charCodeAt(l+2);(C===101||C===69)&&(xe===45||xe===43)&&en>=48&&en<=57&&(Ge.lastIndex=l+2,Ge.test(n),Ge.lastIndex===0?l=n.length-1:l=Ge.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var Zu=g((bb,Ju)=>{"use strict";var Qs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Ju.exports=Qs});var sl=g((Eb,rl)=>{"use strict";var uy=xu(),ly=_u(),cy=Su(),fy=Ou(),py=Au(),hy=Pu(),dy=qu(),my=Du(),yy=Bu(),el=Fu(),gy=Wu(),tl=Yu(),wy=zu(),vy=Xu(),xy=Bs(),by=Us(),_y=Fs(),Ey=Zu();function ky(t){return t.sort((e,s)=>e-s)}rl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new uy;let n=new ly;this.root.append(n),this.current=n,this.tokens=vy(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new fy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new py({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new hy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new Ey(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new yy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new el({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new tl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(j(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=Al([...Ot].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var Gr=class extends Error{name="InvalidDocError";constructor(e){super(Nl(e)),this.doc=e}},Yr=Gr;function Rl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(j(i)){case Ye:return e(i.map(r));case ne:return e({...i,parts:i.parts.map(r)});case ie:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case se:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Ee:case re:case He:case Ke:case ke:return e({...i,contents:r(i.contents)});case _e:case Ve:case ze:case je:case H:case Se:return e(i);default:throw new Yr(i)}}}function Il(t){return t.type===H&&!t.hard?t.soft?"":" ":t.type===ie?t.flatContents:t}function sn(t){return Rl(t,Il)}var Vr=()=>{},oe=Vr,Qe=Vr,nn=Vr;function q(t){return oe(t),{type:re,contents:t}}function on(t,e){return oe(e),{type:Ee,contents:e,n:t}}function L(t,e={}){return oe(t),Qe(e.expandedStates,!0),{type:se,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function an(t){return on({type:"root"},t)}function ae(t){return on(-1,t)}function Te(t){return nn(t),{type:ne,parts:t}}function Ct(t,e="",s={}){return oe(t),e!==""&&oe(e),{type:ie,breakContents:t,flatContents:e,groupId:s.groupId}}function un(t){return oe(t),{type:ke,contents:t}}var Xe={type:Se};var ql={type:H,hard:!0};var A={type:H},D={type:H,soft:!0},S=[ql,Xe];function G(t,e){oe(t),Qe(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}function Ll(t){return Array.isArray(t)&&t.length>0}var ue=Ll;var ln=new Proxy(()=>{},{get:()=>ln}),cn=ln;var At="'",fn='"';function Dl(t,e){let s=e===!0||e===At?At:fn,r=s===At?fn:At,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var pn=Dl;function Ml(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gsu,(o,u,a)=>u===r?u:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(u)?u:"\\"+u));return e+i+e}var hn=Ml;function Bl(t,e){cn.ok(/^(?<quote>["']).*\k<quote>$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":pn(s,e.singleQuote);return t.charAt(0)===r?t:hn(s,r,!1)}var Nt=Bl;var zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dn=zr;function Ul(t){return(t==null?void 0:t.type)==="front-matter"}var Oe=Ul;var Fl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function mn(t,e,s){if(Oe(t)&&t.language==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Oe(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&$(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=$l(t.value)),t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/gu,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isC
Line truncated
|
||||
`,s)+1;return s+t.column}var jr=Hl;function Pt(t){return(e,s,r)=>{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Xg=Pt(/\s/u),Rt=Pt(" "),En=Pt(",; "),It=Pt(/[^\n\r]/u);function kn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Sn(t,e){var s,r,n;if(typeof((r=(s=t.source)==null?void 0:s.start)==null?void 0:r.offset)=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?kn(t,t.sourceIndex):t.sourceIndex;if((n=t.source)!=null&&n.start)return jr(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Kr(t,e){var s,r;if(t.type==="css-comment"&&t.inline)return It(e,t.source.startOffset);if(typeof((r=(s=t.source)==null?void 0:s.end)==null?void 0:r.offset)=="number")return t.source.end.offset;if(t.source){if(t.source.end){let n=jr(t.source.end,e);return t.type==="value-word"?kn(t,n):n}if(ue(t.nodes))return Kr($(!1,t.nodes,-1),e)}return null}function Qr(t,e){t.source&&(t.source.startOffset=Sn(t,e),t.source.endOffset=Kr(t,e));for(let s in t){let r=t[s];s==="source"||!r||typeof r!="object"||(r.type==="value-root"||r.type==="value-unknown"?Tn(r,jl(t),r.text||r.value):Qr(r,e))}}function Tn(t,e,s){t.source&&(t.source.startOffset=Sn(t,s)+e,t.source.endOffset=Kr(t,s)+e);for(let r in t){let n=t[r];r==="source"||!n||typeof n!="object"||Tn(n,e,s)}}function jl(t){var s;let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/u)[0].length),t.type!=="css-atrule"&&typeof((s=t.raws)==null?void 0:s.between)=="string"&&(e+=t.raws.between.length),e}function On(t){let e="initial",s="initial",r,n=!1,i=[];for(let o=0;o<t.length;o++){let u=t[o];switch(e){case"initial":if(u==="'"){e="single-quotes";continue}if(u==='"'){e="double-quotes";continue}if((u==="u"||u==="U")&&t.slice(o,o+4).toLowerCase()==="url("){e="url",o+=3;continue}if(u==="*"&&t[o-1]==="/"){e="comment-block";continue}if(u==="/"&&t[o-1]==="/"){e="comment-inline",r=o-1;continue}continue;case"single-quotes":if(u==="'"&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")"&&(e="initial"),u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":(u==='"'||u==="'"||u==="*")&&(n=!0),(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+E(!1,t.slice(o,u),/["'*]/gu," ")+t.slice(u);return t}function N(t){var e;return(e=t.source)==null?void 0:e.startOffset}function P(t){var e;return(e=t.source)==null?void 0:e.endOffset}var Kl=/\*\/$/,Ql=/^\/\*\*?/,Pn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Xl=/(^|\s+)\/\/([^\n\r]*)/g,Cn=/^(\r?\n)+/,Jl=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,An=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Zl=/(\r?\n|^) *\* ?/g,Rn=[];function In(t){let e=t.match(Pn);return e?e[0].trimStart():""}function qn(t){let e=t.match(Pn),s=e==null?void 0:e[0];return s==null?t:t.slice(s.length)}function Ln(t){let e=`
|
||||
`;t=E(!1,t.replace(Ql,"").replace(Kl,""),Zl,"$1");let s="";for(;s!==t;)s=t,t=E(!1,t,Jl,`${e}$1 $2${e}`);t=t.replace(Cn,"").trimEnd();let r=Object.create(null),n=E(!1,t,An,"").replace(Cn,"").trimEnd(),i;for(;i=An.exec(t);){let o=E(!1,i[2],Xl,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...Rn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Dn({comments:t="",pragmas:e={}}){let s=`
|
||||
`,r="/**",n=" *",i=" */",o=Object.keys(e),u=o.flatMap(c=>Nn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Nn(o[0],c)[0]}${i}`}}let a=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?a:"")+(t&&o.length>0?n+s:"")+u+i}function Nn(t,e){return[...Rn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Mn=["noformat","noprettier"],Bn=["format","prettier"],Un="format";function ec(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var Fn=ec;function Xr(t){let e=Fn(t);e&&(t=t.slice(e.length+1));let s=In(t),{pragmas:r,comments:n}=Ln(s);return{shebang:e,text:t,pragmas:r,comments:n}}function $n(t){let{pragmas:e}=Xr(t);return Bn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Wn(t){let{pragmas:e}=Xr(t);return Mn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Gn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Xr(t),i=qn(s),o=Dn({pragmas:{[Un]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var et=3;function tc(t){let e=t.slice(0,et);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,et);if(s===-1)return;let r=t.slice(et,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+et,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o);return{type:"front-matter",language:i,explicitLanguage:r,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-et),raw:a}}function rc(t){let e=tc(t);if(!e)return{content:t};let{raw:s}=e;return{frontMatter:e,content:E(!1,s,/[^\n]/gu," ")+t.slice(s.length)}}var Ce=rc;function Yn(t){return $n(Ce(t).content)}function Vn(t){return Wn(Ce(t).content)}function zn(t){let{frontMatter:e,content:s}=Ce(t);return(e?e.raw+`
|
||||
|
||||
`:"")+Gn(s)}var sc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Hn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var nc=new Set(["initial","inherit","unset","revert"]);function jn(t){return nc.has(t.toLowerCase())}function Kn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function Ae(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ne(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Qn(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function he(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Xn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function Jn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Zn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function ei(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function ti(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function ri(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function si(t){return t.type==="value-word"&&t.value==="in"}function qt(t){return t.type==="value-operator"&&t.value==="*"}function tt(t){return t.type==="value-operator"&&t.value==="/"}function X(t){return t.type==="value-operator"&&t.value==="+"}function de(t){return t.type==="value-operator"&&t.value==="-"}function ic(t){return t.type==="value-operator"&&t.value==="%"}function Lt(t){return qt(t)||tt(t)||X(t)||de(t)||ic(t)}function ni(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function ii(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function rt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function Zr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/u.test(t.raws.params)}function Dt(t){return t.name.startsWith("prettier-placeholder")}function oi(t){return t.prop.startsWith("@prettier-placeholder")}function ai(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function ui(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function li(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function me(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Mt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Jr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Mt(t.groups[0])}function es(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Jr(s)&&!(r&&Jr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Jr(r)||r.type==="value-func")}function Pe(t){return t.type==="value-comment"&&t.inline}function Bt(t){return t.type==="value-word"&&t.value==="#"}function ts(t){return t.type==="value-word"&&t.value==="{"}function Ut(t){return t.type==="value-word"&&t.value==="}"}function st(t){return["value-word","value-atword"].includes(t.type)}function nt(t){return(t==null?void 0:t.type)==="value-colon"}function ci(t,e){if(!Mt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:nt(s[r+1])}function fi(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function pi(t){return t.type!=="value-func"?!1:sc.has(t.value.toLowerCase())}function Re(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function it(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function hi(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}f
Line truncated
|
||||
`)return e-2;if(n===`
|
||||
`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(n===`
|
||||
`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var $t=pc;function hc(t,e,s={}){let r=Rt(t,s.backwards?e-1:e,s),n=$t(t,r,s);return r!==n}var Wt=hc;function dc(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var vi=dc;function mc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?It(t,e):e}var xi=mc;function yc(t,e){let s=null,r=e;for(;r!==s;)s=r,r=En(t,r),r=vi(t,r),r=Rt(t,r);return r=xi(t,r),r=$t(t,r),r!==!1&&Wt(t,r)}var Gt=yc;function gc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(N(t),N(e.close)).trimEnd().endsWith(","))}function wc(t,e){return Zn(t.grandparent)&&gc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&wi(e)&&t.callParent(()=>es(t,e))?Ct(","):""}function bi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:d})=>typeof d=="string"?d:s(),"groups");if(n&&Jn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",G(",",i),r.close?s("close"):""];if(!r.open){let d=ns(t);Qe(i);let x=xc(G(",",i),2),h=G(d?S:A,x);return q(d?[S,h]:L([vc(t)?D:"",Te(h)]))}let o=t.map(({node:d,isLast:x,index:h})=>{var b;let m=i[h];Mt(d)&&d.type==="value-comma_group"&&d.groups&&d.groups[0].type!=="value-paren_group"&&((b=d.groups[2])==null?void 0:b.type)==="value-paren_group"&&j(m)===se&&j(m.contents)===re&&j(m.contents.contents)===ne&&(m=L(ae(m)));let y=[m,x?wc(t,e):","];if(!x&&d.type==="value-comma_group"&&ue(d.groups)){let w=$(!1,d.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&Gt(e.originalText,P(w))&&y.push(S)}return y},"groups"),u=ci(r,n),a=hi(r,n),c=es(t,e),f=a||c&&!u,p=a||u,l=L([r.open?s("open"):"",q([D,G(A,o)]),D,r.close?s("close"):""],{shouldBreak:f});return p?ae(l):l}function ns(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function vc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function xc(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function bc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Wt(e.originalText,N(o),{backwards:!0})&&!Oe(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:S),Gt(e.originalText,P(n))&&!Oe(n)&&r.push(S))},"nodes"),r}var Ie=bc;function _c(t,e,s){var n,i,o,u,a,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,S];case"css-root":{let f=Ie(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),S]:"",f,p?` ${p}`:"",r.nodes.length>0?S:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Re(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([S,Ie(t,e,s)]):"",S,"}",ei(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),d=l===":",x=typeof r.value=="string"&&/^ *$/u.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=ui(r)?sn(h):h,!d&&Re(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>ns(t),"value","group","group"))&&(h=q([S,ae(h)])),[E(!1,r.raws.before,/[\s;]/gu,""),f.type==="css-atrule"&&f.variable||Qn(t)?r.prop:Ae(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([D,Ie(t,e,s)]),D,"}"]:oi(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Ct(";"):";"]}case"css-atrule":{let f=t.parent,p=Dt(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"
Line truncated
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
var xl=Object.create;var Wr=Object.defineProperty;var bl=Object.getOwnPropertyDescriptor;var _l=Object.getOwnPropertyNames;var El=Object.getPrototypeOf,kl=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rn=(t,e)=>{for(var s in e)Wr(t,s,{get:e[s],enumerable:!0})},Sl=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _l(e))!kl.call(t,n)&&n!==s&&Wr(t,n,{get:()=>e[n],enumerable:!(r=bl(e,n))||r.enumerable});return t};var be=(t,e,s)=>(s=t!=null?xl(El(t)):{},Sl(e||!t||!t.__esModule?Wr(s,"default",{value:t,enumerable:!0}):s,t));var Oi=g((Pv,is)=>{var _=String,Ti=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};is.exports=Ti();is.exports.createColors=Ti});var os=g(()=>{});var Gt=g((qv,Ni)=>{"use strict";var Ci=Oi(),Ai=os(),at=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Ci.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:p,red:l}=Ci.createColors(!0);n=d=>f(l(d)),r=d=>p(d),Ai&&(i=d=>Ai(d))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,p)=>{let l=u+1+p,d=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let h=20,m=Math.max(0,this.column-h),y=Math.max(this.column+h,this.endColumn+h),b=f.slice(m,y),w=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,h-1)).replace(/[^\t]/g," ");return n(">")+r(d)+i(b)+`
|
||||
`+w+n("^")}let x=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+i(f)+`
|
||||
`+x+n("^")}return" "+r(d)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};Ni.exports=at;at.default=at});var Yt=g((Lv,Ri)=>{"use strict";var Pi={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Sc(t){return t[0].toUpperCase()+t.slice(1)}var ut=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(s+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let s=e.nodes.length-1;for(;s>0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,s!==n||r)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+s+e.text+r+"*/",e)}decl(e,s){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),s&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Pi[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Sc(r);this[u]?n=this[u](o,e):o.walk(a=>{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Pi[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ri.exports=ut;ut.default=ut});var lt=g((Dv,Ii)=>{"use strict";var Tc=Yt();function as(t,e){new Tc(e).stringify(t)}Ii.exports=as;as.default=as});var Vt=g((Mv,us)=>{"use strict";us.exports.isClean=Symbol("isClean");us.exports.my=Symbol("my")});var pt=g((Bv,qi)=>{"use strict";var Oc=Gt(),Cc=Yt(),Ac=lt(),{isClean:ct,my:Nc}=Vt();function ls(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>ls(o,s)):(i==="object"&&n!==null&&(n=ls(n)),s[r]=n)}return s}function J(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var ft=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ct]=!1,this[Nc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=ls(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new Oc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[ct]=!0}markDirty(){if(this[ct]){this[ct]=!1;let e=this;for(;e=e.parent;)e[ct]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(J(r,this.source.start),J(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=J(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:J(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:J(s,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:J(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new Cc().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ac){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};qi.exports=ft;ft.default=ft});var qe=g((Uv,Li)=>{"use strict";var Pc=pt(),ht=class extends Pc{constructor(e){super(e),this.type="comment"}};Li.exports=ht;ht.default=ht});var mt=g((Fv,Di)=>{"use strict";var Rc=pt(),dt=class extends Rc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Di.exports=dt;dt.default=dt});var le=g(($v,Vi)=>{"use strict";var Mi=qe(),Bi=mt(),Ic=pt(),{isClean:Ui,my:Fi}=Vt(),cs,$i,Wi,fs;function Gi(t){return t.map(e=>(e.nodes&&(e.nodes=Gi(e.nodes)),delete e.source,e))}function Yi(t){if(t[Ui]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Yi(e)}var V=class t extends Ic{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=Gi($i(e).no
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[ds]=s,s}var Le=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!Ji||/^\w+:\/\//.test(s.from)||ms(s.from)?this.file=s.from:this.file=ys(s.from)),Ji&&$c){let r=new Fc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Mc(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,c;if(s&&typeof s=="object"){let p=s,l=r;if(typeof p.offset=="number"){a=p.offset;let d=this.fromOffset(a);s=d.line,r=d.col}else s=p.line,r=p.column,a=this.fromLineAndColumn(s,r);if(typeof l.offset=="number"){u=l.offset;let d=this.fromOffset(u);o=d.line,i=d.col}else o=l.line,i=l.column,u=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let p=this.fromOffset(a);s=p.line,r=p.col}let f=this.origin(s,r,o,i);return f?c=new Xi(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):c=new Xi(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),c.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(zt&&(c.input.url=zt(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,s){return Zi(this)[e-1]+s-1}fromOffset(e){let s=Zi(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;ms(o.source)?a=zt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||zt(this.map.mapFile));let c={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Qi)c.file=Qi(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};eo.exports=Le;Le.default=Le;hs&&hs.registerInput&&hs.registerInput(Le)});var Ht=g((jv,ro)=>{"use strict";var to=le(),Me=class extends to{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};ro.exports=Me;Me.default=Me;to.registerAtRule(Me)});var Be=g((Kv,oo)=>{"use strict";var so=le(),no,io,ce=class extends so{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new no(new io,this,e).stringify()}};ce.registerLazyResult=t=>{no=t};ce.registerProcessor=t=>{io=t};oo.exports=ce;ce.default=ce;so.registerRoot(ce)});var gs=g((Qv,ao)=>{"use strict";var yt={comma(t){return yt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return yt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};ao.exports=yt;yt.default=yt});var jt=g((Xv,lo)=>{"use strict";var uo=le(),Wc=gs(),Ue=class extends uo{get selectors(){return Wc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};lo.exports=Ue;Ue.default=Ue;uo.registerRule(Ue)});var Xt=g((Jv,fo)=>{"use strict";var Kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gc=/.[\r\n"'(/\\]/,co=/[\da-f]/i;fo.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,d,x,h=r.length,m=0,y=[],b=[];function w(){return m}function v(W){throw e.error("Unclosed "+W,m)}function R(){return b.length===0&&m>=h}function F(W){if(b.length)return b.pop();if(m>=h)return;let T=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(m),i){case 10:case 32:case 9:case 13:case 12:{a=m;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(m,a)],m=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let O=String.fromCharCode(i);f=[O,O,m];break}case 40:{if(x=y.length?y.pop()[1]:"",d=r.charCodeAt(m+1),x==="url"&&d!==39&&d!==34&&d!==32&&d!==10&&d!==9&&d!==12&&d!==13){a=m;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(n||T){a=m;break}else v("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["brackets",r.slice(m,a+1),m,a],m=a}else a=r.indexOf(")",m+1),o=r.slice(m,a+1),a===-1||Gc.test(o)?f=["(","(",m]:(f=["brackets",o,m,a],m=a);break}case 39:case 34:{c=i===39?"'":'"',a=m;do{if(p=!1,a=r.indexOf(c,a+1),a===-1)if(n||T){a=m+1;break}else v("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,p=!p}while(p);f=["string",r.slice(m,a+1),m,a],m=a;break}case 64:{Kt.lastIndex=m+1,Kt.test(r),Kt.lastIndex===0?a=r.length-1:a=Kt.lastIndex-2,f=["at-word",r.slice(m,a+1),m,a],m=a;break}case 92:{for(a=m,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,co.test(r.charAt(a)))){for(;co.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(m,a+1),m,a],m=a;break}default:{i===47&&r.charCodeAt(m+1)===42?(a=r.indexOf("*/",m+2)+1,a===0&&(n||T?a=r.length:v("comment")),f=["comment",r.slice(m,a+1),m,a],m=a):(Qt.lastIndex=m+1,Qt.test(r),Qt.lastIndex===0?a=r.length-1:a=Qt.lastIndex-2,f=["word",r.slice(m,a+1),m,a],y.push(f),m=a);break}}return m++,f}function Q(W){b.push(W)}return{back:Q,endOfFile:R,nextToken:F,position:w}}});var Jt=g((Zv,mo)=>{"use strict";var Yc=Ht(),Vc=qe(),zc=mt(),Hc=Be(),po=jt(),jc=Xt(),ho={empty:!0,space:!0};function Kc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var ws=class{constructor(e){this.input=e,this.root=new Hc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Yc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Vc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=jc(this.input)}decl(e,s){let r=new zc;this.init(r,e[0][2]);let n=e[e.le
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new ef(n),this.tokenizer=Zc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),vs.exports.isInlineComment.bind(this)(t)}return!1}}});var vo=g((rx,wo)=>{wo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var bo=g((sx,xo)=>{var tf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,rf=/\.[0-9]/,sf=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&tf.test(e)===!1&&rf.test(e)===!1};xo.exports={isMixinToken:sf}});var Eo=g((nx,_o)=>{var nf=Xt(),of=/^url\((.+)\)/;_o.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=nf({css:s});for(t.filename=s.replace(of,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Oo=g((ix,To)=>{var ko=/:$/,So=/^:(\s+)?/;To.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(ko.test(e)){let[r]=e.match(ko);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(So.test(s)){let[r]=s.match(So);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var No=g((ax,Ao)=>{var af=qe(),uf=Jt(),{isInlineComment:lf}=go(),{interpolation:Co}=vo(),{isMixinToken:cf}=bo(),ff=Eo(),pf=Oo(),hf=/(!\s*important)$/i;Ao.exports=class extends uf{constructor(...e){super(...e),this.lastNode=null}atrule(e){Co.bind(this)(e)||(super.atrule(e),ff(this.lastNode),pf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new af,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),d=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],m=["brackets",p].concat(d,h),y=e.slice(0,i),b=e.slice(c+1);e=y,e.push(m),e=e.concat(b)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),p=u[u.length-1],l=[c[2],c[3]],d=[p[4],p[5]],h=["word",u.map(m=>m[1]).join("")].concat(l,d);e.splice(f,u.length,h)}let a=e.findIndex(c=>hf.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){lf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),Co.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(cf(s)){this.mixin(e);return}super.unknownWord(e)}}});var Ro=g((lx,Po)=>{var df=Yt();Po.exports=class extends df{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Io=g((cx,xs)=>{var mf=De(),yf=No(),gf=Ro();xs.exports={parse(t,e){let s=new mf(t,e),r=new yf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Os().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return k([n(a)]).process(o,u)},n};k.stringify=ep;k.parse=Jf;k.fromJSON=Hf;k.list=Qf;k.comment=t=>new Zo(t);k.atRule=t=>new Jo(t);k.decl=t=>new ea(t);k.rule=t=>new sa(t);k.root=t=>new ra(t);k.document=t=>new ta(t);k.CssSyntaxError=zf;k.Declaration=ea;k.Container=Vf;k.Processor=Os;k.Document=ta;k.Comment=Zo;k.Warning=tp;k.AtRule=Jo;k.Result=Zf;k.Input=jf;k.Rule=sa;k.Root=ra;k.Node=Xf;Kf.registerPostcss(k);na.exports=k;k.default=k});var oa=g((kx,ia)=>{var{Container:rp}=rr(),Cs=class extends rp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};ia.exports=Cs});var la=g((Sx,ua)=>{"use strict";var sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sp=/.[\r\n"'(/\\]/,aa=/[\da-f]/i,ir=/[\n\f\r]/g;ua.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,p,l,d,x=r.length,h=0,m=[],y=[],b;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function R(){return y.length===0&&h>=x}function F(){let T=1,O=!1,C=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),O?!C&&i===O?(O=!1,C=!1):i===92?C=!C:C&&(C=!1):i===39||i===34?O=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function Q(T){if(y.length)return y.pop();if(h>=x)return;let O=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);d=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);d=[C,C,h];break}case 44:{d=["word",",",h,h+1];break}case 40:{if(p=m.length?m.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)b+=1;else if(l===41&&(b-=1,b===0))break;o+=1}a=r.slice(h,o+1),d=["brackets",a,h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||sp.test(a)?d=["(","(",h]:(d=["brackets",a,h,o],h=o);break}case 39:case 34:{for(u=i,o=h,f=!1;o<x&&(o++,o===x&&v("string"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&l===123&&F();d=["string",r.slice(h,o+1),h,o],h=o;break}case 64:{sr.lastIndex=h+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,d=["at-word",r.slice(h,o+1),h,o],h=o;break}case 92:{for(o=h,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,aa.test(r.charAt(o)))){for(;aa.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}d=["word",r.slice(h,o+1),h,o],h=o;break}default:l=r.charCodeAt(h+1),i===35&&l===123?(o=h,F(),a=r.slice(h,o+1),d=["word",a,h,o],h=o):i===47&&l===42?(o=r.indexOf("*/",h+2)+1,o===0&&(n||O?o=r.length:v("comment")),d=["comment",r.slice(h,o+1),h,o],h=o):i===47&&l===47?(ir.lastIndex=h+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,a=r.slice(h,o+1),d=["comment",a,h,o,"inline"],h=o):(nr.lastIndex=h+1,nr.test(r),nr.lastIndex===0?o=r.length-1:o=nr.lastIndex-2,d=["word",r.slice(h,o+1),h,o],m.push(d),h=o);break}return h++,d}function W(T){y.push(T)}return{back:W,endOfFile:R,nextToken:Q,position:w}}});var fa=g((Tx,ca)=>{var{Comment:np}=rr(),ip=Jt(),op=oa(),ap=la(),As=class extends ip{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new np;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=ap(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new op;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let p=a;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};ca.exports=As});var ha=g((Ox,pa)=>{var{Input:up}=rr(),lp=fa();pa.exports=function(e,s){let r=new up(e,s),n=new lp(r);return n.parse(),n.root}});var Ps=g(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});function fp(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Ns.default=fp});var Is=g(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var pp=Ps(),ma=hp(pp);function hp(t){return t&&t.__esModule?t:{default:t}}function Et(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}Et.prototype=Object.create(ma.default.prototype);Et.constructor=ma.default;Et.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};Et.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};Rs.default=Et});var va=g(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.parseMediaFeature=wa;kt.parseMediaQuery=Ls;kt.parseMediaList=yp;var dp=Ps(),ya=ga(dp),mp=Is(),qs=ga(mp);function ga(t){return t&&t.__esModule?t:{default:t}}function wa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f<c.length;f++){var p=c[f];if((p==="'"||p==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:p}),n++):s[n].mode==="string"&&s[n].character===p&&c[f-1]!=="\\"&&(s.pop(),n--)),p==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):p==="}"&&(s.pop(),n--),s[n].mode==="normal"&&p===":"){var l=c.substring(f+1);u={type:"value",before:/^(\s*)/.exec(l)[1],after:/(\s*)$/.exec(l)[1],value:l.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=p}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Ls(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=wa(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new qs.default(i):new ya.default(i)),i=o(),n=!1)}for(var c=0;c<s.length;c++)if(i=s[c],c>0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=m+u,p=n-o[u].length):(f=m,p=h),e.push(["comment",a,m,y-h,f,n-p,y]),h=p,m=f,y=n):(kr.lastIndex=y+1,kr.test(s),kr.lastIndex===0?n=s.length-1:n=kr.lastIndex-2,e.push(["word",s.slice(y,n+1),m,y-h,m,n-h,y]),y=n);break}y++}return e}lu.exports=Sr.default});var hu=g((Tr,pu)=>{"use strict";Tr.__esModule=!0;var jd=function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}}(),Kd=Bs(),Qd=I(Kd),Xd=Us(),zs=I(Xd),Jd=Fs(),Zd=I(Jd),em=Na(),tm=I(em),rm=Ra(),Hs=I(rm),sm=La(),nm=I(sm),im=Ma(),om=I(im),am=Ua(),um=I(am),lm=$a(),cm=I(lm),fm=Ga(),pm=I(fm),hm=Va(),dm=I(hm),mm=Ha(),ym=I(mm),gm=Ka(),wm=I(gm),vm=Xa(),xm=I(vm),bm=Za(),_m=I(bm),Em=tu(),km=I(Em),Sm=cu(),fu=I(Sm),Tm=M(),Om=Cm(Tm);function Cm(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function Am(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Nm=function(){function t(e){Am(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new tm.default;var s=new Hs.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,fu.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,fu.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new ym.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new xm.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new Hs.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new om.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new _m.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===Om.PSEUDO){var r=new Hs.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column=th
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var U=g((rb,wu)=>{"use strict";var Bm=z(),We=class extends Bm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};We.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!We.prototype[e]&&(We.prototype[e]=function(s){return this.walkType(t,s)})};wu.exports=We});var xu=g((nb,vu)=>{"use strict";var Um=U();vu.exports=class extends Um{constructor(e){super(e),this.type="root"}}});var _u=g((ob,bu)=>{"use strict";var Fm=U();bu.exports=class extends Fm{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var Su=g((ab,ku)=>{"use strict";var Eu=U(),Cr=class extends Eu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Eu.registerWalker(Cr);ku.exports=Cr});var Ou=g((ub,Tu)=>{"use strict";var $m=U(),Wm=z(),Ar=class extends Wm{constructor(e){super(e),this.type="colon"}};$m.registerWalker(Ar);Tu.exports=Ar});var Au=g((lb,Cu)=>{"use strict";var Gm=U(),Ym=z(),Nr=class extends Ym{constructor(e){super(e),this.type="comma"}};Gm.registerWalker(Nr);Cu.exports=Nr});var Pu=g((cb,Nu)=>{"use strict";var Vm=U(),zm=z(),Pr=class extends zm{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Vm.registerWalker(Pr);Nu.exports=Pr});var qu=g((fb,Iu)=>{"use strict";var Ru=U(),Rr=class extends Ru{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Ru.registerWalker(Rr);Iu.exports=Rr});var Du=g((pb,Lu)=>{"use strict";var Hm=U(),jm=z(),Ir=class extends jm{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Hm.registerWalker(Ir);Lu.exports=Ir});var Bu=g((hb,Mu)=>{"use strict";var Km=U(),Qm=z(),qr=class extends Qm{constructor(e){super(e),this.type="operator"}};Km.registerWalker(qr);Mu.exports=qr});var Fu=g((db,Uu)=>{"use strict";var Xm=U(),Jm=z(),Lr=class extends Jm{constructor(e){super(e),this.type="paren",this.parenType=""}};Xm.registerWalker(Lr);Uu.exports=Lr});var Wu=g((mb,$u)=>{"use strict";var Zm=U(),ey=z(),Dr=class extends ey{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Zm.registerWalker(Dr);$u.exports=Dr});var Yu=g((yb,Gu)=>{"use strict";var ty=U(),ry=z(),Mr=class extends ry{constructor(e){super(e),this.type="word"}};ty.registerWalker(Mr);Gu.exports=Mr});var zu=g((gb,Vu)=>{"use strict";var sy=U(),ny=z(),Br=class extends ny{constructor(e){super(e),this.type="unicode-range"}};sy.registerWalker(Br);Vu.exports=Br});var ju=g((wb,Hu)=>{"use strict";var Ks=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);l=C!==-1?C-1:i}m=n.slice(a,l+1),x=m.split(`
|
||||
`),h=x.length-1,h>0?(b=u+h,w=l-x[h].length):(b=u,w=o),r.push(["comment",m,u,a-o,b,l-w,a]),o=w,u=b,a=l}else if(p===35&&!oy.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((p===117||p===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,p=n.charCodeAt(l);while(l<i&&ay.test(n.slice(l,l+1)));r.push(["unicoderange",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1}else if(p===47)l=a+1,r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else{let O=iy;if(p>=48&&p<=57&&(O=Ge),O.lastIndex=a+1,O.test(n),O.lastIndex===0?l=n.length-1:l=O.lastIndex-2,O===Ge||p===46){let C=n.charCodeAt(l),xe=n.charCodeAt(l+1),tn=n.charCodeAt(l+2);(C===101||C===69)&&(xe===45||xe===43)&&tn>=48&&tn<=57&&(Ge.lastIndex=l+2,Ge.test(n),Ge.lastIndex===0?l=n.length-1:l=Ge.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var Zu=g((xb,Ju)=>{"use strict";var Qs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Ju.exports=Qs});var sl=g((_b,rl)=>{"use strict";var uy=xu(),ly=_u(),cy=Su(),fy=Ou(),py=Au(),hy=Pu(),dy=qu(),my=Du(),yy=Bu(),el=Fu(),gy=Wu(),tl=Yu(),wy=zu(),vy=Xu(),xy=Bs(),by=Us(),_y=Fs(),Ey=Zu();function ky(t){return t.sort((e,s)=>e-s)}rl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new uy;let n=new ly;this.root.append(n),this.current=n,this.tokens=vy(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new fy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new py({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new hy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new Ey(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new yy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new el({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new tl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(j(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=Al([...Tt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var Gr=class extends Error{name="InvalidDocError";constructor(e){super(Nl(e)),this.doc=e}},Yr=Gr;function Rl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(j(i)){case Ye:return e(i.map(r));case ne:return e({...i,parts:i.parts.map(r)});case ie:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case se:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Ee:case re:case He:case Ke:case ke:return e({...i,contents:r(i.contents)});case _e:case Ve:case ze:case je:case H:case Se:return e(i);default:throw new Yr(i)}}}function Il(t){return t.type===H&&!t.hard?t.soft?"":" ":t.type===ie?t.flatContents:t}function sn(t){return Rl(t,Il)}var Vr=()=>{},oe=Vr,Qe=Vr,nn=Vr;function q(t){return oe(t),{type:re,contents:t}}function on(t,e){return oe(e),{type:Ee,contents:e,n:t}}function L(t,e={}){return oe(t),Qe(e.expandedStates,!0),{type:se,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function an(t){return on({type:"root"},t)}function ae(t){return on(-1,t)}function Te(t){return nn(t),{type:ne,parts:t}}function Ot(t,e="",s={}){return oe(t),e!==""&&oe(e),{type:ie,breakContents:t,flatContents:e,groupId:s.groupId}}function un(t){return oe(t),{type:ke,contents:t}}var Xe={type:Se};var ql={type:H,hard:!0};var A={type:H},D={type:H,soft:!0},S=[ql,Xe];function G(t,e){oe(t),Qe(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}function Ll(t){return Array.isArray(t)&&t.length>0}var ue=Ll;var ln=new Proxy(()=>{},{get:()=>ln}),cn=ln;var Ct="'",fn='"';function Dl(t,e){let s=e===!0||e===Ct?Ct:fn,r=s===Ct?fn:Ct,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var pn=Dl;function Ml(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gsu,(o,u,a)=>u===r?u:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(u)?u:"\\"+u));return e+i+e}var hn=Ml;function Bl(t,e){cn.ok(/^(?<quote>["']).*\k<quote>$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":pn(s,e.singleQuote);return t.charAt(0)===r?t:hn(s,r,!1)}var At=Bl;var zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dn=zr;function Ul(t){return(t==null?void 0:t.type)==="front-matter"}var Oe=Ul;var Fl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function mn(t,e,s){if(Oe(t)&&t.language==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Oe(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&$(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=$l(t.value)),t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/gu,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isC
Line truncated
|
||||
`,s)+1;return s+t.column}var jr=Hl;function Nt(t){return(e,s,r)=>{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Qg=Nt(/\s/u),Pt=Nt(" "),En=Nt(",; "),Rt=Nt(/[^\n\r]/u);function kn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Sn(t,e){var s,r,n;if(typeof((r=(s=t.source)==null?void 0:s.start)==null?void 0:r.offset)=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?kn(t,t.sourceIndex):t.sourceIndex;if((n=t.source)!=null&&n.start)return jr(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Kr(t,e){var s,r;if(t.type==="css-comment"&&t.inline)return Rt(e,t.source.startOffset);if(typeof((r=(s=t.source)==null?void 0:s.end)==null?void 0:r.offset)=="number")return t.source.end.offset;if(t.source){if(t.source.end){let n=jr(t.source.end,e);return t.type==="value-word"?kn(t,n):n}if(ue(t.nodes))return Kr($(!1,t.nodes,-1),e)}return null}function Qr(t,e){t.source&&(t.source.startOffset=Sn(t,e),t.source.endOffset=Kr(t,e));for(let s in t){let r=t[s];s==="source"||!r||typeof r!="object"||(r.type==="value-root"||r.type==="value-unknown"?Tn(r,jl(t),r.text||r.value):Qr(r,e))}}function Tn(t,e,s){t.source&&(t.source.startOffset=Sn(t,s)+e,t.source.endOffset=Kr(t,s)+e);for(let r in t){let n=t[r];r==="source"||!n||typeof n!="object"||Tn(n,e,s)}}function jl(t){var s;let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/u)[0].length),t.type!=="css-atrule"&&typeof((s=t.raws)==null?void 0:s.between)=="string"&&(e+=t.raws.between.length),e}function On(t){let e="initial",s="initial",r,n=!1,i=[];for(let o=0;o<t.length;o++){let u=t[o];switch(e){case"initial":if(u==="'"){e="single-quotes";continue}if(u==='"'){e="double-quotes";continue}if((u==="u"||u==="U")&&t.slice(o,o+4).toLowerCase()==="url("){e="url",o+=3;continue}if(u==="*"&&t[o-1]==="/"){e="comment-block";continue}if(u==="/"&&t[o-1]==="/"){e="comment-inline",r=o-1;continue}continue;case"single-quotes":if(u==="'"&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")"&&(e="initial"),u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":(u==='"'||u==="'"||u==="*")&&(n=!0),(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+E(!1,t.slice(o,u),/["'*]/gu," ")+t.slice(u);return t}function N(t){var e;return(e=t.source)==null?void 0:e.startOffset}function P(t){var e;return(e=t.source)==null?void 0:e.endOffset}var Kl=/\*\/$/,Ql=/^\/\*\*?/,Pn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Xl=/(^|\s+)\/\/([^\n\r]*)/g,Cn=/^(\r?\n)+/,Jl=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,An=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Zl=/(\r?\n|^) *\* ?/g,Rn=[];function In(t){let e=t.match(Pn);return e?e[0].trimStart():""}function qn(t){let e=t.match(Pn),s=e==null?void 0:e[0];return s==null?t:t.slice(s.length)}function Ln(t){let e=`
|
||||
`;t=E(!1,t.replace(Ql,"").replace(Kl,""),Zl,"$1");let s="";for(;s!==t;)s=t,t=E(!1,t,Jl,`${e}$1 $2${e}`);t=t.replace(Cn,"").trimEnd();let r=Object.create(null),n=E(!1,t,An,"").replace(Cn,"").trimEnd(),i;for(;i=An.exec(t);){let o=E(!1,i[2],Xl,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...Rn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Dn({comments:t="",pragmas:e={}}){let s=`
|
||||
`,r="/**",n=" *",i=" */",o=Object.keys(e),u=o.flatMap(c=>Nn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Nn(o[0],c)[0]}${i}`}}let a=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?a:"")+(t&&o.length>0?n+s:"")+u+i}function Nn(t,e){return[...Rn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Mn=["noformat","noprettier"],Bn=["format","prettier"],Un="format";function ec(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var Fn=ec;function Xr(t){let e=Fn(t);e&&(t=t.slice(e.length+1));let s=In(t),{pragmas:r,comments:n}=Ln(s);return{shebang:e,text:t,pragmas:r,comments:n}}function $n(t){let{pragmas:e}=Xr(t);return Bn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Wn(t){let{pragmas:e}=Xr(t);return Mn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Gn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Xr(t),i=qn(s),o=Dn({pragmas:{[Un]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var et=3;function tc(t){let e=t.slice(0,et);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,et);if(s===-1)return;let r=t.slice(et,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+et,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o);return{type:"front-matter",language:i,explicitLanguage:r,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-et),raw:a}}function rc(t){let e=tc(t);if(!e)return{content:t};let{raw:s}=e;return{frontMatter:e,content:E(!1,s,/[^\n]/gu," ")+t.slice(s.length)}}var Ce=rc;function Yn(t){return $n(Ce(t).content)}function Vn(t){return Wn(Ce(t).content)}function zn(t){let{frontMatter:e,content:s}=Ce(t);return(e?e.raw+`
|
||||
|
||||
`:"")+Gn(s)}var sc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Hn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var nc=new Set(["initial","inherit","unset","revert"]);function jn(t){return nc.has(t.toLowerCase())}function Kn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function Ae(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ne(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Qn(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function he(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Xn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function Jn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Zn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function ei(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function ti(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function ri(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function si(t){return t.type==="value-word"&&t.value==="in"}function It(t){return t.type==="value-operator"&&t.value==="*"}function tt(t){return t.type==="value-operator"&&t.value==="/"}function X(t){return t.type==="value-operator"&&t.value==="+"}function de(t){return t.type==="value-operator"&&t.value==="-"}function ic(t){return t.type==="value-operator"&&t.value==="%"}function qt(t){return It(t)||tt(t)||X(t)||de(t)||ic(t)}function ni(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function ii(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function rt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function Zr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/u.test(t.raws.params)}function Lt(t){return t.name.startsWith("prettier-placeholder")}function oi(t){return t.prop.startsWith("@prettier-placeholder")}function ai(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function ui(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function li(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function me(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Dt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Jr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Dt(t.groups[0])}function es(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Jr(s)&&!(r&&Jr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Jr(r)||r.type==="value-func")}function Pe(t){return t.type==="value-comment"&&t.inline}function Mt(t){return t.type==="value-word"&&t.value==="#"}function ts(t){return t.type==="value-word"&&t.value==="{"}function Bt(t){return t.type==="value-word"&&t.value==="}"}function st(t){return["value-word","value-atword"].includes(t.type)}function nt(t){return(t==null?void 0:t.type)==="value-colon"}function ci(t,e){if(!Dt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:nt(s[r+1])}function fi(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function pi(t){return t.type!=="value-func"?!1:sc.has(t.value.toLowerCase())}function Re(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function it(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function hi(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}f
Line truncated
|
||||
`)return e-2;if(n===`
|
||||
`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(n===`
|
||||
`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var Ft=pc;function hc(t,e,s={}){let r=Pt(t,s.backwards?e-1:e,s),n=Ft(t,r,s);return r!==n}var $t=hc;function dc(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var vi=dc;function mc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Rt(t,e):e}var xi=mc;function yc(t,e){let s=null,r=e;for(;r!==s;)s=r,r=En(t,r),r=vi(t,r),r=Pt(t,r);return r=xi(t,r),r=Ft(t,r),r!==!1&&$t(t,r)}var Wt=yc;function gc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(N(t),N(e.close)).trimEnd().endsWith(","))}function wc(t,e){return Zn(t.grandparent)&&gc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&wi(e)&&t.callParent(()=>es(t,e))?Ot(","):""}function bi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:d})=>typeof d=="string"?d:s(),"groups");if(n&&Jn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",G(",",i),r.close?s("close"):""];if(!r.open){let d=ns(t);Qe(i);let x=xc(G(",",i),2),h=G(d?S:A,x);return q(d?[S,h]:L([vc(t)?D:"",Te(h)]))}let o=t.map(({node:d,isLast:x,index:h})=>{var b;let m=i[h];Dt(d)&&d.type==="value-comma_group"&&d.groups&&d.groups[0].type!=="value-paren_group"&&((b=d.groups[2])==null?void 0:b.type)==="value-paren_group"&&j(m)===se&&j(m.contents)===re&&j(m.contents.contents)===ne&&(m=L(ae(m)));let y=[m,x?wc(t,e):","];if(!x&&d.type==="value-comma_group"&&ue(d.groups)){let w=$(!1,d.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&Wt(e.originalText,P(w))&&y.push(S)}return y},"groups"),u=ci(r,n),a=hi(r,n),c=es(t,e),f=a||c&&!u,p=a||u,l=L([r.open?s("open"):"",q([D,G(A,o)]),D,r.close?s("close"):""],{shouldBreak:f});return p?ae(l):l}function ns(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function vc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function xc(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function bc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!$t(e.originalText,N(o),{backwards:!0})&&!Oe(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:S),Wt(e.originalText,P(n))&&!Oe(n)&&r.push(S))},"nodes"),r}var Ie=bc;function _c(t,e,s){var n,i,o,u,a,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,S];case"css-root":{let f=Ie(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),S]:"",f,p?` ${p}`:"",r.nodes.length>0?S:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Re(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([S,Ie(t,e,s)]):"",S,"}",ei(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),d=l===":",x=typeof r.value=="string"&&/^ *$/u.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=ui(r)?sn(h):h,!d&&Re(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>ns(t),"value","group","group"))&&(h=q([S,ae(h)])),[E(!1,r.raws.before,/[\s;]/gu,""),f.type==="css-atrule"&&f.variable||Qn(t)?r.prop:Ae(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([D,Ie(t,e,s)]),D,"}"]:oi(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Ot(";"):";"]}case"css-atrule":{let f=t.parent,p=Lt(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
typescript: Parser;
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var nl=Object.defineProperty;var dy=Object.getOwnPropertyDescriptor;var my=Object.getOwnPropertyNames;var hy=Object.prototype.hasOwnProperty;var xd=e=>{throw TypeError(e)};var yy=(e,t,a)=>t in e?nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Sd=(e,t)=>{for(var a in t)nl(e,a,{get:t[a],enumerable:!0})},gy=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of my(t))!hy.call(e,m)&&m!==a&&nl(e,m,{get:()=>t[m],enumerable:!(o=dy(t,m))||o.enumerable});return e};var by=e=>gy(nl({},"__esModule",{value:!0}),e);var Vi=(e,t,a)=>yy(e,typeof t!="symbol"?t+"":t,a),vy=(e,t,a)=>t.has(e)||xd("Cannot "+a);var bp=(e,t,a)=>t.has(e)?xd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a);var ge=(e,t,a)=>(vy(e,t,"access private method"),a);var s3={};Sd(s3,{parsers:()=>hd});var hd={};Sd(hd,{typescript:()=>a3});var Ty=()=>()=>{},Ma=Ty;var xy=(e,t,a,o)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(a,o):a.global?t.replace(a,o):t.split(a).join(o)},Er=xy;var km="5.8";var bt=[],Sy=new Map;function r_(e){return e!==void 0?e.length:0}function qn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let o=t(e[a],a);if(o)return o}}function wy(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let o=t(e[a],a);if(o!==void 0)return o}}function wd(e,t,a){let o=[];B.assertEqual(e.length,t.length);for(let m=0;m<e.length;m++)o.push(a(e[m],t[m],m));return o}function Hp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function Em(e,t,a){if(e!==void 0)for(let o=a??0;o<e.length;o++){let m=e[o];if(t(m,o))return m}}function vp(e,t,a){if(e===void 0)return-1;for(let o=a??0;o<e.length;o++)if(t(e[o],o))return o;return-1}function ky(e,t,a=Qp){if(e!==void 0){for(let o=0;o<e.length;o++)if(a(e[o],t))return!0}return!1}function Xr(e,t){if(e!==void 0){let a=e.length,o=0;for(;o<a&&t(e[o]);)o++;if(o<a){let m=e.slice(0,o);for(o++;o<a;){let v=e[o];t(v)&&m.push(v),o++}return m}}return e}function Ip(e,t){let a;if(e!==void 0){a=[];for(let o=0;o<e.length;o++)a.push(t(e[o],o))}return a}function Am(e){let t=[];for(let a=0;a<e.length;a++){let o=e[a];o&&(Qr(o)?Nn(t,o):t.push(o))}return t}function Cm(e,t){let a;if(e!==void 0)for(let o=0;o<e.length;o++){let m=t(e[o],o);m&&(Qr(m)?a=Nn(a,m):a=Dn(a,m))}return a??bt}function Ey(e,t){let a;if(e!==void 0)for(let o=0;o<e.length;o++){let m=e[o],v=t(m,o);(a||m!==v||Qr(v))&&(a||(a=e.slice(0,o)),Qr(v)?Nn(a,v):a.push(v))}return a??e}function Ay(e,t){let a=[];if(e!==void 0)for(let o=0;o<e.length;o++){let m=t(e[o],o);m!==void 0&&a.push(m)}return a}function nn(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Xp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function Cy(e,t,a=Qp){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!a(e[o],t[o],o))return!1;return!0}function Dn(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function Op(e,t){return t<0?e.length+t:t}function Nn(e,t,a,o){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,o);a=a===void 0?0:Op(t,a),o=o===void 0?t.length:Op(t,o);for(let m=a;m<o&&m<t.length;m++)t[m]!==void 0&&e.push(t[m]);return e}function Dy(e,t,a){return ky(e,t,a)?!1:(e.push(t),!0)}function Py(e,t,a){return e!==void 0?(Dy(e,t,a),e):[t]}function Ny(e,t){return e.length===0?bt:e.slice().sort(t)}var l3=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e!==void 0&&(t=Op(e,t),t<e.length))return e[t]};function $p(e){return e===void 0||e.length===0?void 0:e[0]}function Fa(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Iy(e){return B.assert(e.length!==0),e[e.length-1]}function Oy(e){return e!==void 0&&e.length===1?e[0]:void 0}function My(e,t,a,o,m){return Ly(e,a(t),a,o,m)}function Ly(e,t,a,o,m){if(!nn(e))return-1;let v=m??0,E=e.length-1;for(;v<=E;){let C=v+(E-v>>1),c=a(e[C],C);switch(o(c,t)){case-1:v=C+1;break;case 0:return C;case 1:E=C-1;break}}return~v}function Jy(e,t,a,o,m){if(e&&e.length>0){let v=e.length;if(v>0){let E=o===void 0||o<0?0:o,C=m===void 0||E+m>v-1?v-1:E+m,c;for(arguments.length<=2?(c=e[E],E++):c=a;E<=C;)c=t(c,e[E],E),E++;return c}}return a}var Dm=Object.prototype.hasOwnProperty;function Nr(e,t){return Dm.call(e,t)}function jy(e){let t=[];for(let a in e)Dm.call(e,a)&&t.push(a);return t}function Ry(){let e=new Map;return e.add=Uy,e.remove=By,e}function Uy(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function By(e,t){let a=this.get(e);a!==void 0&&(Xy(a,t),a.length||this.delete(e))}function Qr(e){return
Line truncated
|
||||
Node ${Mt(J.kind)} was unexpected.`,me||y)}e.failBadSyntaxKind=y;function g(J,_e,me,Te){J||(_e=_e?`False expression: ${_e}`:"False expression.",me&&(_e+=`\r
|
||||
Verbose Debug Information: `+(typeof me=="string"?me:me())),h(_e,Te||g))}e.assert=g;function x(J,_e,me,Te,Xe){if(J!==_e){let Ke=me?Te?`${me} ${Te}`:me:"";h(`Expected ${J} === ${_e}. ${Ke}`,Xe||x)}}e.assertEqual=x;function N(J,_e,me,Te){J>=_e&&h(`Expected ${J} < ${_e}. ${me||""}`,Te||N)}e.assertLessThan=N;function te(J,_e,me){J>_e&&h(`Expected ${J} <= ${_e}`,me||te)}e.assertLessThanOrEqual=te;function ue(J,_e,me){J<_e&&h(`Expected ${J} >= ${_e}`,me||ue)}e.assertGreaterThanOrEqual=ue;function ye(J,_e,me){J==null&&h(_e,me||ye)}e.assertIsDefined=ye;function fe(J,_e,me){return ye(J,_e,me||fe),J}e.checkDefined=fe;function M(J,_e,me){for(let Te of J)ye(Te,_e,me||M)}e.assertEachIsDefined=M;function ie(J,_e,me){return M(J,_e,me||ie),J}e.checkEachDefined=ie;function Ce(J,_e="Illegal value:",me){let Te=typeof J=="object"&&Nr(J,"kind")&&Nr(J,"pos")?"SyntaxKind: "+Mt(J.kind):JSON.stringify(J);return h(`${_e} ${Te}`,me||Ce)}e.assertNever=Ce;function V(J,_e,me,Te){W(1,"assertEachNode")&&g(_e===void 0||Hp(J,_e),me||"Unexpected node.",()=>`Node array did not pass test '${Tn(_e)}'.`,Te||V)}e.assertEachNode=V;function oe(J,_e,me,Te){W(1,"assertNode")&&g(J!==void 0&&(_e===void 0||_e(J)),me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} did not pass test '${Tn(_e)}'.`,Te||oe)}e.assertNode=oe;function G(J,_e,me,Te){W(1,"assertNotNode")&&g(J===void 0||_e===void 0||!_e(J),me||"Unexpected node.",()=>`Node ${Mt(J.kind)} should not have passed test '${Tn(_e)}'.`,Te||G)}e.assertNotNode=G;function dt(J,_e,me,Te){W(1,"assertOptionalNode")&&g(_e===void 0||J===void 0||_e(J),me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} did not pass test '${Tn(_e)}'.`,Te||dt)}e.assertOptionalNode=dt;function rr(J,_e,me,Te){W(1,"assertOptionalToken")&&g(_e===void 0||J===void 0||J.kind===_e,me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} was not a '${Mt(_e)}' token.`,Te||rr)}e.assertOptionalToken=rr;function vn(J,_e,me){W(1,"assertMissingNode")&&g(J===void 0,_e||"Unexpected node.",()=>`Node ${Mt(J.kind)} was unexpected'.`,me||vn)}e.assertMissingNode=vn;function ir(J){}e.type=ir;function Tn(J){if(typeof J!="function")return"";if(Nr(J,"name"))return J.name;{let _e=Function.prototype.toString.call(J),me=/^function\s+([\w$]+)\s*\(/.exec(_e);return me?me[1]:""}}e.getFunctionName=Tn;function Mn(J){return`{ name: ${f_(J.escapedName)}; flags: ${ct(J.flags)}; declarations: ${Ip(J.declarations,_e=>Mt(_e.kind))} }`}e.formatSymbol=Mn;function Ge(J=0,_e,me){let Te=Or(_e);if(J===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(me){let Xe=[],Ke=J;for(let[st,Pt]of Te){if(st>J)break;st!==0&&st&J&&(Xe.push(Pt),Ke&=~st)}if(Ke===0)return Xe.join("|")}else for(let[Xe,Ke]of Te)if(Xe===J)return Ke;return J.toString()}e.formatEnum=Ge;let ar=new Map;function Or(J){let _e=ar.get(J);if(_e)return _e;let me=[];for(let Xe in J){let Ke=J[Xe];typeof Ke=="number"&&me.push([Ke,Xe])}let Te=Ny(me,(Xe,Ke)=>Pm(Xe[0],Ke[0]));return ar.set(J,Te),Te}function Mt(J){return Ge(J,Ie,!1)}e.formatSyntaxKind=Mt;function Fn(J){return Ge(J,Lm,!1)}e.formatSnippetKind=Fn;function Ln(J){return Ge(J,Ir,!1)}e.formatScriptKind=Ln;function Lt(J){return Ge(J,bn,!0)}e.formatNodeFlags=Lt;function vt(J){return Ge(J,Im,!0)}e.formatNodeCheckFlags=vt;function Qe(J){return Ge(J,Zp,!0)}e.formatModifierFlags=Qe;function zn(J){return Ge(J,Mm,!0)}e.formatTransformFlags=zn;function $t(J){return Ge(J,Jm,!0)}e.formatEmitFlags=$t;function ct(J){return Ge(J,ef,!0)}e.formatSymbolFlags=ct;function at(J){return Ge(J,rn,!0)}e.formatTypeFlags=at;function Ut(J){return Ge(J,Om,!0)}e.formatSignatureFlags=Ut;function Jt(J){return Ge(J,tf,!0)}e.formatObjectFlags=Jt;function lt(J){return Ge(J,Lp,!0)}e.formatFlowFlags=lt;function sr(J){return Ge(J,Nm,!0)}e.formatRelationComparisonResult=sr;function mt(J){return Ge(J,CheckMode,!0)}e.formatCheckMode=mt;function xn(J){return Ge(J,SignatureCheckMode,!0)}e.formatSignatureCheckMode=xn;function yt(J){return Ge(J,TypeFacts,!0)}e.formatTypeFacts=yt;let ln=!1,nt;function Bt(J){"__debugFlowFlags"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(){let _e=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",me=this.flags&-2048;return`${_e}${me?` (${lt(me)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,Lp,!0)}},__debugToString:{value(){return gr(this)}}})}function an(J){return ln&&(typeof Object.setPrototypeOf=="function"?(nt||(nt=Object.create(Object.prototype),Bt(nt)),Object.setPrototypeOf(J,nt)):Bt(J)),J}e.attachFlowNodeDebugInfo=an;let _r;function hr(J){"__tsDebuggerDisplay"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(_e){return _e=String(_e).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${_e}`}}})}function yr(J){ln&&(type
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Ce(this)}}}e.DebugTypeMapper=Mr;function Gn(J){return e.isDebugging?Object.setPrototypeOf(J,Mr.prototype):J}e.attachDebugPrototypeIfDebug=Gn;function De(J){return console.log(gr(J))}e.printControlFlowGraph=De;function gr(J){let _e=-1;function me(u){return u.id||(u.id=_e,_e--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let Xe;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(Xe||(Xe={}));let Ke=2032,st=882,Pt=Object.create(null),Tt=[],ut=[],Lr=Se(J,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),be(u);let br=We(Lr),Jn=et(br);return Ye(Lr,0),un();function Yn(u){return!!(u.flags&128)}function Ei(u){return!!(u.flags&12)&&!!u.antecedent}function R(u){return!!(u.flags&Ke)}function Q(u){return!!(u.flags&st)}function K(u){let Oe=[];for(let Me of u.edges)Me.source===u&&Oe.push(Me.target);return Oe}function xe(u){let Oe=[];for(let Me of u.edges)Me.target===u&&Oe.push(Me.source);return Oe}function Se(u,Oe){let Me=me(u),U=Pt[Me];if(U&&Oe.has(u))return U.circular=!0,U={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(U),U;if(Oe.add(u),!U)if(Pt[Me]=U={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(U),Ei(u))for(let Fe of u.antecedent)we(U,Fe,Oe);else R(u)&&we(U,u.antecedent,Oe);return Oe.delete(u),U}function we(u,Oe,Me){let U=Se(Oe,Me),Fe={source:u,target:U};ut.push(Fe),u.edges.push(Fe),U.edges.push(Fe)}function be(u){if(u.level!==-1)return u.level;let Oe=0;for(let Me of xe(u))Oe=Math.max(Oe,be(Me)+1);return u.level=Oe}function We(u){let Oe=0;for(let Me of K(u))Oe=Math.max(Oe,We(Me));return Oe+1}function et(u){let Oe=L(Array(u),0);for(let Me of Tt)Oe[Me.level]=Math.max(Oe[Me.level],Me.text.length);return Oe}function Ye(u,Oe){if(u.lane===-1){u.lane=Oe,u.endLane=Oe;let Me=K(u);for(let U=0;U<Me.length;U++){U>0&&Oe++;let Fe=Me[U];Ye(Fe,Oe),Fe.endLane>u.endLane&&(Oe=Fe.endLane)}u.endLane=Oe}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function Sn(u){let Oe=gi(u);return Bd(Oe,u,!1)}function rt(u,Oe){let Me=Ee(u.flags);if(Oe&&(Me=`${Me}#${me(u)}`),Yn(u)){let U=[],{switchStatement:Fe,clauseStart:sn,clauseEnd:Ve}=u.node;for(let $e=sn;$e<Ve;$e++){let Nt=Fe.caseBlock.clauses[$e];T6(Nt)?U.push("default"):U.push(Sn(Nt.expression))}Me+=` (${U.join(", ")})`}else Q(u)&&u.node&&(Me+=` (${Sn(u.node)})`);return Oe==="circularity"?`Circular(${Me})`:Me}function un(){let u=Jn.length,Oe=Wy(Tt,0,Ve=>Ve.lane)+1,Me=L(Array(Oe),""),U=Jn.map(()=>Array(Oe)),Fe=Jn.map(()=>L(Array(Oe),0));for(let Ve of Tt){U[Ve.level][Ve.lane]=Ve;let $e=K(Ve);for(let kt=0;kt<$e.length;kt++){let It=$e[kt],qt=8;It.lane===Ve.lane&&(qt|=4),kt>0&&(qt|=1),kt<$e.length-1&&(qt|=2),Fe[Ve.level][It.lane]|=qt}$e.length===0&&(Fe[Ve.level][Ve.lane]|=16);let Nt=xe(Ve);for(let kt=0;kt<Nt.length;kt++){let It=Nt[kt],qt=4;kt>0&&(qt|=1),kt<Nt.length-1&&(qt|=2),Fe[Ve.level-1][It.lane]|=qt}}for(let Ve=0;Ve<u;Ve++)for(let $e=0;$e<Oe;$e++){let Nt=Ve>0?Fe[Ve-1][$e]:0,kt=$e>0?Fe[Ve][$e-1]:0,It=Fe[Ve][$e];It||(Nt&8&&(It|=12),kt&2&&(It|=3),Fe[Ve][$e]=It)}for(let Ve=0;Ve<u;Ve++)for(let $e=0;$e<Me.length;$e++){let Nt=Fe[Ve][$e],kt=Nt&4?"\u2500":" ",It=U[Ve][$e];It?(sn($e,It.text),Ve<u-1&&(sn($e," "),sn($e,qe(kt,Jn[Ve]-It.text.length)))):Ve<u-1&&sn($e,qe(kt,Jn[Ve]+1)),sn($e,ti(Nt)),sn($e,Nt&8&&Ve<u-1&&!U[Ve+1][$e]?"\u2500":" ")}return`
|
||||
${Me.join(`
|
||||
`)}
|
||||
`;function sn(Ve,$e){Me[Ve]+=$e}}function ti(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function L(u,Oe){if(u.fill)u.fill(Oe);else for(let Me=0;Me<u.length;Me++)u[Me]=Oe;return u}function qe(u,Oe){if(u.repeat)return Oe>0?u.repeat(Oe):"";let Me="";for(;Me.length<Oe;)Me+=u;return Me}}e.formatControlFlowGraph=gr})(B||(B={}));var u3=Date.now,Ed=()=>{},Qy=()=>{},ll,Ie=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,K=c;continue}c++}return B.assert(Se!==void 0),x=xe,Se}function Mt(R){let Q=c;if(c++,c>=W)return G(A.Unexpected_end_of_text),"";let K=V(c);switch(c++,K){case 48:if(c>=W||!mi(V(c)))return"\0";case 49:case 50:case 51:c<W&&Sp(V(c))&&c++;case 52:case 53:case 54:case 55:if(c<W&&Sp(V(c))&&c++,N|=2048,R&6){let we=parseInt(C.substring(Q+1,c),8);return R&4&&!(R&32)&&K!==48?G(A.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,Q,c-Q,"\\x"+we.toString(16).padStart(2,"0")):G(A.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,Q,c-Q,"\\x"+we.toString(16).padStart(2,"0")),String.fromCharCode(we)}return C.substring(Q,c);case 56:case 57:return N|=2048,R&6?(R&4&&!(R&32)?G(A.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,Q,c-Q):G(A.Escape_sequence_0_is_not_allowed,Q,c-Q,C.substring(Q,c)),String.fromCharCode(K)):C.substring(Q,c);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(c<W&&V(c)===123){c-=2;let we=Fn(!!(R&6));return R&17||(N|=2048,R&6&&G(A.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,Q,c-Q)),we}for(;c<Q+6;c++)if(!(c<W&&xp(V(c))))return N|=2048,R&6&&G(A.Hexadecimal_digit_expected),C.substring(Q,c);N|=1024;let xe=parseInt(C.substring(Q+2,c),16),Se=String.fromCharCode(xe);if(R&16&&xe>=55296&&xe<=56319&&c+6<W&&C.substring(c,c+2)==="\\u"&&V(c+2)!==123){let we=c,be=c+2;for(;be<we+6;be++)if(!xp(V(be)))return Se;let We=parseInt(C.substring(we+2,be),16);if(We>=56320&&We<=57343)return c=be,Se+String.fromCharCode(We)}return Se;case 120:for(;c<Q+4;c++)if(!(c<W&&xp(V(c))))return N|=2048,R&6&&G(A.Hexadecimal_digit_expected),C.substring(Q,c);return N|=4096,String.fromCharCode(parseInt(C.substring(Q+2,c),16));case 13:c<W&&V(c)===10&&c++;case 10:case 8232:case 8233:return"";default:return(R&16||R&4&&!(R&8)&&Dr(K,e))&&G(A.This_character_cannot_be_escaped_in_a_regular_expression,c-2,2),String.fromCharCode(K)}}function Fn(R){let Q=c;c+=3;let K=c,xe=Mn(1,!1),Se=xe?parseInt(xe,16):-1,we=!1;return Se<0?(R&&G(A.Hexadecimal_digit_expected),we=!0):Se>1114111&&(R&&G(A.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,K,c-K),we=!0),c>=W?(R&&G(A.Unexpected_end_of_text),we=!0):V(c)===125?c++:(R&&G(A.Unterminated_Unicode_escape_sequence),we=!0),we?(N|=2048,C.substring(Q,c)):(N|=8,Id(Se))}function Ln(){if(c+5<W&&V(c+1)===117){let R=c;c+=2;let Q=Tn(4,!1);return c=R,Q}return-1}function Lt(){if(ie(c+1)===117&&ie(c+2)===123){let R=c;c+=3;let Q=Mn(1,!1),K=Q?parseInt(Q,16):-1;return c=R,K}return-1}function vt(){let R="",Q=c;for(;c<W;){let K=ie(c);if(Dr(K,e))c+=zt(K);else if(K===92){if(K=Lt(),K>=0&&Dr(K,e)){R+=Fn(!0),Q=c;continue}if(K=Ln(),!(K>=0&&Dr(K,e)))break;N|=1024,R+=C.substring(Q,c),R+=Id(K),c+=6,Q=c}else break}return R+=C.substring(Q,c),R}function Qe(){let R=x.length;if(R>=2&&R<=12){let Q=x.charCodeAt(0);if(Q>=97&&Q<=122){let K=cg.get(x);if(K!==void 0)return g=K}}return g=80}function zn(R){let Q="",K=!1,xe=!1;for(;;){let Se=V(c);if(Se===95){N|=512,K?(K=!1,xe=!0):G(xe?A.Multiple_consecutive_numeric_separators_are_not_permitted:A.Numeric_separators_are_not_allowed_here,c,1),c++;continue}if(K=!0,!mi(Se)||Se-48>=R)break;Q+=C[c],c++,xe=!1}return V(c-1)===95&&G(A.Numeric_separators_are_not_allowed_here,c-1,1),Q}function $t(){return V(c)===110?(x+="n",N&384&&(x=Rb(x)+"n"),c++,10):(x=""+(N&128?parseInt(x.slice(2),2):N&256?parseInt(x.slice(2),8):+x),9)}function ct(){for(h=c,N=0;;){if(y=c,c>=W)return g=1;let R=ie(c);if(c===0&&R===35&&Xm(C,c)){if(c=$m(C,c),t)continue;return g=6}switch(R){case 10:case 13:if(N|=1,t){c++;continue}else return R===13&&c+1<W&&V(c+1)===10?c+=2:c++,g=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){c++;continue}else{for(;c<W&&a_(V(c));)c++;return g=5}case 33:return V(c+1)===61?V(c+2)===61?(c+=3,g=38):(c+=2,g=36):(c++,g=54);case 34:case 39:return x=ar(),g=11;case 96:return g=Or(!1);case 37:return V(c+1)===61?(c+=2,g=70):(c++,g=45);case 38:return V(c+1)===38?V(c+2)===61?(c+=3,g=77):(c+=2,g=56):V(c+1)===61?(c+=2,g=74):(c++,g=51);case 40:return c++,g=21;case 41:return c++,g=22;case 42:if(V(c+1)===61)return c+=2,g=67;if(V(c+1)===42)return V(c+2)===61?(c+=3,g=68):(c+=2,g=43);if(c++,ue&&(N&32768)===0&&N&1){N|=32768;continue}return g=42;case 43:return V(c+1)===43?(c+=2,g=46):V(c+1)===61?(c+=2,g=65):(c++,g=40);case 44:return c++,g=28;case 45:return V(c+1)===45?(c+=2,g=47):V(c+1)===61?(c+=2,g=66):(c++,g=41);case 46:return mi(V(c+1))?(rr(),g=9):V(c+1)===46&&V(c+2)===46?(c+=3,g=26):(c++,g=25);case 47:if(V(c+1)===47){for(c+=2;c<W&&!Pn(V(c));)c++;if(te=ln(te,C.slice(y,c),mg,y),t)continue;return g=2}if(V(c+1)===42){c+=2;let be=V(c)===42&&V(c+1)!==47,We=!1,et=y;for(;c<W;){let Ye=V(c);if(Ye===42&&V(c+1)===47){c+=2,We=!0;break}c++,Pn(Ye)&&(et=c,N|=1)}if(be&&at()&&(N|=2),te=ln(te,C.slice(et,c),hg,et),We||G(A.Asterisk_Slash_expected),t)continue;return We||(N|=4),g=3}return V(c+1)===61?(c+=2,g=69):(c++,g=44);case 48:if(c+2<W&&(V(c+1)===88||V(c+1)===120))return c+=2,x=Mn(1,!0),x||(G(A.Hexadecimal_digit_expected),x="0"),x="0x"+x,N|=64,g=$t();if(c+2<W&&(V(c+1)===66||V(c+1)===98))return c+=2,x=zn(2),x||(G(A.Binary_digit_expected),x="0"),x="0b"+x,N|=128,g=$t();if(c+2<W&&(V(c+1)===79||V(c+1)===111))return c+=2,x=zn(8),x||(G(A.Octal_digit_expected),x="0"),x="0o"+x,N|=256,g=$t();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return g=rr();case 58:return c++,g=59;case 59:return c++,g=27;case 60:if(Hi(C,c)){if(c=Ja(C,c,G),t)continue;return g=7}return V(c+1)===60?V(c+2)===61?(c+=3,g=71):(c+=2,g=48):V(c+1)===61?(c+=2,g=33):a===1&&V(c+1)===47&&V(c+2)!==42?(c+=2,g=31):(c++,g=30);case 61:if(Hi(C,c)){if(c=Ja(C,c,G),t)continue;return g=7}retu
Line truncated
|
||||
`)),o}function Wa(e){let t=e.emitNode;return t&&t.flags||0}function A2(e,t,a){B.assertGreaterThanOrEqual(t,0),B.assertGreaterThanOrEqual(a,0),B.assertLessThanOrEqual(t,e.length),B.assertLessThanOrEqual(t+a,e.length)}function pl(e){return e.kind===244&&e.expression.kind===11}function yf(e){return!!(Wa(e)&2097152)}function qd(e){return yf(e)&&Rf(e)}function C2(e){return Ze(e.name)&&!e.initializer}function Fd(e){return yf(e)&&Qa(e)&&Hp(e.declarationList.declarations,C2)}function D2(e,t){let a=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?Xp(Eg(t,e.pos),jp(t,e.pos)):jp(t,e.pos);return Xr(a,o=>o.end<=e.end&&t.charCodeAt(o.pos+1)===42&&t.charCodeAt(o.pos+2)===42&&t.charCodeAt(o.pos+3)!==47)}function P2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function N2(e){return e&&e.kind===241&&hf(e.parent)}function zd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function ta(e){return!!e&&!!(e.flags&524288)}function I2(e){return!!e&&!!(e.flags&16777216)}function O2(e){for(;vl(e,!0);)e=e.right;return e}function M2(e){return Ze(e)&&e.escapedText==="exports"}function L2(e){return Ze(e)&&e.escapedText==="module"}function b1(e){return(dr(e)||v1(e))&&L2(e.expression)&&h_(e)==="exports"}function gf(e){let t=j2(e);return t===5||ta(e)?t:0}function J2(e){return r_(e.arguments)===3&&dr(e.expression)&&Ze(e.expression.expression)&&In(e.expression.expression)==="Object"&&In(e.expression.name)==="defineProperty"&&Cl(e.arguments[1])&&m_(e.arguments[0],!0)}function v1(e){return $a(e)&&Cl(e.argumentExpression)}function x_(e,t){return dr(e)&&(!t&&e.expression.kind===110||Ze(e.name)&&m_(e.expression,!0))||T1(e,t)}function T1(e,t){return v1(e)&&(!t&&e.expression.kind===110||Sf(e.expression)||x_(e.expression,!0))}function m_(e,t){return Sf(e)||x_(e,t)}function j2(e){if(Mf(e)){if(!J2(e))return 0;let t=e.arguments[0];return M2(t)||b1(t)?8:x_(t)&&h_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!A1(e.left)||R2(O2(e))?0:m_(e.left.expression,!0)&&h_(e.left)==="prototype"&&Of(B2(e))?6:U2(e.left)}function R2(e){return h6(e)&&na(e.expression)&&e.expression.text==="0"}function bf(e){if(dr(e))return e.name;let t=Tf(e.argumentExpression);return na(t)||Al(t)?t:e}function h_(e){let t=bf(e);if(t){if(Ze(t))return t.escapedText;if(Al(t)||na(t))return ja(t.text)}}function U2(e){if(e.expression.kind===110)return 4;if(b1(e))return 2;if(m_(e.expression,!0)){if(mb(e.expression))return 3;let t=e;for(;!Ze(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&h_(t)==="exports")&&x_(e))return 1;if(m_(e,!0)||$a(e)&&eb(e))return 5}return 0}function B2(e){for(;ea(e.right);)e=e.right;return e.right}function q2(e){return Nl(e)&&ea(e.expression)&&gf(e.expression)!==0&&ea(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function F2(e){switch(e.kind){case 243:let t=qp(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function qp(e){return Qa(e)?$p(e.declarationList.declarations):void 0}function z2(e){return wi(e)&&e.body&&e.body.kind===267?e.body:void 0}function vf(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function V2(e,t){let a;P2(e)&&v2(e)&&$i(e.initializer)&&(a=Nn(a,Vd(e,e.initializer.jsDoc)));let o=e;for(;o&&o.parent;){if($i(o)&&(a=Nn(a,Vd(e,o.jsDoc))),o.kind===169){a=Nn(a,(t?Rg:jg)(o));break}if(o.kind===168){a=Nn(a,(t?Bg:Ug)(o));break}o=G2(o)}return a||bt}function Vd(e,t){let a=Iy(t);return Cm(t,o=>{if(o===a){let m=Xr(o.tags,v=>W2(e,v));return o.tags===m?[o]:m}else return Xr(o.tags,D6)})}function W2(e,t){return!(Vf(t)||O6(t))||!t.parent||!lh(t.parent)||!Pl(t.parent.parent)||t.parent.parent===e}function G2(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||z2(t)||vl(e))return t;if(t.parent&&(qp(t.parent)===e||vl(t)))return t.parent;if(t.parent&&t.parent.parent&&(qp(t.parent.parent)||F2(t.parent.parent)===e||q2(t.parent.parent)))return t.parent.parent}function Tf(e,t){return Wf(e,t?-2147483647:1)}function Y2(e){let t=H2(e);if(t&&ta(e)){let a=qg(e);if(a)return a.class}return t}function H2(e){let t=xf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function X2(e){if(ta(e))return Fg(e).map(t=>t.c
Line truncated
|
||||
`,ee)+1)+4;function ne(Be){H||(H=X),Rn.push(Be),X+=Be.length}for(Fe();zi(5););zi(4)&&(O=0,X=0);e:for(;;){switch(u()){case 60:Na(Rn),pr||(pr=L()),de(q(X)),O=0,H=void 0;break;case 4:Rn.push(t.getTokenText()),O=0,X=0;break;case 42:let Be=t.getTokenText();O===1?(O=2,ne(Be)):(B.assert(O===0),O=1,X+=Be.length);break;case 5:B.assert(O!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();H!==void 0&&X+pt.length>H&&Rn.push(pt.slice(H-X)),X+=pt.length;break;case 1:break e;case 82:O=2,ne(t.getTokenValue());break;case 19:O=2;let yn=t.getTokenFullStart(),on=t.getTokenEnd()-1,tn=s(on);if(tn){Zt||fr(Rn),Gr.push(P(h.createJSDocText(Rn.join("")),Zt??ee,yn)),Gr.push(tn),Rn=[],Zt=t.getTokenEnd();break}default:O=2,ne(t.getTokenText());break}O===2?sn(!1):Fe()}let re=Rn.join("").trimEnd();Gr.length&&re.length&&Gr.push(P(h.createJSDocText(re),Zt??ee,pr)),Gr.length&&Ae&&B.assertIsDefined(pr,"having parsed tags implies that the end of the comment span should be set");let Ne=Ae&&Ct(Ae,Yt,hn);return P(h.createJSDocComment(Gr.length?Ct(Gr,ee,pr):re.length?re:void 0,Ne),ee,Re)}function fr(O){for(;O.length&&(O[0]===`
|
||||
`||O[0]==="\r");)O.shift()}function Na(O){for(;O.length;){let H=O[O.length-1].trimEnd();if(H==="")O.pop();else if(H.length<O[O.length-1].length){O[O.length-1]=H;break}else break}}function Zc(){for(;;){if(Fe(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function Ot(){if(!((u()===5||u()===4)&&Y(Zc)))for(;u()===5||u()===4;)Fe()}function kr(){if((u()===5||u()===4)&&Y(Zc))return"";let O=t.hasPrecedingLineBreak(),H=!1,X="";for(;O&&u()===42||u()===5||u()===4;)X+=t.getTokenText(),u()===4?(O=!0,H=!0,X=""):u()===42&&(O=!1),Fe();return H?X:""}function q(O){B.assert(u()===60);let H=t.getTokenStart();Fe();let X=pi(void 0),ne=kr(),re;switch(X.escapedText){case"author":re=$0(H,X,O,ne);break;case"implements":re=K0(H,X,O,ne);break;case"augments":case"extends":re=Z0(H,X,O,ne);break;case"class":case"constructor":re=Fi(H,h.createJSDocClassTag,X,O,ne);break;case"public":re=Fi(H,h.createJSDocPublicTag,X,O,ne);break;case"private":re=Fi(H,h.createJSDocPrivateTag,X,O,ne);break;case"protected":re=Fi(H,h.createJSDocProtectedTag,X,O,ne);break;case"readonly":re=Fi(H,h.createJSDocReadonlyTag,X,O,ne);break;case"override":re=Fi(H,h.createJSDocOverrideTag,X,O,ne);break;case"deprecated":Gn=!0,re=Fi(H,h.createJSDocDeprecatedTag,X,O,ne);break;case"this":re=bd(H,X,O,ne);break;case"enum":re=ry(H,X,O,ne);break;case"arg":case"argument":case"param":return Kn(H,X,2,O);case"return":case"returns":re=Y0(H,X,O,ne);break;case"template":re=Td(H,X,O,ne);break;case"type":re=yd(H,X,O,ne);break;case"typedef":re=iy(H,X,O,ne);break;case"callback":re=sy(H,X,O,ne);break;case"overload":re=_y(H,X,O,ne);break;case"satisfies":re=ey(H,X,O,ne);break;case"see":re=H0(H,X,O,ne);break;case"exception":case"throws":re=X0(H,X,O,ne);break;case"import":re=ty(H,X,O,ne);break;default:re=z(H,X,O,ne);break}return re}function n(O,H,X,ne){return ne||(X+=H-O),i(X,ne.slice(X))}function i(O,H){let X=L(),ne=[],re=[],Ne,Be=0,pt;function yn(Zn){pt||(pt=O),ne.push(Zn),O+=Zn.length}H!==void 0&&(H!==""&&yn(H),Be=1);let on=u();e:for(;;){switch(on){case 4:Be=0,ne.push(t.getTokenText()),O=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:B.assert(Be!==2&&Be!==3,"whitespace shouldn't come from the scanner while saving comment text");let Zn=t.getTokenText();pt!==void 0&&O+Zn.length>pt&&(ne.push(Zn.slice(pt-O)),Be=2),O+=Zn.length;break;case 19:Be=2;let el=t.getTokenFullStart(),Oa=t.getTokenEnd()-1,tl=s(Oa);tl?(re.push(P(h.createJSDocText(ne.join("")),Ne??X,el)),re.push(tl),ne=[],Ne=t.getTokenEnd()):yn(t.getTokenText());break;case 62:Be===3?Be=2:Be=3,yn(t.getTokenText());break;case 82:Be!==3&&(Be=2),yn(t.getTokenValue());break;case 42:if(Be===0){Be=1,O+=1;break}default:Be!==3&&(Be=2),yn(t.getTokenText());break}Be===2||Be===3?on=sn(Be===3):on=Fe()}fr(ne);let tn=ne.join("").trimEnd();if(re.length)return tn.length&&re.push(P(h.createJSDocText(tn),Ne??X)),Ct(re,X,t.getTokenEnd());if(tn.length)return tn}function s(O){let H=pe(f);if(!H)return;Fe(),Ot();let X=l(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),Fe();let re=H==="link"?h.createJSDocLink:H==="linkcode"?h.createJSDocLinkCode:h.createJSDocLinkPlain;return P(re(X,ne.join("")),O,t.getTokenEnd())}function l(){if(wt(u())){let O=L(),H=Rt();for(;Le(25);)H=P(h.createQualifiedName(H,u()===81?Gt(80,!1):Rt()),O);for(;u()===81;)It(),Fe(),H=P(h.createJSDocMemberName(H,St()),O);return H}}function f(){if(kr(),u()===19&&Fe()===60&&wt(Fe())){let O=t.getTokenValue();if(S(O))return O}}function S(O){return O==="link"||O==="linkcode"||O==="linkplain"}function z(O,H,X,ne){return P(h.createJSDocUnknownTag(H,n(O,L(),X,ne)),O)}function de(O){O&&(Ae?Ae.push(O):(Ae=[O],Yt=O.pos),hn=O.end)}function Ue(){return kr(),u()===19?d():void 0}function en(){let O=zi(23);O&&Ot();let H=zi(62),X=fy();return H&&zl(62),O&&(Ot(),ft(64)&&Et(),j(24)),{name:X,isBracketed:O}}function An(O){switch(O.kind){case 151:return!0;case 188:return An(O.elementType);default:return Pf(O)&&Ze(O.typeName)&&O.typeName.escapedText==="Object"&&!O.typeArguments}}function Kn(O,H,X,ne){let re=Ue(),Ne=!re;kr();let{name:Be,isBracketed:pt}=en(),yn=kr();Ne&&!Y(f)&&(re=Ue());let on=n(O,L(),ne,yn),tn=Ia(re,Be,X,ne);tn&&(re=tn,Ne=!0);let Zn=X===1?h.createJSDocPropertyTag(H,Be,pt,re,Ne,on):h.createJSDocParameterTag(H,Be,pt,re,Ne,on);return P(Zn,O)}function Ia(O,H,X,ne){if(O&&An(O.type)){let re=L(),Ne,Be;for(;Ne=pe(()=>gp(X,ne,H));)Ne.kind===341||Ne.kind===348?Be=Dn(Be,Ne):Ne.kind===345&&un(Ne.tagName,A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Be){let pt=P(h.createJSDocTypeLiteral(Be,O.type.kind===188),re);return P(h.createJSDocTypeExpression(pt),re)}}}function Y0(O,H,X,ne){nn(Ae,N6)&&rt(H.pos,t.getTokenStart(),A._0_tag_already_specified,f_(H.escapedText));let re=Ue();return P(h.createJSDocReturnTag(H,re,n(O,L(),X,ne)),O)}function yd(O,H,X,ne){nn(Ae,Vf)&&rt(H.pos,t.getTokenStart(),A._0_tag_already_specified,f_(H.escapedText));let re=d(!0),Ne=X!==void 0&&ne!==void 0?n(O,L(),X,ne):void 0;return P(h.createJSDocTypeTag(H,re,Ne),O)}f
Line truncated
|
||||
`&&m[o-1]==="\r"?o-1:o}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=Ry();return this.forEachChild(m),e;function t(v){let E=o(v);E&&e.add(E,v)}function a(v){let E=e.get(v);return E||e.set(v,E=[]),E}function o(v){let E=uf(v);return E&&(Ef(E)&&dr(E.expression)?E.expression.name.text:l1(E)?getNameFromPropertyName(E):void 0)}function m(v){switch(v.kind){case 262:case 218:case 174:case 173:let E=v,C=o(E);if(C){let h=a(C),y=Fa(h);y&&E.parent===y.parent&&E.symbol===y.symbol?E.body&&!y.body&&(h[h.length-1]=E):h.push(E)}Ht(v,m);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(v),Ht(v,m);break;case 169:if(!S_(v,31))break;case 260:case 208:{let h=v;if(c2(h.name)){Ht(h.name,m);break}h.initializer&&m(h.initializer)}case 306:case 172:case 171:t(v);break;case 278:let c=v;c.exportClause&&(rh(c.exportClause)?qn(c.exportClause.elements,m):m(c.exportClause.name));break;case 272:let W=v.importClause;W&&(W.name&&t(W.name),W.namedBindings&&(W.namedBindings.kind===274?t(W.namedBindings):qn(W.namedBindings.elements,m)));break;case 226:gf(v)!==0&&t(v);default:Ht(v,m)}}}},gv=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}getLineAndCharacterOfPosition(e){return Ym(this,e)}};function bv(){return{getNodeConstructor:()=>Yf,getTokenConstructor:()=>Th,getIdentifierConstructor:()=>xh,getPrivateIdentifierConstructor:()=>Sh,getSourceFileConstructor:()=>yv,getSymbolConstructor:()=>dv,getTypeConstructor:()=>mv,getSignatureConstructor:()=>hv,getSourceMapSourceConstructor:()=>gv}}var vv=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],z3=[...vv,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];kb(bv());var Ll=new Proxy({},{get:()=>!0});var Ah=Ll["4.8"];function nr(e,t=!1){var a;if(e!=null){if(Ah){if(t||Ml(e)){let o=r1(e);return o?[...o]:void 0}return}return(a=e.modifiers)==null?void 0:a.filter(o=>!Dl(o))}}function ra(e,t=!1){var a;if(e!=null){if(Ah){if(t||Gf(e)){let o=pf(e);return o?[...o]:void 0}return}return(a=e.decorators)==null?void 0:a.filter(Dl)}}var Dh={};var Jl=new Proxy({},{get:(e,t)=>t});var Ph=Jl,Nh=Jl;var D=Ph,Dt=Nh;var Ih=Ll["5.0"],le=Ie,Sv=new Set([le.AmpersandAmpersandToken,le.BarBarToken,le.QuestionQuestionToken]),wv=new Set([Ie.AmpersandAmpersandEqualsToken,Ie.AmpersandEqualsToken,Ie.AsteriskAsteriskEqualsToken,Ie.AsteriskEqualsToken,Ie.BarBarEqualsToken,Ie.BarEqualsToken,Ie.CaretEqualsToken,Ie.EqualsToken,Ie.GreaterThanGreaterThanEqualsToken,Ie.GreaterThanGreaterThanGreaterThanEqualsToken,Ie.LessThanLessThanEqualsToken,Ie.MinusEqualsToken,Ie.PercentEqualsToken,Ie.PlusEqualsToken,Ie.QuestionQuestionEqualsToken,Ie.SlashEqualsToken]),kv=new Set([le.AmpersandAmpersandToken,le.AmpersandToken,le.AsteriskAsteriskToken,le.AsteriskToken,le.BarBarToken,le.BarToken,le.CaretToken,le.EqualsEqualsEqualsToken,le.EqualsEqualsToken,le.ExclamationEqualsEqualsToken,le.ExclamationEqualsToken,le.GreaterThanEqualsToken,le.GreaterThanGreaterThanGreaterThanToken,le.GreaterThanGreaterThanToken,le.GreaterThanToken,le.InKeyword,le.InstanceOfKeyword,le.LessThanEqualsToken,le.LessThanLessThanToken,le.LessThanToken,le.MinusToken,le.PercentToken,le.PlusToken,le.SlashToken]);function Ev(e){return wv.has(e.kind)}function Av(e){return Sv.has(e.kind)}function Cv(e){return kv.has(e.kind)}function Zr(e){return it(e)}function Oh(e){return e.kind!==le.SemicolonClassElement}function He(e,t){let a=nr(t);return(a==null?void 0:a.some(o=>o.kind===e))===!0}function Mh(e){let t=nr(e);return t==null?null:t[t.length-1]??null}function Lh(e){return e.kind===le.CommaToken}function Dv(e){return e.kind===le.SingleLineCommentTrivia||e.kind===le.MultiLineCommentTrivia}function Pv(e){return e.kind===le.JSDocComment}function Jh(e){if(Ev(e))return{type:D.AssignmentExpression,operator:Zr(e.kind)};if(Av(e))return{type:D.LogicalExpression,operator:Zr(e.kind)};if(Cv(e))return{type:D.BinaryExpression,operator:Zr(e.kind)};throw new Error(`Unexpected binary operator ${it(e.kind)}`)}function k_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,l
Line truncated
|
||||
`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var ud=new WeakMap;function R4(e){return ud.has(e)||ud.set(e,j4(e)),ud.get(e)}var pd=R4;function U4(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let o=e[a];if(t&&Xt(o)===cn(t)&&pd(o)&&pd(t)&&(e.splice(a+1,1),o.value+="*//*"+t.value,o.range=[cn(o),Xt(t)]),!cd(o)&&!sa(o))throw new TypeError(`Unknown comment type: "${o.type}".`);t=o}}var x0=U4;var A_=null;function C_(e){if(A_!==null&&typeof A_.property){let t=A_;return A_=C_.prototype=null,t}return A_=C_.prototype=e??Object.create(null),new C_}var B4=10;for(let e=0;e<=B4;e++)C_();function fd(e){return C_(e)}function q4(e,t="type"){fd(e);function a(o){let m=o[t],v=e[m];if(!Array.isArray(v))throw Object.assign(new Error(`Missing visitor keys for '${m}'.`),{node:o});return v}return a}var S0=q4;var w0={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["i
Line truncated
|
||||
`;e=Er(!1,e.replace(W4,"").replace(V4,""),X4,"$1");let a="";for(;a!==e;)a=e,e=Er(!1,e,H4,`${t}$1 $2${t}`);e=e.replace(P0,"").trimEnd();let o=Object.create(null),m=Er(!1,e,N0,"").replace(P0,"").trimEnd(),v;for(;v=N0.exec(e);){let E=Er(!1,v[2],Y4,"");if(typeof o[v[1]]=="string"||Array.isArray(o[v[1]])){let C=o[v[1]];o[v[1]]=[...$4,...Array.isArray(C)?C:[C],E]}else o[v[1]]=E}return{comments:m,pragmas:o}}var M0=["noformat","noprettier"],L0=["format","prettier"];function Q4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var J0=Q4;function j0(e){let t=J0(e);t&&(e=e.slice(t.length+1));let a=I0(e),{pragmas:o,comments:m}=O0(a);return{shebang:t,text:e,pragmas:o,comments:m}}function R0(e){let{pragmas:t}=j0(e);return L0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function U0(e){let{pragmas:t}=j0(e);return M0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function K4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:R0,hasIgnorePragma:U0,locStart:cn,locEnd:Xt,...e}}var B0=K4;var q0=/^[^"'`]*<\/|^[^/]{2}.*\/>/mu;function Z4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var F0=Z4;var z0="module",V0="script",W0=[z0,V0];function G0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return z0;if(/\.(?:cjs|cts)$/iu.test(e))return V0}}var e3={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function t3(e){let{message:t,location:a}=e;if(!a)return e;let{start:o,end:m}=a;return h0(t,{loc:{start:{line:o.line,column:o.column+1},end:{line:m.line,column:m.column+1}},cause:e})}var n3=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function r3(e,t){let a=[{...e3,filePath:t}],o=G0(t);if(o?a=a.map(v=>({...v,sourceType:o})):a=W0.flatMap(v=>a.map(E=>({...E,sourceType:v}))),n3(t))return a;let m=q0.test(e);return[m,!m].flatMap(v=>a.map(E=>({...E,jsx:v})))}function i3(e,t){let a=t==null?void 0:t.filepath;typeof a!="string"&&(a=void 0);let o=F0(e),m=r3(e,a),v;try{v=y0(m.map(E=>()=>m0(o,E)))}catch({errors:[E]}){throw t3(E)}return D0(v,{parser:"typescript",text:e})}var a3=B0(i3);return by(s3);});
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
var xd=Object.defineProperty;var Sd=e=>{throw TypeError(e)};var my=(e,t,a)=>t in e?xd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var wd=(e,t)=>{for(var a in t)xd(e,a,{get:t[a],enumerable:!0})};var Vi=(e,t,a)=>my(e,typeof t!="symbol"?t+"":t,a),hy=(e,t,a)=>t.has(e)||Sd("Cannot "+a);var gp=(e,t,a)=>t.has(e)?Sd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a);var ge=(e,t,a)=>(hy(e,t,"access private method"),a);var hd={};wd(hd,{parsers:()=>md});var md={};wd(md,{typescript:()=>t3});var yy=()=>()=>{},Ma=yy;var gy=(e,t,a,o)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(a,o):a.global?t.replace(a,o):t.split(a).join(o)},Er=gy;var Em="5.8";var bt=[],by=new Map;function r_(e){return e!==void 0?e.length:0}function qn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let o=t(e[a],a);if(o)return o}}function vy(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let o=t(e[a],a);if(o!==void 0)return o}}function kd(e,t,a){let o=[];B.assertEqual(e.length,t.length);for(let m=0;m<e.length;m++)o.push(a(e[m],t[m],m));return o}function Yp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function Am(e,t,a){if(e!==void 0)for(let o=a??0;o<e.length;o++){let m=e[o];if(t(m,o))return m}}function bp(e,t,a){if(e===void 0)return-1;for(let o=a??0;o<e.length;o++)if(t(e[o],o))return o;return-1}function Ty(e,t,a=$p){if(e!==void 0){for(let o=0;o<e.length;o++)if(a(e[o],t))return!0}return!1}function Xr(e,t){if(e!==void 0){let a=e.length,o=0;for(;o<a&&t(e[o]);)o++;if(o<a){let m=e.slice(0,o);for(o++;o<a;){let v=e[o];t(v)&&m.push(v),o++}return m}}return e}function Np(e,t){let a;if(e!==void 0){a=[];for(let o=0;o<e.length;o++)a.push(t(e[o],o))}return a}function Cm(e){let t=[];for(let a=0;a<e.length;a++){let o=e[a];o&&(Qr(o)?Nn(t,o):t.push(o))}return t}function Dm(e,t){let a;if(e!==void 0)for(let o=0;o<e.length;o++){let m=t(e[o],o);m&&(Qr(m)?a=Nn(a,m):a=Dn(a,m))}return a??bt}function xy(e,t){let a;if(e!==void 0)for(let o=0;o<e.length;o++){let m=e[o],v=t(m,o);(a||m!==v||Qr(v))&&(a||(a=e.slice(0,o)),Qr(v)?Nn(a,v):a.push(v))}return a??e}function Sy(e,t){let a=[];if(e!==void 0)for(let o=0;o<e.length;o++){let m=t(e[o],o);m!==void 0&&a.push(m)}return a}function nn(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Hp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function wy(e,t,a=$p){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!a(e[o],t[o],o))return!1;return!0}function Dn(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function Ip(e,t){return t<0?e.length+t:t}function Nn(e,t,a,o){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,o);a=a===void 0?0:Ip(t,a),o=o===void 0?t.length:Ip(t,o);for(let m=a;m<o&&m<t.length;m++)t[m]!==void 0&&e.push(t[m]);return e}function ky(e,t,a){return Ty(e,t,a)?!1:(e.push(t),!0)}function Ey(e,t,a){return e!==void 0?(ky(e,t,a),e):[t]}function Ay(e,t){return e.length===0?bt:e.slice().sort(t)}var a3=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e!==void 0&&(t=Ip(e,t),t<e.length))return e[t]};function Xp(e){return e===void 0||e.length===0?void 0:e[0]}function Fa(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Cy(e){return B.assert(e.length!==0),e[e.length-1]}function Dy(e){return e!==void 0&&e.length===1?e[0]:void 0}function Py(e,t,a,o,m){return Ny(e,a(t),a,o,m)}function Ny(e,t,a,o,m){if(!nn(e))return-1;let v=m??0,E=e.length-1;for(;v<=E;){let C=v+(E-v>>1),c=a(e[C],C);switch(o(c,t)){case-1:v=C+1;break;case 0:return C;case 1:E=C-1;break}}return~v}function Iy(e,t,a,o,m){if(e&&e.length>0){let v=e.length;if(v>0){let E=o===void 0||o<0?0:o,C=m===void 0||E+m>v-1?v-1:E+m,c;for(arguments.length<=2?(c=e[E],E++):c=a;E<=C;)c=t(c,e[E],E),E++;return c}}return a}var Pm=Object.prototype.hasOwnProperty;function Nr(e,t){return Pm.call(e,t)}function Oy(e){let t=[];for(let a in e)Pm.call(e,a)&&t.push(a);return t}function My(){let e=new Map;return e.add=Ly,e.remove=Jy,e}function Ly(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function Jy(e,t){let a=this.get(e);a!==void 0&&(Wy(a,t),a.length||this.delete(e))}function Qr(e){return Array.isArray(e)}function vp(e){return Qr(e)?e:[e]}function jy(e,t){return e!==void 0&&t(e)?e:void 0}function Cr(e,t){return e!==void 0&&t(e)?e:B.fail(`Invalid cast. The supplied value ${e} did not pass the test '${B.getFunctionName(t)}'.`)}function Ga(e){}function Ry(){return!0}function gt(e){return e}function Ed(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function er(e){let t=new Map;return a=>{let o=`${typeof a}:${a}`,m=t.get(o);return m===void 0&&!t.has(o)&&(m=e(a),t.set(o,m)),m}}function $p(e,t){return e===t}function Qp(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Uy(e,t){return $p(e,t)}function By(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function
Line truncated
|
||||
Node ${Mt(J.kind)} was unexpected.`,me||y)}e.failBadSyntaxKind=y;function g(J,_e,me,Te){J||(_e=_e?`False expression: ${_e}`:"False expression.",me&&(_e+=`\r
|
||||
Verbose Debug Information: `+(typeof me=="string"?me:me())),h(_e,Te||g))}e.assert=g;function x(J,_e,me,Te,Xe){if(J!==_e){let Ke=me?Te?`${me} ${Te}`:me:"";h(`Expected ${J} === ${_e}. ${Ke}`,Xe||x)}}e.assertEqual=x;function N(J,_e,me,Te){J>=_e&&h(`Expected ${J} < ${_e}. ${me||""}`,Te||N)}e.assertLessThan=N;function te(J,_e,me){J>_e&&h(`Expected ${J} <= ${_e}`,me||te)}e.assertLessThanOrEqual=te;function ue(J,_e,me){J<_e&&h(`Expected ${J} >= ${_e}`,me||ue)}e.assertGreaterThanOrEqual=ue;function ye(J,_e,me){J==null&&h(_e,me||ye)}e.assertIsDefined=ye;function fe(J,_e,me){return ye(J,_e,me||fe),J}e.checkDefined=fe;function M(J,_e,me){for(let Te of J)ye(Te,_e,me||M)}e.assertEachIsDefined=M;function ie(J,_e,me){return M(J,_e,me||ie),J}e.checkEachDefined=ie;function Ce(J,_e="Illegal value:",me){let Te=typeof J=="object"&&Nr(J,"kind")&&Nr(J,"pos")?"SyntaxKind: "+Mt(J.kind):JSON.stringify(J);return h(`${_e} ${Te}`,me||Ce)}e.assertNever=Ce;function V(J,_e,me,Te){W(1,"assertEachNode")&&g(_e===void 0||Yp(J,_e),me||"Unexpected node.",()=>`Node array did not pass test '${Tn(_e)}'.`,Te||V)}e.assertEachNode=V;function oe(J,_e,me,Te){W(1,"assertNode")&&g(J!==void 0&&(_e===void 0||_e(J)),me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} did not pass test '${Tn(_e)}'.`,Te||oe)}e.assertNode=oe;function G(J,_e,me,Te){W(1,"assertNotNode")&&g(J===void 0||_e===void 0||!_e(J),me||"Unexpected node.",()=>`Node ${Mt(J.kind)} should not have passed test '${Tn(_e)}'.`,Te||G)}e.assertNotNode=G;function dt(J,_e,me,Te){W(1,"assertOptionalNode")&&g(_e===void 0||J===void 0||_e(J),me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} did not pass test '${Tn(_e)}'.`,Te||dt)}e.assertOptionalNode=dt;function rr(J,_e,me,Te){W(1,"assertOptionalToken")&&g(_e===void 0||J===void 0||J.kind===_e,me||"Unexpected node.",()=>`Node ${Mt(J==null?void 0:J.kind)} was not a '${Mt(_e)}' token.`,Te||rr)}e.assertOptionalToken=rr;function vn(J,_e,me){W(1,"assertMissingNode")&&g(J===void 0,_e||"Unexpected node.",()=>`Node ${Mt(J.kind)} was unexpected'.`,me||vn)}e.assertMissingNode=vn;function ir(J){}e.type=ir;function Tn(J){if(typeof J!="function")return"";if(Nr(J,"name"))return J.name;{let _e=Function.prototype.toString.call(J),me=/^function\s+([\w$]+)\s*\(/.exec(_e);return me?me[1]:""}}e.getFunctionName=Tn;function Mn(J){return`{ name: ${f_(J.escapedName)}; flags: ${ct(J.flags)}; declarations: ${Np(J.declarations,_e=>Mt(_e.kind))} }`}e.formatSymbol=Mn;function Ge(J=0,_e,me){let Te=Or(_e);if(J===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(me){let Xe=[],Ke=J;for(let[st,Pt]of Te){if(st>J)break;st!==0&&st&J&&(Xe.push(Pt),Ke&=~st)}if(Ke===0)return Xe.join("|")}else for(let[Xe,Ke]of Te)if(Xe===J)return Ke;return J.toString()}e.formatEnum=Ge;let ar=new Map;function Or(J){let _e=ar.get(J);if(_e)return _e;let me=[];for(let Xe in J){let Ke=J[Xe];typeof Ke=="number"&&me.push([Ke,Xe])}let Te=Ay(me,(Xe,Ke)=>Nm(Xe[0],Ke[0]));return ar.set(J,Te),Te}function Mt(J){return Ge(J,Ie,!1)}e.formatSyntaxKind=Mt;function Fn(J){return Ge(J,Jm,!1)}e.formatSnippetKind=Fn;function Ln(J){return Ge(J,Ir,!1)}e.formatScriptKind=Ln;function Lt(J){return Ge(J,bn,!0)}e.formatNodeFlags=Lt;function vt(J){return Ge(J,Om,!0)}e.formatNodeCheckFlags=vt;function Qe(J){return Ge(J,Kp,!0)}e.formatModifierFlags=Qe;function zn(J){return Ge(J,Lm,!0)}e.formatTransformFlags=zn;function $t(J){return Ge(J,jm,!0)}e.formatEmitFlags=$t;function ct(J){return Ge(J,Zp,!0)}e.formatSymbolFlags=ct;function at(J){return Ge(J,rn,!0)}e.formatTypeFlags=at;function Ut(J){return Ge(J,Mm,!0)}e.formatSignatureFlags=Ut;function Jt(J){return Ge(J,ef,!0)}e.formatObjectFlags=Jt;function lt(J){return Ge(J,Mp,!0)}e.formatFlowFlags=lt;function sr(J){return Ge(J,Im,!0)}e.formatRelationComparisonResult=sr;function mt(J){return Ge(J,CheckMode,!0)}e.formatCheckMode=mt;function xn(J){return Ge(J,SignatureCheckMode,!0)}e.formatSignatureCheckMode=xn;function yt(J){return Ge(J,TypeFacts,!0)}e.formatTypeFacts=yt;let ln=!1,nt;function Bt(J){"__debugFlowFlags"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(){let _e=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",me=this.flags&-2048;return`${_e}${me?` (${lt(me)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,Mp,!0)}},__debugToString:{value(){return gr(this)}}})}function an(J){return ln&&(typeof Object.setPrototypeOf=="function"?(nt||(nt=Object.create(Object.prototype),Bt(nt)),Object.setPrototypeOf(J,nt)):Bt(J)),J}e.attachFlowNodeDebugInfo=an;let _r;function hr(J){"__tsDebuggerDisplay"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(_e){return _e=String(_e).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${_e}`}}})}function yr(J){ln&&(type
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Ce(this)}}}e.DebugTypeMapper=Mr;function Gn(J){return e.isDebugging?Object.setPrototypeOf(J,Mr.prototype):J}e.attachDebugPrototypeIfDebug=Gn;function De(J){return console.log(gr(J))}e.printControlFlowGraph=De;function gr(J){let _e=-1;function me(u){return u.id||(u.id=_e,_e--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let Xe;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(Xe||(Xe={}));let Ke=2032,st=882,Pt=Object.create(null),Tt=[],ut=[],Lr=Se(J,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),be(u);let br=We(Lr),Jn=et(br);return Ye(Lr,0),un();function Yn(u){return!!(u.flags&128)}function Ei(u){return!!(u.flags&12)&&!!u.antecedent}function R(u){return!!(u.flags&Ke)}function Q(u){return!!(u.flags&st)}function K(u){let Oe=[];for(let Me of u.edges)Me.source===u&&Oe.push(Me.target);return Oe}function xe(u){let Oe=[];for(let Me of u.edges)Me.target===u&&Oe.push(Me.source);return Oe}function Se(u,Oe){let Me=me(u),U=Pt[Me];if(U&&Oe.has(u))return U.circular=!0,U={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(U),U;if(Oe.add(u),!U)if(Pt[Me]=U={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(U),Ei(u))for(let Fe of u.antecedent)we(U,Fe,Oe);else R(u)&&we(U,u.antecedent,Oe);return Oe.delete(u),U}function we(u,Oe,Me){let U=Se(Oe,Me),Fe={source:u,target:U};ut.push(Fe),u.edges.push(Fe),U.edges.push(Fe)}function be(u){if(u.level!==-1)return u.level;let Oe=0;for(let Me of xe(u))Oe=Math.max(Oe,be(Me)+1);return u.level=Oe}function We(u){let Oe=0;for(let Me of K(u))Oe=Math.max(Oe,We(Me));return Oe+1}function et(u){let Oe=L(Array(u),0);for(let Me of Tt)Oe[Me.level]=Math.max(Oe[Me.level],Me.text.length);return Oe}function Ye(u,Oe){if(u.lane===-1){u.lane=Oe,u.endLane=Oe;let Me=K(u);for(let U=0;U<Me.length;U++){U>0&&Oe++;let Fe=Me[U];Ye(Fe,Oe),Fe.endLane>u.endLane&&(Oe=Fe.endLane)}u.endLane=Oe}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function Sn(u){let Oe=gi(u);return qd(Oe,u,!1)}function rt(u,Oe){let Me=Ee(u.flags);if(Oe&&(Me=`${Me}#${me(u)}`),Yn(u)){let U=[],{switchStatement:Fe,clauseStart:sn,clauseEnd:Ve}=u.node;for(let $e=sn;$e<Ve;$e++){let Nt=Fe.caseBlock.clauses[$e];y6(Nt)?U.push("default"):U.push(Sn(Nt.expression))}Me+=` (${U.join(", ")})`}else Q(u)&&u.node&&(Me+=` (${Sn(u.node)})`);return Oe==="circularity"?`Circular(${Me})`:Me}function un(){let u=Jn.length,Oe=qy(Tt,0,Ve=>Ve.lane)+1,Me=L(Array(Oe),""),U=Jn.map(()=>Array(Oe)),Fe=Jn.map(()=>L(Array(Oe),0));for(let Ve of Tt){U[Ve.level][Ve.lane]=Ve;let $e=K(Ve);for(let kt=0;kt<$e.length;kt++){let It=$e[kt],qt=8;It.lane===Ve.lane&&(qt|=4),kt>0&&(qt|=1),kt<$e.length-1&&(qt|=2),Fe[Ve.level][It.lane]|=qt}$e.length===0&&(Fe[Ve.level][Ve.lane]|=16);let Nt=xe(Ve);for(let kt=0;kt<Nt.length;kt++){let It=Nt[kt],qt=4;kt>0&&(qt|=1),kt<Nt.length-1&&(qt|=2),Fe[Ve.level-1][It.lane]|=qt}}for(let Ve=0;Ve<u;Ve++)for(let $e=0;$e<Oe;$e++){let Nt=Ve>0?Fe[Ve-1][$e]:0,kt=$e>0?Fe[Ve][$e-1]:0,It=Fe[Ve][$e];It||(Nt&8&&(It|=12),kt&2&&(It|=3),Fe[Ve][$e]=It)}for(let Ve=0;Ve<u;Ve++)for(let $e=0;$e<Me.length;$e++){let Nt=Fe[Ve][$e],kt=Nt&4?"\u2500":" ",It=U[Ve][$e];It?(sn($e,It.text),Ve<u-1&&(sn($e," "),sn($e,qe(kt,Jn[Ve]-It.text.length)))):Ve<u-1&&sn($e,qe(kt,Jn[Ve]+1)),sn($e,ti(Nt)),sn($e,Nt&8&&Ve<u-1&&!U[Ve+1][$e]?"\u2500":" ")}return`
|
||||
${Me.join(`
|
||||
`)}
|
||||
`;function sn(Ve,$e){Me[Ve]+=$e}}function ti(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function L(u,Oe){if(u.fill)u.fill(Oe);else for(let Me=0;Me<u.length;Me++)u[Me]=Oe;return u}function qe(u,Oe){if(u.repeat)return Oe>0?u.repeat(Oe):"";let Me="";for(;Me.length<Oe;)Me+=u;return Me}}e.formatControlFlowGraph=gr})(B||(B={}));var s3=Date.now,Ad=()=>{},Yy=()=>{},cl,Ie=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,K=c;continue}c++}return B.assert(Se!==void 0),x=xe,Se}function Mt(R){let Q=c;if(c++,c>=W)return G(A.Unexpected_end_of_text),"";let K=V(c);switch(c++,K){case 48:if(c>=W||!mi(V(c)))return"\0";case 49:case 50:case 51:c<W&&xp(V(c))&&c++;case 52:case 53:case 54:case 55:if(c<W&&xp(V(c))&&c++,N|=2048,R&6){let we=parseInt(C.substring(Q+1,c),8);return R&4&&!(R&32)&&K!==48?G(A.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,Q,c-Q,"\\x"+we.toString(16).padStart(2,"0")):G(A.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,Q,c-Q,"\\x"+we.toString(16).padStart(2,"0")),String.fromCharCode(we)}return C.substring(Q,c);case 56:case 57:return N|=2048,R&6?(R&4&&!(R&32)?G(A.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,Q,c-Q):G(A.Escape_sequence_0_is_not_allowed,Q,c-Q,C.substring(Q,c)),String.fromCharCode(K)):C.substring(Q,c);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(c<W&&V(c)===123){c-=2;let we=Fn(!!(R&6));return R&17||(N|=2048,R&6&&G(A.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,Q,c-Q)),we}for(;c<Q+6;c++)if(!(c<W&&Tp(V(c))))return N|=2048,R&6&&G(A.Hexadecimal_digit_expected),C.substring(Q,c);N|=1024;let xe=parseInt(C.substring(Q+2,c),16),Se=String.fromCharCode(xe);if(R&16&&xe>=55296&&xe<=56319&&c+6<W&&C.substring(c,c+2)==="\\u"&&V(c+2)!==123){let we=c,be=c+2;for(;be<we+6;be++)if(!Tp(V(be)))return Se;let We=parseInt(C.substring(we+2,be),16);if(We>=56320&&We<=57343)return c=be,Se+String.fromCharCode(We)}return Se;case 120:for(;c<Q+4;c++)if(!(c<W&&Tp(V(c))))return N|=2048,R&6&&G(A.Hexadecimal_digit_expected),C.substring(Q,c);return N|=4096,String.fromCharCode(parseInt(C.substring(Q+2,c),16));case 13:c<W&&V(c)===10&&c++;case 10:case 8232:case 8233:return"";default:return(R&16||R&4&&!(R&8)&&Dr(K,e))&&G(A.This_character_cannot_be_escaped_in_a_regular_expression,c-2,2),String.fromCharCode(K)}}function Fn(R){let Q=c;c+=3;let K=c,xe=Mn(1,!1),Se=xe?parseInt(xe,16):-1,we=!1;return Se<0?(R&&G(A.Hexadecimal_digit_expected),we=!0):Se>1114111&&(R&&G(A.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,K,c-K),we=!0),c>=W?(R&&G(A.Unexpected_end_of_text),we=!0):V(c)===125?c++:(R&&G(A.Unterminated_Unicode_escape_sequence),we=!0),we?(N|=2048,C.substring(Q,c)):(N|=8,Od(Se))}function Ln(){if(c+5<W&&V(c+1)===117){let R=c;c+=2;let Q=Tn(4,!1);return c=R,Q}return-1}function Lt(){if(ie(c+1)===117&&ie(c+2)===123){let R=c;c+=3;let Q=Mn(1,!1),K=Q?parseInt(Q,16):-1;return c=R,K}return-1}function vt(){let R="",Q=c;for(;c<W;){let K=ie(c);if(Dr(K,e))c+=zt(K);else if(K===92){if(K=Lt(),K>=0&&Dr(K,e)){R+=Fn(!0),Q=c;continue}if(K=Ln(),!(K>=0&&Dr(K,e)))break;N|=1024,R+=C.substring(Q,c),R+=Od(K),c+=6,Q=c}else break}return R+=C.substring(Q,c),R}function Qe(){let R=x.length;if(R>=2&&R<=12){let Q=x.charCodeAt(0);if(Q>=97&&Q<=122){let K=ag.get(x);if(K!==void 0)return g=K}}return g=80}function zn(R){let Q="",K=!1,xe=!1;for(;;){let Se=V(c);if(Se===95){N|=512,K?(K=!1,xe=!0):G(xe?A.Multiple_consecutive_numeric_separators_are_not_permitted:A.Numeric_separators_are_not_allowed_here,c,1),c++;continue}if(K=!0,!mi(Se)||Se-48>=R)break;Q+=C[c],c++,xe=!1}return V(c-1)===95&&G(A.Numeric_separators_are_not_allowed_here,c-1,1),Q}function $t(){return V(c)===110?(x+="n",N&384&&(x=Mb(x)+"n"),c++,10):(x=""+(N&128?parseInt(x.slice(2),2):N&256?parseInt(x.slice(2),8):+x),9)}function ct(){for(h=c,N=0;;){if(y=c,c>=W)return g=1;let R=ie(c);if(c===0&&R===35&&$m(C,c)){if(c=Qm(C,c),t)continue;return g=6}switch(R){case 10:case 13:if(N|=1,t){c++;continue}else return R===13&&c+1<W&&V(c+1)===10?c+=2:c++,g=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){c++;continue}else{for(;c<W&&a_(V(c));)c++;return g=5}case 33:return V(c+1)===61?V(c+2)===61?(c+=3,g=38):(c+=2,g=36):(c++,g=54);case 34:case 39:return x=ar(),g=11;case 96:return g=Or(!1);case 37:return V(c+1)===61?(c+=2,g=70):(c++,g=45);case 38:return V(c+1)===38?V(c+2)===61?(c+=3,g=77):(c+=2,g=56):V(c+1)===61?(c+=2,g=74):(c++,g=51);case 40:return c++,g=21;case 41:return c++,g=22;case 42:if(V(c+1)===61)return c+=2,g=67;if(V(c+1)===42)return V(c+2)===61?(c+=3,g=68):(c+=2,g=43);if(c++,ue&&(N&32768)===0&&N&1){N|=32768;continue}return g=42;case 43:return V(c+1)===43?(c+=2,g=46):V(c+1)===61?(c+=2,g=65):(c++,g=40);case 44:return c++,g=28;case 45:return V(c+1)===45?(c+=2,g=47):V(c+1)===61?(c+=2,g=66):(c++,g=41);case 46:return mi(V(c+1))?(rr(),g=9):V(c+1)===46&&V(c+2)===46?(c+=3,g=26):(c++,g=25);case 47:if(V(c+1)===47){for(c+=2;c<W&&!Pn(V(c));)c++;if(te=ln(te,C.slice(y,c),ug,y),t)continue;return g=2}if(V(c+1)===42){c+=2;let be=V(c)===42&&V(c+1)!==47,We=!1,et=y;for(;c<W;){let Ye=V(c);if(Ye===42&&V(c+1)===47){c+=2,We=!0;break}c++,Pn(Ye)&&(et=c,N|=1)}if(be&&at()&&(N|=2),te=ln(te,C.slice(et,c),pg,et),We||G(A.Asterisk_Slash_expected),t)continue;return We||(N|=4),g=3}return V(c+1)===61?(c+=2,g=69):(c++,g=44);case 48:if(c+2<W&&(V(c+1)===88||V(c+1)===120))return c+=2,x=Mn(1,!0),x||(G(A.Hexadecimal_digit_expected),x="0"),x="0x"+x,N|=64,g=$t();if(c+2<W&&(V(c+1)===66||V(c+1)===98))return c+=2,x=zn(2),x||(G(A.Binary_digit_expected),x="0"),x="0b"+x,N|=128,g=$t();if(c+2<W&&(V(c+1)===79||V(c+1)===111))return c+=2,x=zn(8),x||(G(A.Octal_digit_expected),x="0"),x="0o"+x,N|=256,g=$t();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return g=rr();case 58:return c++,g=59;case 59:return c++,g=27;case 60:if(Hi(C,c)){if(c=Ja(C,c,G),t)continue;return g=7}return V(c+1)===60?V(c+2)===61?(c+=3,g=71):(c+=2,g=48):V(c+1)===61?(c+=2,g=33):a===1&&V(c+1)===47&&V(c+2)!==42?(c+=2,g=31):(c++,g=30);case 61:if(Hi(C,c)){if(c=Ja(C,c,G),t)continue;return g=7}retu
Line truncated
|
||||
`)),o}function Wa(e){let t=e.emitNode;return t&&t.flags||0}function S2(e,t,a){B.assertGreaterThanOrEqual(t,0),B.assertGreaterThanOrEqual(a,0),B.assertLessThanOrEqual(t,e.length),B.assertLessThanOrEqual(t+a,e.length)}function ul(e){return e.kind===244&&e.expression.kind===11}function hf(e){return!!(Wa(e)&2097152)}function Fd(e){return hf(e)&&jf(e)}function w2(e){return Ze(e.name)&&!e.initializer}function zd(e){return hf(e)&&Qa(e)&&Yp(e.declarationList.declarations,w2)}function k2(e,t){let a=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?Hp(xg(t,e.pos),Jp(t,e.pos)):Jp(t,e.pos);return Xr(a,o=>o.end<=e.end&&t.charCodeAt(o.pos+1)===42&&t.charCodeAt(o.pos+2)===42&&t.charCodeAt(o.pos+3)!==47)}function E2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function A2(e){return e&&e.kind===241&&mf(e.parent)}function Vd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function ta(e){return!!e&&!!(e.flags&524288)}function C2(e){return!!e&&!!(e.flags&16777216)}function D2(e){for(;bl(e,!0);)e=e.right;return e}function P2(e){return Ze(e)&&e.escapedText==="exports"}function N2(e){return Ze(e)&&e.escapedText==="module"}function v1(e){return(dr(e)||T1(e))&&N2(e.expression)&&h_(e)==="exports"}function yf(e){let t=O2(e);return t===5||ta(e)?t:0}function I2(e){return r_(e.arguments)===3&&dr(e.expression)&&Ze(e.expression.expression)&&In(e.expression.expression)==="Object"&&In(e.expression.name)==="defineProperty"&&Al(e.arguments[1])&&m_(e.arguments[0],!0)}function T1(e){return $a(e)&&Al(e.argumentExpression)}function x_(e,t){return dr(e)&&(!t&&e.expression.kind===110||Ze(e.name)&&m_(e.expression,!0))||x1(e,t)}function x1(e,t){return T1(e)&&(!t&&e.expression.kind===110||xf(e.expression)||x_(e.expression,!0))}function m_(e,t){return xf(e)||x_(e,t)}function O2(e){if(Of(e)){if(!I2(e))return 0;let t=e.arguments[0];return P2(t)||v1(t)?8:x_(t)&&h_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!C1(e.left)||M2(D2(e))?0:m_(e.left.expression,!0)&&h_(e.left)==="prototype"&&If(J2(e))?6:L2(e.left)}function M2(e){return p6(e)&&na(e.expression)&&e.expression.text==="0"}function gf(e){if(dr(e))return e.name;let t=vf(e.argumentExpression);return na(t)||El(t)?t:e}function h_(e){let t=gf(e);if(t){if(Ze(t))return t.escapedText;if(El(t)||na(t))return ja(t.text)}}function L2(e){if(e.expression.kind===110)return 4;if(v1(e))return 2;if(m_(e.expression,!0)){if(ub(e.expression))return 3;let t=e;for(;!Ze(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&h_(t)==="exports")&&x_(e))return 1;if(m_(e,!0)||$a(e)&&$2(e))return 5}return 0}function J2(e){for(;ea(e.right);)e=e.right;return e.right}function j2(e){return Pl(e)&&ea(e.expression)&&yf(e.expression)!==0&&ea(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function R2(e){switch(e.kind){case 243:let t=Bp(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Bp(e){return Qa(e)?Xp(e.declarationList.declarations):void 0}function U2(e){return wi(e)&&e.body&&e.body.kind===267?e.body:void 0}function bf(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function B2(e,t){let a;E2(e)&&h2(e)&&$i(e.initializer)&&(a=Nn(a,Wd(e,e.initializer.jsDoc)));let o=e;for(;o&&o.parent;){if($i(o)&&(a=Nn(a,Wd(e,o.jsDoc))),o.kind===169){a=Nn(a,(t?Mg:Og)(o));break}if(o.kind===168){a=Nn(a,(t?Jg:Lg)(o));break}o=F2(o)}return a||bt}function Wd(e,t){let a=Cy(t);return Dm(t,o=>{if(o===a){let m=Xr(o.tags,v=>q2(e,v));return o.tags===m?[o]:m}else return Xr(o.tags,k6)})}function q2(e,t){return!(zf(t)||D6(t))||!t.parent||!uh(t.parent)||!Dl(t.parent.parent)||t.parent.parent===e}function F2(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||U2(t)||bl(e))return t;if(t.parent&&(Bp(t.parent)===e||bl(t)))return t.parent;if(t.parent&&t.parent.parent&&(Bp(t.parent.parent)||R2(t.parent.parent)===e||j2(t.parent.parent)))return t.parent.parent}function vf(e,t){return Vf(e,t?-2147483647:1)}function z2(e){let t=V2(e);if(t&&ta(e)){let a=jg(e);if(a)return a.class}return t}function V2(e){let t=Tf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function W2(e){if(ta(e))return Rg(e).map(t=>t.c
Line truncated
|
||||
`,ee)+1)+4;function ne(Be){H||(H=X),Rn.push(Be),X+=Be.length}for(Fe();zi(5););zi(4)&&(O=0,X=0);e:for(;;){switch(u()){case 60:Na(Rn),pr||(pr=L()),de(q(X)),O=0,H=void 0;break;case 4:Rn.push(t.getTokenText()),O=0,X=0;break;case 42:let Be=t.getTokenText();O===1?(O=2,ne(Be)):(B.assert(O===0),O=1,X+=Be.length);break;case 5:B.assert(O!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();H!==void 0&&X+pt.length>H&&Rn.push(pt.slice(H-X)),X+=pt.length;break;case 1:break e;case 82:O=2,ne(t.getTokenValue());break;case 19:O=2;let yn=t.getTokenFullStart(),on=t.getTokenEnd()-1,tn=s(on);if(tn){Zt||fr(Rn),Gr.push(P(h.createJSDocText(Rn.join("")),Zt??ee,yn)),Gr.push(tn),Rn=[],Zt=t.getTokenEnd();break}default:O=2,ne(t.getTokenText());break}O===2?sn(!1):Fe()}let re=Rn.join("").trimEnd();Gr.length&&re.length&&Gr.push(P(h.createJSDocText(re),Zt??ee,pr)),Gr.length&&Ae&&B.assertIsDefined(pr,"having parsed tags implies that the end of the comment span should be set");let Ne=Ae&&Ct(Ae,Yt,hn);return P(h.createJSDocComment(Gr.length?Ct(Gr,ee,pr):re.length?re:void 0,Ne),ee,Re)}function fr(O){for(;O.length&&(O[0]===`
|
||||
`||O[0]==="\r");)O.shift()}function Na(O){for(;O.length;){let H=O[O.length-1].trimEnd();if(H==="")O.pop();else if(H.length<O[O.length-1].length){O[O.length-1]=H;break}else break}}function Zc(){for(;;){if(Fe(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function Ot(){if(!((u()===5||u()===4)&&Y(Zc)))for(;u()===5||u()===4;)Fe()}function kr(){if((u()===5||u()===4)&&Y(Zc))return"";let O=t.hasPrecedingLineBreak(),H=!1,X="";for(;O&&u()===42||u()===5||u()===4;)X+=t.getTokenText(),u()===4?(O=!0,H=!0,X=""):u()===42&&(O=!1),Fe();return H?X:""}function q(O){B.assert(u()===60);let H=t.getTokenStart();Fe();let X=pi(void 0),ne=kr(),re;switch(X.escapedText){case"author":re=Q0(H,X,O,ne);break;case"implements":re=Z0(H,X,O,ne);break;case"augments":case"extends":re=ey(H,X,O,ne);break;case"class":case"constructor":re=Fi(H,h.createJSDocClassTag,X,O,ne);break;case"public":re=Fi(H,h.createJSDocPublicTag,X,O,ne);break;case"private":re=Fi(H,h.createJSDocPrivateTag,X,O,ne);break;case"protected":re=Fi(H,h.createJSDocProtectedTag,X,O,ne);break;case"readonly":re=Fi(H,h.createJSDocReadonlyTag,X,O,ne);break;case"override":re=Fi(H,h.createJSDocOverrideTag,X,O,ne);break;case"deprecated":Gn=!0,re=Fi(H,h.createJSDocDeprecatedTag,X,O,ne);break;case"this":re=bd(H,X,O,ne);break;case"enum":re=iy(H,X,O,ne);break;case"arg":case"argument":case"param":return Kn(H,X,2,O);case"return":case"returns":re=H0(H,X,O,ne);break;case"template":re=Td(H,X,O,ne);break;case"type":re=yd(H,X,O,ne);break;case"typedef":re=ay(H,X,O,ne);break;case"callback":re=_y(H,X,O,ne);break;case"overload":re=oy(H,X,O,ne);break;case"satisfies":re=ty(H,X,O,ne);break;case"see":re=X0(H,X,O,ne);break;case"exception":case"throws":re=$0(H,X,O,ne);break;case"import":re=ny(H,X,O,ne);break;default:re=z(H,X,O,ne);break}return re}function n(O,H,X,ne){return ne||(X+=H-O),i(X,ne.slice(X))}function i(O,H){let X=L(),ne=[],re=[],Ne,Be=0,pt;function yn(Zn){pt||(pt=O),ne.push(Zn),O+=Zn.length}H!==void 0&&(H!==""&&yn(H),Be=1);let on=u();e:for(;;){switch(on){case 4:Be=0,ne.push(t.getTokenText()),O=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:B.assert(Be!==2&&Be!==3,"whitespace shouldn't come from the scanner while saving comment text");let Zn=t.getTokenText();pt!==void 0&&O+Zn.length>pt&&(ne.push(Zn.slice(pt-O)),Be=2),O+=Zn.length;break;case 19:Be=2;let el=t.getTokenFullStart(),Oa=t.getTokenEnd()-1,tl=s(Oa);tl?(re.push(P(h.createJSDocText(ne.join("")),Ne??X,el)),re.push(tl),ne=[],Ne=t.getTokenEnd()):yn(t.getTokenText());break;case 62:Be===3?Be=2:Be=3,yn(t.getTokenText());break;case 82:Be!==3&&(Be=2),yn(t.getTokenValue());break;case 42:if(Be===0){Be=1,O+=1;break}default:Be!==3&&(Be=2),yn(t.getTokenText());break}Be===2||Be===3?on=sn(Be===3):on=Fe()}fr(ne);let tn=ne.join("").trimEnd();if(re.length)return tn.length&&re.push(P(h.createJSDocText(tn),Ne??X)),Ct(re,X,t.getTokenEnd());if(tn.length)return tn}function s(O){let H=pe(f);if(!H)return;Fe(),Ot();let X=l(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),Fe();let re=H==="link"?h.createJSDocLink:H==="linkcode"?h.createJSDocLinkCode:h.createJSDocLinkPlain;return P(re(X,ne.join("")),O,t.getTokenEnd())}function l(){if(wt(u())){let O=L(),H=Rt();for(;Le(25);)H=P(h.createQualifiedName(H,u()===81?Gt(80,!1):Rt()),O);for(;u()===81;)It(),Fe(),H=P(h.createJSDocMemberName(H,St()),O);return H}}function f(){if(kr(),u()===19&&Fe()===60&&wt(Fe())){let O=t.getTokenValue();if(S(O))return O}}function S(O){return O==="link"||O==="linkcode"||O==="linkplain"}function z(O,H,X,ne){return P(h.createJSDocUnknownTag(H,n(O,L(),X,ne)),O)}function de(O){O&&(Ae?Ae.push(O):(Ae=[O],Yt=O.pos),hn=O.end)}function Ue(){return kr(),u()===19?d():void 0}function en(){let O=zi(23);O&&Ot();let H=zi(62),X=dy();return H&&Fl(62),O&&(Ot(),ft(64)&&Et(),j(24)),{name:X,isBracketed:O}}function An(O){switch(O.kind){case 151:return!0;case 188:return An(O.elementType);default:return Df(O)&&Ze(O.typeName)&&O.typeName.escapedText==="Object"&&!O.typeArguments}}function Kn(O,H,X,ne){let re=Ue(),Ne=!re;kr();let{name:Be,isBracketed:pt}=en(),yn=kr();Ne&&!Y(f)&&(re=Ue());let on=n(O,L(),ne,yn),tn=Ia(re,Be,X,ne);tn&&(re=tn,Ne=!0);let Zn=X===1?h.createJSDocPropertyTag(H,Be,pt,re,Ne,on):h.createJSDocParameterTag(H,Be,pt,re,Ne,on);return P(Zn,O)}function Ia(O,H,X,ne){if(O&&An(O.type)){let re=L(),Ne,Be;for(;Ne=pe(()=>yp(X,ne,H));)Ne.kind===341||Ne.kind===348?Be=Dn(Be,Ne):Ne.kind===345&&un(Ne.tagName,A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Be){let pt=P(h.createJSDocTypeLiteral(Be,O.type.kind===188),re);return P(h.createJSDocTypeExpression(pt),re)}}}function H0(O,H,X,ne){nn(Ae,A6)&&rt(H.pos,t.getTokenStart(),A._0_tag_already_specified,f_(H.escapedText));let re=Ue();return P(h.createJSDocReturnTag(H,re,n(O,L(),X,ne)),O)}function yd(O,H,X,ne){nn(Ae,zf)&&rt(H.pos,t.getTokenStart(),A._0_tag_already_specified,f_(H.escapedText));let re=d(!0),Ne=X!==void 0&&ne!==void 0?n(O,L(),X,ne):void 0;return P(h.createJSDocTypeTag(H,re,Ne),O)}f
Line truncated
|
||||
`&&m[o-1]==="\r"?o-1:o}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=My();return this.forEachChild(m),e;function t(v){let E=o(v);E&&e.add(E,v)}function a(v){let E=e.get(v);return E||e.set(v,E=[]),E}function o(v){let E=lf(v);return E&&(kf(E)&&dr(E.expression)?E.expression.name.text:u1(E)?getNameFromPropertyName(E):void 0)}function m(v){switch(v.kind){case 262:case 218:case 174:case 173:let E=v,C=o(E);if(C){let h=a(C),y=Fa(h);y&&E.parent===y.parent&&E.symbol===y.symbol?E.body&&!y.body&&(h[h.length-1]=E):h.push(E)}Ht(v,m);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(v),Ht(v,m);break;case 169:if(!S_(v,31))break;case 260:case 208:{let h=v;if(a2(h.name)){Ht(h.name,m);break}h.initializer&&m(h.initializer)}case 306:case 172:case 171:t(v);break;case 278:let c=v;c.exportClause&&(ih(c.exportClause)?qn(c.exportClause.elements,m):m(c.exportClause.name));break;case 272:let W=v.importClause;W&&(W.name&&t(W.name),W.namedBindings&&(W.namedBindings.kind===274?t(W.namedBindings):qn(W.namedBindings.elements,m)));break;case 226:yf(v)!==0&&t(v);default:Ht(v,m)}}}},dv=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(o=>o)}getLineAndCharacterOfPosition(e){return Hm(this,e)}};function mv(){return{getNodeConstructor:()=>Gf,getTokenConstructor:()=>xh,getIdentifierConstructor:()=>Sh,getPrivateIdentifierConstructor:()=>wh,getSourceFileConstructor:()=>fv,getSymbolConstructor:()=>lv,getTypeConstructor:()=>uv,getSignatureConstructor:()=>pv,getSourceMapSourceConstructor:()=>dv}}var hv=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],R3=[...hv,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];Tb(mv());var Ml=new Proxy({},{get:()=>!0});var Ch=Ml["4.8"];function nr(e,t=!1){var a;if(e!=null){if(Ch){if(t||Ol(e)){let o=i1(e);return o?[...o]:void 0}return}return(a=e.modifiers)==null?void 0:a.filter(o=>!Cl(o))}}function ra(e,t=!1){var a;if(e!=null){if(Ch){if(t||Wf(e)){let o=uf(e);return o?[...o]:void 0}return}return(a=e.decorators)==null?void 0:a.filter(Cl)}}var Ph={};var Ll=new Proxy({},{get:(e,t)=>t});var Nh=Ll,Ih=Ll;var D=Nh,Dt=Ih;var Oh=Ml["5.0"],le=Ie,bv=new Set([le.AmpersandAmpersandToken,le.BarBarToken,le.QuestionQuestionToken]),vv=new Set([Ie.AmpersandAmpersandEqualsToken,Ie.AmpersandEqualsToken,Ie.AsteriskAsteriskEqualsToken,Ie.AsteriskEqualsToken,Ie.BarBarEqualsToken,Ie.BarEqualsToken,Ie.CaretEqualsToken,Ie.EqualsToken,Ie.GreaterThanGreaterThanEqualsToken,Ie.GreaterThanGreaterThanGreaterThanEqualsToken,Ie.LessThanLessThanEqualsToken,Ie.MinusEqualsToken,Ie.PercentEqualsToken,Ie.PlusEqualsToken,Ie.QuestionQuestionEqualsToken,Ie.SlashEqualsToken]),Tv=new Set([le.AmpersandAmpersandToken,le.AmpersandToken,le.AsteriskAsteriskToken,le.AsteriskToken,le.BarBarToken,le.BarToken,le.CaretToken,le.EqualsEqualsEqualsToken,le.EqualsEqualsToken,le.ExclamationEqualsEqualsToken,le.ExclamationEqualsToken,le.GreaterThanEqualsToken,le.GreaterThanGreaterThanGreaterThanToken,le.GreaterThanGreaterThanToken,le.GreaterThanToken,le.InKeyword,le.InstanceOfKeyword,le.LessThanEqualsToken,le.LessThanLessThanToken,le.LessThanToken,le.MinusToken,le.PercentToken,le.PlusToken,le.SlashToken]);function xv(e){return vv.has(e.kind)}function Sv(e){return bv.has(e.kind)}function wv(e){return Tv.has(e.kind)}function Zr(e){return it(e)}function Mh(e){return e.kind!==le.SemicolonClassElement}function He(e,t){let a=nr(t);return(a==null?void 0:a.some(o=>o.kind===e))===!0}function Lh(e){let t=nr(e);return t==null?null:t[t.length-1]??null}function Jh(e){return e.kind===le.CommaToken}function kv(e){return e.kind===le.SingleLineCommentTrivia||e.kind===le.MultiLineCommentTrivia}function Ev(e){return e.kind===le.JSDocComment}function jh(e){if(xv(e))return{type:D.AssignmentExpression,operator:Zr(e.kind)};if(Sv(e))return{type:D.LogicalExpression,operator:Zr(e.kind)};if(wv(e))return{type:D.BinaryExpression,operator:Zr(e.kind)};throw new Error(`Unexpected binary operator ${it(e.kind)}`)}function k_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,l
Line truncated
|
||||
`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var ld=new WeakMap;function M4(e){return ld.has(e)||ld.set(e,O4(e)),ld.get(e)}var ud=M4;function L4(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let o=e[a];if(t&&Xt(o)===cn(t)&&ud(o)&&ud(t)&&(e.splice(a+1,1),o.value+="*//*"+t.value,o.range=[cn(o),Xt(t)]),!od(o)&&!sa(o))throw new TypeError(`Unknown comment type: "${o.type}".`);t=o}}var S0=L4;var A_=null;function C_(e){if(A_!==null&&typeof A_.property){let t=A_;return A_=C_.prototype=null,t}return A_=C_.prototype=e??Object.create(null),new C_}var J4=10;for(let e=0;e<=J4;e++)C_();function pd(e){return C_(e)}function j4(e,t="type"){pd(e);function a(o){let m=o[t],v=e[m];if(!Array.isArray(v))throw Object.assign(new Error(`Missing visitor keys for '${m}'.`),{node:o});return v}return a}var w0=j4;var k0={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["i
Line truncated
|
||||
`;e=Er(!1,e.replace(q4,"").replace(B4,""),W4,"$1");let a="";for(;a!==e;)a=e,e=Er(!1,e,V4,`${t}$1 $2${t}`);e=e.replace(N0,"").trimEnd();let o=Object.create(null),m=Er(!1,e,I0,"").replace(N0,"").trimEnd(),v;for(;v=I0.exec(e);){let E=Er(!1,v[2],z4,"");if(typeof o[v[1]]=="string"||Array.isArray(o[v[1]])){let C=o[v[1]];o[v[1]]=[...G4,...Array.isArray(C)?C:[C],E]}else o[v[1]]=E}return{comments:m,pragmas:o}}var L0=["noformat","noprettier"],J0=["format","prettier"];function Y4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var j0=Y4;function R0(e){let t=j0(e);t&&(e=e.slice(t.length+1));let a=O0(e),{pragmas:o,comments:m}=M0(a);return{shebang:t,text:e,pragmas:o,comments:m}}function U0(e){let{pragmas:t}=R0(e);return J0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function B0(e){let{pragmas:t}=R0(e);return L0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function H4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:U0,hasIgnorePragma:B0,locStart:cn,locEnd:Xt,...e}}var q0=H4;var F0=/^[^"'`]*<\/|^[^/]{2}.*\/>/mu;function X4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var z0=X4;var V0="module",W0="script",G0=[V0,W0];function Y0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return V0;if(/\.(?:cjs|cts)$/iu.test(e))return W0}}var $4={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function Q4(e){let{message:t,location:a}=e;if(!a)return e;let{start:o,end:m}=a;return y0(t,{loc:{start:{line:o.line,column:o.column+1},end:{line:m.line,column:m.column+1}},cause:e})}var K4=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function Z4(e,t){let a=[{...$4,filePath:t}],o=Y0(t);if(o?a=a.map(v=>({...v,sourceType:o})):a=G0.flatMap(v=>a.map(E=>({...E,sourceType:v}))),K4(t))return a;let m=F0.test(e);return[m,!m].flatMap(v=>a.map(E=>({...E,jsx:v})))}function e3(e,t){let a=t==null?void 0:t.filepath;typeof a!="string"&&(a=void 0);let o=z0(e),m=Z4(e,a),v;try{v=g0(m.map(E=>()=>h0(o,E)))}catch({errors:[E]}){throw Q4(E)}return P0(v,{parser:"typescript",text:e})}var t3=q0(e3);var r9=hd;export{r9 as default,md as parsers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
yaml: Parser;
|
||||
};
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Di=Object.create;var Xe=Object.defineProperty;var Yi=Object.getOwnPropertyDescriptor;var $i=Object.getOwnPropertyNames;var Bi=Object.getPrototypeOf,Fi=Object.prototype.hasOwnProperty;var mr=t=>{throw TypeError(t)};var qi=(t,e,n)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hr=(t,e)=>{for(var n in e)Xe(t,n,{get:e[n],enumerable:!0})},gr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $i(e))!Fi.call(t,s)&&s!==n&&Xe(t,s,{get:()=>e[s],enumerable:!(r=Yi(e,s))||r.enumerable});return t};var dr=(t,e,n)=>(n=t!=null?Di(Bi(t)):{},gr(e||!t||!t.__esModule?Xe(n,"default",{value:t,enumerable:!0}):n,t)),Ui=t=>gr(Xe({},"__esModule",{value:!0}),t);var cn=(t,e,n)=>qi(t,typeof e!="symbol"?e+"":e,n),ln=(t,e,n)=>e.has(t)||mr("Cannot "+n);var Te=(t,e,n)=>(ln(t,e,"read from private field"),n?n.call(t):e.get(t)),Ot=(t,e,n)=>e.has(t)?mr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),fn=(t,e,n,r)=>(ln(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ze=(t,e,n)=>(ln(t,e,"access private method"),n);var oe=te($=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},mt={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},wo="tag:yaml.org,2002:",bo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function zr(t){let e=[0],n=t.indexOf(`
|
||||
`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(`
|
||||
`,n);return e}function Zr(t){let e,n;return typeof t=="string"?(e=zr(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=zr(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Tn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Zr(e);if(!n||!r||t>r.length)return null;for(let i=0;i<n.length;++i){let o=n[i];if(t<o)return{line:i,col:t-n[i-1]+1};if(t===o)return{line:i+1,col:1}}let s=n.length;return{line:s,col:t-n[s-1]+1}}function No(t,e){let{lineStarts:n,src:r}=Zr(e);if(!n||!(t>=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===`
|
||||
`;)--i;return r.slice(s,i)}function Oo({start:t,end:e},n,r=80){let s=No(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s}
|
||||
${c}${l}${a}`}var Be=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;i<e.length&&!(e[i]>r);)++i;this.origStart=r+i;let o=i;for(;i<e.length&&!(e[i]>=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===`
|
||||
`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===`
|
||||
`?r+`
|
||||
`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==`
|
||||
`)return!1;if(r){if(s!==r)return!1}else if(s!==re.DIRECTIVES_END&&s!==re.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===`
|
||||
`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[`
|
||||
`," "," ",">"]:[`
|
||||
`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==`
|
||||
`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===`
|
||||
`)return n;for(;r&&r!==`
|
||||
`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===`
|
||||
`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===`
|
||||
`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==`
|
||||
`&&e[n-1]===`
|
||||
`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===`
|
||||
`;){switch(a){case`
|
||||
`:s=0,n+=1,o+=`
|
||||
`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,re.ANCHOR,!0);if(n!=null)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,re.COMMENT,!0);r!=null&&e.push(r)}return e.length>0?e.join(`
|
||||
`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]===re.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]!==re.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[mt.FLOW_MAP,mt.FLOW_SEQ,mt.QUOTE_DOUBLE,mt.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=Tn(this.range.start,this.context.root);if(!e)return;let n=Tn(this.range.end,this.context.root);return{start:e,end:n}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange;return this.context.src.slice(e,n)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,re.TAG,!1);if(n!=null){if(n[1]==="<")return{verbatim:n.slice(2,-1)};{let[r,s,i]=n.match(/^(.*!)([^!]*)$/);return{handle:s,suffix:i}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:n}=this.valueRange,{src:r}=this.context;for(let s=e;s<n;++s)if(r[s]===`
|
||||
`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===re.COMMENT){let r=t.endOfLine(n,e+1),s=new Be(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ye=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Be(this.offset,this.offset+1);let n=e&&Tn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Oo(this.linePos,e);s&&(this.message+=`:
|
||||
|
||||
${s}
|
||||
`)}delete this.source}},Mn=class extends ye{constructor(e,n){super("YAMLReferenceError",e,n)}},ht=class extends ye{constructor(e,n){super("YAMLSemanticError",e,n)}},Cn=class extends ye{constructor(e,n){super("YAMLSyntaxError",e,n)}},kn=class extends ye{constructor(e,n){super("YAMLWarning",e,n)}};function Ao(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==`
|
||||
`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===`
|
||||
`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;e<n&&(s===`
|
||||
`||s===" "||s===" ");)s=r[--n-1];let i="";for(let a=e;a<n;++a){let c=r[a];if(c===`
|
||||
`){let{fold:l,offset:f}=se.foldNewline(r,a,-1);i+=l,a=f}else if(c===" "||c===" "){let l=a,f=r[a+1];for(;a<n&&(f===" "||f===" ");)a+=1,f=r[a+1];f!==`
|
||||
`&&(i+=a>l?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new ht(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new ht(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===`
|
||||
`&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===`
|
||||
`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==`
|
||||
`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Be(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};$.Char=re;$.Node=se;$.PlainValue=Pn;$.Range=Be;$.Type=mt;$.YAMLError=ye;$.YAMLReferenceError=Mn;$.YAMLSemanticError=ht;$.YAMLSyntaxError=Cn;$.YAMLWarning=kn;$._defineProperty=Ao;$.defaultTagPrefix=wo;$.defaultTags=bo});var ts=te(es=>{"use strict";var u=oe(),Se=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},gt=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===`
|
||||
`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===`
|
||||
`&&m.length===0&&(d=new Se,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},Ee=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function In(t){let e=t;for(;e instanceof gt;)e=e.node;if(!(e instanceof xt))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var xt=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==`
|
||||
`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start<e.context.lineStart){this.props=e.props.slice(0,r+1),e.props=e.props.slice(r+1);let s=e.props[0]||e.valueRange;e.range.start=s.start;break}this.items=[e];let n=In(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===`
|
||||
`||l==="#";){if(f&&l===`
|
||||
`&&!m){let h=new Se;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c<i+a&&!t.nextContentHasIndent(s,c,a))return c;let h=new Ee;if(c=h.parse({indent:a,lineStart:i,src:s},c),this.items.push(h),this.valueRange.end=c,c>=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===`
|
||||
`||g==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(c<i+a){i>n&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===`
|
||||
`||h===" "||h===" "){let g="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,g)}}let d=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!d)return c;if(this.items.push(d),this.valueRange.end=d.valueRange.end,c=u.Node.normalizeOffset(s,d.range.end),l=s[c],f=!1,m=d.includesTrailingLines,l){let h=c-1,g=s[h];for(;g===" "||g===" ";)g=s[--h];g===`
|
||||
`&&(i=h+1,f=!0)}let y=In(d);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o<n.length;++o){let a=n[o],{atLineStart:c,indent:l}=a.context;if(c)for(let f=0;f<l;++f)i+=" ";i+=String(a)}return u.Node.addStringTerminator(e,r.end,i)}},vn=class extends u.Node{constructor(){super(u.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!==" "&&s!==" ";)s=n[r+=1];return this.name=n.slice(e,r),r}parseParameters(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!=="#";)s=n[r+=1];return this.valueRange=new u.Range(e,r),r}parse(e,n){this.context=e;let r=this.parseName(n+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new u.Range(n,r),r}},_n=class t extends u.Node{static startCommentOrEndBlankLine(e,n){let r=u.Node.endOfWhiteSpace(e,n),s=e[r];return s==="#"||s===`
|
||||
`?r:n}constructor(){super(u.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){let{src:n}=this.context;this.directives=[];let r=!0,s=!1,i=e;for(;!u.Node.atDocumentBoundary(n,i,u.Char.DIRECTIVES_END);)switch(i=t.startCommentOrEndBlankLine(n,i),n[i]){case`
|
||||
`:if(r){let o=new Se;i=o.parse({src:n},i),i<n.length&&this.directives.push(o)}else i+=1,r=!0;break;case"#":{let o=new Ee;i=o.parse({src:n},i),this.directives.push(o),r=!1}break;case"%":{let o=new vn;i=o.parse({parent:this,src:n},i),this.directives.push(o),s=!0,r=!1}break;default:return s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case`
|
||||
`:if(o){let a=new Se;i=a.parse({src:r},i),i<r.length&&this.contents.push(a)}else i+=1,o=!0;s=i;break;case"#":{let a=new Ee;i=a.parse({src:r},i),this.contents.push(a),o=!1}break;default:{let a=u.Node.endOfIndent(r,i),l=n({atLineStart:o,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},a);if(!l)return this.valueRange.end=a;this.contents.push(l),i=l.range.end,o=!1;let f=In(l);f&&Array.prototype.push.apply(this.contents,f)}}i=t.startCommentOrEndBlankLine(r,i)}if(this.valueRange.end=i,r[i]&&(this.documentEndMarker=new u.Range(i,i+3),i+=3,r[i])){if(i=u.Node.endOfWhiteSpace(r,i),r[i]==="#"){let a=new Ee;i=a.parse({src:r},i),this.contents.push(a)}switch(r[i]){case`
|
||||
`:i+=1;break;case void 0:break;default:this.error=new u.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return i}parse(e,n){e.root=this,this.context=e;let{src:r}=e,s=r.charCodeAt(n)===65279?n+1:n;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.directives.forEach(r=>{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`---
|
||||
`),s+=e.join("")),s[s.length-1]!==`
|
||||
`&&(s+=`
|
||||
`),s}},Rn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},ae={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},xn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=ae.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===ae.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===`
|
||||
`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===ae.KEEP)break;return""}o===`
|
||||
`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===ae.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",d="",y=!1;for(let h=e;h<n;++h){for(let w=0;w<c&&s[h]===" ";++w)h+=1;let g=s[h];if(g===`
|
||||
`)d===`
|
||||
`?m+=`
|
||||
`:d=`
|
||||
`;else{let w=u.Node.endOfLine(s,h),M=s.slice(h,w);h=w,l&&(g===" "||g===" ")&&h<a?(d===" "?d=`
|
||||
`:!y&&!f&&d===`
|
||||
`&&(d=`
|
||||
|
||||
`),m+=d+M,d=w<n&&s[w]||"",y=!0):(m+=d+M,d=l&&h<a?" ":`
|
||||
`,y=!1),f&&M!==""&&(f=!1)}}return this.chomping===ae.STRIP?m:m+`
|
||||
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,s="";for(;;){let i=n[r];switch(i){case"-":this.chomping=ae.STRIP;break;case"+":this.chomping=ae.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new u.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,s=!!this.blockIndent,i=e,o=e,a=1;for(let c=r[i];c===`
|
||||
`&&(i+=1,!u.Node.atDocumentBoundary(r,i));c=r[i]){let l=u.Node.endOfBlockIndent(r,n,i);if(l===null)break;let f=r[l],m=l-(i+n);if(this.blockIndent){if(f&&f!==`
|
||||
`&&m<this.blockIndent){if(r[l]==="#")break;if(!this.error){let y=`Block scalars must not be less indented than their ${s?"explicit indentation indicator":"first line"}`;this.error=new u.YAMLSemanticError(this,y)}}}else if(r[l]!==`
|
||||
`){if(m<a){let d="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new u.YAMLSemanticError(this,d)}this.blockIndent=m}else m>a&&(a=m);r[l]===`
|
||||
`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==ae.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},Dn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case`
|
||||
`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===`
|
||||
`){let f=new Se;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c<o+i||a!=="]"&&a!=="}")){let f="Insufficient indentation in flow collection";this.error=new u.YAMLSemanticError(this,f)}}break;case",":this.items.push({char:a,offset:c}),c+=1;break;case"#":{let l=new Ee;c=l.parse({src:s},c),this.items.push(l)}break;case"?":case":":{let l=s[c+1];if(l===`
|
||||
`||l===" "||l===" "||l===","||a===":"&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:c}),c+=1;break}}default:{let l=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},c);if(!l)return this.valueRange=new u.Range(n,c),c;this.items.push(l),c=u.Node.normalizeOffset(s,l.range.end)}}c=u.Node.endOfWhiteSpace(s,c),a=s[c]}return this.valueRange=new u.Range(n,c+1),a&&(this.items.push({char:a,offset:c}),c=u.Node.endOfWhiteSpace(s,c+1),c=this.parseComment(c)),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;s<e.length&&!(e[s]>r.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===`
|
||||
`&&e[a-1]!==`
|
||||
`&&e[a]===`
|
||||
`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},Yn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(c==="\\")switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="\x07";break;case"b":o+="\b";break;case"e":o+="\x1B";break;case"f":o+="\f";break;case"n":o+=`
|
||||
`;break;case"r":o+="\r";break;case"t":o+=" ";break;case"v":o+="\v";break;case"N":o+="\x85";break;case"_":o+="\xA0";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case" ":o+=" ";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case`
|
||||
`:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},$n=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(c==="'")o+=c,a+=1,i[a]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Lo(t,e){switch(t){case u.Type.ALIAS:return new Rn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new xn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Dn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new gt(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Yn(t,e);case u.Type.QUOTE_SINGLE:return new $n(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=Lo(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new xt(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof gt)return!0;let i=e.range.end;return s[i]===`
|
||||
`||s[i-1]===`
|
||||
`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===`
|
||||
`;){if(a===`
|
||||
`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===`
|
||||
`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function To(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),`
|
||||
`)));let n=[],r=0;do{let s=new _n,i=new Bn({src:t});r=s.parse(i,r),n.push(s)}while(r<t.length);return n.setOrigRanges=()=>{if(e.length===0)return!1;for(let i=1;i<e.length;++i)e[i]-=i;let s=0;for(let i=0;i<n.length;++i)s=n[i].setOrigRanges(e,s);return e.splice(0,e.length),!0},n.toString=()=>n.join(`...
|
||||
`),n}es.parse=To});var qe=te(k=>{"use strict";var p=oe();function Mo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)}
|
||||
${e}${t}`:t}function Fe(t,e,n){return n?n.indexOf(`
|
||||
`)===-1?`${t} #${n}`:`${t}
|
||||
`+n.replace(/^/gm,`${e||""}#`):t}var j=class{};function ce(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ce(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var _=class extends j{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ce(this.value,e,n)}toString(){return String(this.value)}};function ns(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var is=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends j{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(is(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,ns(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof _?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof _&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,ns(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((M,A,C)=>{let L;A&&(!y&&A.spaceBefore&&M.push({type:"comment",str:""}),A.commentBefore&&A.commentBefore.match(/^.*$/gm).forEach(xi=>{M.push({type:"comment",str:`#${xi}`})}),A.comment&&(L=A.comment),m&&(!y&&A.spaceBefore||A.commentBefore||A.comment||A.key&&(A.key.commentBefore||A.key.comment)||A.value&&(A.value.commentBefore||A.value.comment))&&(h=!0)),y=!1;let R=f(A,e,()=>L=null,()=>y=!0);return m&&!h&&R.includes(`
|
||||
`)&&(h=!0),m&&C<this.items.length-1&&(R+=","),R=Fe(R,i,L),y&&(L||m)&&(y=!1),M.push({type:"item",str:R}),M},[]),w;if(g.length===0)w=r.start+r.end;else if(m){let{start:M,end:A}=r,C=g.map(L=>L.str);if(h||C.reduce((L,R)=>L+R.length+2,2)>t.maxFlowStringSingleLineLength){w=M;for(let L of C)w+=L?`
|
||||
${l}${c}${L}`:`
|
||||
`;w+=`
|
||||
${c}${A}`}else w=`${M} ${C.join(" ")} ${A}`}else{let M=g.map(n);w=M.shift();for(let A of M)w+=A?`
|
||||
${c}${A}`:`
|
||||
`}return this.comment?(w+=`
|
||||
`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function Dt(t){let e=t instanceof _?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var le=class extends W{add(e){this.items.push(e)}delete(e){let n=Dt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Dt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof _?s.value:s}has(e){let n=Dt(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Dt(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);this.items[r]=n}toJSON(e,n){let r=[];n&&n.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(ce(i,String(s++),n));return r}toString(e,n,r){return e?super.toString(e,{blockItem:s=>s.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},Co=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof j&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends j{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof j?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new _(null)),this.key instanceof j)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ce(this.key,"",e);if(n instanceof Map){let s=ce(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=Co(this.key,r,e),i=ce(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof j&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let f=!o&&(!a||l||(a instanceof j?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Fe(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Fe(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w}
|
||||
${d}:`:`${w}:`,this.comment&&(w=Fe(w,e.indent,this.comment),n&&n());let M="",A=null;if(c instanceof j){if(c.spaceBefore&&(M=`
|
||||
`),c.commentBefore){let R=c.commentBefore.replace(/^/gm,`${e.indent}#`);M+=`
|
||||
${R}`}A=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof _&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof le&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let C=h(c,e,()=>A=null,()=>g=!0),L=" ";return M||this.comment?L=`${M}
|
||||
${e.indent}`:!f&&c instanceof W?(!(C[0]==="["||C[0]==="{")||C.includes(`
|
||||
`))&&(L=`
|
||||
${e.indent}`):C[0]===`
|
||||
`&&(L=""),g&&!A&&r&&r(),Fe(w+L+C,e.indent,A)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Yt=(t,e)=>{if(t instanceof be){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=Yt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Yt(t.key,e),r=Yt(t.value,e);return Math.max(n,r)}return 1},be=class t extends j{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ce(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Yt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(be,"default",!0);function dt(t,e){let n=e instanceof _?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var yt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=dt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=dt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=dt(this.items,e),s=r&&r.value;return!n&&s instanceof _?s.value:s}has(e){return!!dt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},os="<<",Ft=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof le||(n=new le,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new _(os),new le);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof yt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},ko={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Po={trueStr:"true",falseStr:"false"},Io={asBigInt:!1},vo={nullStr:"null"},Ne={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function qn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof _||(a=new _(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new _(t)}var as="flow",Fn="block",$t="quoted",rs=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==`
|
||||
`);n=t[e+1]}return e};function qt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,M=-1;n===Fn&&(g=rs(t,g),g!==-1&&(m=g+c));for(let C;C=t[g+=1];){if(n===$t&&C==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}M=g}if(C===`
|
||||
`)n===Fn&&(g=rs(t,g)),m=g+c,d=void 0;else{if(C===" "&&y&&y!==" "&&y!==`
|
||||
`&&y!==" "){let L=t[g+1];L&&L!==" "&&L!==`
|
||||
`&&L!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===$t){for(;y===" "||y===" ";)y=C,C=t[g+=1],h=!0;let L=g>M+1?g-2:w-1;if(f[L])return t;l.push(L),f[L]=!0,m=L+c,d=void 0}else h=!0}y=C}if(h&&a&&a(),l.length===0)return t;o&&o();let A=t.slice(0,l[0]);for(let C=0;C<l.length;++C){let L=l[C],R=l[C+1]||t.length;L===0?A=`
|
||||
${e}${t.slice(0,R)}`:(n===$t&&f[L]&&(A+=`${t[L]}\\`),A+=`
|
||||
${e}${t.slice(L+1,R)}`)}return A}var Un=({indentAtStart:t})=>t?Object.assign({indentAtStart:t},Ne.fold):Ne.fold,Ut=t=>/^(%|---|\.\.\.)/m.test(t);function _o(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
||||
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function we(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=Ne.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Ut(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<s)l+=1;else{for(a+=i.slice(c,l)+`
|
||||
|
||||
`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
|
||||
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:qt(a,o,$t,Un(e))}function cs(t,e){if(e.implicitKey){if(/\n/.test(t))return we(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return we(t,e);let n=e.indent||(Ut(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:qt(r,n,as,Un(e))}function Bt({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return we(n,r);let o=r.indent||(r.forceBlockIndent||Ut(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!_o(n,Ne.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+`
|
||||
`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(`
|
||||
`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a}
|
||||
${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l}
|
||||
${o}${f}${n}${m}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=qt(`${f}${n}${m}`,o,Fn,Ne.fold);return`${l}
|
||||
${o}${d}`}function Ro(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return we(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(`
|
||||
`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?cs(o,e):we(o,e):Bt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(`
|
||||
`)!==-1)return Bt(t,e,n,r);if(l===""&&Ut(o))return e.forceBlockIndent=!0,Bt(t,e,n,r);let m=o.replace(/\n+/g,`$&
|
||||
${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof qn(m,y,y.scalarFallback).value!="string")return we(o,e)}let d=c?m:qt(m,l,as,Un(e));return s&&!f&&(d.indexOf(`
|
||||
`)!==-1||s.indexOf(`
|
||||
`)!==-1)?(n&&n(),Mo(d,l,s)):d}function xo(t,e,n,r){let{defaultType:s}=Ne,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Bt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return we(c,e);case p.Type.QUOTE_SINGLE:return cs(c,e);case p.Type.PLAIN:return Ro(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function Do({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function ls(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function fs(t,e){let n=e.context.src[e.range.start-1];if(n!==`
|
||||
`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function us(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function ps(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=`
|
||||
`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=`
|
||||
`+s:t.comment=s)}}function Kn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Yo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function $o(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Yo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function ss(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new _(a)}let i=Kn(t,e);return typeof i=="string"&&s.length>0?qn(i,s,r.scalarFallback):null}function Bo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Fo(t,e,n){try{let r=ss(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Bo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=ss(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var qo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Uo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=qo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Ko(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new be(a);return n._cstAliases.push(c),c}let i=$o(t,e);if(i)return Fo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Kn(t,e);return qn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function fe(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Uo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Ko(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(`
|
||||
`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore}
|
||||
${o}`:o);let a=n.after.join(`
|
||||
`);a&&(i.comment=i.comment?`${i.comment}
|
||||
${a}`:a)}return e.resolved=i}function Vo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Go(t,e):Qo(t,e),s=new yt;s.items=r,ps(s,n);let i=!1;for(let o=0;o<r.length;++o){let{key:a}=r[o];if(a instanceof W&&(i=!0),t.schema.merge&&a&&a.value===os){r[o]=new Ft(r[o]);let c=r[o].value.items,l=null;c.some(f=>{if(f instanceof be){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c<r.length;++c){let{key:l}=r[c];if(a===l||a&&l&&Object.prototype.hasOwnProperty.call(a,"value")&&a.value===l.value){let f=`Map keys must be unique; "${a}" is repeated`;t.errors.push(new p.YAMLSemanticError(e,f));break}}}if(i&&!t.options.mapAsMap){let o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,o))}return e.resolved=s,s}var jo=({context:{lineStart:t,node:e,src:n},props:r})=>{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i<s;++i)if(n[i]===`
|
||||
`)return!1;return!0};function Wo(t,e){if(!jo(t))return;let n=t.getPropValue(0,p.Char.COMMENT,!0),r=!1,s=e.value.commentBefore;if(s&&s.startsWith(n))e.value.commentBefore=s.substr(n.length+1),r=!0;else{let i=e.value.comment;!t.node&&i&&i.startsWith(n)&&(e.value.comment=i.substr(n.length+1),r=!0)}r&&(e.comment=n)}function Qo(t,e){let n=[],r=[],s,i=null;for(let o=0;o<e.items.length;++o){let a=e.items[o];switch(a.type){case p.Type.BLANK_LINE:n.push({afterKey:!!s,before:r.length});break;case p.Type.COMMENT:n.push({afterKey:!!s,before:r.length,comment:a.comment});break;case p.Type.MAP_KEY:s!==void 0&&r.push(new T(s)),a.error&&t.errors.push(a.error),s=fe(t,a.node),i=null;break;case p.Type.MAP_VALUE:{if(s===void 0&&(s=null),a.error&&t.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===p.Type.MAP&&!a.node.context.atLineStart){let f="Nested mappings are not allowed in compact mappings";t.errors.push(new p.YAMLSemanticError(a.node,f))}let c=a.node;if(!c&&a.props.length>0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,fe(t,c));Wo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(us(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=fe(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Go(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;a<e.items.length;++a){let c=e.items[a];if(typeof c.char=="string"){let{char:l,offset:f}=c;if(l==="?"&&s===void 0&&!i){i=!0,o=":";continue}if(l===":"){if(s===void 0&&(s=null),o===":"){o=",";continue}}else if(i&&(s===void 0&&l!==","&&(s=null),i=!1),s!==void 0&&(r.push(new T(s)),s=void 0,l===",")){o=":";continue}if(l==="}"){if(a===e.items.length-1)continue}else if(l===o){o=":";continue}let m=`Flow map contains an unexpected ${l}`,d=new p.YAMLSyntaxError(e,m);d.offset=f,t.errors.push(d)}else c.type===p.Type.BLANK_LINE?n.push({afterKey:!!s,before:r.length}):c.type===p.Type.COMMENT?(fs(t.errors,c),n.push({afterKey:!!s,before:r.length,comment:c.comment})):s===void 0?(o===","&&t.errors.push(new p.YAMLSemanticError(c,"Separator , missing in flow map")),s=fe(t,c)):(o!==","&&t.errors.push(new p.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new T(s,fe(t,c))),s=void 0,i=!1)}return ls(t.errors,e),s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Ho(t,e){if(e.type!==p.Type.SEQ&&e.type!==p.Type.FLOW_SEQ){let i=`A ${e.type} node cannot be resolved as a sequence`;return t.errors.push(new p.YAMLSyntaxError(e,i)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_SEQ?Xo(t,e):Jo(t,e),s=new le;if(s.items=r,ps(s,n),!t.options.mapAsMap&&r.some(i=>i instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Jo(t,e){let n=[],r=[];for(let s=0;s<e.items.length;++s){let i=e.items[s];switch(i.type){case p.Type.BLANK_LINE:n.push({before:r.length});break;case p.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case p.Type.SEQ_ITEM:if(i.error&&t.errors.push(i.error),r.push(fe(t,i.node)),i.hasProps){let o="Sequence items cannot have tags or anchors before the - indicator";t.errors.push(new p.YAMLSemanticError(i,o))}break;default:i.error&&t.errors.push(i.error),t.errors.push(new p.YAMLSyntaxError(i,`Unexpected ${i.type} node in sequence`))}}return{comments:n,items:r}}function Xo(t,e){let n=[],r=[],s=!1,i,o=null,a="[",c=null;for(let l=0;l<e.items.length;++l){let f=e.items[l];if(typeof f.char=="string"){let{char:m,offset:d}=f;if(m!==":"&&(s||i!==void 0)&&(s&&i===void 0&&(i=a?r.pop():null),r.push(new T(i)),s=!1,i=void 0,o=null),m===a)a=null;else if(!a&&m==="?")s=!0;else if(a!=="["&&m===":"&&i===void 0){if(a===","){if(i=r.pop(),i instanceof T){let y="Chaining flow sequence pairs is invalid",h=new p.YAMLSemanticError(e,y);h.offset=d,t.errors.push(h)}if(!s&&typeof o=="number"){let y=f.range?f.range.start:f.offset;y>o+1024&&t.errors.push(us(e,i));let{src:h}=c.context;for(let g=o;g<y;++g)if(h[g]===`
|
||||
`){let w="Implicit keys of flow sequence pairs need to be on a single line";t.errors.push(new p.YAMLSemanticError(c,w));break}}}else i=null;o=null,s=!1,a=null}else if(a==="["||m!=="]"||l<e.items.length-1){let y=`Flow sequence contains an unexpected ${m}`,h=new p.YAMLSyntaxError(e,y);h.offset=d,t.errors.push(h)}}else if(f.type===p.Type.BLANK_LINE)n.push({before:r.length});else if(f.type===p.Type.COMMENT)fs(t.errors,f),n.push({comment:f.comment,before:r.length});else{if(a){let d=`Expected a ${a} in flow sequence`;t.errors.push(new p.YAMLSemanticError(f,d))}let m=fe(t,f);i===void 0?(r.push(m),c=f):(r.push(new T(i,m)),i=void 0),o=f.range.start,a=","}}return ls(t.errors,e),i!==void 0&&r.push(new T(i)),{comments:n,items:r}}k.Alias=be;k.Collection=W;k.Merge=Ft;k.Node=j;k.Pair=T;k.Scalar=_;k.YAMLMap=yt;k.YAMLSeq=le;k.addComment=Fe;k.binaryOptions=ko;k.boolOptions=Po;k.findPair=dt;k.intOptions=Io;k.isEmptyPath=is;k.nullOptions=vo;k.resolveMap=Vo;k.resolveNode=fe;k.resolveSeq=Ho;k.resolveString=Kn;k.strOptions=Ne;k.stringifyNumber=Do;k.stringifyString=xo;k.toJSON=ce});var Qn=te(z=>{"use strict";var Q=oe(),O=qe(),zo={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}else{let r="This environment does not support reading binary tags; either Buffer or atob is required";return t.errors.push(new Q.YAMLReferenceError(e,r)),null}},options:O.binaryOptions,stringify:({comment:t,type:e,value:n},r,s,i)=>{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<n.length;++c)a+=String.fromCharCode(n[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.binaryOptions.defaultType),e===Q.Type.QUOTE_DOUBLE)n=o;else{let{lineWidth:a}=O.binaryOptions,c=Math.ceil(o.length/a),l=new Array(c);for(let f=0,m=0;f<c;++f,m+=a)l[f]=o.substr(m,a);n=l.join(e===Q.Type.BLOCK_LITERAL?`
|
||||
`:" ")}return O.stringifyString({comment:t,type:e,value:n},r,s,i)}};function hs(t,e){let n=O.resolveSeq(t,e);for(let r=0;r<n.items.length;++r){let s=n.items[r];if(!(s instanceof O.Pair)){if(s instanceof O.YAMLMap){if(s.items.length>1){let o="Each pair must have its own sequence indicator";throw new Q.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore}
|
||||
${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function gs(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var Zo={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:hs,createNode:gs},Ue=class t extends O.YAMLSeq{constructor(){super(),Q._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),Q._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),Q._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),Q._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),Q._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};Q._defineProperty(Ue,"tag","tag:yaml.org,2002:omap");function ea(t,e){let n=hs(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new Q.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Ue,n)}function ta(t,e,n){let r=gs(t,e,n),s=new Ue;return s.items=r.items,s}var na={identify:t=>t instanceof Map,nodeClass:Ue,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ea,createNode:ta},Ke=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};Q._defineProperty(Ke,"tag","tag:yaml.org,2002:set");function ra(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new Q.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ke,n)}function sa(t,e,n){let r=new Ke;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var ia={identify:t=>t instanceof Set,nodeClass:Ke,default:!1,tag:"tag:yaml.org,2002:set",resolve:ra,createNode:sa},Vn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},ds=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},oa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:ds},aa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Vn(e,n.replace(/_/g,"")),stringify:ds},ca={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Vn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function jn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Wn(t,e){jn(!1)&&console.warn(e?`${e}: ${t}`:t)}function la(t){if(jn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var ms={};function fa(t,e){if(!ms[t]&&jn(!0)){ms[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Wn(n,"DeprecationWarning")}}z.binary=zo;z.floatTime=aa;z.intTime=oa;z.omap=na;z.pairs=Zo;z.set=ia;z.timestamp=ca;z.warn=Wn;z.warnFileDeprecation=la;z.warnOptionDep
Line truncated
|
||||
${e.indent}${c}`:c}var zn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Ht=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Ht(r,e))):t instanceof S.Pair?(Ht(t.key,e),Ht(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ta=t=>Object.keys(Ht(t,{}));function Ma(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(`
|
||||
`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(`
|
||||
`)||null;else{let i=n.before.join(`
|
||||
`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i}
|
||||
${o.commentBefore}`:i}t.comment=n.after.join(`
|
||||
`)||null}}function Ca({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function ka(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!vs[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Pa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(Ca(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=ka(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(`
|
||||
`)||null}function Ve(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Jt=class t{constructor(e){this.anchors=new zn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ve(this.contents),this.contents.add(e)}addIn(e,n){Ve(this.contents),this.contents.addIn(e,n)}delete(e){return Ve(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ve(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ve(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ve(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new Ps.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Pa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],Ma(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ta(this.contents).filter(e=>e.indexOf(Ps.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Gt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Gt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Gt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Gt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(`
|
||||
`)+`
|
||||
`}};Y._defineProperty(Jt,"defaults",vs);Xt.Document=Jt;Xt.defaultOptions=Na;Xt.scalarOptions=Oa});var Ds=te(xs=>{"use strict";var Zn=ts(),Oe=_s(),Ia=Xn(),va=oe(),_a=Qn();qe();function Ra(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Oe.Document.defaults[Oe.defaultOptions.version],Oe.defaultOptions);return new Ia.Schema(r).createNode(t,e,n)}var je=class extends Oe.Document{constructor(e){super(Object.assign({},Oe.defaultOptions,e))}};function xa(t,e){let n=[],r;for(let s of Zn.parse(t)){let i=new je(e);i.parse(s,r),n.push(i),r=i}return n}function Rs(t,e){let n=Zn.parse(t),r=new je(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new va.YAMLSemanticError(n[1],s))}return r}function Da(t,e){let n=Rs(t,e);if(n.warnings.forEach(r=>_a.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Ya(t,e){let n=new je(e);return n.contents=t,String(n)}var $a={createNode:Ra,defaultOptions:Oe.defaultOptions,Document:je,parse:Da,parseAllDocuments:xa,parseCST:Zn.parse,parseDocument:Rs,scalarOptions:Oe.scalarOptions,stringify:Ya};xs.YAML=$a});var $s=te((tf,Ys)=>{Ys.exports=Ds().YAML});var Bs=te(G=>{"use strict";var We=qe(),Qe=oe();G.findPair=We.findPair;G.parseMap=We.resolveMap;G.parseSeq=We.resolveSeq;G.stringifyNumber=We.stringifyNumber;G.stringifyString=We.stringifyString;G.toJSON=We.toJSON;G.Type=Qe.Type;G.YAMLError=Qe.YAMLError;G.YAMLReferenceError=Qe.YAMLReferenceError;G.YAMLSemanticError=Qe.YAMLSemanticError;G.YAMLSyntaxError=Qe.YAMLSyntaxError;G.YAMLWarning=Qe.YAMLWarning});var rc={};hr(rc,{languages:()=>Jr,options:()=>Xr,parsers:()=>pr,printers:()=>nc});var Ki=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},At=Ki;var Me="string",Ze="array",et="cursor",tt="indent",Ce="align",nt="trim",ke="group",Pe="fill",ge="if-break",rt="indent-if-break",Ie="line-suffix",st="line-suffix-boundary",Z="line",it="label",ve="break-parent",Lt=new Set([et,tt,Ce,nt,ke,Pe,ge,rt,Ie,st,Z,it,ve]);var Vi=(t,e,n)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=Vi;function ji(t){if(typeof t=="string")return Me;if(Array.isArray(t))return Ze;if(!t)return;let{type:e}=t;if(Lt.has(e))return e}var _e=ji;var Wi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Qi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(_e(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Wi([...Lt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var un=class extends Error{name="InvalidDocError";constructor(e){super(Qi(e)),this.doc=e}},pn=un;function Hi(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(_e(i)){case Ze:return e(i.map(r));case Pe:return e({...i,parts:i.parts.map(r)});case ge:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ce:case tt:case rt:case it:case Ie:return e({...i,contents:r(i.contents)});case Me:case et:case nt:case st:case Z:case ve:return e(i);default:throw new pn(i)}}}function yr(t,e=ot){return Hi(t,n=>typeof n=="string"?P(e,n.split(`
|
||||
`)):n)}var mn=()=>{},de=mn,hn=mn,Er=mn;function at(t,e){return de(e),{type:Ce,contents:e,n:t}}function Re(t,e={}){return de(t),hn(e.expandedStates,!0),{type:ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function gn(t){return at(Number.NEGATIVE_INFINITY,t)}function Sr(t){return at({type:"root"},t)}function wr(t){return at(-1,t)}function dn(t,e){return Re(t[0],{...e,expandedStates:t})}function Tt(t){return Er(t),{type:Pe,parts:t}}function ct(t,e="",n={}){return de(t),e!==""&&de(e),{type:ge,breakContents:t,flatContents:e,groupId:n.groupId}}function br(t){return de(t),{type:Ie,contents:t}}var Mt={type:ve};var Ji={type:Z,hard:!0},Xi={type:Z,hard:!0,literal:!0},ne={type:Z},Ct={type:Z,soft:!0},N=[Ji,Mt],ot=[Xi,Mt];function P(t,e){de(t),hn(e);let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}function kt(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;s?o--:o++}return o===-1||o===i?o:!1}}var $c=kt(/\s/u),yn=kt(" "),Bc=kt(",; "),Fc=kt(/[^\n\r]/u);function zi(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===`
|
||||
`)return e-2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return e-1}else{if(s==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return e+1}return e}var En=zi;function Zi(t,e){let n=e-1;n=yn(t,n,{backwards:!0}),n=En(t,n,{backwards:!0}),n=yn(t,n,{backwards:!0});let r=En(t,n,{backwards:!0});return n!==r}var Nr=Zi;var Sn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Or=Sn;function Ar(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}Ar.getVisitorKeys=()=>[];var Lr=Ar;var lt=null;function ft(t){if(lt!==null&&typeof lt.property){let e=lt;return lt=ft.prototype=null,e}return lt=ft.prototype=t??Object.create(null),new ft}var eo=10;for(let t=0;t<=eo;t++)ft();function wn(t){return ft(t)}function to(t,e="type"){wn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Tr=to;var no=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),Mr=no;var ro=Tr(Mr),Cr=ro;function xe(t){return t.position.start.offset}function kr(t){return t.position.end.offset}var Pr="format";var Ir=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,vr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,_r=/^\s*@(?:format|prettier)\s*$/u;function Rr(t){return _r.test(t)}function xr(t){return vr.test(t)}function Dr(t){return Ir.test(t)}function Yr(t){return`# @${Pr}
|
||||
|
||||
${t}`}function so(t){return Array.isArray(t)&&t.length>0}var De=so;function K(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function bn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>bn(r,e,t))}:t,n)}function Ye(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Br(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;s<r;s++){let i=e[s];if(i===`
|
||||
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function Pt(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let r=1;r<n;r++){let s=t.stack[r],i=t.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function It(t){return De(t.children)?It(x(!1,t.children,-1)):t}function $r(t){return t.value.trim()==="prettier-ignore"}function Fr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return I(n)&&$r(x(!1,n.endComments,-1))}return ee(e)&&$r(x(!1,e.leadingComments,-1))}function $e(t){return!De(t.children)&&!io(t)}function io(t){return ee(t)||ie(t)||Nn(t)||V(t)||I(t)}function ee(t){return De(t==null?void 0:t.leadingComments)}function ie(t){return De(t==null?void 0:t.middleComments)}function Nn(t){return t==null?void 0:t.indicatorComment}function V(t){return t==null?void 0:t.trailingComment}function I(t){return De(t==null?void 0:t.endComments)}function qr(t){let e=[],n;for(let r of t.split(/( +)/u))r!==" "?n===" "?e.push(r):e.push((e.pop()||"")+r):n===void 0&&e.unshift(""),n=r;return n===" "&&e.push((e.pop()||"")+" "),e[0]===""&&(e.shift(),e.unshift(" "+(e.shift()||""))),e}function Ur(t,e,n){let r=e.split(`
|
||||
`).map((s,i,o)=>i===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:qr(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Kr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let c=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(`
|
||||
`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:qr(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/u.test(l[0])&&!/^\s|\s$/u.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/u.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ut(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var On=new WeakMap;function vt(t,e){let{node:n,root:r}=t,s;return On.has(r)?s=On.get(r):(s=new Set,On.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Br(n,e)&&!An(t.parent))?Ct:""}function An(t){return I(t)&&!K(t,["documentHead","documentBody","flowMapping","flowSequence"])}function v(t,e){return at(" ".repeat(t),e)}function oo(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Pt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),Nn(r)&&o.push(" ",n("indicatorComment"));let a=Kr(r,{parentIndent:s,isLastDescendant:i,options:e}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(Tt(P(ne,f))),l!==a.length-1?c.push(f.length===0?N:Sr(ot)):r.chomping==="keep"&&i&&c.push(gn(f.length===0?N:ot));return r.indent===null?o.push(wr(v(e.tabWidth,c))):o.push(gn(v(r.indent-1+s,c))),o}var Vr=oo;function _t(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Ct;s&&r.children.length>0&&e.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&$e(c.key)&&$e(c.value);return[i,v(e.tabWidth,[a,ao(t,e,n),e.trailingComma==="none"?"":ct(","),I(r)?[N,P(N,t.map(n,"endComments"))]:""]),l?"":a,o]}function ao(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",ne,s.position.start.line!==i.position.start.line?vt(t,e.originalText):""]],"children")}function co(t,e,n){var M;let{node:r,parent:s}=t,{key:i,value:o}=r,a=$e(i),c=$e(o);if(a&&c)return": ";let l=n("key"),f=lo(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&Ln(i.content,e)&&!V(i.content)&&((M=s.tag)==null?void 0:M.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",v(2,l)];let m=n("value");if(a)return[": ",v(2,m)];if(ee(o)||!ut(i.content))return["? ",v(2,l),N,...t.map(()=>[n(),N],"value","leadingComments"),": ",v(2,m)];if(fo(i.content)&&!ee(i.content)&&!ie(i.content)&&!V(i.content)&&!I(i)&&!ee(o.content)&&!ie(o.content)&&!I(o)&&Ln(o.content,e))return[l,f,": ",m];let d=Symbol("mappingKey"),y=Re([ct("? "),Re(v(2,l),{id:d})]),h=[N,": ",v(2,m)],g=[f,":"];I(o)&&o.content&&K(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?g.push(" "):ee(o.content)||I(o)&&o.content&&!K(o.content,["mapping","sequence"])||s.type==="mapping"&&V(i.content)&&ut(o.content)||K(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content?g.push(ne):V(o)&&g.push(" "),g.push(m);let w=v(e.tabWidth,g);return Ln(i.content,e)&&!ee(i.content)&&!ie(i.content)&&!I(i)?dn([[l,w]]):dn([[y,ct(h,w,{groupId:d})]])}function Ln(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function lo(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function fo(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var jr=co;function uo(t){return bn(t,po)}function po(t){switch(t.type){case"document":Ye(t,"head",()=>t.children[0]),Ye(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Ye(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Ye(t,"key",()=>t.children[0]),Ye(t,"value",()=>t.children[1]);break}return t}var Wr=uo;function mo(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&ee(r)&&s.push([P(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return K(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Pt(t)&&(a=vt(t,e.originalText)),(i||o)&&(K(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,P(N,t.map(n,"middleComments")),N]),Fr(t)?s.push(yr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Re(ho(t,e,n))),V(r)&&!K(r,["document","documentHead"])&&s.push(br([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ut(r)?"":Mt,n("trailingComment")])),An(r)&&s.push(v(r.type==="sequenceItem"?2:0,[N,P(N,t.map(({node:c})=>[Nr(e.originalText,xe(c))?N:"",n()],"endComments"))])),s.push(a),s}function ho(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),Qr(o,a)?(s.push(N,"..."),V(o)&&s.push(" ",n("trailingComment"))):a&&!V(a.head)&&s.push(N,"---")},"children");let i=It(r);return(!K(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return yo(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),V(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),go(r)&&s.push(n("body")),P(N,s)}case"documentHead":return P(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=It(r);K(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[P(N,t.map(n,"children")),o,P(N,t.map(n,"endComments"))]}case"directive":return["%",P(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return pt(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,pt(r.type,o,e),c]}if(o.includes(i))return[s,pt(r.type,r.type==="quoteDouble"?At(!1,At(!1,o,String.raw`\"`,i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,pt(r.type,r.type==="quoteSingle"?At(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,pt(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Vr(t,e,n);case"mapping":case"sequence":return P(N,t.map(n,"children"));case"sequenceItem":return["- ",v(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return jr(t,e,n);case"flowMapping":return _t(t,e,n);case"flowSequence":return _t(t,e,n);case"flowSequenceItem":return n("content");default:throw new Or(r,"YAML")}}function go(t){return t.body.children.length>0||I(t.body)}function Qr(t,e){return V(t)||e&&(e.head.children.length>0||I(e.head))}function yo(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/u.test(e.originalText.slice(xe(n),xe(n)+4))||n.head.children.length>0||I(n.head)||V(n.head))return"head";let r=t.next;return Qr(n,r)?!1:r?"root":!1}function pt(t,e,n){let r=Ur(t,e,n);return P(N,r.map(s=>Tt(P(ne,s))))}function Gr(t,e){if(K(t))switch(t.type){case"comment":if(Rr(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}Gr.ignoredProperties=new Set(["position"]);var Eo={preprocess:Wr,embed:Lr,print:mo,massageAstNode:Gr,insertPragma:Yr,getVisitorKeys:Cr},Hr=Eo;var Jr=[{name:"YAML",type:"data",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],tmScope:"source.yaml",aceMode:"yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],parsers:["yaml"],vscodeLanguageIdLine truncated
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
var Yi=Object.create;var Nt=Object.defineProperty;var $i=Object.getOwnPropertyDescriptor;var Bi=Object.getOwnPropertyNames;var Fi=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty;var dr=t=>{throw TypeError(t)};var Ui=(t,e,n)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yr=(t,e)=>{for(var n in e)Nt(t,n,{get:e[n],enumerable:!0})},Ki=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Bi(e))!qi.call(t,s)&&s!==n&&Nt(t,s,{get:()=>e[s],enumerable:!(r=$i(e,s))||r.enumerable});return t};var cn=(t,e,n)=>(n=t!=null?Yi(Fi(t)):{},Ki(e||!t||!t.__esModule?Nt(n,"default",{value:t,enumerable:!0}):n,t));var ln=(t,e,n)=>Ui(t,typeof e!="symbol"?e+"":e,n),fn=(t,e,n)=>e.has(t)||dr("Cannot "+n);var Te=(t,e,n)=>(fn(t,e,"read from private field"),n?n.call(t):e.get(t)),Ot=(t,e,n)=>e.has(t)?dr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),un=(t,e,n,r)=>(fn(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Xe=(t,e,n)=>(fn(t,e,"access private method"),n);var oe=te($=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},pt={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},bo="tag:yaml.org,2002:",No={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Zr(t){let e=[0],n=t.indexOf(`
|
||||
`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(`
|
||||
`,n);return e}function es(t){let e,n;return typeof t=="string"?(e=Zr(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Zr(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Mn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=es(e);if(!n||!r||t>r.length)return null;for(let i=0;i<n.length;++i){let o=n[i];if(t<o)return{line:i,col:t-n[i-1]+1};if(t===o)return{line:i+1,col:1}}let s=n.length;return{line:s,col:t-n[s-1]+1}}function Oo(t,e){let{lineStarts:n,src:r}=es(e);if(!n||!(t>=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===`
|
||||
`;)--i;return r.slice(s,i)}function Ao({start:t,end:e},n,r=80){let s=Oo(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s}
|
||||
${c}${l}${a}`}var Be=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;i<e.length&&!(e[i]>r);)++i;this.origStart=r+i;let o=i;for(;i<e.length&&!(e[i]>=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===`
|
||||
`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===`
|
||||
`?r+`
|
||||
`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==`
|
||||
`)return!1;if(r){if(s!==r)return!1}else if(s!==re.DIRECTIVES_END&&s!==re.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===`
|
||||
`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[`
|
||||
`," "," ",">"]:[`
|
||||
`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==`
|
||||
`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===`
|
||||
`)return n;for(;r&&r!==`
|
||||
`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===`
|
||||
`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===`
|
||||
`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==`
|
||||
`&&e[n-1]===`
|
||||
`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===`
|
||||
`;){switch(a){case`
|
||||
`:s=0,n+=1,o+=`
|
||||
`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,re.ANCHOR,!0);if(n!=null)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,re.COMMENT,!0);r!=null&&e.push(r)}return e.length>0?e.join(`
|
||||
`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]===re.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]!==re.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[pt.FLOW_MAP,pt.FLOW_SEQ,pt.QUOTE_DOUBLE,pt.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=Mn(this.range.start,this.context.root);if(!e)return;let n=Mn(this.range.end,this.context.root);return{start:e,end:n}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange;return this.context.src.slice(e,n)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,re.TAG,!1);if(n!=null){if(n[1]==="<")return{verbatim:n.slice(2,-1)};{let[r,s,i]=n.match(/^(.*!)([^!]*)$/);return{handle:s,suffix:i}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:n}=this.valueRange,{src:r}=this.context;for(let s=e;s<n;++s)if(r[s]===`
|
||||
`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===re.COMMENT){let r=t.endOfLine(n,e+1),s=new Be(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ye=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Be(this.offset,this.offset+1);let n=e&&Mn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Ao(this.linePos,e);s&&(this.message+=`:
|
||||
|
||||
${s}
|
||||
`)}delete this.source}},Cn=class extends ye{constructor(e,n){super("YAMLReferenceError",e,n)}},mt=class extends ye{constructor(e,n){super("YAMLSemanticError",e,n)}},kn=class extends ye{constructor(e,n){super("YAMLSyntaxError",e,n)}},Pn=class extends ye{constructor(e,n){super("YAMLWarning",e,n)}};function Lo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var In=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==`
|
||||
`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===`
|
||||
`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;e<n&&(s===`
|
||||
`||s===" "||s===" ");)s=r[--n-1];let i="";for(let a=e;a<n;++a){let c=r[a];if(c===`
|
||||
`){let{fold:l,offset:f}=se.foldNewline(r,a,-1);i+=l,a=f}else if(c===" "||c===" "){let l=a,f=r[a+1];for(;a<n&&(f===" "||f===" ");)a+=1,f=r[a+1];f!==`
|
||||
`&&(i+=a>l?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new mt(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new mt(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===`
|
||||
`&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===`
|
||||
`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==`
|
||||
`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Be(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};$.Char=re;$.Node=se;$.PlainValue=In;$.Range=Be;$.Type=pt;$.YAMLError=ye;$.YAMLReferenceError=Cn;$.YAMLSemanticError=mt;$.YAMLSyntaxError=kn;$.YAMLWarning=Pn;$._defineProperty=Lo;$.defaultTagPrefix=bo;$.defaultTags=No});var ns=te(ts=>{"use strict";var u=oe(),Se=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ht=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===`
|
||||
`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===`
|
||||
`&&m.length===0&&(d=new Se,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},Ee=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function vn(t){let e=t;for(;e instanceof ht;)e=e.node;if(!(e instanceof xt))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var xt=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==`
|
||||
`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start<e.context.lineStart){this.props=e.props.slice(0,r+1),e.props=e.props.slice(r+1);let s=e.props[0]||e.valueRange;e.range.start=s.start;break}this.items=[e];let n=vn(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===`
|
||||
`||l==="#";){if(f&&l===`
|
||||
`&&!m){let h=new Se;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c<i+a&&!t.nextContentHasIndent(s,c,a))return c;let h=new Ee;if(c=h.parse({indent:a,lineStart:i,src:s},c),this.items.push(h),this.valueRange.end=c,c>=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===`
|
||||
`||g==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(c<i+a){i>n&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===`
|
||||
`||h===" "||h===" "){let g="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,g)}}let d=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!d)return c;if(this.items.push(d),this.valueRange.end=d.valueRange.end,c=u.Node.normalizeOffset(s,d.range.end),l=s[c],f=!1,m=d.includesTrailingLines,l){let h=c-1,g=s[h];for(;g===" "||g===" ";)g=s[--h];g===`
|
||||
`&&(i=h+1,f=!0)}let y=vn(d);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o<n.length;++o){let a=n[o],{atLineStart:c,indent:l}=a.context;if(c)for(let f=0;f<l;++f)i+=" ";i+=String(a)}return u.Node.addStringTerminator(e,r.end,i)}},_n=class extends u.Node{constructor(){super(u.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!==" "&&s!==" ";)s=n[r+=1];return this.name=n.slice(e,r),r}parseParameters(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!=="#";)s=n[r+=1];return this.valueRange=new u.Range(e,r),r}parse(e,n){this.context=e;let r=this.parseName(n+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new u.Range(n,r),r}},Rn=class t extends u.Node{static startCommentOrEndBlankLine(e,n){let r=u.Node.endOfWhiteSpace(e,n),s=e[r];return s==="#"||s===`
|
||||
`?r:n}constructor(){super(u.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){let{src:n}=this.context;this.directives=[];let r=!0,s=!1,i=e;for(;!u.Node.atDocumentBoundary(n,i,u.Char.DIRECTIVES_END);)switch(i=t.startCommentOrEndBlankLine(n,i),n[i]){case`
|
||||
`:if(r){let o=new Se;i=o.parse({src:n},i),i<n.length&&this.directives.push(o)}else i+=1,r=!0;break;case"#":{let o=new Ee;i=o.parse({src:n},i),this.directives.push(o),r=!1}break;case"%":{let o=new _n;i=o.parse({parent:this,src:n},i),this.directives.push(o),s=!0,r=!1}break;default:return s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case`
|
||||
`:if(o){let a=new Se;i=a.parse({src:r},i),i<r.length&&this.contents.push(a)}else i+=1,o=!0;s=i;break;case"#":{let a=new Ee;i=a.parse({src:r},i),this.contents.push(a),o=!1}break;default:{let a=u.Node.endOfIndent(r,i),l=n({atLineStart:o,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},a);if(!l)return this.valueRange.end=a;this.contents.push(l),i=l.range.end,o=!1;let f=vn(l);f&&Array.prototype.push.apply(this.contents,f)}}i=t.startCommentOrEndBlankLine(r,i)}if(this.valueRange.end=i,r[i]&&(this.documentEndMarker=new u.Range(i,i+3),i+=3,r[i])){if(i=u.Node.endOfWhiteSpace(r,i),r[i]==="#"){let a=new Ee;i=a.parse({src:r},i),this.contents.push(a)}switch(r[i]){case`
|
||||
`:i+=1;break;case void 0:break;default:this.error=new u.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return i}parse(e,n){e.root=this,this.context=e;let{src:r}=e,s=r.charCodeAt(n)===65279?n+1:n;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.directives.forEach(r=>{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`---
|
||||
`),s+=e.join("")),s[s.length-1]!==`
|
||||
`&&(s+=`
|
||||
`),s}},xn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},ae={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Dn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=ae.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===ae.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===`
|
||||
`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===ae.KEEP)break;return""}o===`
|
||||
`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===ae.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",d="",y=!1;for(let h=e;h<n;++h){for(let w=0;w<c&&s[h]===" ";++w)h+=1;let g=s[h];if(g===`
|
||||
`)d===`
|
||||
`?m+=`
|
||||
`:d=`
|
||||
`;else{let w=u.Node.endOfLine(s,h),M=s.slice(h,w);h=w,l&&(g===" "||g===" ")&&h<a?(d===" "?d=`
|
||||
`:!y&&!f&&d===`
|
||||
`&&(d=`
|
||||
|
||||
`),m+=d+M,d=w<n&&s[w]||"",y=!0):(m+=d+M,d=l&&h<a?" ":`
|
||||
`,y=!1),f&&M!==""&&(f=!1)}}return this.chomping===ae.STRIP?m:m+`
|
||||
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,s="";for(;;){let i=n[r];switch(i){case"-":this.chomping=ae.STRIP;break;case"+":this.chomping=ae.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new u.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,s=!!this.blockIndent,i=e,o=e,a=1;for(let c=r[i];c===`
|
||||
`&&(i+=1,!u.Node.atDocumentBoundary(r,i));c=r[i]){let l=u.Node.endOfBlockIndent(r,n,i);if(l===null)break;let f=r[l],m=l-(i+n);if(this.blockIndent){if(f&&f!==`
|
||||
`&&m<this.blockIndent){if(r[l]==="#")break;if(!this.error){let y=`Block scalars must not be less indented than their ${s?"explicit indentation indicator":"first line"}`;this.error=new u.YAMLSemanticError(this,y)}}}else if(r[l]!==`
|
||||
`){if(m<a){let d="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new u.YAMLSemanticError(this,d)}this.blockIndent=m}else m>a&&(a=m);r[l]===`
|
||||
`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==ae.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},Yn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case`
|
||||
`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===`
|
||||
`){let f=new Se;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c<o+i||a!=="]"&&a!=="}")){let f="Insufficient indentation in flow collection";this.error=new u.YAMLSemanticError(this,f)}}break;case",":this.items.push({char:a,offset:c}),c+=1;break;case"#":{let l=new Ee;c=l.parse({src:s},c),this.items.push(l)}break;case"?":case":":{let l=s[c+1];if(l===`
|
||||
`||l===" "||l===" "||l===","||a===":"&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:c}),c+=1;break}}default:{let l=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},c);if(!l)return this.valueRange=new u.Range(n,c),c;this.items.push(l),c=u.Node.normalizeOffset(s,l.range.end)}}c=u.Node.endOfWhiteSpace(s,c),a=s[c]}return this.valueRange=new u.Range(n,c+1),a&&(this.items.push({char:a,offset:c}),c=u.Node.endOfWhiteSpace(s,c+1),c=this.parseComment(c)),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;s<e.length&&!(e[s]>r.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===`
|
||||
`&&e[a-1]!==`
|
||||
`&&e[a]===`
|
||||
`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},$n=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(c==="\\")switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="\x07";break;case"b":o+="\b";break;case"e":o+="\x1B";break;case"f":o+="\f";break;case"n":o+=`
|
||||
`;break;case"r":o+="\r";break;case"t":o+=" ";break;case"v":o+="\v";break;case"N":o+="\x85";break;case"_":o+="\xA0";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case" ":o+=" ";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case`
|
||||
`:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},Bn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(c==="'")o+=c,a+=1,i[a]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function To(t,e){switch(t){case u.Type.ALIAS:return new xn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new Dn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Yn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ht(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new $n(t,e);case u.Type.QUOTE_SINGLE:return new Bn(t,e);default:return null}}var Fn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=To(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new xt(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ht)return!0;let i=e.range.end;return s[i]===`
|
||||
`||s[i-1]===`
|
||||
`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===`
|
||||
`;){if(a===`
|
||||
`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===`
|
||||
`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function Mo(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),`
|
||||
`)));let n=[],r=0;do{let s=new Rn,i=new Fn({src:t});r=s.parse(i,r),n.push(s)}while(r<t.length);return n.setOrigRanges=()=>{if(e.length===0)return!1;for(let i=1;i<e.length;++i)e[i]-=i;let s=0;for(let i=0;i<n.length;++i)s=n[i].setOrigRanges(e,s);return e.splice(0,e.length),!0},n.toString=()=>n.join(`...
|
||||
`),n}ts.parse=Mo});var qe=te(k=>{"use strict";var p=oe();function Co(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)}
|
||||
${e}${t}`:t}function Fe(t,e,n){return n?n.indexOf(`
|
||||
`)===-1?`${t} #${n}`:`${t}
|
||||
`+n.replace(/^/gm,`${e||""}#`):t}var j=class{};function ce(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ce(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var _=class extends j{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ce(this.value,e,n)}toString(){return String(this.value)}};function rs(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var os=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends j{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(os(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,rs(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof _?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof _&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,rs(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((M,A,C)=>{let L;A&&(!y&&A.spaceBefore&&M.push({type:"comment",str:""}),A.commentBefore&&A.commentBefore.match(/^.*$/gm).forEach(Di=>{M.push({type:"comment",str:`#${Di}`})}),A.comment&&(L=A.comment),m&&(!y&&A.spaceBefore||A.commentBefore||A.comment||A.key&&(A.key.commentBefore||A.key.comment)||A.value&&(A.value.commentBefore||A.value.comment))&&(h=!0)),y=!1;let R=f(A,e,()=>L=null,()=>y=!0);return m&&!h&&R.includes(`
|
||||
`)&&(h=!0),m&&C<this.items.length-1&&(R+=","),R=Fe(R,i,L),y&&(L||m)&&(y=!1),M.push({type:"item",str:R}),M},[]),w;if(g.length===0)w=r.start+r.end;else if(m){let{start:M,end:A}=r,C=g.map(L=>L.str);if(h||C.reduce((L,R)=>L+R.length+2,2)>t.maxFlowStringSingleLineLength){w=M;for(let L of C)w+=L?`
|
||||
${l}${c}${L}`:`
|
||||
`;w+=`
|
||||
${c}${A}`}else w=`${M} ${C.join(" ")} ${A}`}else{let M=g.map(n);w=M.shift();for(let A of M)w+=A?`
|
||||
${c}${A}`:`
|
||||
`}return this.comment?(w+=`
|
||||
`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function Dt(t){let e=t instanceof _?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var le=class extends W{add(e){this.items.push(e)}delete(e){let n=Dt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Dt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof _?s.value:s}has(e){let n=Dt(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Dt(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);this.items[r]=n}toJSON(e,n){let r=[];n&&n.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(ce(i,String(s++),n));return r}toString(e,n,r){return e?super.toString(e,{blockItem:s=>s.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},ko=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof j&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends j{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof j?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new _(null)),this.key instanceof j)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ce(this.key,"",e);if(n instanceof Map){let s=ce(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=ko(this.key,r,e),i=ce(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof j&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let f=!o&&(!a||l||(a instanceof j?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Fe(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Fe(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w}
|
||||
${d}:`:`${w}:`,this.comment&&(w=Fe(w,e.indent,this.comment),n&&n());let M="",A=null;if(c instanceof j){if(c.spaceBefore&&(M=`
|
||||
`),c.commentBefore){let R=c.commentBefore.replace(/^/gm,`${e.indent}#`);M+=`
|
||||
${R}`}A=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof _&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof le&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let C=h(c,e,()=>A=null,()=>g=!0),L=" ";return M||this.comment?L=`${M}
|
||||
${e.indent}`:!f&&c instanceof W?(!(C[0]==="["||C[0]==="{")||C.includes(`
|
||||
`))&&(L=`
|
||||
${e.indent}`):C[0]===`
|
||||
`&&(L=""),g&&!A&&r&&r(),Fe(w+L+C,e.indent,A)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Yt=(t,e)=>{if(t instanceof be){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=Yt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Yt(t.key,e),r=Yt(t.value,e);return Math.max(n,r)}return 1},be=class t extends j{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ce(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Yt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(be,"default",!0);function gt(t,e){let n=e instanceof _?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var dt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=gt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=gt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=gt(this.items,e),s=r&&r.value;return!n&&s instanceof _?s.value:s}has(e){return!!gt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},as="<<",Ft=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof le||(n=new le,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new _(as),new le);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof dt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Po={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Io={trueStr:"true",falseStr:"false"},vo={asBigInt:!1},_o={nullStr:"null"},Ne={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Un(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof _||(a=new _(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new _(t)}var cs="flow",qn="block",$t="quoted",ss=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==`
|
||||
`);n=t[e+1]}return e};function qt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,M=-1;n===qn&&(g=ss(t,g),g!==-1&&(m=g+c));for(let C;C=t[g+=1];){if(n===$t&&C==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}M=g}if(C===`
|
||||
`)n===qn&&(g=ss(t,g)),m=g+c,d=void 0;else{if(C===" "&&y&&y!==" "&&y!==`
|
||||
`&&y!==" "){let L=t[g+1];L&&L!==" "&&L!==`
|
||||
`&&L!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===$t){for(;y===" "||y===" ";)y=C,C=t[g+=1],h=!0;let L=g>M+1?g-2:w-1;if(f[L])return t;l.push(L),f[L]=!0,m=L+c,d=void 0}else h=!0}y=C}if(h&&a&&a(),l.length===0)return t;o&&o();let A=t.slice(0,l[0]);for(let C=0;C<l.length;++C){let L=l[C],R=l[C+1]||t.length;L===0?A=`
|
||||
${e}${t.slice(0,R)}`:(n===$t&&f[L]&&(A+=`${t[L]}\\`),A+=`
|
||||
${e}${t.slice(L+1,R)}`)}return A}var Kn=({indentAtStart:t})=>t?Object.assign({indentAtStart:t},Ne.fold):Ne.fold,Ut=t=>/^(%|---|\.\.\.)/m.test(t);function Ro(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
||||
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function we(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=Ne.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Ut(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<s)l+=1;else{for(a+=i.slice(c,l)+`
|
||||
|
||||
`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
|
||||
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:qt(a,o,$t,Kn(e))}function ls(t,e){if(e.implicitKey){if(/\n/.test(t))return we(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return we(t,e);let n=e.indent||(Ut(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:qt(r,n,cs,Kn(e))}function Bt({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return we(n,r);let o=r.indent||(r.forceBlockIndent||Ut(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!Ro(n,Ne.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+`
|
||||
`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(`
|
||||
`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a}
|
||||
${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l}
|
||||
${o}${f}${n}${m}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=qt(`${f}${n}${m}`,o,qn,Ne.fold);return`${l}
|
||||
${o}${d}`}function xo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return we(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(`
|
||||
`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?ls(o,e):we(o,e):Bt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(`
|
||||
`)!==-1)return Bt(t,e,n,r);if(l===""&&Ut(o))return e.forceBlockIndent=!0,Bt(t,e,n,r);let m=o.replace(/\n+/g,`$&
|
||||
${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Un(m,y,y.scalarFallback).value!="string")return we(o,e)}let d=c?m:qt(m,l,cs,Kn(e));return s&&!f&&(d.indexOf(`
|
||||
`)!==-1||s.indexOf(`
|
||||
`)!==-1)?(n&&n(),Co(d,l,s)):d}function Do(t,e,n,r){let{defaultType:s}=Ne,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Bt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return we(c,e);case p.Type.QUOTE_SINGLE:return ls(c,e);case p.Type.PLAIN:return xo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function Yo({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function fs(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function us(t,e){let n=e.context.src[e.range.start-1];if(n!==`
|
||||
`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function ps(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function ms(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=`
|
||||
`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=`
|
||||
`+s:t.comment=s)}}function Vn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function $o(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Bo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return $o(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function is(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new _(a)}let i=Vn(t,e);return typeof i=="string"&&s.length>0?Un(i,s,r.scalarFallback):null}function Fo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function qo(t,e,n){try{let r=is(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Fo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=is(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Uo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Ko(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Uo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Vo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new be(a);return n._cstAliases.push(c),c}let i=Bo(t,e);if(i)return qo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Vn(t,e);return Un(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function fe(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Ko(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Vo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(`
|
||||
`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore}
|
||||
${o}`:o);let a=n.after.join(`
|
||||
`);a&&(i.comment=i.comment?`${i.comment}
|
||||
${a}`:a)}return e.resolved=i}function jo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Ho(t,e):Go(t,e),s=new dt;s.items=r,ms(s,n);let i=!1;for(let o=0;o<r.length;++o){let{key:a}=r[o];if(a instanceof W&&(i=!0),t.schema.merge&&a&&a.value===as){r[o]=new Ft(r[o]);let c=r[o].value.items,l=null;c.some(f=>{if(f instanceof be){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c<r.length;++c){let{key:l}=r[c];if(a===l||a&&l&&Object.prototype.hasOwnProperty.call(a,"value")&&a.value===l.value){let f=`Map keys must be unique; "${a}" is repeated`;t.errors.push(new p.YAMLSemanticError(e,f));break}}}if(i&&!t.options.mapAsMap){let o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,o))}return e.resolved=s,s}var Wo=({context:{lineStart:t,node:e,src:n},props:r})=>{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i<s;++i)if(n[i]===`
|
||||
`)return!1;return!0};function Qo(t,e){if(!Wo(t))return;let n=t.getPropValue(0,p.Char.COMMENT,!0),r=!1,s=e.value.commentBefore;if(s&&s.startsWith(n))e.value.commentBefore=s.substr(n.length+1),r=!0;else{let i=e.value.comment;!t.node&&i&&i.startsWith(n)&&(e.value.comment=i.substr(n.length+1),r=!0)}r&&(e.comment=n)}function Go(t,e){let n=[],r=[],s,i=null;for(let o=0;o<e.items.length;++o){let a=e.items[o];switch(a.type){case p.Type.BLANK_LINE:n.push({afterKey:!!s,before:r.length});break;case p.Type.COMMENT:n.push({afterKey:!!s,before:r.length,comment:a.comment});break;case p.Type.MAP_KEY:s!==void 0&&r.push(new T(s)),a.error&&t.errors.push(a.error),s=fe(t,a.node),i=null;break;case p.Type.MAP_VALUE:{if(s===void 0&&(s=null),a.error&&t.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===p.Type.MAP&&!a.node.context.atLineStart){let f="Nested mappings are not allowed in compact mappings";t.errors.push(new p.YAMLSemanticError(a.node,f))}let c=a.node;if(!c&&a.props.length>0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,fe(t,c));Qo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(ps(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=fe(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Ho(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;a<e.items.length;++a){let c=e.items[a];if(typeof c.char=="string"){let{char:l,offset:f}=c;if(l==="?"&&s===void 0&&!i){i=!0,o=":";continue}if(l===":"){if(s===void 0&&(s=null),o===":"){o=",";continue}}else if(i&&(s===void 0&&l!==","&&(s=null),i=!1),s!==void 0&&(r.push(new T(s)),s=void 0,l===",")){o=":";continue}if(l==="}"){if(a===e.items.length-1)continue}else if(l===o){o=":";continue}let m=`Flow map contains an unexpected ${l}`,d=new p.YAMLSyntaxError(e,m);d.offset=f,t.errors.push(d)}else c.type===p.Type.BLANK_LINE?n.push({afterKey:!!s,before:r.length}):c.type===p.Type.COMMENT?(us(t.errors,c),n.push({afterKey:!!s,before:r.length,comment:c.comment})):s===void 0?(o===","&&t.errors.push(new p.YAMLSemanticError(c,"Separator , missing in flow map")),s=fe(t,c)):(o!==","&&t.errors.push(new p.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new T(s,fe(t,c))),s=void 0,i=!1)}return fs(t.errors,e),s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Jo(t,e){if(e.type!==p.Type.SEQ&&e.type!==p.Type.FLOW_SEQ){let i=`A ${e.type} node cannot be resolved as a sequence`;return t.errors.push(new p.YAMLSyntaxError(e,i)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_SEQ?zo(t,e):Xo(t,e),s=new le;if(s.items=r,ms(s,n),!t.options.mapAsMap&&r.some(i=>i instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Xo(t,e){let n=[],r=[];for(let s=0;s<e.items.length;++s){let i=e.items[s];switch(i.type){case p.Type.BLANK_LINE:n.push({before:r.length});break;case p.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case p.Type.SEQ_ITEM:if(i.error&&t.errors.push(i.error),r.push(fe(t,i.node)),i.hasProps){let o="Sequence items cannot have tags or anchors before the - indicator";t.errors.push(new p.YAMLSemanticError(i,o))}break;default:i.error&&t.errors.push(i.error),t.errors.push(new p.YAMLSyntaxError(i,`Unexpected ${i.type} node in sequence`))}}return{comments:n,items:r}}function zo(t,e){let n=[],r=[],s=!1,i,o=null,a="[",c=null;for(let l=0;l<e.items.length;++l){let f=e.items[l];if(typeof f.char=="string"){let{char:m,offset:d}=f;if(m!==":"&&(s||i!==void 0)&&(s&&i===void 0&&(i=a?r.pop():null),r.push(new T(i)),s=!1,i=void 0,o=null),m===a)a=null;else if(!a&&m==="?")s=!0;else if(a!=="["&&m===":"&&i===void 0){if(a===","){if(i=r.pop(),i instanceof T){let y="Chaining flow sequence pairs is invalid",h=new p.YAMLSemanticError(e,y);h.offset=d,t.errors.push(h)}if(!s&&typeof o=="number"){let y=f.range?f.range.start:f.offset;y>o+1024&&t.errors.push(ps(e,i));let{src:h}=c.context;for(let g=o;g<y;++g)if(h[g]===`
|
||||
`){let w="Implicit keys of flow sequence pairs need to be on a single line";t.errors.push(new p.YAMLSemanticError(c,w));break}}}else i=null;o=null,s=!1,a=null}else if(a==="["||m!=="]"||l<e.items.length-1){let y=`Flow sequence contains an unexpected ${m}`,h=new p.YAMLSyntaxError(e,y);h.offset=d,t.errors.push(h)}}else if(f.type===p.Type.BLANK_LINE)n.push({before:r.length});else if(f.type===p.Type.COMMENT)us(t.errors,f),n.push({comment:f.comment,before:r.length});else{if(a){let d=`Expected a ${a} in flow sequence`;t.errors.push(new p.YAMLSemanticError(f,d))}let m=fe(t,f);i===void 0?(r.push(m),c=f):(r.push(new T(i,m)),i=void 0),o=f.range.start,a=","}}return fs(t.errors,e),i!==void 0&&r.push(new T(i)),{comments:n,items:r}}k.Alias=be;k.Collection=W;k.Merge=Ft;k.Node=j;k.Pair=T;k.Scalar=_;k.YAMLMap=dt;k.YAMLSeq=le;k.addComment=Fe;k.binaryOptions=Po;k.boolOptions=Io;k.findPair=gt;k.intOptions=vo;k.isEmptyPath=os;k.nullOptions=_o;k.resolveMap=jo;k.resolveNode=fe;k.resolveSeq=Jo;k.resolveString=Vn;k.strOptions=Ne;k.stringifyNumber=Yo;k.stringifyString=Do;k.toJSON=ce});var Gn=te(z=>{"use strict";var Q=oe(),O=qe(),Zo={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}else{let r="This environment does not support reading binary tags; either Buffer or atob is required";return t.errors.push(new Q.YAMLReferenceError(e,r)),null}},options:O.binaryOptions,stringify:({comment:t,type:e,value:n},r,s,i)=>{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<n.length;++c)a+=String.fromCharCode(n[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.binaryOptions.defaultType),e===Q.Type.QUOTE_DOUBLE)n=o;else{let{lineWidth:a}=O.binaryOptions,c=Math.ceil(o.length/a),l=new Array(c);for(let f=0,m=0;f<c;++f,m+=a)l[f]=o.substr(m,a);n=l.join(e===Q.Type.BLOCK_LITERAL?`
|
||||
`:" ")}return O.stringifyString({comment:t,type:e,value:n},r,s,i)}};function gs(t,e){let n=O.resolveSeq(t,e);for(let r=0;r<n.items.length;++r){let s=n.items[r];if(!(s instanceof O.Pair)){if(s instanceof O.YAMLMap){if(s.items.length>1){let o="Each pair must have its own sequence indicator";throw new Q.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore}
|
||||
${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function ds(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var ea={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:gs,createNode:ds},Ue=class t extends O.YAMLSeq{constructor(){super(),Q._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),Q._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),Q._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),Q._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),Q._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};Q._defineProperty(Ue,"tag","tag:yaml.org,2002:omap");function ta(t,e){let n=gs(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new Q.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Ue,n)}function na(t,e,n){let r=ds(t,e,n),s=new Ue;return s.items=r.items,s}var ra={identify:t=>t instanceof Map,nodeClass:Ue,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ta,createNode:na},Ke=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};Q._defineProperty(Ke,"tag","tag:yaml.org,2002:set");function sa(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new Q.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ke,n)}function ia(t,e,n){let r=new Ke;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var oa={identify:t=>t instanceof Set,nodeClass:Ke,default:!1,tag:"tag:yaml.org,2002:set",resolve:sa,createNode:ia},jn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},ys=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},aa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>jn(e,n.replace(/_/g,"")),stringify:ys},ca={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>jn(e,n.replace(/_/g,"")),stringify:ys},la={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=jn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Wn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Qn(t,e){Wn(!1)&&console.warn(e?`${e}: ${t}`:t)}function fa(t){if(Wn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Qn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var hs={};function ua(t,e){if(!hs[t]&&Wn(!0)){hs[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Qn(n,"DeprecationWarning")}}z.binary=Zo;z.floatTime=ca;z.intTime=aa;z.omap=ra;z.pairs=ea;z.set=oa;z.timestamp=la;z.warn=Qn;z.warnFileDeprecation=fa;z.warnOptionDep
Line truncated
|
||||
${e.indent}${c}`:c}var Zn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Ht=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Ht(r,e))):t instanceof S.Pair?(Ht(t.key,e),Ht(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ma=t=>Object.keys(Ht(t,{}));function Ca(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(`
|
||||
`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(`
|
||||
`)||null;else{let i=n.before.join(`
|
||||
`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i}
|
||||
${o.commentBefore}`:i}t.comment=n.after.join(`
|
||||
`)||null}}function ka({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Pa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!_s[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Ia(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(ka(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Pa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(`
|
||||
`)||null}function Ve(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Jt=class t{constructor(e){this.anchors=new Zn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ve(this.contents),this.contents.add(e)}addIn(e,n){Ve(this.contents),this.contents.addIn(e,n)}delete(e){return Ve(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ve(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ve(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ve(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new Is.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Ia(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],Ca(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ma(this.contents).filter(e=>e.indexOf(Is.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Gt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Gt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Gt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Gt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(`
|
||||
`)+`
|
||||
`}};Y._defineProperty(Jt,"defaults",_s);Xt.Document=Jt;Xt.defaultOptions=Oa;Xt.scalarOptions=Aa});var Ys=te(Ds=>{"use strict";var er=ns(),Oe=Rs(),va=zn(),_a=oe(),Ra=Gn();qe();function xa(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Oe.Document.defaults[Oe.defaultOptions.version],Oe.defaultOptions);return new va.Schema(r).createNode(t,e,n)}var je=class extends Oe.Document{constructor(e){super(Object.assign({},Oe.defaultOptions,e))}};function Da(t,e){let n=[],r;for(let s of er.parse(t)){let i=new je(e);i.parse(s,r),n.push(i),r=i}return n}function xs(t,e){let n=er.parse(t),r=new je(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new _a.YAMLSemanticError(n[1],s))}return r}function Ya(t,e){let n=xs(t,e);if(n.warnings.forEach(r=>Ra.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function $a(t,e){let n=new je(e);return n.contents=t,String(n)}var Ba={createNode:xa,defaultOptions:Oe.defaultOptions,Document:je,parse:Ya,parseAllDocuments:Da,parseCST:er.parse,parseDocument:xs,scalarOptions:Oe.scalarOptions,stringify:$a};Ds.YAML=Ba});var tr=te((nf,$s)=>{$s.exports=Ys().YAML});var Bs=te(G=>{"use strict";var We=qe(),Qe=oe();G.findPair=We.findPair;G.parseMap=We.resolveMap;G.parseSeq=We.resolveSeq;G.stringifyNumber=We.stringifyNumber;G.stringifyString=We.stringifyString;G.toJSON=We.toJSON;G.Type=Qe.Type;G.YAMLError=Qe.YAMLError;G.YAMLReferenceError=Qe.YAMLReferenceError;G.YAMLSemanticError=Qe.YAMLSemanticError;G.YAMLSyntaxError=Qe.YAMLSyntaxError;G.YAMLWarning=Qe.YAMLWarning});var gr={};yr(gr,{__parsePrettierYamlConfig:()=>sc,languages:()=>Xr,options:()=>zr,parsers:()=>hr,printers:()=>rc});var Vi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},At=Vi;var Me="string",ze="array",Ze="cursor",et="indent",Ce="align",tt="trim",ke="group",Pe="fill",ge="if-break",nt="indent-if-break",Ie="line-suffix",rt="line-suffix-boundary",Z="line",st="label",ve="break-parent",Lt=new Set([Ze,et,Ce,tt,ke,Pe,ge,nt,Ie,rt,Z,st,ve]);var ji=(t,e,n)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=ji;function Wi(t){if(typeof t=="string")return Me;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(Lt.has(e))return e}var _e=Wi;var Qi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Gi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(_e(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Qi([...Lt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var pn=class extends Error{name="InvalidDocError";constructor(e){super(Gi(e)),this.doc=e}},mn=pn;function Ji(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(_e(i)){case ze:return e(i.map(r));case Pe:return e({...i,parts:i.parts.map(r)});case ge:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ce:case et:case nt:case st:case Ie:return e({...i,contents:r(i.contents)});case Me:case Ze:case tt:case rt:case Z:case ve:return e(i);default:throw new mn(i)}}}function Er(t,e=it){return Ji(t,n=>typeof n=="string"?P(e,n.split(`
|
||||
`)):n)}var hn=()=>{},de=hn,gn=hn,Sr=hn;function ot(t,e){return de(e),{type:Ce,contents:e,n:t}}function Re(t,e={}){return de(t),gn(e.expandedStates,!0),{type:ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function dn(t){return ot(Number.NEGATIVE_INFINITY,t)}function wr(t){return ot({type:"root"},t)}function br(t){return ot(-1,t)}function yn(t,e){return Re(t[0],{...e,expandedStates:t})}function Tt(t){return Sr(t),{type:Pe,parts:t}}function at(t,e="",n={}){return de(t),e!==""&&de(e),{type:ge,breakContents:t,flatContents:e,groupId:n.groupId}}function Nr(t){return de(t),{type:Ie,contents:t}}var Mt={type:ve};var Xi={type:Z,hard:!0},zi={type:Z,hard:!0,literal:!0},ne={type:Z},Ct={type:Z,soft:!0},N=[Xi,Mt],it=[zi,Mt];function P(t,e){de(t),gn(e);let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}function kt(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;s?o--:o++}return o===-1||o===i?o:!1}}var Bc=kt(/\s/u),En=kt(" "),Fc=kt(",; "),qc=kt(/[^\n\r]/u);function Zi(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===`
|
||||
`)return e-2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return e-1}else{if(s==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(s===`
|
||||
`||s==="\r"||s==="\u2028"||s==="\u2029")return e+1}return e}var Sn=Zi;function eo(t,e){let n=e-1;n=En(t,n,{backwards:!0}),n=Sn(t,n,{backwards:!0}),n=En(t,n,{backwards:!0});let r=Sn(t,n,{backwards:!0});return n!==r}var Or=eo;var wn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Ar=wn;function Lr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}Lr.getVisitorKeys=()=>[];var Tr=Lr;var ct=null;function lt(t){if(ct!==null&&typeof ct.property){let e=ct;return ct=lt.prototype=null,e}return ct=lt.prototype=t??Object.create(null),new lt}var to=10;for(let t=0;t<=to;t++)lt();function bn(t){return lt(t)}function no(t,e="type"){bn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Mr=no;var ro=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),Cr=ro;var so=Mr(Cr),kr=so;function xe(t){return t.position.start.offset}function Pr(t){return t.position.end.offset}var Ir="format";var vr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,_r=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Rr=/^\s*@(?:format|prettier)\s*$/u;function xr(t){return Rr.test(t)}function Dr(t){return _r.test(t)}function Yr(t){return vr.test(t)}function $r(t){return`# @${Ir}
|
||||
|
||||
${t}`}function io(t){return Array.isArray(t)&&t.length>0}var De=io;function K(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function Nn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>Nn(r,e,t))}:t,n)}function Ye(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Fr(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;s<r;s++){let i=e[s];if(i===`
|
||||
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function Pt(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let r=1;r<n;r++){let s=t.stack[r],i=t.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function It(t){return De(t.children)?It(x(!1,t.children,-1)):t}function Br(t){return t.value.trim()==="prettier-ignore"}function qr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return I(n)&&Br(x(!1,n.endComments,-1))}return ee(e)&&Br(x(!1,e.leadingComments,-1))}function $e(t){return!De(t.children)&&!oo(t)}function oo(t){return ee(t)||ie(t)||On(t)||V(t)||I(t)}function ee(t){return De(t==null?void 0:t.leadingComments)}function ie(t){return De(t==null?void 0:t.middleComments)}function On(t){return t==null?void 0:t.indicatorComment}function V(t){return t==null?void 0:t.trailingComment}function I(t){return De(t==null?void 0:t.endComments)}function Ur(t){let e=[],n;for(let r of t.split(/( +)/u))r!==" "?n===" "?e.push(r):e.push((e.pop()||"")+r):n===void 0&&e.unshift(""),n=r;return n===" "&&e.push((e.pop()||"")+" "),e[0]===""&&(e.shift(),e.unshift(" "+(e.shift()||""))),e}function Kr(t,e,n){let r=e.split(`
|
||||
`).map((s,i,o)=>i===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:Ur(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Vr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let c=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(`
|
||||
`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:Ur(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/u.test(l[0])&&!/^\s|\s$/u.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/u.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ft(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var An=new WeakMap;function vt(t,e){let{node:n,root:r}=t,s;return An.has(r)?s=An.get(r):(s=new Set,An.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Fr(n,e)&&!Ln(t.parent))?Ct:""}function Ln(t){return I(t)&&!K(t,["documentHead","documentBody","flowMapping","flowSequence"])}function v(t,e){return ot(" ".repeat(t),e)}function ao(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Pt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),On(r)&&o.push(" ",n("indicatorComment"));let a=Vr(r,{parentIndent:s,isLastDescendant:i,options:e}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(Tt(P(ne,f))),l!==a.length-1?c.push(f.length===0?N:wr(it)):r.chomping==="keep"&&i&&c.push(dn(f.length===0?N:it));return r.indent===null?o.push(br(v(e.tabWidth,c))):o.push(dn(v(r.indent-1+s,c))),o}var jr=ao;function _t(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Ct;s&&r.children.length>0&&e.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&$e(c.key)&&$e(c.value);return[i,v(e.tabWidth,[a,co(t,e,n),e.trailingComma==="none"?"":at(","),I(r)?[N,P(N,t.map(n,"endComments"))]:""]),l?"":a,o]}function co(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",ne,s.position.start.line!==i.position.start.line?vt(t,e.originalText):""]],"children")}function lo(t,e,n){var M;let{node:r,parent:s}=t,{key:i,value:o}=r,a=$e(i),c=$e(o);if(a&&c)return": ";let l=n("key"),f=fo(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&Tn(i.content,e)&&!V(i.content)&&((M=s.tag)==null?void 0:M.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",v(2,l)];let m=n("value");if(a)return[": ",v(2,m)];if(ee(o)||!ft(i.content))return["? ",v(2,l),N,...t.map(()=>[n(),N],"value","leadingComments"),": ",v(2,m)];if(uo(i.content)&&!ee(i.content)&&!ie(i.content)&&!V(i.content)&&!I(i)&&!ee(o.content)&&!ie(o.content)&&!I(o)&&Tn(o.content,e))return[l,f,": ",m];let d=Symbol("mappingKey"),y=Re([at("? "),Re(v(2,l),{id:d})]),h=[N,": ",v(2,m)],g=[f,":"];I(o)&&o.content&&K(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?g.push(" "):ee(o.content)||I(o)&&o.content&&!K(o.content,["mapping","sequence"])||s.type==="mapping"&&V(i.content)&&ft(o.content)||K(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content?g.push(ne):V(o)&&g.push(" "),g.push(m);let w=v(e.tabWidth,g);return Tn(i.content,e)&&!ee(i.content)&&!ie(i.content)&&!I(i)?yn([[l,w]]):yn([[y,at(h,w,{groupId:d})]])}function Tn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function fo(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function uo(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Wr=lo;function po(t){return Nn(t,mo)}function mo(t){switch(t.type){case"document":Ye(t,"head",()=>t.children[0]),Ye(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Ye(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Ye(t,"key",()=>t.children[0]),Ye(t,"value",()=>t.children[1]);break}return t}var Qr=po;function ho(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&ee(r)&&s.push([P(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return K(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Pt(t)&&(a=vt(t,e.originalText)),(i||o)&&(K(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,P(N,t.map(n,"middleComments")),N]),qr(t)?s.push(Er(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Re(go(t,e,n))),V(r)&&!K(r,["document","documentHead"])&&s.push(Nr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ft(r)?"":Mt,n("trailingComment")])),Ln(r)&&s.push(v(r.type==="sequenceItem"?2:0,[N,P(N,t.map(({node:c})=>[Or(e.originalText,xe(c))?N:"",n()],"endComments"))])),s.push(a),s}function go(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),Gr(o,a)?(s.push(N,"..."),V(o)&&s.push(" ",n("trailingComment"))):a&&!V(a.head)&&s.push(N,"---")},"children");let i=It(r);return(!K(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return Eo(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),V(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),yo(r)&&s.push(n("body")),P(N,s)}case"documentHead":return P(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=It(r);K(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[P(N,t.map(n,"children")),o,P(N,t.map(n,"endComments"))]}case"directive":return["%",P(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return ut(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,ut(r.type,o,e),c]}if(o.includes(i))return[s,ut(r.type,r.type==="quoteDouble"?At(!1,At(!1,o,String.raw`\"`,i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,ut(r.type,r.type==="quoteSingle"?At(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,ut(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return jr(t,e,n);case"mapping":case"sequence":return P(N,t.map(n,"children"));case"sequenceItem":return["- ",v(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Wr(t,e,n);case"flowMapping":return _t(t,e,n);case"flowSequence":return _t(t,e,n);case"flowSequenceItem":return n("content");default:throw new Ar(r,"YAML")}}function yo(t){return t.body.children.length>0||I(t.body)}function Gr(t,e){return V(t)||e&&(e.head.children.length>0||I(e.head))}function Eo(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/u.test(e.originalText.slice(xe(n),xe(n)+4))||n.head.children.length>0||I(n.head)||V(n.head))return"head";let r=t.next;return Gr(n,r)?!1:r?"root":!1}function ut(t,e,n){let r=Kr(t,e,n);return P(N,r.map(s=>Tt(P(ne,s))))}function Hr(t,e){if(K(t))switch(t.type){case"comment":if(xr(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}Hr.ignoredProperties=new Set(["position"]);var So={preprocess:Qr,embed:Tr,print:ho,massageAstNode:Hr,insertPragma:$r,getVisitorKeys:kr},Jr=So;var Xr=[{name:"YAML",type:"data",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],tmScope:"source.yaml",aceMode:"yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],parsers:["yaml"],vscodeLanguageIdLine truncated
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import { CursorOptions, CursorResult, Options, SupportInfo } from "./index.js";
|
||||
|
||||
/**
|
||||
* formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code.
|
||||
* This is useful for editor integrations, to prevent the cursor from moving when code is formatted
|
||||
*
|
||||
* The cursorOffset option should be provided, to specify where the cursor is.
|
||||
*
|
||||
* ```js
|
||||
* await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" });
|
||||
* ```
|
||||
* `-> { formatted: "1;\n", cursorOffset: 1 }`
|
||||
*/
|
||||
export function formatWithCursor(
|
||||
source: string,
|
||||
options: CursorOptions,
|
||||
): Promise<CursorResult>;
|
||||
|
||||
/**
|
||||
* `format` is used to format text using Prettier. [Options](https://prettier.io/docs/options) may be provided to override the defaults.
|
||||
*/
|
||||
export function format(source: string, options?: Options): Promise<string>;
|
||||
|
||||
/**
|
||||
* `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`.
|
||||
* This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios.
|
||||
*/
|
||||
export function check(source: string, options?: Options): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns an object representing the parsers, languages and file types Prettier supports for the current version.
|
||||
*/
|
||||
export function getSupportInfo(): Promise<SupportInfo>;
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
(function(t){function e(){var o=t();return o.default||o}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};f.prettier=e()}})(function(){"use strict";var Fu=Object.create;var Ue=Object.defineProperty;var pu=Object.getOwnPropertyDescriptor;var du=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var Zt=e=>{throw TypeError(e)};var Cu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dt=(e,t)=>{for(var r in t)Ue(e,r,{get:t[r],enumerable:!0})},er=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of du(t))!Eu.call(e,u)&&u!==r&&Ue(e,u,{get:()=>t[u],enumerable:!(n=pu(t,u))||n.enumerable});return e};var hu=(e,t,r)=>(r=e!=null?Fu(mu(e)):{},er(t||!e||!e.__esModule?Ue(r,"default",{value:e,enumerable:!0}):r,e)),gu=e=>er(Ue({},"__esModule",{value:!0}),e);var yu=(e,t,r)=>t.has(e)||Zt("Cannot "+r);var tr=(e,t,r)=>t.has(e)?Zt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var fe=(e,t,r)=>(yu(e,t,"access private method"),r);var Pn=Cu(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});function Co(){return new Proxy({},{get:()=>e=>e})}var On=/\r\n|[\n\r\u2028\u2029]/;function ho(e,t,r){let n=Object.assign({column:0,line:-1},e.start),u=Object.assign({},n,e.end),{linesAbove:o=2,linesBelow:i=3}=r||{},s=n.line,a=n.column,c=u.line,D=u.column,p=Math.max(s-(o+1),0),l=Math.min(t.length,c+i);s===-1&&(p=0),c===-1&&(l=t.length);let F=c-s,f={};if(F)for(let d=0;d<=F;d++){let m=d+s;if(!a)f[m]=!0;else if(d===0){let C=t[m-1].length;f[m]=[a,C-a+1]}else if(d===F)f[m]=[0,D];else{let C=t[m-d].length;f[m]=[0,C]}}else a===D?a?f[s]=[a,0]:f[s]=!0:f[s]=[a,D-a];return{start:p,end:l,markerLines:f}}function go(e,t,r={}){let u=Co(!1),o=e.split(On),{start:i,end:s,markerLines:a}=ho(t,o,r),c=t.start&&typeof t.start.column=="number",D=String(s).length,l=e.split(On,s).slice(i,s).map((F,f)=>{let d=i+1+f,C=` ${` ${d}`.slice(-D)} |`,E=a[d],h=!a[d+1];if(E){let x="";if(Array.isArray(E)){let A=F.slice(0,Math.max(E[0]-1,0)).replace(/[^\t]/g," "),$=E[1]||1;x=[`
|
||||
`,u.gutter(C.replace(/\d/g," "))," ",A,u.marker("^").repeat($)].join(""),h&&r.message&&(x+=" "+u.message(r.message))}return[u.marker(">"),u.gutter(C),F.length>0?` ${F}`:"",x].join("")}else return` ${u.gutter(C)}${F.length>0?` ${F}`:""}`}).join(`
|
||||
`);return r.message&&!c&&(l=`${" ".repeat(D+1)}${r.message}
|
||||
${l}`),l}Mt.codeFrameColumns=go});var oi={};dt(oi,{__debug:()=>ui,check:()=>ri,doc:()=>qt,format:()=>fu,formatWithCursor:()=>cu,getSupportInfo:()=>ni,util:()=>Qt,version:()=>tu});var Au=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},te=Au;var _e=class{diff(t,r,n={}){let u;typeof n=="function"?(u=n,n={}):"callback"in n&&(u=n.callback);let o=this.castInput(t,n),i=this.castInput(r,n),s=this.removeEmpty(this.tokenize(o,n)),a=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(s,a,n,u)}diffWithOptionsObj(t,r,n,u){var o;let i=E=>{if(E=this.postProcess(E,n),u){setTimeout(function(){u(E)},0);return}else return E},s=r.length,a=t.length,c=1,D=s+a;n.maxEditLength!=null&&(D=Math.min(D,n.maxEditLength));let p=(o=n.timeout)!==null&&o!==void 0?o:1/0,l=Date.now()+p,F=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(F[0],r,t,0,n);if(F[0].oldPos+1>=a&&f+1>=s)return i(this.buildValues(F[0].lastComponent,r,t));let d=-1/0,m=1/0,C=()=>{for(let E=Math.max(d,-c);E<=Math.min(m,c);E+=2){let h,x=F[E-1],A=F[E+1];x&&(F[E-1]=void 0);let $=!1;if(A){let Be=A.oldPos-E;$=A&&0<=Be&&Be<s}let ue=x&&x.oldPos+1<a;if(!$&&!ue){F[E]=void 0;continue}if(!ue||$&&x.oldPos<A.oldPos?h=this.addToPath(A,!0,!1,0,n):h=this.addToPath(x,!1,!0,1,n),f=this.extractCommon(h,r,t,E,n),h.oldPos+1>=a&&f+1>=s)return i(this.buildValues(h.lastComponent,r,t))||!0;F[E]=h,h.oldPos+1>=a&&(m=Math.min(m,E-1)),f+1>=s&&(d=Math.max(d,E+1))}c++};if(u)(function E(){setTimeout(function(){if(c>D||Date.now()>l)return u(void 0);C()||E()},0)})();else for(;c<=D&&Date.now()<=l;){let E=C();if(E)return E}}addToPath(t,r,n,u,o){let i=t.lastComponent;return i&&!o.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:t.oldPos+u,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+u,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(t,r,n,u,o){let i=r.length,s=n.length,a=t.oldPos,c=a-u,D=0;for(;c+1<i&&a+1<s&&this.equals(n[a+1],r[c+1],o);)c++,a++,D++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return D&&!o.oneChangePerToken&&(t.lastComponent={count:D,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=a,c}equals(t,r,n){return n.comparator?n.comparator(t,r):t===r||!!n.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,n){let u=[],o;for(;t;)u.push(t),o=t.previousComponent,delete t.previousComponent,t=o;u.reverse();let i=u.length,s=0,a=0,c=0;for(;s<i;s++){let D=u[s];if(D.removed)D.value=this.join(n.slice(c,c+D.count)),c+=D.count;else{if(!D.added&&this.useLongestToken){let p=r.slice(a,a+D.count);p=p.map(function(l,F){let f=n[c+F];return f.length>l.length?f:l}),D.value=this.join(p)}else D.value=this.join(r.slice(a,a+D.count));a+=D.count,D.added||(c+=D.count)}}return u}};var mt=class extends _e{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},rr=new mt;function Et(e,t,r){return rr.diff(e,t,r)}function nr(e){let t=e.indexOf("\r");return t!==-1?e.charAt(t+1)===`
|
||||
`?"crlf":"cr":"lf"}function xe(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
||||
`;default:return`
|
||||
`}}function Ct(e,t){let r;switch(t){case`
|
||||
`:r=/\n/gu;break;case"\r":r=/\r/gu;break;case`\r
|
||||
`:r=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function ur(e){return te(!1,e,/\r\n?/gu,`
|
||||
`)}var W="string",Y="array",j="cursor",N="indent",O="align",P="trim",B="group",k="fill",_="if-break",v="indent-if-break",L="line-suffix",I="line-suffix-boundary",g="line",S="label",w="break-parent",Ve=new Set([j,N,O,P,B,k,_,v,L,I,g,S,w]);var Bu=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=Bu;function or(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===`
|
||||
`);)t--;return t<e.length?e.slice(0,t):e}function _u(e){if(typeof e=="string")return W;if(Array.isArray(e))return Y;if(!e)return;let{type:t}=e;if(Ve.has(t))return t}var M=_u;var xu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function wu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(M(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=xu([...Ve].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var ht=class extends Error{name="InvalidDocError";constructor(t){super(wu(t)),this.doc=t}},q=ht;var ir={};function bu(e,t,r,n){let u=[e];for(;u.length>0;){let o=u.pop();if(o===ir){r(u.pop());continue}r&&u.push(o,ir);let i=M(o);if(!i)throw new q(o);if((t==null?void 0:t(o))!==!1)switch(i){case Y:case k:{let s=i===Y?o:o.parts;for(let a=s.length,c=a-1;c>=0;--c)u.push(s[c]);break}case _:u.push(o.flatContents,o.breakContents);break;case B:if(n&&o.expandedStates)for(let s=o.expandedStates.length,a=s-1;a>=0;--a)u.push(o.expandedStates[a]);else u.push(o.contents);break;case O:case N:case v:case S:case L:u.push(o.contents);break;case W:case j:case P:case I:case g:case w:break;default:throw new q(o)}}}var le=bu;function be(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(o){if(r.has(o))return r.get(o);let i=u(o);return r.set(o,i),i}function u(o){switch(M(o)){case Y:return t(o.map(n));case k:return t({...o,parts:o.parts.map(n)});case _:return t({...o,breakContents:n(o.breakContents),flatContents:n(o.flatContents)});case B:{let{expandedStates:i,contents:s}=o;return i?(i=i.map(n),s=i[0]):s=n(s),t({...o,contents:s,expandedStates:i})}case O:case N:case v:case S:case L:return t({...o,contents:n(o.contents)});case W:case j:case P:case I:case g:case w:return t(o);default:throw new q(o)}}}function $e(e,t,r){let n=r,u=!1;function o(i){if(u)return!1;let s=t(i);s!==void 0&&(u=!0,n=s)}return le(e,o),n}function ku(e){if(e.type===B&&e.break||e.type===g&&e.hard||e.type===w)return!0}function Dr(e){return $e(e,ku,!1)}function sr(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function cr(e){let t=new Set,r=[];function n(o){if(o.type===w&&sr(r),o.type===B){if(r.push(o),t.has(o))return!1;t.add(o)}}function u(o){o.type===B&&r.pop().break&&sr(r)}le(e,n,u,!0)}function Su(e){return e.type===g&&!e.hard?e.soft?"":" ":e.type===_?e.flatContents:e}function fr(e){return be(e,Su)}function ar(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===g&&y(!1,e,-1).type===w;)e.length-=2;if(e.length>0){let t=we(y(!1,e,-1));e[e.length-1]=t}return e}function we(e){switch(M(e)){case N:case v:case B:case L:case S:{let t=we(e.contents);return{...e,contents:t}}case _:return{...e,breakContents:we(e.breakContents),flatContents:we(e.flatContents)};case k:return{...e,parts:ar(e.parts)};case Y:return ar(e);case W:return or(e);case O:case j:case P:case I:case g:case w:break;default:throw new q(e)}return e}function We(e){return we(Nu(e))}function Tu(e){switch(M(e)){case k:if(e.parts.every(t=>t===""))return"";break;case B:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===B&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case O:case N:case v:case L:if(!e.contents)return"";break;case _:if(!e.flatContents&&!e.breakContents)return"";break;case Y:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case W:case j:case P:case I:case g:case S:case w:break;default:throw new q(e)}return e}function Nu(e){return be(e,t=>Tu(t))}function lr(e,t=Me){return be(e,r=>typeof r=="string"?ke(t,r.split(`
|
||||
`)):r)}function Ou(e){if(e.type===g)return!0}function Fr(e){return $e(e,Ou,!1)}function Fe(e,t){return e.type===S?{...e,contents:t(e.contents)}:t(e)}var gt=()=>{},K=gt,yt=gt,pr=gt;function ie(e){return K(e),{type:N,contents:e}}function oe(e,t){return K(t),{type:O,contents:t,n:e}}function At(e,t={}){return K(e),yt(t.expandedStates,!0),{type:B,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function dr(e){return oe(Number.NEGATIVE_INFINITY,e)}function mr(e){return oe({type:"root"},e)}function Er(e){return oe(-1,e)}function Cr(e,t){return At(e[0],{...t,expandedStates:e})}function hr(e){return pr(e),{type:k,parts:e}}function gr(e,t="",r={}){return K(e),t!==""&&K(t),{type:_,breakContents:e,flatContents:t,groupId:r.groupId}}function yr(e,t){return K(e),{type:v,contents:e,groupId:t.groupId,negate:t.negate}}function Se(e){return K(e),{type:L,contents:e}}var Ar={type:I},pe={type:w},Br={type:P},Te={type:g,hard:!0},Bt={type:g,hard:!0,literal:!0},Ge={type:g},_r={type:g,soft:!0},z=[Te,pe],Me=[Bt,pe],X={type:j};function ke(e,t){K(e),yt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Ke(e,t,r){K(e);let n=e;if(t>0){for(let u=0;u<Math.floor(t/r);++u)n=ie(n);n=oe(t%r,n),n=oe(Number.NEGATIVE_INFINITY,n)}return n}function xr(e,t){return K(t),e?{type:S,label:e,contents:t}:t}function Q(e){var t;if(!e)return"";if(Array.isArray(e)){let r=[];for(let n of e)if(Array.isArray(n))r.push(...Q(n));else{let u=Q(n);u!==""&&r.push(u)}return r}return e.type===_?{...e,breakContents:Q(e.breakContents),flatContents:Q(e.flatContents)}:e.type===B?{...e,contents:Q(e.contents),expandedStates:(t=e.expandedStates)==null?void 0:t.map(Q)}:e.type===k?{type:"fill",parts:e.parts.map(Q)}:e.contents?{...e,contents:Q(e.contents)}:e}function wr(e){let t=Object.create(null),r=new Set;return n(Q(e));function n(o,i,s){var a,c;if(typeof o=="string")return JSON.stringify(o);if(Array.isArray(o)){let D=o.map(n).filter(Boolean);return D.length===1?D[0]:`[${D.join(", ")}]`}if(o.type===g){let D=((a=s==null?void 0:s[i+1])==null?void 0:a.type)===w;return o.literal?D?"literalline":"literallineWithoutBreakParent":o.hard?D?"hardline":"hardlineWithoutBreakParent":o.soft?"softline":"line"}if(o.type===w)return((c=s==null?void 0:s[i-1])==null?void 0:c.type)===g&&s[i-1].hard?void 0:"breakParent";if(o.type===P)return"trim";if(o.type===N)return"indent("+n(o.contents)+")";if(o.type===O)return o.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(o.contents)+")":o.n<0?"dedent("+n(o.contents)+")":o.n.type==="root"?"markAsRoot("+n(o.contents)+")":"align("+JSON.stringify(o.n)+", "+n(o.contents)+")";if(o.type===_)return"ifBreak("+n(o.breakContents)+(o.flatContents?", "+n(o.flatContents):"")+(o.groupId?(o.flatContents?"":', ""')+`, { groupId: ${u(o.groupId)} }`:"")+")";if(o.type===v){let D=[];o.negate&&D.push("negate: true"),o.groupId&&D.push(`groupId: ${u(o.groupId)}`);let p=D.length>0?`, { ${D.join(", ")} }`:"";return`indentIfBreak(${n(o.contents)}${p})`}if(o.type===B){let D=[];o.break&&o.break!=="propagated"&&D.push("shouldBreak: true"),o.id&&D.push(`id: ${u(o.id)}`);let p=D.length>0?`, { ${D.join(", ")} }`:"";return o.expandedStates?`conditionalGroup([${o.expandedStates.map(l=>n(l)).join(",")}]${p})`:`group(${n(o.contents)}${p})`}if(o.type===k)return`fill([${o.parts.map(D=>n(D)).join(", ")}])`;if(o.type===L)return"lineSuffix("+n(o.contents)+")";if(o.type===I)return"lineSuffixBoundary";if(o.type===S)return`label(${JSON.stringify(o.label)}, ${n(o.contents)})`;if(o.type===j)return"cursor";throw new Error("Unknown doc type "+o.type)}function u(o){if(typeof o!="symbol")return JSON.stringify(String(o));if(o in t)return t[o];let i=o.description||"symbol";for(let s=0;;s++){let a=i+(s>0?` #${s}`:"");if(!r.has(a))return r.add(a),t[o]=`Symbol.for(${JSON.stringify(a)})`}}}var br=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF9
Line truncated
|
||||
`?te(!1,f,`
|
||||
`,u):f;s.push(d),i.length>0&&(o+=Ne(d));break}case Y:for(let d=f.length-1;d>=0;d--)i.push({ind:l,mode:F,doc:f[d]});break;case j:if(D>=2)throw new Error("There are too many 'cursor' in doc.");s.push(de),D++;break;case N:i.push({ind:Lu(l,t),mode:F,doc:f.contents});break;case O:i.push({ind:Iu(l,f.n,t),mode:F,doc:f.contents});break;case P:o-=wt(s);break;case B:switch(F){case H:if(!a){i.push({ind:l,mode:f.break?R:H,doc:f.contents});break}case R:{a=!1;let d={ind:l,mode:H,doc:f.contents},m=n-o,C=c.length>0;if(!f.break&&ze(d,i,m,C,r))i.push(d);else if(f.expandedStates){let E=y(!1,f.expandedStates,-1);if(f.break){i.push({ind:l,mode:R,doc:E});break}else for(let h=1;h<f.expandedStates.length+1;h++)if(h>=f.expandedStates.length){i.push({ind:l,mode:R,doc:E});break}else{let x=f.expandedStates[h],A={ind:l,mode:H,doc:x};if(ze(A,i,m,C,r)){i.push(A);break}}}else i.push({ind:l,mode:R,doc:f.contents});break}}f.id&&(r[f.id]=y(!1,i,-1).mode);break;case k:{let d=n-o,m=f[_t]??0,{parts:C}=f,E=C.length-m;if(E===0)break;let h=C[m+0],x=C[m+1],A={ind:l,mode:H,doc:h},$={ind:l,mode:R,doc:h},ue=ze(A,[],d,c.length>0,r,!0);if(E===1){ue?i.push(A):i.push($);break}let Be={ind:l,mode:H,doc:x},Ft={ind:l,mode:R,doc:x};if(E===2){ue?i.push(Be,A):i.push(Ft,$);break}let lu=C[m+2],pt={ind:l,mode:F,doc:{...f,[_t]:m+2}};ze({ind:l,mode:H,doc:[h,x,lu]},[],d,c.length>0,r,!0)?i.push(pt,Be,A):ue?i.push(pt,Ft,A):i.push(pt,Ft,$);break}case _:case v:{let d=f.groupId?r[f.groupId]:F;if(d===R){let m=f.type===_?f.breakContents:f.negate?f.contents:ie(f.contents);m&&i.push({ind:l,mode:F,doc:m})}if(d===H){let m=f.type===_?f.flatContents:f.negate?ie(f.contents):f.contents;m&&i.push({ind:l,mode:F,doc:m})}break}case L:c.push({ind:l,mode:F,doc:f.contents});break;case I:c.length>0&&i.push({ind:l,mode:F,doc:Te});break;case g:switch(F){case H:if(f.hard)a=!0;else{f.soft||(s.push(" "),o+=1);break}case R:if(c.length>0){i.push({ind:l,mode:F,doc:f},...c.reverse()),c.length=0;break}f.literal?l.root?(s.push(u,l.root.value),o=l.root.length):(s.push(u),o=0):(o-=wt(s),s.push(u+l.value),o=l.length);break}break;case S:i.push({ind:l,mode:F,doc:f.contents});break;case w:break;default:throw new q(f)}i.length===0&&c.length>0&&(i.push(...c.reverse()),c.length=0)}let p=s.indexOf(de);if(p!==-1){let l=s.indexOf(de,p+1);if(l===-1)return{formatted:s.filter(m=>m!==de).join("")};let F=s.slice(0,p).join(""),f=s.slice(p+1,l).join(""),d=s.slice(l+1).join("");return{formatted:F+f+d,cursorNodeStart:F.length,cursorNodeText:f}}return{formatted:s.join("")}}function Ru(e,t,r=0){let n=0;for(let u=r;u<e.length;++u)e[u]===" "?n=n+t-n%t:n++;return n}var Ee=Ru;var Z,kt,He,bt=class{constructor(t){tr(this,Z);this.stack=[t]}get key(){let{stack:t,siblings:r}=this;return y(!1,t,r===null?-2:-4)??null}get index(){return this.siblings===null?null:y(!1,this.stack,-2)}get node(){return y(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:t}=this,r=y(!1,t,-3);return Array.isArray(r)?r:null}get next(){let{siblings:t}=this;return t===null?null:t[this.index+1]}get previous(){let{siblings:t}=this;return t===null?null:t[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:t,index:r}=this;return t!==null&&r===t.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...fe(this,Z,He).call(this)]}getName(){let{stack:t}=this,{length:r}=t;return r>1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=fe(this,Z,kt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:u}=n,o=y(!1,n,-1);for(let i of r)o=o[i],n.push(i,o);try{return t(this)}finally{n.length=u}}callParent(t,r=0){let n=fe(this,Z,kt).call(this,r+1),u=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...u)}}each(t,...r){let{stack:n}=this,{length:u}=n,o=y(!1,n,-1);for(let i of r)o=o[i],n.push(i,o);try{for(let i=0;i<o.length;++i)n.push(i,o[i]),t(this,i,o),n.length-=2}finally{n.length=u}}map(t,...r){let n=[];return this.each((u,o,i)=>{n[o]=t(u,o,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,u=this.stack[r--];for(let o of t){if(u===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],u=this.stack[r--]),o&&!o(u,n,i))return!1;n=this.stack[r--],u=this.stack[r--]}return!0}findAncestor(t){for(let r of fe(this,Z,He).call(this))if(t(r))return r}hasAncestor(t){for(let r of fe(this,Z,He).call(this))if(t(r))return!0;return!1}};Z=new WeakSet,kt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},He=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Or=bt;var Pr=new Proxy(()=>{},{get:()=>Pr}),Oe=Pr;function Yu(e){return e!==null&&typeof e=="object"}var vr=Yu;function*Ce(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,u=o=>vr(o)&&n(o);for(let o of r(e)){let
Line truncated
|
||||
`)return t-2;if(u===`
|
||||
`||u==="\r"||u==="\u2028"||u==="\u2029")return t-1}else{if(u==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(u===`
|
||||
`||u==="\r"||u==="\u2028"||u==="\u2029")return t+1}return t}var U=ju;function Uu(e,t,r={}){let n=T(e,r.backwards?t-1:t,r),u=U(e,n,r);return n!==u}var G=Uu;function Vu(e){return Array.isArray(e)&&e.length>0}var Xe=Vu;var Yr=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),$u=e=>Object.keys(e).filter(t=>!Yr.has(t));function Wu(e){return e?t=>e(t,Yr):$u}var J=Wu;function Mu(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function St(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Mu(e)}function se(e,t){t.leading=!0,t.trailing=!1,St(e,t)}function ee(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),St(e,t)}function ae(e,t){t.leading=!1,t.trailing=!0,St(e,t)}var Tt=new WeakMap;function Qe(e,t){if(Tt.has(e))return Tt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:u},locStart:o,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Ce(e,{getVisitorKeys:J(u)})]).flatMap(a=>n(a)?[a]:Qe(a,t));return s.sort((a,c)=>o(a)-o(c)||i(a)-i(c)),Tt.set(e,s),s}function Ur(e,t,r,n){let{locStart:u,locEnd:o}=r,i=u(t),s=o(t),a=Qe(e,r),c,D,p=0,l=a.length;for(;p<l;){let F=p+l>>1,f=a[F],d=u(f),m=o(f);if(d<=i&&s<=m)return Ur(f,t,r,f);if(m<=i){c=f,p=F+1;continue}if(s<=d){D=f,l=F;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:F}=n,f=Ot(F,t,r);c&&Ot(F,c,r)!==f&&(c=null),D&&Ot(F,D,r)!==f&&(D=null)}return{enclosingNode:n,precedingNode:c,followingNode:D}}var Nt=()=>!1;function Vr(e,t){let{comments:r}=e;if(delete e.comments,!Xe(r)||!t.printer.canAttachComment)return;let n=[],{printer:{experimentalFeatures:{avoidAstMutation:u=!1}={},handleComments:o={}},originalText:i}=t,{ownLine:s=Nt,endOfLine:a=Nt,remaining:c=Nt}=o,D=r.map((p,l)=>({...Ur(e,p,t),comment:p,text:i,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of D.entries()){let{comment:F,precedingNode:f,enclosingNode:d,followingNode:m,text:C,options:E,ast:h,isLastComment:x}=l,A;if(u?A=[l]:(F.enclosingNode=d,F.precedingNode=f,F.followingNode=m,A=[F,C,E,h,x]),Gu(C,E,D,p))F.placement="ownLine",s(...A)||(m?se(m,F):f?ae(f,F):d?ee(d,F):ee(h,F));else if(Ku(C,E,D,p))F.placement="endOfLine",a(...A)||(f?ae(f,F):m?se(m,F):d?ee(d,F):ee(h,F));else if(F.placement="remaining",!c(...A))if(f&&m){let $=n.length;$>0&&n[$-1].followingNode!==m&&jr(n,E),n.push(l)}else f?ae(f,F):m?se(m,F):d?ee(d,F):ee(h,F)}if(jr(n,t),!u)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var $r=e=>!/[\S\n\u2028\u2029]/u.test(e);function Gu(e,t,r,n){let{comment:u,precedingNode:o}=r[n],{locStart:i,locEnd:s}=t,a=i(u);if(o)for(let c=n-1;c>=0;c--){let{comment:D,precedingNode:p}=r[c];if(p!==o||!$r(e.slice(s(D),a)))break;a=i(D)}return G(e,a,{backwards:!0})}function Ku(e,t,r,n){let{comment:u,followingNode:o}=r[n],{locStart:i,locEnd:s}=t,a=s(u);if(o)for(let c=n+1;c<r.length;c++){let{comment:D,followingNode:p}=r[c];if(p!==o||!$r(e.slice(a,i(D))))break;a=s(D)}return G(e,a)}function jr(e,t){var s,a;let r=e.length;if(r===0)return;let{precedingNode:n,followingNode:u}=e[0],o=t.locStart(u),i;for(i=r;i>0;--i){let{comment:c,precedingNode:D,followingNode:p}=e[i-1];Oe.strictEqual(D,n),Oe.strictEqual(p,u);let l=t.originalText.slice(t.locEnd(c),o);if(((a=(s=t.printer).isGap)==null?void 0:a.call(s,l,t))??/^[\s(]*$/u.test(l))o=t.locStart(c);else break}for(let[c,{comment:D}]of e.entries())c<i?ae(n,D):se(u,D);for(let c of[n,u])c.comments&&c.comments.length>1&&c.comments.sort((D,p)=>t.locStart(D)-t.locStart(p));e.length=0}function Ot(e,t,r){let n=r.locStart(t)-1;for(let u=1;u<e.length;++u)if(n<r.locStart(e[u]))return u-1;return 0}function zu(e,t){let r=t-1;r=T(e,r,{backwards:!0}),r=U(e,r,{backwards:!0}),r=T(e,r,{backwards:!0});let n=U(e,r,{backwards:!0});return r!==n}var Pe=zu;function Wr(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Hu(e,t){var D;let r=e.node,n=[Wr(e,t)],{printer:u,originalText:o,locStart:i,locEnd:s}=t;if((D=u.isBlockComment)==null?void 0:D.call(u,r)){let p=G(o,s(r))?G(o,i(r),{backwards:!0})?z:Ge:" ";n.push(p)}else n.push(z);let c=U(o,T(o,s(r)));return c!==!1&&G(o,c)&&n.push(z),n}function Ju(e,t,r){var c;let n=e.node,u=Wr(e,t),{printer:o,originalText:i,locStart:s}=t,a=(c=o.isBlockComment)==null?void 0:c.call(o,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||G(i,s(n),{backwards:!0})){let D=Pe(i,s(n));return{doc:Se([z,D?z:"",u]),isBlock:a,hasLineSuffix:!0}}return!a||r!=null&&r.hasLineSuffix?{doc:[Se([" ",u]),pe],isBlock:a,hasLineSuffix:!0}:{doc:[" ",u],isBlock:a,hasLineSuffix:!1}}function qu(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(a=>!n.has(a)).length===0)return{leading:"",trailing:""
Line truncated
|
||||
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
||||
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
||||
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function Ze({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(u=>u.languages??[]),n=[];for(let u of Zu(Object.assign({},...e.map(({options:o})=>o),zr)))!t&&u.deprecated||(Array.isArray(u.choices)&&(t||(u.choices=u.choices.filter(o=>!o.deprecated)),u.name==="parser"&&(u.choices=[...u.choices,...Qu(u.choices,r,e)])),u.pluginDefaults=Object.fromEntries(e.filter(o=>{var i;return((i=o.defaultOptions)==null?void 0:i[u.name])!==void 0}).map(o=>[o.name,o.defaultOptions[u.name]])),n.push(u));return{languages:r,options:n}}function*Qu(e,t,r){let n=new Set(e.map(u=>u.value));for(let u of t)if(u.parsers){for(let o of u.parsers)if(!n.has(o)){n.add(o);let i=r.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,o)),s=u.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:o,description:s}}}}function Zu(e){let t=[];for(let[r,n]of Object.entries(e)){let u={name:r,...n};Array.isArray(u.default)&&(u.default=y(!1,u.default,-1).value),t.push(u)}return t}var eo=(e,t)=>{if(!(e&&t==null))return t.toReversed||!Array.isArray(t)?t.toReversed():[...t].reverse()},Hr=eo;var Jr,qr,Xr,Qr,Zr,to=((Jr=globalThis.Deno)==null?void 0:Jr.build.os)==="windows"||((Xr=(qr=globalThis.navigator)==null?void 0:qr.platform)==null?void 0:Xr.startsWith("Win"))||((Zr=(Qr=globalThis.process)==null?void 0:Qr.platform)==null?void 0:Zr.startsWith("win"))||!1;function en(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ro(e){return e=en(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function no(e){e=en(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function tn(e){return to?no(e):ro(e)}var rn=tn;var uo=e=>String(e).split(/[/\\]/u).pop();function nn(e,t){if(!t)return;let r=uo(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(u=>u.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(u=>r.endsWith(u)))}function oo(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function un(e,t){if(t){if(String(t).startsWith("file:"))try{t=rn(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r==null?void 0:r({filepath:t}))}}function io(e,t){let r=Hr(!1,e.plugins).flatMap(u=>u.languages??[]),n=oo(r,t.language)??nn(r,t.physicalFile)??nn(r,t.file)??un(r,t.physicalFile)??un(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var on=io;var re={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>re.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${re.key(r)}: ${re.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>re.value({[e]:t})};var sn=new Proxy(String,{get:()=>sn}),V=sn;var an=(e,t,{descriptor:r})=>{let n=[`${V.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${V.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var et=Symbol.for("vnopts.VALUE_NOT_EXIST"),ge=Symbol.for("vnopts.VALUE_UNCHANGED");var Dn=" ".repeat(2),fn=(e,t,r)=>{let{text:n,list:u}=r.normalizeExpectedResult(r.schemas[e].expected(r)),o=[];return n&&o.push(cn(e,t,n,r.descriptor)),u&&o.push([cn(e,t,u.title,r.descriptor)].concat(u.values.map(i=>ln(i,r.loggerPrintWidth))).join(`
|
||||
`)),Fn(o,r.loggerPrintWidth)};function cn(e,t,r,n){return[`Invalid ${V.red(n.key(e))} value.`,`Expected ${V.blue(r)},`,`but received ${t===et?V.gray("nothing"):V.red(n.value(t))}.`].join(" ")}function ln({text:e,list:t},r){let n=[];return e&&n.push(`- ${V.blue(e)}`),t&&n.push([`- ${V.blue(t.title)}:`].concat(t.values.map(u=>ln(u,r-Dn.length).replace(/^|\n/g,`$&${Dn}`))).join(`
|
||||
`)),Fn(n,r)}function Fn(e,t){if(e.length===1)return e[0];let[r,n]=e,[u,o]=e.map(i=>i.split(`
|
||||
`,1)[0].length);return u>t&&u>o?n:r}var Pt=[],pn=[];function vt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,u=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-u);)n--,u--;let o=0;for(;o<n&&e.charCodeAt(o)===t.charCodeAt(o);)o++;if(n-=o,u-=o,n===0)return u;let i,s,a,c,D=0,p=0;for(;D<n;)pn[D]=e.charCodeAt(o+D),Pt[D]=++D;for(;p<u;)for(i=t.charCodeAt(o+p),a=p++,s=p,D=0;D<n;D++)c=i===pn[D]?a:a+1,a=Pt[D],s=Pt[D]=a>s?c>s?s+1:c:c>a?a+1:c;return s}var tt=(e,t,{descriptor:r,logger:n,schemas:u})=>{let o=[`Ignored unknown option ${V.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(u).sort().find(s=>vt(e,s)<3);i&&o.push(`Did you mean ${V.blue(r.key(i))}?`),n.warn(o.join(" "))};var so=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function ao(e,t){let r=new e(t),n=Object.create(r);for(let u of so)u in t&&(n[u]=Do(t[u],r,b.prototype[u].length));return n}var b=class{static create(t){return ao(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return ge}};function Do(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var rt=class extends b{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var nt=class extends b{expected(){return"anything"}validate(){return!0}};var ut=class extends b{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let u of t){let o=r.normalizeValidateResult(this._valueSchema.validate(u,r),u);o!==!0&&n.push(o.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let u of t){let o=r.normalizeDeprecatedResult(this._valueSchema.deprecated(u,r),u);o!==!1&&n.push(...o.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let u of t){let o=r.normalizeForwardResult(this._valueSchema.forward(u,r),u);n.push(...o.map(dn))}return n}redirect(t,r){let n=[],u=[];for(let o of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(o,r),o);"remain"in i&&n.push(i.remain),u.push(...i.redirect.map(dn))}return n.length===0?{redirect:u}:{redirect:u,remain:n}}overlap(t,r){return t.concat(r)}};function dn({from:e,to:t}){return{from:[e],to:t}}var ot=class extends b{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function En(e,t){let r=Object.create(null);for(let n of e){let u=n[t];if(r[u])throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r[u]=n}return r}function Cn(e,t){let r=new Map;for(let n of e){let u=n[t];if(r.has(u))throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r.set(u,n)}return r}function hn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function gn(e,t){let r=[],n=[];for(let u of e)t(u)?r.push(u):n.push(u);return[r,n]}function yn(e){return e===Math.floor(e)}function An(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,u=["undefined","object","boolean","number","string"];return r!==n?u.indexOf(r)-u.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Bn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Lt(e){return e===void 0?{}:e}function It(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return co((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(It)}}:{text:t}}function Rt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Yt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function mn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function it(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>mn(r,t)):[mn(e,t)]}function jt(e,t){let r=it(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function co(e,t){if(!e)throw new Error(t)}var st=class extends b{constructor(t){super(t),this._choices=Cn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(An).map(t.value),n=r.slice(0,-2),u=r.slice(-2);return{text:n.concat(u.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.
Line truncated
|
||||
`+n,e.codeFrame=n,e}throw e}var De=yo;async function Ln(e,t,r,n,u){let{embeddedLanguageFormatting:o,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:a}}=r;if(!i||o!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let c=J(i.getVisitorKeys??a),D=[];F();let p=e.stack;for(let{print:f,node:d,pathStack:m}of D)try{e.stack=m;let C=await f(l,t,e,r);C&&u.set(d,C)}catch(C){if(globalThis.PRETTIER_DEBUG)throw C}e.stack=p;function l(f,d){return Bo(f,d,r,n)}function F(){let{node:f}=e;if(f===null||typeof f!="object"||s(e))return;for(let m of c(f))Array.isArray(f[m])?e.each(F,m):e.call(F,m);let d=i(e,r);if(d){if(typeof d=="function"){D.push({print:d,node:f,pathStack:[...e.stack]});return}u.set(f,d)}}}async function Bo(e,t,r,n){let u=await ne({...r,...t,parentParser:r.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:o}=await De(e,u),i=await n(o,u);return We(i)}function _o(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:u,locEnd:o,[Symbol.for("printedComments")]:i}=t,{node:s}=e,a=u(s),c=o(s);for(let D of n)u(D)>=a&&o(D)<=c&&i.add(D);return r.slice(a,c)}var In=_o;async function Ye(e,t){({ast:e}=await Gt(e,t));let r=new Map,n=new Or(e),u=Kr(t),o=new Map;await Ln(n,s,t,Ye,o);let i=await Rn(n,t,s,void 0,o);if(Gr(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[X,i];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[i,X]}return i;function s(c,D){return c===void 0||c===n?a(D):Array.isArray(c)?n.call(()=>a(D),...c):n.call(()=>a(D),c)}function a(c){u(n);let D=n.node;if(D==null)return"";let p=D&&typeof D=="object"&&c===void 0;if(p&&r.has(D))return r.get(D);let l=Rn(n,t,s,c,o);return p&&r.set(D,l),l}}function Rn(e,t,r,n,u){var a;let{node:o}=e,{printer:i}=t,s;switch((a=i.hasPrettierIgnore)!=null&&a.call(i,e)?s=In(e,t):u.has(o)?s=u.get(o):s=i.print(e,t,r,n),o){case t.cursorNode:s=Fe(s,c=>[X,c,X]);break;case t.nodeBeforeCursor:s=Fe(s,c=>[c,X]);break;case t.nodeAfterCursor:s=Fe(s,c=>[X,c]);break}return i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=Mr(e,s,t)),s}async function Gt(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("printedComments")]=new Set,Vr(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function xo(e,t){let{cursorOffset:r,locStart:n,locEnd:u}=t,o=J(t.printer.getVisitorKeys),i=F=>n(F)<=r&&u(F)>=r,s=e,a=[e];for(let F of Lr(e,{getVisitorKeys:o,filter:i}))a.push(F),s=F;if(Ir(s,{getVisitorKeys:o}))return{cursorNode:s};let c,D,p=-1,l=Number.POSITIVE_INFINITY;for(;a.length>0&&(c===void 0||D===void 0);){s=a.pop();let F=c!==void 0,f=D!==void 0;for(let d of Ce(s,{getVisitorKeys:o})){if(!F){let m=u(d);m<=r&&m>p&&(c=d,p=m)}if(!f){let m=n(d);m>=r&&m<l&&(D=d,l=m)}}}return{nodeBeforeCursor:c,nodeAfterCursor:D}}var Kt=xo;function wo(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let u=J(n),o=r.ignoredProperties??new Set;return i(e);function i(s,a){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(l=>i(l,a)).filter(Boolean);let c={},D=new Set(u(s));for(let l in s)!Object.prototype.hasOwnProperty.call(s,l)||o.has(l)||(D.has(l)?c[l]=i(s[l],s):c[l]=s[l]);let p=r(s,c,a);if(p!==null)return p??c}}var Yn=wo;var bo=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return n}return-1}},jn=bo;var ko=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function So(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(u=>$n.has(u.type)&&n.has(u))}function Un(e){let t=jn(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function To(e,t,{locStart:r,locEnd:n}){let u=e.node,o=t.node;if(u===o)return{startNode:u,endNode:o};let i=r(e.node);for(let a of Un(t.parentNodes))if(r(a)>=i)o=a;else break;let s=n(t.node);for(let a of Un(e.parentNodes)){if(n(a)<=s)u=a;else break;if(u===o)break}return{startNode:u,endNode:o}}function zt(e,t,r,n,u=[],o){let{locStart:i,locEnd:s}=r,a=i(e),c=s(e);if(!(t>c||t<a||o==="rangeEnd"&&t===a||o==="rangeStart"&&t===c)){for(let D of Qe(e,r)){let p=zt(D,t,r,n,[e,...u],o);if(p)return p}if(!n||n(e,u[0]))return{node:e,parentNodes:u}}}function No(e,t){return t!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var $n=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Oo=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDef
Line truncated
|
||||
`,u)+1),a=n.slice(s,u).match(/^\s*/u)[0],c=Ee(a,t.tabWidth),D=await Hn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>u&&t.cursorOffset<=o?t.cursorOffset-u:-1,endOfLine:"lf"},c),p=D.formatted.trimEnd(),{cursorOffset:l}=t;l>o?l+=p.length-i.length:D.cursorOffset>=0&&(l=D.cursorOffset+u);let F=n.slice(0,u)+p+n.slice(o);if(t.endOfLine!=="lf"){let f=xe(t.endOfLine);l>=0&&f===`\r
|
||||
`&&(l+=Ct(F.slice(0,l),`
|
||||
`)),F=te(!1,F,`
|
||||
`,f)}return{formatted:F,cursorOffset:l,comments:D.comments}}function Ht(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Gn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u}=t;return r=Ht(e,r,-1),n=Ht(e,n,0),u=Ht(e,u,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:u}}function Jn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o}=Gn(e,t),i=e.charAt(0)===zn;if(i&&(e=e.slice(1),r--,n--,u--),o==="auto"&&(o=nr(e)),e.includes("\r")){let s=a=>Ct(e.slice(0,Math.max(a,0)),`\r
|
||||
`);r-=s(r),n-=s(n),u-=s(u),e=ur(e)}return{hasBOM:i,text:e,options:Gn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o})}}async function Kn(e,t){let r=await Re(t);return!r.hasPragma||r.hasPragma(e)}async function vo(e,t){var n;let r=await Re(t);return(n=r.hasIgnorePragma)==null?void 0:n.call(r,e)}async function Jt(e,t){let{hasBOM:r,text:n,options:u}=Jn(e,await ne(t));if(u.rangeStart>=u.rangeEnd&&n!==""||u.requirePragma&&!await Kn(n,u)||u.checkIgnorePragma&&await vo(n,u))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let o;return u.rangeStart>0||u.rangeEnd<n.length?o=await Po(n,u):(!u.requirePragma&&u.insertPragma&&u.printer.insertPragma&&!await Kn(n,u)&&(n=u.printer.insertPragma(n)),o=await Hn(n,u)),r&&(o.formatted=zn+o.formatted,o.cursorOffset>=0&&o.cursorOffset++),o}async function qn(e,t,r){let{text:n,options:u}=Jn(e,await ne(t)),o=await De(n,u);return r&&(r.preprocessForPrint&&(o.ast=await Gt(o.ast,u)),r.massage&&(o.ast=Yn(o.ast,u))),o}async function Xn(e,t){t=await ne(t);let r=await Ye(e,t);return me(r,t)}async function Qn(e,t){let r=wr(e),{formatted:n}=await Jt(r,{...t,parser:"__js_expression"});return n}async function Zn(e,t){t=await ne(t);let{ast:r}=await De(e,t);return t.cursorOffset>=0&&(t={...t,...Kt(r,t)}),Ye(r,t)}async function eu(e,t){return me(e,await ne(t))}var qt={};dt(qt,{builders:()=>Io,printer:()=>Ro,utils:()=>Yo});var Io={join:ke,line:Ge,softline:_r,hardline:z,literalline:Me,group:At,conditionalGroup:Cr,fill:hr,lineSuffix:Se,lineSuffixBoundary:Ar,cursor:X,breakParent:pe,ifBreak:gr,trim:Br,indent:ie,indentIfBreak:yr,align:oe,addAlignmentToDoc:Ke,markAsRoot:mr,dedentToRoot:dr,dedent:Er,hardlineWithoutBreakParent:Te,literallineWithoutBreakParent:Bt,label:xr,concat:e=>e},Ro={printDocToString:me},Yo={willBreak:Dr,traverseDoc:le,findInDoc:$e,mapDoc:be,removeLines:fr,stripTrailingHardline:We,replaceEndOfLine:lr,canBreak:Fr};var tu="3.6.2";var Qt={};dt(Qt,{addDanglingComment:()=>ee,addLeadingComment:()=>se,addTrailingComment:()=>ae,getAlignmentSize:()=>Ee,getIndentSize:()=>ru,getMaxContinuousCount:()=>nu,getNextNonSpaceNonCommentCharacter:()=>uu,getNextNonSpaceNonCommentCharacterIndex:()=>Xo,getPreferredQuote:()=>iu,getStringWidth:()=>Ne,hasNewline:()=>G,hasNewlineInRange:()=>su,hasSpaces:()=>au,isNextLineEmpty:()=>ti,isNextLineEmptyAfterIndex:()=>ft,isPreviousLineEmpty:()=>Zo,makeString:()=>Du,skip:()=>he,skipEverythingButNewLine:()=>qe,skipInlineComment:()=>ye,skipNewline:()=>U,skipSpaces:()=>T,skipToLineEnd:()=>Je,skipTrailingComment:()=>Ae,skipWhitespace:()=>Rr});function jo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var ye=jo;function Uo(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?qe(e,t):t}var Ae=Uo;function Vo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=T(e,n),n=ye(e,n),n=Ae(e,n),n=U(e,n);return n}var je=Vo;function $o(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Je(e,n),n=ye(e,n),n=T(e,n);return n=Ae(e,n),n=U(e,n),n!==!1&&G(e,n)}var ft=$o;function Wo(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:Ee(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var ru=Wo;function Xt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Mo(e,t){let r=e.match(new RegExp(`(${Xt(t)})+`,"gu"));return r===null?0:r.reduce((n,u)=>Math.max(n,u.length/t.length),0)}var nu=Mo;function Go(e,t){let r=je(e,t);return r===!1?"":e.charAt(r)}var uu=Go;var lt="'",ou='"';function Ko(e,t){let r=t===!0||t===lt?lt:ou,n=r===lt?ou:lt,u=0,o=0;for(let i of e)i===r?u++:i===n&&o++;return u>o?n:r}var iu=Ko;function zo(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var su=zo;function Ho(e,t,r={}){return T(e,r.backwards?t-1:t,r)!==t}var au=Ho;function Jo(e,t,r){let n=t==='"'?"'":'"',o=te(!1,e,/\\(.)|(["'])/gsu,(i,s,a)=>s===n?s:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s)?s:"\\"+s));return t+o+t}var Du=Jo;function qo(e,t,r){return je(e,r(t))}function Xo(e,t){return arguments.length===2||typeof t=="number"?je(e,t):qo(...arguments)}function Qo(e,t,r){return Pe(e,r(t))}function Zo(e,t){return arguments.length===2||typeof t=="number"?Pe(e,t):Qo(...arguments)}function ei(e,t,r){return ft(e,r(t))}function ti(e,t){return arguments.length===2||typeof t=="number"?ft(e,t):ei(...arguments)}function ce(e,t=1){return async(...r)=>{let n=r[t]??{},u=n.plugins??[];return r[t]={...n,plugins:Array.isArray(u)?u:Object.values(u)},e(...r)}}var cu=ce(Jt);async function fu(e,t){let{formatted:r}=await cu(e,{...t,cursorOffset:-1});return r}async function ri(e,t){return await fu(e,t)===e}var ni=ce(Ze,0),ui={parse:ce(qn),formatAST:ce(Xn),formatDoc:ce(Qn),printToDoc:ce(Zn),printDocToString:ce(eu)};return gu(oi);});
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
var Fu=Object.create;var pt=Object.defineProperty;var pu=Object.getOwnPropertyDescriptor;var du=Object.getOwnPropertyNames;var mu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var er=e=>{throw TypeError(e)};var Cu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dt=(e,t)=>{for(var r in t)pt(e,r,{get:t[r],enumerable:!0})},hu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of du(t))!Eu.call(e,u)&&u!==r&&pt(e,u,{get:()=>t[u],enumerable:!(n=pu(t,u))||n.enumerable});return e};var gu=(e,t,r)=>(r=e!=null?Fu(mu(e)):{},hu(t||!e||!e.__esModule?pt(r,"default",{value:e,enumerable:!0}):r,e));var yu=(e,t,r)=>t.has(e)||er("Cannot "+r);var tr=(e,t,r)=>t.has(e)?er("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var fe=(e,t,r)=>(yu(e,t,"access private method"),r);var Pn=Cu(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});function Co(){return new Proxy({},{get:()=>e=>e})}var On=/\r\n|[\n\r\u2028\u2029]/;function ho(e,t,r){let n=Object.assign({column:0,line:-1},e.start),u=Object.assign({},n,e.end),{linesAbove:o=2,linesBelow:i=3}=r||{},s=n.line,a=n.column,c=u.line,D=u.column,p=Math.max(s-(o+1),0),l=Math.min(t.length,c+i);s===-1&&(p=0),c===-1&&(l=t.length);let F=c-s,f={};if(F)for(let d=0;d<=F;d++){let m=d+s;if(!a)f[m]=!0;else if(d===0){let C=t[m-1].length;f[m]=[a,C-a+1]}else if(d===F)f[m]=[0,D];else{let C=t[m-d].length;f[m]=[0,C]}}else a===D?a?f[s]=[a,0]:f[s]=!0:f[s]=[a,D-a];return{start:p,end:l,markerLines:f}}function go(e,t,r={}){let u=Co(!1),o=e.split(On),{start:i,end:s,markerLines:a}=ho(t,o,r),c=t.start&&typeof t.start.column=="number",D=String(s).length,l=e.split(On,s).slice(i,s).map((F,f)=>{let d=i+1+f,C=` ${` ${d}`.slice(-D)} |`,E=a[d],h=!a[d+1];if(E){let x="";if(Array.isArray(E)){let A=F.slice(0,Math.max(E[0]-1,0)).replace(/[^\t]/g," "),$=E[1]||1;x=[`
|
||||
`,u.gutter(C.replace(/\d/g," "))," ",A,u.marker("^").repeat($)].join(""),h&&r.message&&(x+=" "+u.message(r.message))}return[u.marker(">"),u.gutter(C),F.length>0?` ${F}`:"",x].join("")}else return` ${u.gutter(C)}${F.length>0?` ${F}`:""}`}).join(`
|
||||
`);return r.message&&!c&&(l=`${" ".repeat(D+1)}${r.message}
|
||||
${l}`),l}Mt.codeFrameColumns=go});var Zt={};dt(Zt,{__debug:()=>ui,check:()=>ri,doc:()=>qt,format:()=>fu,formatWithCursor:()=>cu,getSupportInfo:()=>ni,util:()=>Qt,version:()=>tu});var Au=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},te=Au;var _e=class{diff(t,r,n={}){let u;typeof n=="function"?(u=n,n={}):"callback"in n&&(u=n.callback);let o=this.castInput(t,n),i=this.castInput(r,n),s=this.removeEmpty(this.tokenize(o,n)),a=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(s,a,n,u)}diffWithOptionsObj(t,r,n,u){var o;let i=E=>{if(E=this.postProcess(E,n),u){setTimeout(function(){u(E)},0);return}else return E},s=r.length,a=t.length,c=1,D=s+a;n.maxEditLength!=null&&(D=Math.min(D,n.maxEditLength));let p=(o=n.timeout)!==null&&o!==void 0?o:1/0,l=Date.now()+p,F=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(F[0],r,t,0,n);if(F[0].oldPos+1>=a&&f+1>=s)return i(this.buildValues(F[0].lastComponent,r,t));let d=-1/0,m=1/0,C=()=>{for(let E=Math.max(d,-c);E<=Math.min(m,c);E+=2){let h,x=F[E-1],A=F[E+1];x&&(F[E-1]=void 0);let $=!1;if(A){let Be=A.oldPos-E;$=A&&0<=Be&&Be<s}let ue=x&&x.oldPos+1<a;if(!$&&!ue){F[E]=void 0;continue}if(!ue||$&&x.oldPos<A.oldPos?h=this.addToPath(A,!0,!1,0,n):h=this.addToPath(x,!1,!0,1,n),f=this.extractCommon(h,r,t,E,n),h.oldPos+1>=a&&f+1>=s)return i(this.buildValues(h.lastComponent,r,t))||!0;F[E]=h,h.oldPos+1>=a&&(m=Math.min(m,E-1)),f+1>=s&&(d=Math.max(d,E+1))}c++};if(u)(function E(){setTimeout(function(){if(c>D||Date.now()>l)return u(void 0);C()||E()},0)})();else for(;c<=D&&Date.now()<=l;){let E=C();if(E)return E}}addToPath(t,r,n,u,o){let i=t.lastComponent;return i&&!o.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:t.oldPos+u,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+u,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(t,r,n,u,o){let i=r.length,s=n.length,a=t.oldPos,c=a-u,D=0;for(;c+1<i&&a+1<s&&this.equals(n[a+1],r[c+1],o);)c++,a++,D++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return D&&!o.oneChangePerToken&&(t.lastComponent={count:D,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=a,c}equals(t,r,n){return n.comparator?n.comparator(t,r):t===r||!!n.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,n){let u=[],o;for(;t;)u.push(t),o=t.previousComponent,delete t.previousComponent,t=o;u.reverse();let i=u.length,s=0,a=0,c=0;for(;s<i;s++){let D=u[s];if(D.removed)D.value=this.join(n.slice(c,c+D.count)),c+=D.count;else{if(!D.added&&this.useLongestToken){let p=r.slice(a,a+D.count);p=p.map(function(l,F){let f=n[c+F];return f.length>l.length?f:l}),D.value=this.join(p)}else D.value=this.join(r.slice(a,a+D.count));a+=D.count,D.added||(c+=D.count)}}return u}};var mt=class extends _e{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},rr=new mt;function Et(e,t,r){return rr.diff(e,t,r)}function nr(e){let t=e.indexOf("\r");return t!==-1?e.charAt(t+1)===`
|
||||
`?"crlf":"cr":"lf"}function xe(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
||||
`;default:return`
|
||||
`}}function Ct(e,t){let r;switch(t){case`
|
||||
`:r=/\n/gu;break;case"\r":r=/\r/gu;break;case`\r
|
||||
`:r=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function ur(e){return te(!1,e,/\r\n?/gu,`
|
||||
`)}var W="string",Y="array",j="cursor",N="indent",O="align",P="trim",B="group",k="fill",_="if-break",v="indent-if-break",L="line-suffix",I="line-suffix-boundary",g="line",S="label",w="break-parent",Ue=new Set([j,N,O,P,B,k,_,v,L,I,g,S,w]);var Bu=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=Bu;function or(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===`
|
||||
`);)t--;return t<e.length?e.slice(0,t):e}function _u(e){if(typeof e=="string")return W;if(Array.isArray(e))return Y;if(!e)return;let{type:t}=e;if(Ue.has(t))return t}var M=_u;var xu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function wu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(M(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=xu([...Ue].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var ht=class extends Error{name="InvalidDocError";constructor(t){super(wu(t)),this.doc=t}},q=ht;var ir={};function bu(e,t,r,n){let u=[e];for(;u.length>0;){let o=u.pop();if(o===ir){r(u.pop());continue}r&&u.push(o,ir);let i=M(o);if(!i)throw new q(o);if((t==null?void 0:t(o))!==!1)switch(i){case Y:case k:{let s=i===Y?o:o.parts;for(let a=s.length,c=a-1;c>=0;--c)u.push(s[c]);break}case _:u.push(o.flatContents,o.breakContents);break;case B:if(n&&o.expandedStates)for(let s=o.expandedStates.length,a=s-1;a>=0;--a)u.push(o.expandedStates[a]);else u.push(o.contents);break;case O:case N:case v:case S:case L:u.push(o.contents);break;case W:case j:case P:case I:case g:case w:break;default:throw new q(o)}}}var le=bu;function be(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(o){if(r.has(o))return r.get(o);let i=u(o);return r.set(o,i),i}function u(o){switch(M(o)){case Y:return t(o.map(n));case k:return t({...o,parts:o.parts.map(n)});case _:return t({...o,breakContents:n(o.breakContents),flatContents:n(o.flatContents)});case B:{let{expandedStates:i,contents:s}=o;return i?(i=i.map(n),s=i[0]):s=n(s),t({...o,contents:s,expandedStates:i})}case O:case N:case v:case S:case L:return t({...o,contents:n(o.contents)});case W:case j:case P:case I:case g:case w:return t(o);default:throw new q(o)}}}function Ve(e,t,r){let n=r,u=!1;function o(i){if(u)return!1;let s=t(i);s!==void 0&&(u=!0,n=s)}return le(e,o),n}function ku(e){if(e.type===B&&e.break||e.type===g&&e.hard||e.type===w)return!0}function Dr(e){return Ve(e,ku,!1)}function sr(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function cr(e){let t=new Set,r=[];function n(o){if(o.type===w&&sr(r),o.type===B){if(r.push(o),t.has(o))return!1;t.add(o)}}function u(o){o.type===B&&r.pop().break&&sr(r)}le(e,n,u,!0)}function Su(e){return e.type===g&&!e.hard?e.soft?"":" ":e.type===_?e.flatContents:e}function fr(e){return be(e,Su)}function ar(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===g&&y(!1,e,-1).type===w;)e.length-=2;if(e.length>0){let t=we(y(!1,e,-1));e[e.length-1]=t}return e}function we(e){switch(M(e)){case N:case v:case B:case L:case S:{let t=we(e.contents);return{...e,contents:t}}case _:return{...e,breakContents:we(e.breakContents),flatContents:we(e.flatContents)};case k:return{...e,parts:ar(e.parts)};case Y:return ar(e);case W:return or(e);case O:case j:case P:case I:case g:case w:break;default:throw new q(e)}return e}function $e(e){return we(Nu(e))}function Tu(e){switch(M(e)){case k:if(e.parts.every(t=>t===""))return"";break;case B:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===B&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case O:case N:case v:case L:if(!e.contents)return"";break;case _:if(!e.flatContents&&!e.breakContents)return"";break;case Y:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case W:case j:case P:case I:case g:case S:case w:break;default:throw new q(e)}return e}function Nu(e){return be(e,t=>Tu(t))}function lr(e,t=We){return be(e,r=>typeof r=="string"?ke(t,r.split(`
|
||||
`)):r)}function Ou(e){if(e.type===g)return!0}function Fr(e){return Ve(e,Ou,!1)}function Fe(e,t){return e.type===S?{...e,contents:t(e.contents)}:t(e)}var gt=()=>{},K=gt,yt=gt,pr=gt;function ie(e){return K(e),{type:N,contents:e}}function oe(e,t){return K(t),{type:O,contents:t,n:e}}function At(e,t={}){return K(e),yt(t.expandedStates,!0),{type:B,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function dr(e){return oe(Number.NEGATIVE_INFINITY,e)}function mr(e){return oe({type:"root"},e)}function Er(e){return oe(-1,e)}function Cr(e,t){return At(e[0],{...t,expandedStates:e})}function hr(e){return pr(e),{type:k,parts:e}}function gr(e,t="",r={}){return K(e),t!==""&&K(t),{type:_,breakContents:e,flatContents:t,groupId:r.groupId}}function yr(e,t){return K(e),{type:v,contents:e,groupId:t.groupId,negate:t.negate}}function Se(e){return K(e),{type:L,contents:e}}var Ar={type:I},pe={type:w},Br={type:P},Te={type:g,hard:!0},Bt={type:g,hard:!0,literal:!0},Me={type:g},_r={type:g,soft:!0},z=[Te,pe],We=[Bt,pe],X={type:j};function ke(e,t){K(e),yt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Ge(e,t,r){K(e);let n=e;if(t>0){for(let u=0;u<Math.floor(t/r);++u)n=ie(n);n=oe(t%r,n),n=oe(Number.NEGATIVE_INFINITY,n)}return n}function xr(e,t){return K(t),e?{type:S,label:e,contents:t}:t}function Q(e){var t;if(!e)return"";if(Array.isArray(e)){let r=[];for(let n of e)if(Array.isArray(n))r.push(...Q(n));else{let u=Q(n);u!==""&&r.push(u)}return r}return e.type===_?{...e,breakContents:Q(e.breakContents),flatContents:Q(e.flatContents)}:e.type===B?{...e,contents:Q(e.contents),expandedStates:(t=e.expandedStates)==null?void 0:t.map(Q)}:e.type===k?{type:"fill",parts:e.parts.map(Q)}:e.contents?{...e,contents:Q(e.contents)}:e}function wr(e){let t=Object.create(null),r=new Set;return n(Q(e));function n(o,i,s){var a,c;if(typeof o=="string")return JSON.stringify(o);if(Array.isArray(o)){let D=o.map(n).filter(Boolean);return D.length===1?D[0]:`[${D.join(", ")}]`}if(o.type===g){let D=((a=s==null?void 0:s[i+1])==null?void 0:a.type)===w;return o.literal?D?"literalline":"literallineWithoutBreakParent":o.hard?D?"hardline":"hardlineWithoutBreakParent":o.soft?"softline":"line"}if(o.type===w)return((c=s==null?void 0:s[i-1])==null?void 0:c.type)===g&&s[i-1].hard?void 0:"breakParent";if(o.type===P)return"trim";if(o.type===N)return"indent("+n(o.contents)+")";if(o.type===O)return o.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(o.contents)+")":o.n<0?"dedent("+n(o.contents)+")":o.n.type==="root"?"markAsRoot("+n(o.contents)+")":"align("+JSON.stringify(o.n)+", "+n(o.contents)+")";if(o.type===_)return"ifBreak("+n(o.breakContents)+(o.flatContents?", "+n(o.flatContents):"")+(o.groupId?(o.flatContents?"":', ""')+`, { groupId: ${u(o.groupId)} }`:"")+")";if(o.type===v){let D=[];o.negate&&D.push("negate: true"),o.groupId&&D.push(`groupId: ${u(o.groupId)}`);let p=D.length>0?`, { ${D.join(", ")} }`:"";return`indentIfBreak(${n(o.contents)}${p})`}if(o.type===B){let D=[];o.break&&o.break!=="propagated"&&D.push("shouldBreak: true"),o.id&&D.push(`id: ${u(o.id)}`);let p=D.length>0?`, { ${D.join(", ")} }`:"";return o.expandedStates?`conditionalGroup([${o.expandedStates.map(l=>n(l)).join(",")}]${p})`:`group(${n(o.contents)}${p})`}if(o.type===k)return`fill([${o.parts.map(D=>n(D)).join(", ")}])`;if(o.type===L)return"lineSuffix("+n(o.contents)+")";if(o.type===I)return"lineSuffixBoundary";if(o.type===S)return`label(${JSON.stringify(o.label)}, ${n(o.contents)})`;if(o.type===j)return"cursor";throw new Error("Unknown doc type "+o.type)}function u(o){if(typeof o!="symbol")return JSON.stringify(String(o));if(o in t)return t[o];let i=o.description||"symbol";for(let s=0;;s++){let a=i+(s>0?` #${s}`:"");if(!r.has(a))return r.add(a),t[o]=`Symbol.for(${JSON.stringify(a)})`}}}var br=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF9
Line truncated
|
||||
`?te(!1,f,`
|
||||
`,u):f;s.push(d),i.length>0&&(o+=Ne(d));break}case Y:for(let d=f.length-1;d>=0;d--)i.push({ind:l,mode:F,doc:f[d]});break;case j:if(D>=2)throw new Error("There are too many 'cursor' in doc.");s.push(de),D++;break;case N:i.push({ind:Lu(l,t),mode:F,doc:f.contents});break;case O:i.push({ind:Iu(l,f.n,t),mode:F,doc:f.contents});break;case P:o-=wt(s);break;case B:switch(F){case H:if(!a){i.push({ind:l,mode:f.break?R:H,doc:f.contents});break}case R:{a=!1;let d={ind:l,mode:H,doc:f.contents},m=n-o,C=c.length>0;if(!f.break&&Ke(d,i,m,C,r))i.push(d);else if(f.expandedStates){let E=y(!1,f.expandedStates,-1);if(f.break){i.push({ind:l,mode:R,doc:E});break}else for(let h=1;h<f.expandedStates.length+1;h++)if(h>=f.expandedStates.length){i.push({ind:l,mode:R,doc:E});break}else{let x=f.expandedStates[h],A={ind:l,mode:H,doc:x};if(Ke(A,i,m,C,r)){i.push(A);break}}}else i.push({ind:l,mode:R,doc:f.contents});break}}f.id&&(r[f.id]=y(!1,i,-1).mode);break;case k:{let d=n-o,m=f[_t]??0,{parts:C}=f,E=C.length-m;if(E===0)break;let h=C[m+0],x=C[m+1],A={ind:l,mode:H,doc:h},$={ind:l,mode:R,doc:h},ue=Ke(A,[],d,c.length>0,r,!0);if(E===1){ue?i.push(A):i.push($);break}let Be={ind:l,mode:H,doc:x},lt={ind:l,mode:R,doc:x};if(E===2){ue?i.push(Be,A):i.push(lt,$);break}let lu=C[m+2],Ft={ind:l,mode:F,doc:{...f,[_t]:m+2}};Ke({ind:l,mode:H,doc:[h,x,lu]},[],d,c.length>0,r,!0)?i.push(Ft,Be,A):ue?i.push(Ft,lt,A):i.push(Ft,lt,$);break}case _:case v:{let d=f.groupId?r[f.groupId]:F;if(d===R){let m=f.type===_?f.breakContents:f.negate?f.contents:ie(f.contents);m&&i.push({ind:l,mode:F,doc:m})}if(d===H){let m=f.type===_?f.flatContents:f.negate?ie(f.contents):f.contents;m&&i.push({ind:l,mode:F,doc:m})}break}case L:c.push({ind:l,mode:F,doc:f.contents});break;case I:c.length>0&&i.push({ind:l,mode:F,doc:Te});break;case g:switch(F){case H:if(f.hard)a=!0;else{f.soft||(s.push(" "),o+=1);break}case R:if(c.length>0){i.push({ind:l,mode:F,doc:f},...c.reverse()),c.length=0;break}f.literal?l.root?(s.push(u,l.root.value),o=l.root.length):(s.push(u),o=0):(o-=wt(s),s.push(u+l.value),o=l.length);break}break;case S:i.push({ind:l,mode:F,doc:f.contents});break;case w:break;default:throw new q(f)}i.length===0&&c.length>0&&(i.push(...c.reverse()),c.length=0)}let p=s.indexOf(de);if(p!==-1){let l=s.indexOf(de,p+1);if(l===-1)return{formatted:s.filter(m=>m!==de).join("")};let F=s.slice(0,p).join(""),f=s.slice(p+1,l).join(""),d=s.slice(l+1).join("");return{formatted:F+f+d,cursorNodeStart:F.length,cursorNodeText:f}}return{formatted:s.join("")}}function Ru(e,t,r=0){let n=0;for(let u=r;u<e.length;++u)e[u]===" "?n=n+t-n%t:n++;return n}var Ee=Ru;var Z,kt,ze,bt=class{constructor(t){tr(this,Z);this.stack=[t]}get key(){let{stack:t,siblings:r}=this;return y(!1,t,r===null?-2:-4)??null}get index(){return this.siblings===null?null:y(!1,this.stack,-2)}get node(){return y(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:t}=this,r=y(!1,t,-3);return Array.isArray(r)?r:null}get next(){let{siblings:t}=this;return t===null?null:t[this.index+1]}get previous(){let{siblings:t}=this;return t===null?null:t[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:t,index:r}=this;return t!==null&&r===t.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...fe(this,Z,ze).call(this)]}getName(){let{stack:t}=this,{length:r}=t;return r>1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=fe(this,Z,kt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:u}=n,o=y(!1,n,-1);for(let i of r)o=o[i],n.push(i,o);try{return t(this)}finally{n.length=u}}callParent(t,r=0){let n=fe(this,Z,kt).call(this,r+1),u=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...u)}}each(t,...r){let{stack:n}=this,{length:u}=n,o=y(!1,n,-1);for(let i of r)o=o[i],n.push(i,o);try{for(let i=0;i<o.length;++i)n.push(i,o[i]),t(this,i,o),n.length-=2}finally{n.length=u}}map(t,...r){let n=[];return this.each((u,o,i)=>{n[o]=t(u,o,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,u=this.stack[r--];for(let o of t){if(u===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],u=this.stack[r--]),o&&!o(u,n,i))return!1;n=this.stack[r--],u=this.stack[r--]}return!0}findAncestor(t){for(let r of fe(this,Z,ze).call(this))if(t(r))return r}hasAncestor(t){for(let r of fe(this,Z,ze).call(this))if(t(r))return!0;return!1}};Z=new WeakSet,kt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},ze=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Or=bt;var Pr=new Proxy(()=>{},{get:()=>Pr}),Oe=Pr;function Yu(e){return e!==null&&typeof e=="object"}var vr=Yu;function*Ce(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,u=o=>vr(o)&&n(o);for(let o of r(e)){let
Line truncated
|
||||
`)return t-2;if(u===`
|
||||
`||u==="\r"||u==="\u2028"||u==="\u2029")return t-1}else{if(u==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(u===`
|
||||
`||u==="\r"||u==="\u2028"||u==="\u2029")return t+1}return t}var U=ju;function Uu(e,t,r={}){let n=T(e,r.backwards?t-1:t,r),u=U(e,n,r);return n!==u}var G=Uu;function Vu(e){return Array.isArray(e)&&e.length>0}var qe=Vu;var Yr=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),$u=e=>Object.keys(e).filter(t=>!Yr.has(t));function Wu(e){return e?t=>e(t,Yr):$u}var J=Wu;function Mu(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function St(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Mu(e)}function se(e,t){t.leading=!0,t.trailing=!1,St(e,t)}function ee(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),St(e,t)}function ae(e,t){t.leading=!1,t.trailing=!0,St(e,t)}var Tt=new WeakMap;function Xe(e,t){if(Tt.has(e))return Tt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:u},locStart:o,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Ce(e,{getVisitorKeys:J(u)})]).flatMap(a=>n(a)?[a]:Xe(a,t));return s.sort((a,c)=>o(a)-o(c)||i(a)-i(c)),Tt.set(e,s),s}function Ur(e,t,r,n){let{locStart:u,locEnd:o}=r,i=u(t),s=o(t),a=Xe(e,r),c,D,p=0,l=a.length;for(;p<l;){let F=p+l>>1,f=a[F],d=u(f),m=o(f);if(d<=i&&s<=m)return Ur(f,t,r,f);if(m<=i){c=f,p=F+1;continue}if(s<=d){D=f,l=F;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:F}=n,f=Ot(F,t,r);c&&Ot(F,c,r)!==f&&(c=null),D&&Ot(F,D,r)!==f&&(D=null)}return{enclosingNode:n,precedingNode:c,followingNode:D}}var Nt=()=>!1;function Vr(e,t){let{comments:r}=e;if(delete e.comments,!qe(r)||!t.printer.canAttachComment)return;let n=[],{printer:{experimentalFeatures:{avoidAstMutation:u=!1}={},handleComments:o={}},originalText:i}=t,{ownLine:s=Nt,endOfLine:a=Nt,remaining:c=Nt}=o,D=r.map((p,l)=>({...Ur(e,p,t),comment:p,text:i,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of D.entries()){let{comment:F,precedingNode:f,enclosingNode:d,followingNode:m,text:C,options:E,ast:h,isLastComment:x}=l,A;if(u?A=[l]:(F.enclosingNode=d,F.precedingNode=f,F.followingNode=m,A=[F,C,E,h,x]),Gu(C,E,D,p))F.placement="ownLine",s(...A)||(m?se(m,F):f?ae(f,F):d?ee(d,F):ee(h,F));else if(Ku(C,E,D,p))F.placement="endOfLine",a(...A)||(f?ae(f,F):m?se(m,F):d?ee(d,F):ee(h,F));else if(F.placement="remaining",!c(...A))if(f&&m){let $=n.length;$>0&&n[$-1].followingNode!==m&&jr(n,E),n.push(l)}else f?ae(f,F):m?se(m,F):d?ee(d,F):ee(h,F)}if(jr(n,t),!u)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var $r=e=>!/[\S\n\u2028\u2029]/u.test(e);function Gu(e,t,r,n){let{comment:u,precedingNode:o}=r[n],{locStart:i,locEnd:s}=t,a=i(u);if(o)for(let c=n-1;c>=0;c--){let{comment:D,precedingNode:p}=r[c];if(p!==o||!$r(e.slice(s(D),a)))break;a=i(D)}return G(e,a,{backwards:!0})}function Ku(e,t,r,n){let{comment:u,followingNode:o}=r[n],{locStart:i,locEnd:s}=t,a=s(u);if(o)for(let c=n+1;c<r.length;c++){let{comment:D,followingNode:p}=r[c];if(p!==o||!$r(e.slice(a,i(D))))break;a=s(D)}return G(e,a)}function jr(e,t){var s,a;let r=e.length;if(r===0)return;let{precedingNode:n,followingNode:u}=e[0],o=t.locStart(u),i;for(i=r;i>0;--i){let{comment:c,precedingNode:D,followingNode:p}=e[i-1];Oe.strictEqual(D,n),Oe.strictEqual(p,u);let l=t.originalText.slice(t.locEnd(c),o);if(((a=(s=t.printer).isGap)==null?void 0:a.call(s,l,t))??/^[\s(]*$/u.test(l))o=t.locStart(c);else break}for(let[c,{comment:D}]of e.entries())c<i?ae(n,D):se(u,D);for(let c of[n,u])c.comments&&c.comments.length>1&&c.comments.sort((D,p)=>t.locStart(D)-t.locStart(p));e.length=0}function Ot(e,t,r){let n=r.locStart(t)-1;for(let u=1;u<e.length;++u)if(n<r.locStart(e[u]))return u-1;return 0}function zu(e,t){let r=t-1;r=T(e,r,{backwards:!0}),r=U(e,r,{backwards:!0}),r=T(e,r,{backwards:!0});let n=U(e,r,{backwards:!0});return r!==n}var Pe=zu;function Wr(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Hu(e,t){var D;let r=e.node,n=[Wr(e,t)],{printer:u,originalText:o,locStart:i,locEnd:s}=t;if((D=u.isBlockComment)==null?void 0:D.call(u,r)){let p=G(o,s(r))?G(o,i(r),{backwards:!0})?z:Me:" ";n.push(p)}else n.push(z);let c=U(o,T(o,s(r)));return c!==!1&&G(o,c)&&n.push(z),n}function Ju(e,t,r){var c;let n=e.node,u=Wr(e,t),{printer:o,originalText:i,locStart:s}=t,a=(c=o.isBlockComment)==null?void 0:c.call(o,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||G(i,s(n),{backwards:!0})){let D=Pe(i,s(n));return{doc:Se([z,D?z:"",u]),isBlock:a,hasLineSuffix:!0}}return!a||r!=null&&r.hasLineSuffix?{doc:[Se([" ",u]),pe],isBlock:a,hasLineSuffix:!0}:{doc:[" ",u],isBlock:a,hasLineSuffix:!1}}function qu(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(a=>!n.has(a)).length===0)return{leading:"",trailing:""
Line truncated
|
||||
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
||||
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
||||
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function Qe({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(u=>u.languages??[]),n=[];for(let u of Zu(Object.assign({},...e.map(({options:o})=>o),zr)))!t&&u.deprecated||(Array.isArray(u.choices)&&(t||(u.choices=u.choices.filter(o=>!o.deprecated)),u.name==="parser"&&(u.choices=[...u.choices,...Qu(u.choices,r,e)])),u.pluginDefaults=Object.fromEntries(e.filter(o=>{var i;return((i=o.defaultOptions)==null?void 0:i[u.name])!==void 0}).map(o=>[o.name,o.defaultOptions[u.name]])),n.push(u));return{languages:r,options:n}}function*Qu(e,t,r){let n=new Set(e.map(u=>u.value));for(let u of t)if(u.parsers){for(let o of u.parsers)if(!n.has(o)){n.add(o);let i=r.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,o)),s=u.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:o,description:s}}}}function Zu(e){let t=[];for(let[r,n]of Object.entries(e)){let u={name:r,...n};Array.isArray(u.default)&&(u.default=y(!1,u.default,-1).value),t.push(u)}return t}var eo=(e,t)=>{if(!(e&&t==null))return t.toReversed||!Array.isArray(t)?t.toReversed():[...t].reverse()},Hr=eo;var Jr,qr,Xr,Qr,Zr,to=((Jr=globalThis.Deno)==null?void 0:Jr.build.os)==="windows"||((Xr=(qr=globalThis.navigator)==null?void 0:qr.platform)==null?void 0:Xr.startsWith("Win"))||((Zr=(Qr=globalThis.process)==null?void 0:Qr.platform)==null?void 0:Zr.startsWith("win"))||!1;function en(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ro(e){return e=en(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function no(e){e=en(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function tn(e){return to?no(e):ro(e)}var rn=tn;var uo=e=>String(e).split(/[/\\]/u).pop();function nn(e,t){if(!t)return;let r=uo(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(u=>u.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(u=>r.endsWith(u)))}function oo(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function un(e,t){if(t){if(String(t).startsWith("file:"))try{t=rn(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r==null?void 0:r({filepath:t}))}}function io(e,t){let r=Hr(!1,e.plugins).flatMap(u=>u.languages??[]),n=oo(r,t.language)??nn(r,t.physicalFile)??nn(r,t.file)??un(r,t.physicalFile)??un(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var on=io;var re={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>re.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${re.key(r)}: ${re.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>re.value({[e]:t})};var sn=new Proxy(String,{get:()=>sn}),V=sn;var an=(e,t,{descriptor:r})=>{let n=[`${V.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${V.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var Ze=Symbol.for("vnopts.VALUE_NOT_EXIST"),ge=Symbol.for("vnopts.VALUE_UNCHANGED");var Dn=" ".repeat(2),fn=(e,t,r)=>{let{text:n,list:u}=r.normalizeExpectedResult(r.schemas[e].expected(r)),o=[];return n&&o.push(cn(e,t,n,r.descriptor)),u&&o.push([cn(e,t,u.title,r.descriptor)].concat(u.values.map(i=>ln(i,r.loggerPrintWidth))).join(`
|
||||
`)),Fn(o,r.loggerPrintWidth)};function cn(e,t,r,n){return[`Invalid ${V.red(n.key(e))} value.`,`Expected ${V.blue(r)},`,`but received ${t===Ze?V.gray("nothing"):V.red(n.value(t))}.`].join(" ")}function ln({text:e,list:t},r){let n=[];return e&&n.push(`- ${V.blue(e)}`),t&&n.push([`- ${V.blue(t.title)}:`].concat(t.values.map(u=>ln(u,r-Dn.length).replace(/^|\n/g,`$&${Dn}`))).join(`
|
||||
`)),Fn(n,r)}function Fn(e,t){if(e.length===1)return e[0];let[r,n]=e,[u,o]=e.map(i=>i.split(`
|
||||
`,1)[0].length);return u>t&&u>o?n:r}var Pt=[],pn=[];function vt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,u=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-u);)n--,u--;let o=0;for(;o<n&&e.charCodeAt(o)===t.charCodeAt(o);)o++;if(n-=o,u-=o,n===0)return u;let i,s,a,c,D=0,p=0;for(;D<n;)pn[D]=e.charCodeAt(o+D),Pt[D]=++D;for(;p<u;)for(i=t.charCodeAt(o+p),a=p++,s=p,D=0;D<n;D++)c=i===pn[D]?a:a+1,a=Pt[D],s=Pt[D]=a>s?c>s?s+1:c:c>a?a+1:c;return s}var et=(e,t,{descriptor:r,logger:n,schemas:u})=>{let o=[`Ignored unknown option ${V.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(u).sort().find(s=>vt(e,s)<3);i&&o.push(`Did you mean ${V.blue(r.key(i))}?`),n.warn(o.join(" "))};var so=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function ao(e,t){let r=new e(t),n=Object.create(r);for(let u of so)u in t&&(n[u]=Do(t[u],r,b.prototype[u].length));return n}var b=class{static create(t){return ao(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return ge}};function Do(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var tt=class extends b{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var rt=class extends b{expected(){return"anything"}validate(){return!0}};var nt=class extends b{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let u of t){let o=r.normalizeValidateResult(this._valueSchema.validate(u,r),u);o!==!0&&n.push(o.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let u of t){let o=r.normalizeDeprecatedResult(this._valueSchema.deprecated(u,r),u);o!==!1&&n.push(...o.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let u of t){let o=r.normalizeForwardResult(this._valueSchema.forward(u,r),u);n.push(...o.map(dn))}return n}redirect(t,r){let n=[],u=[];for(let o of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(o,r),o);"remain"in i&&n.push(i.remain),u.push(...i.redirect.map(dn))}return n.length===0?{redirect:u}:{redirect:u,remain:n}}overlap(t,r){return t.concat(r)}};function dn({from:e,to:t}){return{from:[e],to:t}}var ut=class extends b{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function En(e,t){let r=Object.create(null);for(let n of e){let u=n[t];if(r[u])throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r[u]=n}return r}function Cn(e,t){let r=new Map;for(let n of e){let u=n[t];if(r.has(u))throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);r.set(u,n)}return r}function hn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function gn(e,t){let r=[],n=[];for(let u of e)t(u)?r.push(u):n.push(u);return[r,n]}function yn(e){return e===Math.floor(e)}function An(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,u=["undefined","object","boolean","number","string"];return r!==n?u.indexOf(r)-u.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Bn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Lt(e){return e===void 0?{}:e}function It(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return co((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(It)}}:{text:t}}function Rt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Yt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function mn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function ot(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>mn(r,t)):[mn(e,t)]}function jt(e,t){let r=ot(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function co(e,t){if(!e)throw new Error(t)}var it=class extends b{constructor(t){super(t),this._choices=Cn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(An).map(t.value),n=r.slice(0,-2),u=r.slice(-2);return{text:n.concat(u.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.
Line truncated
|
||||
`+n,e.codeFrame=n,e}throw e}var De=yo;async function Ln(e,t,r,n,u){let{embeddedLanguageFormatting:o,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:a}}=r;if(!i||o!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let c=J(i.getVisitorKeys??a),D=[];F();let p=e.stack;for(let{print:f,node:d,pathStack:m}of D)try{e.stack=m;let C=await f(l,t,e,r);C&&u.set(d,C)}catch(C){if(globalThis.PRETTIER_DEBUG)throw C}e.stack=p;function l(f,d){return Bo(f,d,r,n)}function F(){let{node:f}=e;if(f===null||typeof f!="object"||s(e))return;for(let m of c(f))Array.isArray(f[m])?e.each(F,m):e.call(F,m);let d=i(e,r);if(d){if(typeof d=="function"){D.push({print:d,node:f,pathStack:[...e.stack]});return}u.set(f,d)}}}async function Bo(e,t,r,n){let u=await ne({...r,...t,parentParser:r.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:o}=await De(e,u),i=await n(o,u);return $e(i)}function _o(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:u,locEnd:o,[Symbol.for("printedComments")]:i}=t,{node:s}=e,a=u(s),c=o(s);for(let D of n)u(D)>=a&&o(D)<=c&&i.add(D);return r.slice(a,c)}var In=_o;async function Ye(e,t){({ast:e}=await Gt(e,t));let r=new Map,n=new Or(e),u=Kr(t),o=new Map;await Ln(n,s,t,Ye,o);let i=await Rn(n,t,s,void 0,o);if(Gr(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[X,i];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[i,X]}return i;function s(c,D){return c===void 0||c===n?a(D):Array.isArray(c)?n.call(()=>a(D),...c):n.call(()=>a(D),c)}function a(c){u(n);let D=n.node;if(D==null)return"";let p=D&&typeof D=="object"&&c===void 0;if(p&&r.has(D))return r.get(D);let l=Rn(n,t,s,c,o);return p&&r.set(D,l),l}}function Rn(e,t,r,n,u){var a;let{node:o}=e,{printer:i}=t,s;switch((a=i.hasPrettierIgnore)!=null&&a.call(i,e)?s=In(e,t):u.has(o)?s=u.get(o):s=i.print(e,t,r,n),o){case t.cursorNode:s=Fe(s,c=>[X,c,X]);break;case t.nodeBeforeCursor:s=Fe(s,c=>[c,X]);break;case t.nodeAfterCursor:s=Fe(s,c=>[X,c]);break}return i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=Mr(e,s,t)),s}async function Gt(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("printedComments")]=new Set,Vr(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function xo(e,t){let{cursorOffset:r,locStart:n,locEnd:u}=t,o=J(t.printer.getVisitorKeys),i=F=>n(F)<=r&&u(F)>=r,s=e,a=[e];for(let F of Lr(e,{getVisitorKeys:o,filter:i}))a.push(F),s=F;if(Ir(s,{getVisitorKeys:o}))return{cursorNode:s};let c,D,p=-1,l=Number.POSITIVE_INFINITY;for(;a.length>0&&(c===void 0||D===void 0);){s=a.pop();let F=c!==void 0,f=D!==void 0;for(let d of Ce(s,{getVisitorKeys:o})){if(!F){let m=u(d);m<=r&&m>p&&(c=d,p=m)}if(!f){let m=n(d);m>=r&&m<l&&(D=d,l=m)}}}return{nodeBeforeCursor:c,nodeAfterCursor:D}}var Kt=xo;function wo(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let u=J(n),o=r.ignoredProperties??new Set;return i(e);function i(s,a){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(l=>i(l,a)).filter(Boolean);let c={},D=new Set(u(s));for(let l in s)!Object.prototype.hasOwnProperty.call(s,l)||o.has(l)||(D.has(l)?c[l]=i(s[l],s):c[l]=s[l]);let p=r(s,c,a);if(p!==null)return p??c}}var Yn=wo;var bo=(e,t,r)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(r);for(let n=t.length-1;n>=0;n--){let u=t[n];if(r(u,n,t))return n}return-1}},jn=bo;var ko=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function So(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(u=>$n.has(u.type)&&n.has(u))}function Un(e){let t=jn(!1,e,r=>r.type!=="Program"&&r.type!=="File");return t===-1?e:e.slice(0,t+1)}function To(e,t,{locStart:r,locEnd:n}){let u=e.node,o=t.node;if(u===o)return{startNode:u,endNode:o};let i=r(e.node);for(let a of Un(t.parentNodes))if(r(a)>=i)o=a;else break;let s=n(t.node);for(let a of Un(e.parentNodes)){if(n(a)<=s)u=a;else break;if(u===o)break}return{startNode:u,endNode:o}}function zt(e,t,r,n,u=[],o){let{locStart:i,locEnd:s}=r,a=i(e),c=s(e);if(!(t>c||t<a||o==="rangeEnd"&&t===a||o==="rangeStart"&&t===c)){for(let D of Xe(e,r)){let p=zt(D,t,r,n,[e,...u],o);if(p)return p}if(!n||n(e,u[0]))return{node:e,parentNodes:u}}}function No(e,t){return t!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var $n=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Oo=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDef
Line truncated
|
||||
`,u)+1),a=n.slice(s,u).match(/^\s*/u)[0],c=Ee(a,t.tabWidth),D=await Hn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>u&&t.cursorOffset<=o?t.cursorOffset-u:-1,endOfLine:"lf"},c),p=D.formatted.trimEnd(),{cursorOffset:l}=t;l>o?l+=p.length-i.length:D.cursorOffset>=0&&(l=D.cursorOffset+u);let F=n.slice(0,u)+p+n.slice(o);if(t.endOfLine!=="lf"){let f=xe(t.endOfLine);l>=0&&f===`\r
|
||||
`&&(l+=Ct(F.slice(0,l),`
|
||||
`)),F=te(!1,F,`
|
||||
`,f)}return{formatted:F,cursorOffset:l,comments:D.comments}}function Ht(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Gn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u}=t;return r=Ht(e,r,-1),n=Ht(e,n,0),u=Ht(e,u,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:u}}function Jn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o}=Gn(e,t),i=e.charAt(0)===zn;if(i&&(e=e.slice(1),r--,n--,u--),o==="auto"&&(o=nr(e)),e.includes("\r")){let s=a=>Ct(e.slice(0,Math.max(a,0)),`\r
|
||||
`);r-=s(r),n-=s(n),u-=s(u),e=ur(e)}return{hasBOM:i,text:e,options:Gn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o})}}async function Kn(e,t){let r=await Re(t);return!r.hasPragma||r.hasPragma(e)}async function vo(e,t){var n;let r=await Re(t);return(n=r.hasIgnorePragma)==null?void 0:n.call(r,e)}async function Jt(e,t){let{hasBOM:r,text:n,options:u}=Jn(e,await ne(t));if(u.rangeStart>=u.rangeEnd&&n!==""||u.requirePragma&&!await Kn(n,u)||u.checkIgnorePragma&&await vo(n,u))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let o;return u.rangeStart>0||u.rangeEnd<n.length?o=await Po(n,u):(!u.requirePragma&&u.insertPragma&&u.printer.insertPragma&&!await Kn(n,u)&&(n=u.printer.insertPragma(n)),o=await Hn(n,u)),r&&(o.formatted=zn+o.formatted,o.cursorOffset>=0&&o.cursorOffset++),o}async function qn(e,t,r){let{text:n,options:u}=Jn(e,await ne(t)),o=await De(n,u);return r&&(r.preprocessForPrint&&(o.ast=await Gt(o.ast,u)),r.massage&&(o.ast=Yn(o.ast,u))),o}async function Xn(e,t){t=await ne(t);let r=await Ye(e,t);return me(r,t)}async function Qn(e,t){let r=wr(e),{formatted:n}=await Jt(r,{...t,parser:"__js_expression"});return n}async function Zn(e,t){t=await ne(t);let{ast:r}=await De(e,t);return t.cursorOffset>=0&&(t={...t,...Kt(r,t)}),Ye(r,t)}async function eu(e,t){return me(e,await ne(t))}var qt={};dt(qt,{builders:()=>Io,printer:()=>Ro,utils:()=>Yo});var Io={join:ke,line:Me,softline:_r,hardline:z,literalline:We,group:At,conditionalGroup:Cr,fill:hr,lineSuffix:Se,lineSuffixBoundary:Ar,cursor:X,breakParent:pe,ifBreak:gr,trim:Br,indent:ie,indentIfBreak:yr,align:oe,addAlignmentToDoc:Ge,markAsRoot:mr,dedentToRoot:dr,dedent:Er,hardlineWithoutBreakParent:Te,literallineWithoutBreakParent:Bt,label:xr,concat:e=>e},Ro={printDocToString:me},Yo={willBreak:Dr,traverseDoc:le,findInDoc:Ve,mapDoc:be,removeLines:fr,stripTrailingHardline:$e,replaceEndOfLine:lr,canBreak:Fr};var tu="3.6.2";var Qt={};dt(Qt,{addDanglingComment:()=>ee,addLeadingComment:()=>se,addTrailingComment:()=>ae,getAlignmentSize:()=>Ee,getIndentSize:()=>ru,getMaxContinuousCount:()=>nu,getNextNonSpaceNonCommentCharacter:()=>uu,getNextNonSpaceNonCommentCharacterIndex:()=>Xo,getPreferredQuote:()=>iu,getStringWidth:()=>Ne,hasNewline:()=>G,hasNewlineInRange:()=>su,hasSpaces:()=>au,isNextLineEmpty:()=>ti,isNextLineEmptyAfterIndex:()=>ct,isPreviousLineEmpty:()=>Zo,makeString:()=>Du,skip:()=>he,skipEverythingButNewLine:()=>Je,skipInlineComment:()=>ye,skipNewline:()=>U,skipSpaces:()=>T,skipToLineEnd:()=>He,skipTrailingComment:()=>Ae,skipWhitespace:()=>Rr});function jo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var ye=jo;function Uo(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Je(e,t):t}var Ae=Uo;function Vo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=T(e,n),n=ye(e,n),n=Ae(e,n),n=U(e,n);return n}var je=Vo;function $o(e,t){let r=null,n=t;for(;n!==r;)r=n,n=He(e,n),n=ye(e,n),n=T(e,n);return n=Ae(e,n),n=U(e,n),n!==!1&&G(e,n)}var ct=$o;function Wo(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:Ee(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var ru=Wo;function Xt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Mo(e,t){let r=e.match(new RegExp(`(${Xt(t)})+`,"gu"));return r===null?0:r.reduce((n,u)=>Math.max(n,u.length/t.length),0)}var nu=Mo;function Go(e,t){let r=je(e,t);return r===!1?"":e.charAt(r)}var uu=Go;var ft="'",ou='"';function Ko(e,t){let r=t===!0||t===ft?ft:ou,n=r===ft?ou:ft,u=0,o=0;for(let i of e)i===r?u++:i===n&&o++;return u>o?n:r}var iu=Ko;function zo(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var su=zo;function Ho(e,t,r={}){return T(e,r.backwards?t-1:t,r)!==t}var au=Ho;function Jo(e,t,r){let n=t==='"'?"'":'"',o=te(!1,e,/\\(.)|(["'])/gsu,(i,s,a)=>s===n?s:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s)?s:"\\"+s));return t+o+t}var Du=Jo;function qo(e,t,r){return je(e,r(t))}function Xo(e,t){return arguments.length===2||typeof t=="number"?je(e,t):qo(...arguments)}function Qo(e,t,r){return Pe(e,r(t))}function Zo(e,t){return arguments.length===2||typeof t=="number"?Pe(e,t):Qo(...arguments)}function ei(e,t,r){return ct(e,r(t))}function ti(e,t){return arguments.length===2||typeof t=="number"?ct(e,t):ei(...arguments)}function ce(e,t=1){return async(...r)=>{let n=r[t]??{},u=n.plugins??[];return r[t]={...n,plugins:Array.isArray(u)?u:Object.values(u)},e(...r)}}var cu=ce(Jt);async function fu(e,t){let{formatted:r}=await cu(e,{...t,cursorOffset:-1});return r}async function ri(e,t){return await fu(e,t)===e}var ni=ce(Qe,0),ui={parse:ce(qn),formatAST:ce(Xn),formatDoc:ce(Qn),printToDoc:ce(Zn),printDocToString:ce(eu)};var xf=Zt;export{ui as __debug,ri as check,xf as default,qt as doc,fu as format,cu as formatWithCursor,ni as getSupportInfo,Qt as util,tu as version};
|
||||
Reference in new issue
Block a user