diff --git a/.github/workflows/livecodes-post-comment.yml b/.github/workflows/livecodes-post-comment.yml new file mode 100644 index 0000000..e0a9286 --- /dev/null +++ b/.github/workflows/livecodes-post-comment.yml @@ -0,0 +1,21 @@ +name: comment + +on: + workflow_run: + workflows: ['livecodes'] # the workflow that created the artifact + types: + - completed + +jobs: + upload: + runs-on: ubuntu-latest + permissions: + pull-requests: write + if: > + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' + + steps: + - uses: live-codes/pr-comment-from-artifact@v1 + with: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/livecodes-preview.yml b/.github/workflows/livecodes-preview.yml new file mode 100644 index 0000000..d5a750a --- /dev/null +++ b/.github/workflows/livecodes-preview.yml @@ -0,0 +1,18 @@ +name: livecodes + +on: [pull_request] + +jobs: + build_and_prepare: + runs-on: ubuntu-latest + name: Generate Playgrounds + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build and generate + uses: live-codes/preview-in-livecodes@v1 + with: + install-command: 'npm install' + build-command: 'npm run build' + base-url: 'https://deploy-preview-{{LC::PR}}--racingbars.netlify.app/' diff --git a/.livecodes/js-esm.json b/.livecodes/js-esm.json new file mode 100644 index 0000000..0f96aa7 --- /dev/null +++ b/.livecodes/js-esm.json @@ -0,0 +1,26 @@ +{ + "title": "JavaScript (ESM)", + "activeEditor": "script", + "markup": { + "language": "html", + "content": "
Loading...
" + }, + "style": { + "language": "css", + "content": "#race {\n height: 80vh;\n}\n" + }, + "script": { + "language": "javascript", + "content": "import { race } from \"racing-bars\";\n\n/** @type {import('racing-bars').Options} */\nconst options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nrace(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/.livecodes/js-umd.json b/.livecodes/js-umd.json new file mode 100644 index 0000000..642ae7e --- /dev/null +++ b/.livecodes/js-umd.json @@ -0,0 +1,26 @@ +{ + "title": "JavaScript (UMD)", + "activeEditor": "script", + "markup": { + "language": "html", + "content": "
Loading...
\n\n" + }, + "style": { + "language": "css", + "content": "#race {\n height: 80vh;\n}\n" + }, + "script": { + "language": "javascript", + "content": "const options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nracingBars.race(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/.livecodes/react.json b/.livecodes/react.json new file mode 100644 index 0000000..b608173 --- /dev/null +++ b/.livecodes/react.json @@ -0,0 +1,22 @@ +{ + "title": "React", + "activeEditor": "script", + "style": { + "language": "css", + "content": ".race {\n height: 80vh;\n}\n" + }, + "script": { + "language": "jsx", + "content": "import RacingBars from \"racing-bars/react\";\n\nexport default function App() {\n /** @type {import('racing-bars').Options} */\n const options = {\n dataUrl: \"{{LC::TO_URL(./data/population.csv)}}\",\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n };\n\n return Loading...;\n}\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/.livecodes/svelte.json b/.livecodes/svelte.json new file mode 100644 index 0000000..dc68be2 --- /dev/null +++ b/.livecodes/svelte.json @@ -0,0 +1,18 @@ +{ + "title": "Svelte", + "activeEditor": "script", + "script": { + "language": "svelte", + "content": "\n\n
Loading...
\n\n\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/.livecodes/ts.json b/.livecodes/ts.json new file mode 100644 index 0000000..d2e8542 --- /dev/null +++ b/.livecodes/ts.json @@ -0,0 +1,26 @@ +{ + "title": "TypeScript", + "activeEditor": "script", + "markup": { + "language": "html", + "content": "
Loading...
" + }, + "style": { + "language": "css", + "content": "#race {\n height: 80vh;\n}\n" + }, + "script": { + "language": "typescript", + "content": "import { race, type Options } from \"racing-bars\";\n\nconst options: Options = {\n dataTransform: (data) =>\n data.map((d) => ({\n ...d,\n icon: `https://flagsapi.com/${d.code}/flat/64.png`,\n })),\n title: \"World Population\",\n subTitle: \"Country Population in millions\",\n caption: \"Source: World Bank\",\n dateCounter: \"YYYY\",\n showIcons: true,\n labelsPosition: \"outside\",\n};\n\nrace(\"{{LC::TO_URL(./data/population.csv)}}\", \"#race\", options);\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/.livecodes/vue.json b/.livecodes/vue.json new file mode 100644 index 0000000..47f152d --- /dev/null +++ b/.livecodes/vue.json @@ -0,0 +1,18 @@ +{ + "title": "Vue", + "activeEditor": "script", + "script": { + "language": "vue", + "content": "\n\n\n\n\n" + }, + "customSettings": { + "imports": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.js)}}", + "racing-bars/react": "{{LC::TO_URL(./lib/react.js)}}", + "racing-bars/vue": "{{LC::TO_URL(./lib/vue.js)}}" + }, + "types": { + "racing-bars": "{{LC::TO_URL(./lib/racing-bars.d.ts)}}" + } + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index efbcd1b..0176af4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,38 @@ All notable changes to this project will be documented in this file. See [standa --- +## [v0.3.0](https://github.com/hatemhosny/racing-bars/compare/v0.2.0...v0.3.0) (2024-09-07) + +### Highlights for this release + +- The charts are now responsive and works much better on smaller screens. Dynamically resizing the container element will also resize the chart. +- Added the option `valueDecimals` to control decimal spaces. +- The `labelsPosition` option can now be set to `"none"` to hide the labels (e.g. for icons only). + +In addition to some bug fixes. + +The website homepage now has a GUI editor for chart options. Also added search capability in the website. + +Thank you @AhmedElbohoty for the valuable contribution. + +### Bug Fixes + +- **api:** re-prepare data when `makeCumulative` option is changed by `changeOptions` API method ([80584ca](https://github.com/hatemhosny/racing-bars/commit/80584ca3622499a4b5c6e2b7f6b070ac31bfa758)) +- **data:** fix passing data to worker ([94aadd5](https://github.com/hatemhosny/racing-bars/commit/94aadd5a0bd3ebc7ec917dd3eacb43c7f8c132b5)) +- **renderer:** avoid icons overflow outside bars ([b75dedb](https://github.com/hatemhosny/racing-bars/commit/b75dedb51cde6778431a97d85c4000a104c993e8)) + +### Features + +- **options:** add labelPositions `"none"` ([4127c7a](https://github.com/hatemhosny/racing-bars/commit/4127c7a5dd49c5add1b1bf323815d0ccef965ec3)) +- **options:** add the option `valueDecimals` ([330202a](https://github.com/hatemhosny/racing-bars/commit/330202aa7b432e2ff6b509128c0da53226b3d064)) +- **options:** validate options ([0dccf85](https://github.com/hatemhosny/racing-bars/commit/0dccf850d4af29eda795a37490606dc11f80cf9c)) +- **renderer:** resize chart on resizing root element ([daec0cd](https://github.com/hatemhosny/racing-bars/commit/daec0cdebf95d15736edc52a4101fdd14c231f47)) +- **styles:** make the chart text & controls responsive ([eb2a353](https://github.com/hatemhosny/racing-bars/commit/eb2a35341dcda6fbfe3563d7c7cfc1d5f5253430)) +- **website:** add options editor GUI ([a023795](https://github.com/hatemhosny/racing-bars/commit/a023795a1f78bbb7ae3562a736641f09d50245b6)) +- **website:** add search ([00015fc](https://github.com/hatemhosny/racing-bars/commit/00015fce403e40099c8288a4d6fd4e6fffe32d71)) + +--- + ## [v0.2.0](https://github.com/hatemhosny/racing-bars/compare/v0.1.2...v0.2.0) (2024-09-01) ### Bug Fixes diff --git a/scripts/start-release.js b/scripts/start-release.js index 9d4d875..36bd19e 100644 --- a/scripts/start-release.js +++ b/scripts/start-release.js @@ -10,53 +10,91 @@ const pkgPath = '../src/package.lib.json'; const changelogPath = '../CHANGELOG.md'; const pkg = require(pkgPath); +const originalVersion = pkg.version; +const stringify = (obj) => JSON.stringify(obj, null, 2) + '\n'; -const gitBranch = execSync('git rev-parse --abbrev-ref HEAD').toString().replace(/\n/g, ''); -if (gitBranch !== 'develop') { - console.log('Can only prepare a release from branch: develop'); - process.exit(1); -} +const confirmCancel = async (continueFn) => { + if (await confirm({ message: 'Do you want to cancel release and discard all changes?' })) { + execSync(`git reset --hard`); + console.log('Release cancelled!'); + process.exit(1); + } + return continueFn(); +}; -const gitStatus = execSync('git status -s').toString().replace(/\n/g, '').trim(); -if (gitStatus) { - console.log('Please commit changes before starting a release.'); - process.exit(1); -} +const checkIsDevelop = () => { + const gitBranch = execSync('git rev-parse --abbrev-ref HEAD').toString().replace(/\n/g, ''); + if (gitBranch !== 'develop') { + console.log('Can only start a release from branch: develop'); + process.exit(1); + } +}; -const getVersion = () => - input({ - message: 'Please specify the new version:', - validate(value) { - const parts = value.split('.'); - if (parts.length !== 3) return false; - for (const part of parts) { - if (isNaN(Number(part))) return false; - } - return true; - }, - }); +const checkIsClean = () => { + const gitStatus = execSync('git status -s').toString().replace(/\n/g, '').trim(); + if (gitStatus) { + console.log('Please commit changes before starting a release.'); + process.exit(1); + } +}; + +const performChecks = async () => { + checkIsDevelop(); + checkIsClean(); +}; -const bumpVersion = (libBump) => { - if (!libBump) return; - let [major, minor, patch] = pkg.version.split('.'); - if (libBump === 'major') { +const bumpVersion = (oldVersion, bump) => { + if (!bump) return; + let [major, minor, patch] = oldVersion.split('.'); + if (bump === 'major') { major = String(Number(major) + 1); minor = '0'; patch = '0'; } - if (libBump === 'minor') { + if (bump === 'minor') { minor = String(Number(minor) + 1); patch = '0'; } - if (libBump === 'patch') { + if (bump === 'patch') { patch = String(Number(patch) + 1); } return `${major}.${minor}.${patch}`; }; -const getBump = () => - select({ - message: 'Library version upgrade:', +const specifyVersion = () => + input({ + message: 'Please specify the new version:', + validate(value) { + const version = value.startsWith('v') ? value.slice(1) : value; + const parts = version.split('.'); + if (parts.length !== 3) return false; + for (const part of parts) { + if (isNaN(Number(part))) return false; + } + const originalVersionParts = originalVersion.split('.'); + if (Number(parts[0]) > Number(originalVersionParts[0])) return true; + if (Number(parts[1]) > Number(originalVersionParts[1])) return true; + if (Number(parts[2]) > Number(originalVersionParts[2])) return true; + return false; + }, + }); + +const getBump = async (releaseNotes) => { + const suggestedBump = releaseNotes.includes('### BREAKING CHANGES') + ? 'major' + : releaseNotes.includes('### Features') + ? 'minor' + : 'patch'; + const hint = + suggestedBump === 'major' + ? ' (has breaking changes!)' + : suggestedBump === 'minor' + ? ' (includes new feature(s))' + : ''; + + const bump = await select({ + message: `Library version upgrade:${hint}`, + default: suggestedBump, choices: [ { name: 'Major', @@ -74,58 +112,84 @@ const getBump = () => name: 'Specify version', value: 'specify', }, + { + name: 'Cancel', + value: 'cancel', + }, ], }); - -const stringify = (obj) => JSON.stringify(obj, null, 2) + '\n'; - -const cancelRelease = async () => { - if (await confirm({ message: 'Cancelling release. Do you want to discard all changes?' })) { - execSync(`git reset --hard`); + if (bump === 'cancel') { + return confirmCancel(() => getBump(releaseNotes)); } - console.log('Release cancelled!'); - process.exit(1); + return bump; }; -(async () => { - const libBump = await getBump(); - pkg.version = libBump === 'specify' ? await getVersion() : bumpVersion(libBump); - const version = 'v' + pkg.version; - if (!(await confirm({ message: `Creating version: ${version}\nProceed?` }))) { - await cancelRelease(); +const changeVersion = async (releaseNotes) => { + const bump = await getBump(releaseNotes); + const selectedVersion = + bump === 'specify' ? await specifyVersion() : bumpVersion(originalVersion, bump); + const version = selectedVersion?.startsWith('v') ? selectedVersion.slice(1) : selectedVersion; + const versionName = 'v' + version; + pkg.version = version; + if (!(await confirm({ message: `Creating version: ${versionName}\nProceed?` }))) { + return confirmCancel(async () => changeVersion(releaseNotes)); } fs.writeFileSync(new URL(pkgPath, import.meta.url), stringify(pkg), 'utf8'); + return releaseNotes; +}; - const changelog = fs.readFileSync(new URL(changelogPath, import.meta.url), 'utf8'); - const changelogSeparator = '\n---'; - const [changelogHeader, ...prevLogs] = changelog.split(changelogSeparator); +const streamToString = (stream) => { + const chunks = []; + return new Promise((resolve, reject) => { + stream.on('data', (chunk) => chunks.push(Buffer.from(chunk))); + stream.on('error', (err) => reject(err)); + stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8'))); + }); +}; - const releaseChangelog = await streamToString( +const getReleaseNotes = async () => + streamToString( conventionalChangelog({ preset: 'angular', }), - ).then((str) => { - return '\n\n#' + str.replace('[0.0.0]', `[${version}]`).replace('v0.0.0', `${version}`); - }); + ); +const writeChangelog = async (releaseNotes) => { + const version = 'v' + pkg.version; + const changelog = fs.readFileSync(new URL(changelogPath, import.meta.url), 'utf8'); + const changelogSeparator = '\n---'; + const [changelogHeader, ...prevLogs] = changelog.split(changelogSeparator); + const releaseChangelog = + '\n\n#' + releaseNotes.replace('[0.0.0]', `[${version}]`).replace('v0.0.0', `${version}`); const newChangelog = [changelogHeader, releaseChangelog, ...prevLogs].join(changelogSeparator); fs.writeFileSync(new URL(changelogPath, import.meta.url), newChangelog, 'utf8'); - if (!(await confirm({ message: `Change log added to ./CHANGELOG.md\nProceed?` }))) { - await cancelRelease(); - } + const waitForApproval = async () => { + if (!(await confirm({ message: `Change log added to ./CHANGELOG.md\nProceed?` }))) { + return confirmCancel(waitForApproval); + } + return version; + }; + return waitForApproval(); +}; +const pushReleaseBranch = (version) => { + if (!version) { + console.log('Invalid version. Aborting.'); + process.exit(1); + } const branchName = 'releases/' + version; execSync(`git checkout -b ${branchName}`); execSync(`git add -A && git commit -m "release: ${version}"`); execSync(`git push -u origin ${branchName}`); -})(); +}; -function streamToString(stream) { - const chunks = []; - return new Promise((resolve, reject) => { - stream.on('data', (chunk) => chunks.push(Buffer.from(chunk))); - stream.on('error', (err) => reject(err)); - stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8'))); - }); -} +const run = async () => { + performChecks() + .then(getReleaseNotes) + .then(changeVersion) + .then(writeChangelog) + .then(pushReleaseBranch); +}; + +run(); diff --git a/src/lib/css/styles.css b/src/lib/css/styles.css index 7bc88f6..89caeee 100644 --- a/src/lib/css/styles.css +++ b/src/lib/css/styles.css @@ -1,12 +1,21 @@ +__selector__ { + --base-font-size: max(1vw, 12px); + --text-font-size: calc(var(--base-font-size) * 1.2); + --title-font-size: calc(var(--base-font-size) * 2); + --caption-font-size: calc(var(--base-font-size) * 1.5); + --counter-font-size: calc(var(--base-font-size) * 4); + --controls-font-size: calc(var(--base-font-size) * 1.5); +} + __selector__ text { font-family: Open Sans, sans-serif; - font-size: 16px; + font-size: var(--text-font-size); } __selector__ text.title { - font-size: 24px; + font-size: var(--title-font-size); font-weight: 500; } @@ -15,7 +24,7 @@ __selector__ text.subTitle { } __selector__ text.caption { - font-size: 24px; + font-size: var(--caption-font-size); font-weight: 400; } @@ -31,12 +40,16 @@ __selector__ text.label { font-weight: 600; } +__selector__ text.label.hidden { + visibility: hidden; +} + __selector__ text.valueLabel { font-weight: 300; } __selector__ text.dateCounterText { - font-size: 64px; + font-size: var(--counter-font-size); font-weight: 700; } @@ -63,22 +76,29 @@ __selector__ .controls { __selector__ .controls div, __selector__ .overlay div { + align-items: center; border-radius: 5px; border-radius: 5px; border-radius: 5px; cursor: pointer; - font-size: 24px; - font-weight: 700; - height: 38px; + display: flex; + justify-content: center; margin: 5px; - text-align: center; - width: 38px; +} + +__selector__ .controls div { + height: 10vw; + max-height: 32px; + max-width: 32px; + width: 10vw; } __selector__ .controls svg { - height: 28px; + height: 7vw; margin: 5px auto; - width: 28px; + max-height: 24px; + max-width: 24px; + width: 7vw; } __selector__ .overlay { @@ -98,10 +118,12 @@ __selector__ .overlay div { border-radius: 100px; border-radius: 100px; display: flex; - height: 200px; + height: 20vw; justify-content: center; position: relative; - width: 200px; + max-height: 200px; + max-width: 200px; + width: 20vw; } __selector__ .overlay svg { diff --git a/src/lib/options/__tests__/validate-options.spec.ts b/src/lib/options/__tests__/validate-options.spec.ts new file mode 100644 index 0000000..319b693 --- /dev/null +++ b/src/lib/options/__tests__/validate-options.spec.ts @@ -0,0 +1,233 @@ +import { validateOptions } from '../index'; + +test('Tests to validate boolean options', () => { + const options: any = { + makeCumulative: true, + loop: false, + showIcons: true, + showGroups: false, + mouseControls: true, + keyboardControls: false, + autorun: true, + injectStyles: 10, + fixedScale: 10, + highlightBars: 'string', + selectBars: 'string', + }; + const validatedOptions = validateOptions(options); + + // Valid options + expect(validatedOptions.makeCumulative).toBe(true); + expect(validatedOptions.loop).toBe(false); + expect(validatedOptions.showIcons).toBe(true); + expect(validatedOptions.showGroups).toBe(false); + expect(validatedOptions.mouseControls).toBe(true); + expect(validatedOptions.keyboardControls).toBe(false); + expect(validatedOptions.autorun).toBe(true); + + // Invalid options + expect(validatedOptions.injectStyles).toBe(undefined); + expect(validatedOptions.fixedScale).toBe(undefined); + expect(validatedOptions.highlightBars).toBe(undefined); + expect(validatedOptions.selectBars).toBe(undefined); +}); + +test('Tests to validate number options', () => { + const options: any = { + labelsWidth: 100, + tickDuration: 500, + topN: 5, + minHeight: 'string', + minWidth: true, + }; + const validatedOptions = validateOptions(options); + + // Valid options + expect(validatedOptions.labelsWidth).toBe(100); + expect(validatedOptions.tickDuration).toBe(500); + expect(validatedOptions.topN).toBe(5); + + // Invalid options + expect(validatedOptions.minHeight).toBe(undefined); + expect(validatedOptions.minWidth).toBe(undefined); +}); + +test('Tests to validate string options', () => { + const options: any = { + theme: 'dark', + startDate: '2022-12-31', + endDate: 90, + }; + const validatedOpts = validateOptions(options); + + // Valid options + expect(validatedOpts.theme).toBe('dark'); + expect(validatedOpts.startDate).toBe('2022-12-31'); + + // Invalid options + expect(validatedOpts.endDate).toBe(undefined); +}); + +test('Tests to validate string or number options', () => { + const options: any = { + colorSeed: 'seed123', + inputHeight: 100, + inputWidth: '200', + height: true, + width: () => 0, + }; + const validatedOpts = validateOptions(options); + + // Valid options + expect(validatedOpts.colorSeed).toBe('seed123'); + expect(validatedOpts.inputHeight).toBe(100); + expect(validatedOpts.inputWidth).toBe('200'); + + // Invalid options + expect(validatedOpts.height).toBe(undefined); + expect(validatedOpts.width).toBe(undefined); +}); + +test('Tests to validate function or string options', () => { + const options: any = { + title: 'Chart Title', + subTitle: () => 'Sub Title', + dateCounter: 90, + caption: true, + }; + const validatedOpts = validateOptions(options); + + // Valid options + expect(validatedOpts.title).toBe('Chart Title'); + expect(typeof validatedOpts.subTitle).toBe('function'); + + // Invalid options + expect(validatedOpts.dateCounter).toBe(undefined); + expect(validatedOpts.caption).toBe(undefined); +}); + +test('Tests to validate dataShape option', () => { + // Valid options + const options: any = { dataShape: 'long' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.dataShape).toBe('long'); + + // Invalid options + options.dataShape = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.dataShape).toBeUndefined(); +}); + +test('Tests to validate dataType option', () => { + // Valid options + const options: any = { dataType: 'json' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.dataType).toBe('json'); + + // Invalid options + options.dataType = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.dataType).toBeUndefined(); +}); + +test('Tests to validate labelsPosition option', () => { + // Valid options + const options: any = { labelsPosition: 'inside' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.labelsPosition).toBe('inside'); + + // Invalid options + options.labelsPosition = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.labelsPosition).toBeUndefined(); +}); + +test('Tests to validate controlButtons option', () => { + // Valid options + const options: any = { controlButtons: 'all' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.controlButtons).toBe('all'); + + // Invalid options + options.controlButtons = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.controlButtons).toBeUndefined(); +}); + +test('Tests to validate overlays option', () => { + // Valid options + const options: any = { overlays: 'play' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.overlays).toBe('play'); + + // Invalid options + options.overlays = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.overlays).toBeUndefined(); +}); + +test('Tests to validate fillDateGapsInterval option', () => { + // Valid options + const options: any = { fillDateGapsInterval: 'year' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.fillDateGapsInterval).toBe('year'); + + // Invalid options + options.fillDateGapsInterval = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.fillDateGapsInterval).toBeUndefined(); +}); + +test('Tests to validate fillDateGapsValue option', () => { + // Valid options + const options: any = { fillDateGapsValue: 'last' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.fillDateGapsValue).toBe('last'); + + // Invalid options + options.fillDateGapsValue = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.fillDateGapsValue).toBeUndefined(); +}); + +test('Tests to validate valueDecimals option', () => { + // Valid options + const options: any = { valueDecimals: 'preserve' }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.valueDecimals).toBe('preserve'); + + // Valid options + const options2: any = { valueDecimals: 2 }; + const validatedOpts2 = validateOptions(options2); + expect(validatedOpts2.valueDecimals).toBe(2); + + // Invalid options + options.valueDecimals = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.valueDecimals).toBeUndefined(); +}); + +test('Tests to validate colorMap option', () => { + // Valid options + const options: any = { colorMap: ['blue', 'red'] }; + const validatedOpts = validateOptions(options); + expect(validatedOpts.colorMap).toStrictEqual(['blue', 'red']); + + // Valid options + const options2: any = { + colorMap: { + India: 'orange', + 'United States': 'blue', + }, + }; + const validatedOpts2 = validateOptions(options2); + expect(validatedOpts2.colorMap).toStrictEqual({ + India: 'orange', + 'United States': 'blue', + }); + + // Invalid options + options.colorMap = 'invalid'; + const invalidOpts = validateOptions(options); + expect(invalidOpts.colorMap).toBeUndefined(); +}); diff --git a/src/lib/options/index.ts b/src/lib/options/index.ts index 67b9f42..327a943 100644 --- a/src/lib/options/index.ts +++ b/src/lib/options/index.ts @@ -1,3 +1,4 @@ export * from './options.actions'; export * from './options.models'; export * from './options.reducer'; +export * from './validate-options'; diff --git a/src/lib/options/options.models.ts b/src/lib/options/options.models.ts index b120c37..6e8ad00 100644 --- a/src/lib/options/options.models.ts +++ b/src/lib/options/options.models.ts @@ -9,45 +9,52 @@ export interface Options { dataShape: 'long' | 'wide' | 'auto'; dataType: 'json' | 'csv' | 'tsv' | 'xml' | 'auto'; dataTransform: null | ((data: Data[] | WideData[]) => Data[] | WideData[]); + valueDecimals: 'preserve' | number; fillDateGapsInterval: null | 'year' | 'month' | 'day'; fillDateGapsValue: 'last' | 'interpolate'; + labelsPosition: 'inside' | 'outside' | 'none'; + controlButtons: 'all' | 'play' | 'none'; + overlays: 'all' | 'play' | 'repeat' | 'none'; + makeCumulative: boolean; - title: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); - subTitle: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); - dateCounter: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); - caption: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); - startDate: string; - endDate: string; loop: boolean; - labelsPosition: 'inside' | 'outside'; - labelsWidth: number; showIcons: boolean; - colorSeed: string | number; showGroups: boolean; + mouseControls: boolean; + keyboardControls: boolean; + autorun: boolean; + injectStyles: boolean; + fixedScale: boolean; + highlightBars: boolean; + selectBars: boolean; + + labelsWidth: number; tickDuration: number; topN: number; - inputHeight: number | string; - inputWidth: number | string; minHeight: number; minWidth: number; - height: number | string; - width: number | string; marginTop: number; marginRight: number; marginBottom: number; marginLeft: number; - mouseControls: boolean; - keyboardControls: boolean; - controlButtons: 'all' | 'play' | 'none'; - overlays: 'all' | 'play' | 'repeat' | 'none'; - autorun: boolean; - injectStyles: boolean; + + startDate: string; + endDate: string; theme: string; + + colorSeed: number | string; + inputHeight: number | string; + inputWidth: number | string; + height: number | string; + width: number | string; + + title: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); + subTitle: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); + dateCounter: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); + caption: string | ((currentDate: string, dateSlice: Data[], allDates: string[]) => string); + colorMap: { [key: string]: string } | string[]; - fixedScale: boolean; fixedOrder: string[]; - highlightBars: boolean; - selectBars: boolean; } export type TransformFn = (data: Data[] | WideData[]) => Data[] | WideData[]; diff --git a/src/lib/options/options.reducer.ts b/src/lib/options/options.reducer.ts index 77cf689..b2aa4dd 100644 --- a/src/lib/options/options.reducer.ts +++ b/src/lib/options/options.reducer.ts @@ -7,6 +7,7 @@ export const defaultOptions: Options = { dataShape: 'auto', dataType: 'auto', dataTransform: null, + valueDecimals: 'preserve', fillDateGapsInterval: null, fillDateGapsValue: 'interpolate', makeCumulative: false, @@ -33,7 +34,7 @@ export const defaultOptions: Options = { inputHeight: '', inputWidth: '', minHeight: 300, - minWidth: 350, + minWidth: 250, height: '', width: '', marginTop: 0, diff --git a/src/lib/options/validate-options.ts b/src/lib/options/validate-options.ts new file mode 100644 index 0000000..74f198c --- /dev/null +++ b/src/lib/options/validate-options.ts @@ -0,0 +1,193 @@ +import type { Options } from './index'; + +const boolOpts = [ + 'makeCumulative', + 'loop', + 'showIcons', + 'showGroups', + 'mouseControls', + 'keyboardControls', + 'autorun', + 'injectStyles', + 'highlightBars', + 'selectBars', + 'fixedScale', +] as const satisfies Array; +const numberOpts = [ + 'labelsWidth', + 'tickDuration', + 'topN', + 'minHeight', + 'minWidth', + 'marginTop', + 'marginRight', + 'marginBottom', + 'marginLeft', +] as const satisfies Array; +const strOpts = ['theme', 'startDate', 'endDate'] as const satisfies Array; +const strOrNumberOpts = [ + 'colorSeed', + 'inputHeight', + 'inputWidth', + 'height', + 'width', +] as const satisfies Array; +const strOrFuncOpts = ['title', 'subTitle', 'dateCounter', 'caption'] as const satisfies Array< + keyof Options +>; + +const validDataShapes: Array = ['long', 'wide', 'auto']; +const validDataTypes: Array = ['json', 'csv', 'tsv', 'xml', 'auto']; +const validLabelsPositions: Array = ['inside', 'outside', 'none']; +const validControlButtons: Array = ['all', 'play', 'none']; +const validOverlays: Array = ['all', 'play', 'repeat', 'none']; +const validFillDateGapsIntervals: Array = [ + null, + 'year', + 'month', + 'day', +]; +const validFillDateGapsValues: Array = ['last', 'interpolate']; + +export function validateOptions(options: Partial): Partial { + const newOptions: Partial = {}; + + // Validate boolean options + boolOpts.forEach((opt) => { + if (is(options[opt], 'boolean')) { + newOptions[opt] = options[opt]; + } else if (is(options[opt], 'string')) { + const booleanOption = options[opt] as unknown; + if (booleanOption === 'true' || booleanOption === 'false') { + newOptions[opt] = booleanOption === 'true'; + } + } + }); + + // Validate number options + numberOpts.forEach((opt) => { + if (!is(options[opt], 'number')) return; + newOptions[opt] = Number(options[opt]); + }); + + // Validate string options + strOpts.forEach((opt) => { + if (!is(options[opt], 'string')) return; + newOptions[opt] = options[opt]; + }); + + // Validate string or number options + strOrNumberOpts.forEach((opt) => { + if (!is(options[opt], 'string') && !is(options[opt], 'number')) return; + newOptions[opt] = options[opt]; + }); + + // Validate function or string options + strOrFuncOpts.forEach((opt) => { + if (!is(options[opt], 'string') && !is(options[opt], 'function')) return; + newOptions[opt] = options[opt]; + }); + + // Validate one of options + if (includes(validDataShapes, options.dataShape)) { + newOptions.dataShape = options.dataShape; + } + + if (includes(validDataTypes, options.dataType)) { + newOptions.dataType = options.dataType; + } + + if (includes(validLabelsPositions, options.labelsPosition)) { + newOptions.labelsPosition = options.labelsPosition; + } + + if (includes(validControlButtons, options.controlButtons)) { + newOptions.controlButtons = options.controlButtons; + } + + if (includes(validOverlays, options.overlays)) { + newOptions.overlays = options.overlays; + } + + if (includes(validFillDateGapsIntervals, options.fillDateGapsInterval)) { + newOptions.fillDateGapsInterval = options.fillDateGapsInterval; + } + + if (includes(validFillDateGapsValues, options.fillDateGapsValue)) { + newOptions.fillDateGapsValue = options.fillDateGapsValue; + } + + if (options.valueDecimals === 'preserve') { + newOptions.valueDecimals = 'preserve'; + } + if (is(options.valueDecimals, 'number')) { + newOptions.valueDecimals = Number(options.valueDecimals); + } + + // Validate array of options + if (is(options.fixedOrder, 'array', 'string')) { + newOptions.fixedOrder = options.fixedOrder; + } + + // Other validations + if (validateDataTransform(options.dataTransform)) { + newOptions.dataTransform = options.dataTransform; + } + + if (validateColorMap(options.colorMap)) { + newOptions.colorMap = options.colorMap; + } + + return newOptions; +} + +function validateDataTransform(value: Options['dataTransform'] | undefined): boolean { + if (typeof value === 'undefined') return false; + + if (value === null || typeof value === 'function') { + return true; + } + + return false; +} + +function validateColorMap(value: string[] | { [key: string]: string } | undefined): boolean { + if (typeof value === 'undefined') return false; + if (value === null) return false; + + // Check if color map is array of string + if (is(value, 'array', 'string')) return true; + + // Check if color map is object and every value within that object is a string + return is(value, 'object') && Object.values(value).every((v) => typeof v === 'string'); +} + +type types = 'array' | 'boolean' | 'object' | 'number' | 'string' | 'undefined' | 'function'; +function is(value: any, type: types, arrayType?: types): boolean { + if (typeof value === 'undefined') return false; + + if (type === 'number') { + return typeof value === 'number' && !isNaN(Number(value)); + } + + if (type === 'boolean') { + return typeof value === 'boolean' || value === 'true' || value === 'false'; + } + + if (type === 'array') { + if (!Array.isArray(value)) return false; + if (!arrayType) return true; + + return value.every((val) => is(val, arrayType)); + } + + if (type === 'object') { + return value !== null && typeof value === 'object'; + } + + return typeof value === type; +} + +function includes(arr: any[], x: any) { + return x != null && arr.includes(x); +} diff --git a/src/lib/race.ts b/src/lib/race.ts index 40c2968..e700812 100644 --- a/src/lib/race.ts +++ b/src/lib/race.ts @@ -1,11 +1,16 @@ import * as d3 from './d3'; import { getDateString, prepareData, computeNextDateSubscriber, safeName } from './utils'; import type { Data, WideData } from './data'; -import { createRenderer, rendererSubscriber, type Renderer } from './renderer'; +import { + createRenderer, + createResizeObserver, + rendererSubscriber, + type Renderer, +} from './renderer'; import { createTicker } from './ticker'; import { styleInject } from './styles'; import { actions, createStore, rootReducer, type Store } from './store'; -import type { Options } from './options'; +import { type Options, validateOptions } from './options'; import { registerEvents, DOMEventSubscriber, getTickDetails, type EventType } from './events'; import type { Race, ApiCallback } from './models'; @@ -34,9 +39,11 @@ export async function race( typeof container === 'string' ? document.querySelector(container) : container; if (!root) throw new Error('Container element is not found.'); + const validOptions = validateOptions(options); + const store = createStore(rootReducer); store.dispatch(actions.container.setContainer({ element: root })); - store.dispatch(actions.options.loadOptions(options)); + store.dispatch(actions.options.loadOptions(validOptions)); const ticker = createTicker(store); let preparedData = await prepareData(data, store); let renderer = createRenderer(preparedData, store, root); @@ -58,7 +65,8 @@ export async function race( } const events = registerEvents(store, ticker); - window.addEventListener('resize', resize); + const resizeObserver = createResizeObserver(resize); + resizeObserver?.observe(root); function subscribeToStore(store: Store, renderer: Renderer, data: Data[]) { const subscriptions = [ @@ -66,8 +74,8 @@ export async function race( computeNextDateSubscriber(data, store), DOMEventSubscriber(store), ]; - [...subscriptions, ...apiSubscriptions].forEach((subcsription) => { - store.subscribe(subcsription); + [...subscriptions, ...apiSubscriptions].forEach((subscription) => { + store.subscribe(subscription); }); } @@ -86,7 +94,6 @@ export async function race( } const API = { - // TODO: validate user input play() { if (!store.getState().ticker.isRunning) { ticker.start(); @@ -105,10 +112,12 @@ export async function race( ticker.skipForward(); }, inc(value = 1) { - store.dispatch(actions.ticker.inc(+value)); + if (!isNaN(Number(value))) value = 1; + store.dispatch(actions.ticker.inc(Number(value))); }, dec(value = 1) { - store.dispatch(actions.ticker.dec(+value)); + if (!isNaN(Number(value))) value = 1; + store.dispatch(actions.ticker.dec(Number(value))); }, setDate(inputDate: string | Date) { store.dispatch(actions.ticker.updateDate(getDateString(inputDate))); @@ -126,13 +135,13 @@ export async function race( d3.select(root) .select('rect.' + safeName(name)) .classed('selected', true); - store.dispatch(actions.data.addSelection(name)); + store.dispatch(actions.data.addSelection(String(name))); }, unselect(name: string) { d3.select(root) .select('rect.' + safeName(name)) .classed('selected', false); - store.dispatch(actions.data.removeSelection(name)); + store.dispatch(actions.data.removeSelection(String(name))); }, unselectAll() { d3.select(root).selectAll('rect').classed('selected', false); @@ -151,9 +160,11 @@ export async function race( store.dispatch(actions.data.resetFilters()); }, async changeOptions(newOptions: Partial) { + const newValidOptions = validateOptions(newOptions); + const unAllowedOptions: Array = ['dataShape', 'dataType']; unAllowedOptions.forEach((key) => { - if (newOptions[key] && newOptions[key] !== store.getState().options[key]) { + if (newValidOptions[key] && newValidOptions[key] !== store.getState().options[key]) { throw new Error(`The option "${key}" cannot be changed.`); } }); @@ -165,15 +176,16 @@ export async function race( 'startDate', 'endDate', 'fixedOrder', + 'makeCumulative', ]; let dataOptionsChanged = false; dataOptions.forEach((key) => { - if (newOptions[key] && newOptions[key] !== store.getState().options[key]) { + if (newValidOptions[key] && newValidOptions[key] !== store.getState().options[key]) { dataOptionsChanged = true; } }); - store.dispatch(actions.options.changeOptions(newOptions)); + store.dispatch(actions.options.changeOptions(newValidOptions)); const { injectStyles, theme, autorun } = store.getState().options; if (dataOptionsChanged) { @@ -184,7 +196,7 @@ export async function race( subscribeToStore(store, renderer, preparedData); } - if ('injectStyles' in newOptions || 'theme' in newOptions) { + if ('injectStyles' in newValidOptions || 'theme' in newValidOptions) { document.getElementById(stylesId)?.remove(); if (injectStyles) { stylesId = styleInject(root, theme); @@ -202,12 +214,15 @@ export async function race( } }, onDate(date: string | Date, fn: ApiCallback) { + if (typeof fn !== 'function') { + throw new Error('The second argument must be a function'); + } const dateString = getDateString(date); let lastDate = ''; const watcher = addApiSubscription(() => { if (store.getState().ticker.currentDate === dateString && dateString !== lastDate) { lastDate = store.getState().ticker.currentDate; // avoid infinite loop if fn dispatches action - fn.call(API, getTickDetails(store)); + fn(getTickDetails(store)); } lastDate = store.getState().ticker.currentDate; }); @@ -218,8 +233,11 @@ export async function race( }; }, on(event: EventType, fn: ApiCallback) { + if (typeof fn !== 'function') { + throw new Error('The second argument must be a function'); + } const watcher = events.addApiEventHandler(event, () => { - fn.call(API, getTickDetails(store)); + fn(getTickDetails(store)); }); return { remove() { @@ -231,7 +249,7 @@ export async function race( ticker.stop(); store.unsubscribeAll(); events.unregister(); - window.removeEventListener('resize', resize); + resizeObserver?.unobserve(root); root.innerHTML = ''; document.getElementById(stylesId)?.remove(); for (const method of Object.keys(this)) { diff --git a/src/lib/renderer/calculate-dimensions.ts b/src/lib/renderer/calculate-dimensions.ts index 212185a..2983c9a 100644 --- a/src/lib/renderer/calculate-dimensions.ts +++ b/src/lib/renderer/calculate-dimensions.ts @@ -43,7 +43,7 @@ export function calculateDimensions(store: Store, renderOptions: RenderOptions) 10, ); - const labelsArea = labelsPosition === 'inside' ? 0 : labelsWidth; + const labelsArea = labelsPosition !== 'outside' ? 0 : labelsWidth; const topAxisPadding = 15; const margin = { @@ -73,7 +73,7 @@ export function calculateDimensions(store: Store, renderOptions: RenderOptions) const iconSize = (renderOptions.iconSize = showIcons ? barHeight * 0.9 : 0); const iconSpace = (renderOptions.iconSpace = showIcons ? iconSize + labelPadding : 0); renderOptions.labelX = - labelsPosition === 'inside' + labelsPosition !== 'outside' ? (d: Data) => x(d.value) - labelPadding - iconSpace : margin.left - labelPadding; diff --git a/src/lib/renderer/controls.ts b/src/lib/renderer/controls.ts index 40d843c..420d34e 100644 --- a/src/lib/renderer/controls.ts +++ b/src/lib/renderer/controls.ts @@ -88,8 +88,8 @@ export function renderOverlays(store: Store, renderOptions: RenderOptions) { d3.select(root) .append('div') .classed('overlay', true) - .style('minHeight', minHeight + 'px') - .style('minWidth', minWidth + 'px') + .style('min-height', minHeight + 'px') + .style('min-width', minWidth + 'px') .selectAll('div') .data(overlayButtonIcons) .enter() diff --git a/src/lib/renderer/index.ts b/src/lib/renderer/index.ts index 4910cc0..e7c6b77 100644 --- a/src/lib/renderer/index.ts +++ b/src/lib/renderer/index.ts @@ -1,4 +1,5 @@ export { createRenderer } from './create-renderer'; +export { createResizeObserver } from './resize-observer'; export { elements } from './elements'; export { rendererSubscriber } from './renderer-subscriber'; export type { Renderer } from './renderer.models'; diff --git a/src/lib/renderer/render-frame.ts b/src/lib/renderer/render-frame.ts index 171c366..8d2ad92 100644 --- a/src/lib/renderer/render-frame.ts +++ b/src/lib/renderer/render-frame.ts @@ -2,7 +2,7 @@ import * as d3 from '../d3'; import type { Data } from '../data'; import type { Store } from '../store'; -import { getDateSlice, safeName, getColor, getIconID, getText } from '../utils'; +import { getDateSlice, safeName, getColor, getIconID, getText, countDecimals } from '../utils'; import type { RenderOptions } from './render-options'; import { selectFn, highlightFn, halo } from './helpers'; import { updateControls } from './controls'; @@ -50,6 +50,7 @@ export function renderFrame(data: Data[], store: Store, renderOptions: RenderOpt const currentDate = store.getState().ticker.currentDate; const CompleteDateSlice = getDateSlice(currentDate, data, store); const dateSlice = CompleteDateSlice.slice(0, topN); + const valueDecimals = store.getState().options.valueDecimals; if (showGroups) { svg @@ -114,7 +115,8 @@ export function renderFrame(data: Data[], store: Store, renderOptions: RenderOpt .enter() .append('text') .attr('class', 'label') - .classed('outside-bars', labelsPosition !== 'inside') + .classed('outside-bars', labelsPosition === 'outside') + .classed('hidden', labelsPosition === 'none') .attr('x', labelX) .attr('y', () => y(topN + 1) + marginBottom + 5 + barHalfHeight) .style('text-anchor', 'end') @@ -153,7 +155,11 @@ export function renderFrame(data: Data[], store: Store, renderOptions: RenderOpt .attr('class', 'valueLabel') .attr('x', (d: Data) => x(d.value) + 5) .attr('y', () => y(topN + 1) + marginBottom + 5) - .text((d: Data) => d3.format(',.0f')(d.lastValue as number)) + .text((d: Data) => + valueDecimals === 'preserve' + ? d.lastValue + : d3.format(`,.${countDecimals(d.lastValue ?? d.value)}f`)(d.lastValue as number), + ) .transition() .duration(tickDuration) .ease(d3.easeLinear) @@ -167,10 +173,14 @@ export function renderFrame(data: Data[], store: Store, renderOptions: RenderOpt .attr('x', (d: Data) => x(d.value) + 5) .attr('y', (d: Data) => barY(d) + barHalfHeight) .tween('text', function (d: Data) { - const lastValue = sameDate ? d.value : (d.lastValue as number); - const i = d3.interpolateRound(lastValue, d.value); + const lastValue = Number(sameDate ? d.value : (d.lastValue as number)) || 0; + const i = d3.interpolate(lastValue, d.value); return function (t: number) { - this.textContent = d3.format(',')(i(t)); + const decimals = + valueDecimals === 'preserve' + ? Math.max(countDecimals(d.value), countDecimals(lastValue)) + : valueDecimals; + this.textContent = d3.format(`,.${decimals || 0}f`)(i(t)); }; }); @@ -224,7 +234,8 @@ export function renderFrame(data: Data[], store: Store, renderOptions: RenderOpt .transition() .duration(tickDuration) .ease(d3.easeLinear) - .attr('cy', (d: Data) => y(d.rank as number) + barHalfHeight); + .attr('cy', (d: Data) => y(d.rank as number) + barHalfHeight) + .attr('clip-path', `url(#clipPath-${store.getState().container.element.id})`); icons .transition() diff --git a/src/lib/renderer/render-initial-view.ts b/src/lib/renderer/render-initial-view.ts index a125786..4a50c57 100644 --- a/src/lib/renderer/render-initial-view.ts +++ b/src/lib/renderer/render-initial-view.ts @@ -2,7 +2,7 @@ import * as d3 from '../d3'; import type { Store } from '../store'; import type { Data } from '../data'; -import { getDateSlice, getText, getColor, safeName, getIconID } from '../utils'; +import { getDateSlice, getText, getColor, safeName, getIconID, countDecimals } from '../utils'; import type { RenderOptions } from './render-options'; import { calculateDimensions } from './calculate-dimensions'; import { renderHeader } from './render-header'; @@ -20,6 +20,7 @@ export function renderInitialView(data: Data[], store: Store, renderOptions: Ren const CompleteDateSlice = getDateSlice(currentDate, data, store); const dateSlice = CompleteDateSlice.slice(0, topN); const lastDateIndex = dates.indexOf(currentDate) > 0 ? dates.indexOf(currentDate) - 1 : 0; + const valueDecimals = store.getState().options.valueDecimals; renderOptions.lastDate = dates[lastDateIndex]; if (!root || dateSlice.length === 0) return; @@ -97,7 +98,8 @@ export function renderInitialView(data: Data[], store: Store, renderOptions: Ren .enter() .append('text') .attr('class', 'label') - .classed('outside-bars', labelsPosition !== 'inside') + .classed('outside-bars', labelsPosition === 'outside') + .classed('hidden', labelsPosition === 'none') .attr('x', labelX) .attr('y', (d: Data) => barY(d) + barHalfHeight) .style('text-anchor', 'end') @@ -114,7 +116,11 @@ export function renderInitialView(data: Data[], store: Store, renderOptions: Ren .attr('class', 'valueLabel') .attr('x', (d: Data) => x(d.value) + 5) .attr('y', (d: Data) => barY(d) + barHalfHeight) - .text((d: Data) => d3.format(',.0f')(d.lastValue as number)); + .text((d: Data) => + valueDecimals === 'preserve' + ? d.lastValue + : d3.format(`,.${countDecimals(d.lastValue ?? d.value)}f`)(d.lastValue as number), + ); if (showIcons) { const defs = (renderOptions.defs = svg.append('svg:defs')); @@ -135,6 +141,15 @@ export function renderInitialView(data: Data[], store: Store, renderOptions: Ren .attr('x', 0) .attr('y', 0); + svg + .append('clipPath') + .attr('id', 'clipPath-' + store.getState().container.element.id) + .append('rect') + .attr('x', x(0) + 1) + .attr('y', margin.top) + .attr('width', width) + .attr('height', height); + svg .selectAll('circle') .data(dateSlice, (d: Data) => d.name) @@ -144,7 +159,8 @@ export function renderInitialView(data: Data[], store: Store, renderOptions: Ren .attr('cy', (d: Data) => y(d.rank as number) + barHalfHeight) .attr('r', iconSize / 2) .style('fill', 'transparent') - .style('fill', (d: Data) => `url(#${getIconID(d)})`); + .style('fill', (d: Data) => `url(#${getIconID(d)})`) + .attr('clip-path', `url(#clipPath-${store.getState().container.element.id})`); } const endY = height - margin.bottom; diff --git a/src/lib/renderer/resize-observer.ts b/src/lib/renderer/resize-observer.ts new file mode 100644 index 0000000..acc9cec --- /dev/null +++ b/src/lib/renderer/resize-observer.ts @@ -0,0 +1,18 @@ +export function createResizeObserver(resizeFn: () => void) { + if (window.ResizeObserver && window.requestAnimationFrame) { + return new ResizeObserver((entries) => { + window.requestAnimationFrame((): void | undefined => { + if (!entries?.length) return; + resizeFn(); + }); + }); + } + return { + observe: () => { + window.addEventListener('resize', resizeFn); + }, + unobserve: () => { + window.removeEventListener('resize', resizeFn); + }, + }; +} diff --git a/src/lib/utils/data.ts b/src/lib/utils/data.ts index 1a459e9..6637d75 100644 --- a/src/lib/utils/data.ts +++ b/src/lib/utils/data.ts @@ -25,7 +25,7 @@ export async function prepareData( const messageId = generateId(); worker.postMessage({ type: 'prepare-data', - data, + data: await data, options: removeFnOptions(store.getState().options), baseUrl: location.href, messageId, diff --git a/src/lib/utils/utils.ts b/src/lib/utils/utils.ts index ca1f33d..60449e4 100644 --- a/src/lib/utils/utils.ts +++ b/src/lib/utils/utils.ts @@ -61,6 +61,8 @@ function toNumber(s: string | number) { return +nums; } +export const countDecimals = (n: number) => String(n).split('.')[1]?.length || 0; + export function random(InputSeed: string | number) { const seed = toNumber(InputSeed); const x = Math.sin(seed) * 10000; @@ -170,7 +172,7 @@ export function getText( export function safeName(name: string) { // replace non-alphanumeric with underscore - return name.replace(/[\W]+/g, '_'); + return String(name).replace(/[\W]+/g, '_'); } export function toggleClass(root: HTMLElement, selector: string, className: string) { diff --git a/src/package.lib.json b/src/package.lib.json index a3b10d3..d3b26e1 100644 --- a/src/package.lib.json +++ b/src/package.lib.json @@ -1,6 +1,6 @@ { "name": "racing-bars", - "version": "0.2.0", + "version": "0.3.0", "description": "Bar chart race made easy 📶", "author": "Hatem Hosny", "license": "MIT", diff --git a/src/vue.ts b/src/vue.ts index 76a4057..eed14de 100644 --- a/src/vue.ts +++ b/src/vue.ts @@ -25,6 +25,7 @@ const props = { dataTransform: [Function, Object], // Object for null fillDateGapsInterval: [String, Object], // Object for null fillDateGapsValue: String, + valueDecimals: Number, makeCumulative: String, // Boolean title: String, subTitle: String, diff --git a/website/docs/documentation/options.md b/website/docs/documentation/options.md index f375413..5e4c8eb 100644 --- a/website/docs/documentation/options.md +++ b/website/docs/documentation/options.md @@ -175,7 +175,7 @@ See the guide on [`chart controls`](../guides/chart-controls.md) for other alter ### dataShape -Instruction whether the data shape is "long" or "wide". By default, the library tries to detect the data shape automatically from its structure (after any [transformation](#dataTransform), by finding the columns `date`, `name` and `value`). If the data shape is not detected correctly, it can be manually specified. +Instruction whether the data shape is "long" or "wide". By default, the library tries to detect the data shape automatically from its structure (after any [transformation](#datatransform), by finding the columns `date`, `name` and `value`). If the data shape is not detected correctly, it can be manually specified. See ["Data" section](./data.md) for more details and examples. - Type: `"long" | "wide" | "auto"` @@ -516,12 +516,13 @@ See the guide on [`chart controls`](../guides/chart-controls.md) for other alter ### labelsPosition Sets the position of bar labels. If set to `"inside"`, the labels are positioned inside the bars. -Otherwise, the labels are positioned on the left side of the bars. +If set to `"outside"`, the labels are positioned on the left side of the bars. +If set to `"none"`, the labels are not displayed (this can be useful to show icons only - see [example in gallery](../gallery/labels-position.md)). Note that if this is set to `"inside"` (default), bars with small width (low values) may have their labels partially invisible ([demo](../gallery/fixed-scale)). -- Type: `"inside" | "outside"` +- Type: `"inside" | "outside" | "none"` - Default: `"inside"` - Example: [view in gallery](../gallery/labels-position.md) @@ -843,6 +844,20 @@ const options = { }; ``` +### valueDecimals + +Number of decimal places to display for values. By default (`"preserve"`), the values in the data are used as is. + +- Type: `number | "preserve"` +- Default: `"preserve"` +- Example: [view in gallery](../gallery/value-decimals.md) + +```js +const options = { + valueDecimals: 0, +}; +``` + ### width Specifies the width of the chart. diff --git a/website/docs/gallery/_gallery-demos.ts b/website/docs/gallery/_gallery-demos.ts index 4bd3d2d..e3ec57c 100644 --- a/website/docs/gallery/_gallery-demos.ts +++ b/website/docs/gallery/_gallery-demos.ts @@ -254,20 +254,6 @@ export const fillDateGapsNull: ChartProps = { label: 'Filling Date Gaps: null (default)', dataUrl: '/data/population.csv', fillDateGapsInterval: null, - dataTransform: function multiplyBy1000(data) { - return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, - })); - }, - dynamicProps: { - dataTransform: `function multiplyBy1000(data) { -return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, -})); -}`, - }, }; export const fillDateGapsMonthInterpolate: ChartProps = { @@ -275,20 +261,7 @@ export const fillDateGapsMonthInterpolate: ChartProps = { dataUrl: '/data/population.csv', fillDateGapsInterval: 'month', fillDateGapsValue: 'interpolate', - dataTransform: function multiplyBy1000(data) { - return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, - })); - }, - dynamicProps: { - dataTransform: `function multiplyBy1000(data) { -return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, -})); -}`, - }, + valueDecimals: 2, }; export const fillDateGapsMonthLast: ChartProps = { @@ -296,20 +269,7 @@ export const fillDateGapsMonthLast: ChartProps = { dataUrl: '/data/population.csv', fillDateGapsInterval: 'month', fillDateGapsValue: 'last', - dataTransform: function multiplyBy1000(data) { - return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, - })); - }, - dynamicProps: { - dataTransform: `function multiplyBy1000(data) { -return data.map((d) => ({ - ...d, - value: Number(d.value) * 1000, -})); -}`, - }, + valueDecimals: 2, }; export const fixedOrder: ChartProps = { @@ -368,6 +328,22 @@ export const labelsPosition: ChartProps = { labelsPosition: 'outside', }; +export const labelsPositionNone: ChartProps = { + label: 'Hidden Labels', + dataUrl: '/data/population.csv', + dataTransform: (data) => + data.map((d) => ({ + ...d, + icon: `https://flagsapi.com/${d.code}/flat/64.png`, + })), + title: 'World Population', + labelsPosition: 'none', + showIcons: true, + dynamicProps: { + dataTransform: `(data) => data.map((d) => ({ ...d, icon: \`https://flagsapi.com/\${d.code}/flat/64.png\` }))`, + }, +}; + export const loop: ChartProps = { label: 'Loop', dataUrl: '/data/population.csv', @@ -454,3 +430,10 @@ export const topN: ChartProps = { title: 'World Population', topN: 5, }; + +export const valueDecimals: ChartProps = { + label: 'Value Decimals', + dataUrl: '/data/population.csv', + title: 'World Population', + valueDecimals: 3, +}; diff --git a/website/docs/gallery/icons.md b/website/docs/gallery/icons.md index 7fc7191..bac7826 100644 --- a/website/docs/gallery/icons.md +++ b/website/docs/gallery/icons.md @@ -4,7 +4,7 @@ hide_table_of_contents: true --- import RacingBars from '../../src/components/RacingBars'; -import { icons } from './\_gallery-demos.ts'; +import { icons, labelsPositionNone } from './\_gallery-demos.ts'; A demo showing the use of [icons](../guides/icons.md). @@ -27,3 +27,14 @@ Notice setting [`labelsPosition`](../documentation/options.md#labelsposition) to You may also use the [`dataTransform`](../documentation/options.md#datatransform) option for data transformation, like in [this example](./data-transform.md). + +### Show icons only + +Bars can have icons only (without labels), by combining the `showIcons: true` option with `labelsPosition: 'none'`. + +
+ + +
diff --git a/website/docs/gallery/labels-position.md b/website/docs/gallery/labels-position.md index 2dbb3c3..3f16642 100644 --- a/website/docs/gallery/labels-position.md +++ b/website/docs/gallery/labels-position.md @@ -4,7 +4,7 @@ hide_table_of_contents: true --- import RacingBars from '../../src/components/RacingBars'; -import { labelsPosition } from './\_gallery-demos.ts'; +import { labelsPosition, labelsPositionNone } from './\_gallery-demos.ts'; A demo for using [`labelsPosition`](../documentation/options.md#labelsposition). @@ -31,3 +31,14 @@ A demo for using [`labelsPosition`](../documentation/options.md#labelsposition). /> + +## labelsPosition: 'none' + +### Chart + +
+ + +
diff --git a/website/docs/gallery/value-decimals.md b/website/docs/gallery/value-decimals.md new file mode 100644 index 0000000..7f3fba9 --- /dev/null +++ b/website/docs/gallery/value-decimals.md @@ -0,0 +1,19 @@ +--- +title: Value Decimals +hide_table_of_contents: true +--- + +import RacingBars from '../../src/components/RacingBars'; +import { valueDecimals } from './\_gallery-demos.ts'; + +A demo for using [`valueDecimals`](../documentation/options.md#valuedecimals) to control the number of decimal places to display for values. + + + +### Chart + +
+ +
diff --git a/website/docs/guides/colors.md b/website/docs/guides/colors.md index e69de29..f1b5002 100644 --- a/website/docs/guides/colors.md +++ b/website/docs/guides/colors.md @@ -0,0 +1,5 @@ +--- +title: Colors +--- + +TODO... diff --git a/website/docs/guides/data-transformation.md b/website/docs/guides/data-transformation.md new file mode 100644 index 0000000..a4a9a9a --- /dev/null +++ b/website/docs/guides/data-transformation.md @@ -0,0 +1,125 @@ +--- +title: Data Transformation +--- + +By, default, the [loaded data](../documentation/data.md) is used as is. + +However, it is possible to transform the data before it is used in the chart, by one of these ways: + +## `dataTransform` function + +The [chart options](../documentation/options.md) can have a [`dataTransform`](../documentation/options.md#datatransform) function which can be used to transform the data before it is used in the chart. It receives the loaded data and returns the transformed data. + +Example: + +```js +import { race } from 'racing-bars'; + +const options = { + dataTransform: (data) => + data.map((d) => ({ + ...d, + icon: `https://flagsapi.com/${d.code}/flat/64.png`, + })), + title: 'World Population', + // ... +}; + +race('/data/population.csv', '#race', options); +``` + +[View in gallery](../gallery/data-transform.md) + +## Manually loading and transforming data + +The [`loadData`](../documentation/api.md#loaddata) function can be used to load data. It can then be transformed before it is used in the chart. + +```js +import { loadData, race } from 'racing-bars'; + +const data = await loadData('/data/population.csv', 'csv'); +const transformedData = data.map((d) => ({ + ...d, + icon: `https://flagsapi.com/${d.code}/flat/64.png`, +})); + +const options = { + title: 'World Population', + // ... +}; + +race(transformedData, '#race', options); +``` + +## `startDate` and `endDate` options + +The data can be filtered by setting the [`startDate`](../documentation/options.md#startDate) and [`endDate`](../documentation/options.md#endDate) options. + +```js +import { race } from 'racing-bars'; + +const options = { + title: 'World Population', + startDate: '1970-01-01', + endDate: '1999-12-31', +}; + +race('/data/population.csv', '#race', options); +``` + +[View in gallery](../gallery/start-end-dates.md) + +## `makeCumulative` option + +The data values can be converted to cumulative sums (running totals) by setting the [`makeCumulative`](../documentation/options.md#makecummulative) option to `true`. + +```js +import { race } from 'racing-bars'; + +const options = { + title: 'Github Stars', + makeCumulative: true, + // ... +}; + +race('/data/gh-star.csv', '#race', options); +``` + +[View in gallery](../gallery/data-gh-star.md) + +## `valueDecimals` option + +In case you just need to control the number of decimal places to display for values, you do not need to transform the data. You may just use the [`valueDecimals`](../documentation/options.md#valuedecimals) option. + +```js +import { race } from 'racing-bars'; + +const options = { + title: 'World Population', + valueDecimals: 0, + // ... +}; + +race('/data/population.csv', '#race', options); +``` + +[View in gallery](../gallery/value-decimals.md) + +## Filling gaps in data + +Dates that are missing from data will be skipped. +If you need to fill date gaps, you may use the options [`fillDateGapsInterval`](../documentation/options.md#filldategapsinterval) and [`fillDateGapValue`](../documentation/options.md#filldategapsvalue). + +```js +import { race } from 'racing-bars'; + +const options = { + fillDateGapsInterval: 'month', + fillDateGapsValue: 'interpolate', + valueDecimals: 2, +}; + +race('/data/population.csv', '#race', options); +``` + +[View in gallery](../gallery/fill-date-gaps.md) diff --git a/website/docs/index.md b/website/docs/index.md index a338623..f4fcaa1 100644 --- a/website/docs/index.md +++ b/website/docs/index.md @@ -16,9 +16,12 @@ _RacingBars_ is an [open-source](https://github.com/hatemhosny/racing-bars), lig _RacingBars_ is available for JavaScript, TypeScript, React, Vue and Svelte. import RacingBars from '../src/components/RacingBars'; +import ChartOptions from '../src/components/ChartOptions'; **Examples:** +This is a basic chart with the default options +

-export const transformFn = (data) => data.map((d) => ({ -...d, -icon: `https://flagsapi.com/${d.code}/flat/64.png`, -})); +Try playing with some of the [options](./documentation/options.md). Or check the code [playground](./playground).
- data.map((d) => ({ - ...d, - icon: \`https://flagsapi.com/\${d.code}/flat/64.png\`, - }))`}} -/> +
diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 5518ce0..0638548 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -70,6 +70,11 @@ const config: Config = { }, ], }, + docs: { + sidebar: { + hideable: true, + }, + }, footer: { style: 'dark', links: [ @@ -136,18 +141,30 @@ const config: Config = { darkTheme: prismThemes.dracula, additionalLanguages: ['json'], }, + algolia: { + appId: 'PGI61GHXJD', + apiKey: '6c4c87fe6ec8c139e4a941f00d4b5717', + indexName: 'racing-bars', + contextualSearch: true, + replaceSearchResultPathname: { + from: '/docs/', + to: '/', + }, + searchParameters: {}, + searchPagePath: 'search', + }, } satisfies Preset.ThemeConfig, scripts: [ { - src: 'https://unpkg.com/prettier@2.4.1/standalone.js', + src: '/js/prettier-2.4.1/standalone.js', async: true, }, { - src: 'https://unpkg.com/prettier@2.4.1/parser-babel.js', + src: '/js/prettier-2.4.1/parser-babel.js', async: true, }, { - src: 'https://unpkg.com/prettier@2.4.1/parser-html.js', + src: '/js/prettier-2.4.1/parser-html.js', async: true, }, ], diff --git a/website/sidebars.ts b/website/sidebars.ts index b635357..ef0c457 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -5,10 +5,8 @@ import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; - create an ordered group of docs - render a sidebar for each doc of that group - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. + The sidebars can be generated from the filesystem, or explicitly defined here. + Create as many sidebars as you want. */ const sidebars: SidebarsConfig = { docsSidebar: [ @@ -59,6 +57,7 @@ const sidebars: SidebarsConfig = { type: 'generated-index', }, items: [ + 'guides/data-transformation', 'guides/chart-size', 'guides/bar-colors', 'guides/themes-styles', diff --git a/website/src/components/ChartOptions/index.tsx b/website/src/components/ChartOptions/index.tsx new file mode 100644 index 0000000..9d9ad66 --- /dev/null +++ b/website/src/components/ChartOptions/index.tsx @@ -0,0 +1,86 @@ +// eslint-disable-next-line import/no-unresolved +import { getBaseUrl } from '@site/src/helpers/base-url'; +import RacingBars from '../RacingBars'; +import type { Props } from '../../../../src'; +import styles from './styles.module.css'; + +const PARAMS: Props = { + dataTransform: (data) => + data.map((d) => ({ + ...d, + icon: `https://flagsapi.com/${d.code}/flat/64.png`, + })), + colorSeed: '', + showGroups: false, + topN: 10, + autorun: false, + loop: false, + title: 'World Population', + subTitle: 'in millions', + caption: 'Source: World Bank', + dateCounter: 'MM/YYYY', + labelsPosition: 'inside', + labelsWidth: 150, + showIcons: true, + controlButtons: 'all', + overlays: 'all', + theme: 'dark', + fixedScale: false, + highlightBars: true, + selectBars: true, +}; + +async function initPane(racer) { + const baseUrl = getBaseUrl(); + const mod = await import(/* webpackIgnore: true */ `${baseUrl}/js/tweakpane.min.js`); + const { Pane } = mod; + const pane = new Pane({ + container: document.querySelector('#tweakpane')!, + expanded: true, + title: 'Change Options:', + }); + + pane.addBinding(PARAMS, 'theme', { options: { dark: 'dark', light: 'light' } }); + pane.addBinding(PARAMS, 'title'); + pane.addBinding(PARAMS, 'subTitle'); + pane.addBinding(PARAMS, 'caption'); + pane.addBinding(PARAMS, 'dateCounter'); + pane.addBinding(PARAMS, 'showIcons'); + pane.addBinding(PARAMS, 'showGroups'); + pane.addBinding(PARAMS, 'topN', { min: 2, max: 15, step: 1 }); + pane.addBinding(PARAMS, 'labelsPosition', { + options: { inside: 'inside', outside: 'outside', none: 'none' }, + }); + pane.addBinding(PARAMS, 'labelsWidth', { min: 0, max: 300, step: 1 }); + pane.addBinding(PARAMS, 'loop'); + pane.addBinding(PARAMS, 'controlButtons', { + options: { all: 'all', play: 'play', none: 'none' }, + }); + pane.addBinding(PARAMS, 'overlays', { + options: { all: 'all', play: 'play', repeat: 'repeat', none: 'none' }, + }); + pane.addBinding(PARAMS, 'fixedScale'); + pane.addBinding(PARAMS, 'colorSeed'); + pane.addBinding(PARAMS, 'highlightBars'); + pane.addBinding(PARAMS, 'selectBars'); + + pane.on('change', (ev: any) => { + const key = ev.target.label; + racer.changeOptions({ [key]: ev.value }); + }); +} + +export default function ChartOptions() { + return ( +
+ initPane(racer)} + showCode={false} + className={styles.chart} + /> +
+
+ ); +} diff --git a/website/src/components/ChartOptions/styles.module.css b/website/src/components/ChartOptions/styles.module.css new file mode 100644 index 0000000..7a7db0f --- /dev/null +++ b/website/src/components/ChartOptions/styles.module.css @@ -0,0 +1,17 @@ +.container { + display: flex; + justify-content: center; + min-width: 100%; + gap: 1em; +} + +.tweakpane { + width: 300px; +} + +@media screen and (max-width: 600px) { + .container { + align-items: center; + flex-direction: column; + } +} diff --git a/website/src/components/OpenInPlayground/index.tsx b/website/src/components/OpenInPlayground/index.tsx index c53d6b3..4630558 100644 --- a/website/src/components/OpenInPlayground/index.tsx +++ b/website/src/components/OpenInPlayground/index.tsx @@ -1,15 +1,11 @@ /* eslint-disable import/no-unresolved */ import React from 'react'; import { getPlaygroundUrl, type Config, type Language } from 'livecodes'; -import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import { getBaseUrl } from '@site/src/helpers/base-url'; import styles from './styles.module.css'; export default function OpenInPlayground(props: { language: Language; code: string }) { - const baseUrl = ExecutionEnvironment.canUseDOM - ? location.origin - : useDocusaurusContext().siteConfig.url; - + const baseUrl = getBaseUrl(); const config: Partial = { title: 'RacingBars', activeEditor: 'script', diff --git a/website/src/components/RacingBars/index.tsx b/website/src/components/RacingBars/index.tsx index 32ccfe7..dd27fea 100644 --- a/website/src/components/RacingBars/index.tsx +++ b/website/src/components/RacingBars/index.tsx @@ -18,7 +18,7 @@ export default function RacingBars( label?: string; }, ): JSX.Element { - const { label, className, style, showCode, dynamicProps, ...options } = props; + const { label, className, style, showCode, dynamicProps, callback, ...options } = props; const { jsCode, tsCode, reactCode, vueCode, svelteCode } = getFrameworkCode( options, dynamicProps, @@ -55,6 +55,7 @@ export default function RacingBars( }} {...{ theme: colorMode, + callback, ...options, }} > diff --git a/website/src/helpers/base-url.ts b/website/src/helpers/base-url.ts new file mode 100644 index 0000000..cd09b25 --- /dev/null +++ b/website/src/helpers/base-url.ts @@ -0,0 +1,6 @@ +/* eslint-disable import/no-unresolved */ +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; + +export const getBaseUrl = () => + ExecutionEnvironment.canUseDOM ? location.origin : useDocusaurusContext().siteConfig.url; diff --git a/website/src/pages/playground.tsx b/website/src/pages/playground.tsx index ddf32e1..a2fb5cf 100644 --- a/website/src/pages/playground.tsx +++ b/website/src/pages/playground.tsx @@ -7,17 +7,14 @@ import Layout from '@theme/Layout'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import type { Options } from '../../../src'; import { getFrameworkCode } from '../helpers/get-framework-code'; +import { getBaseUrl } from '../helpers/base-url'; import { getCode } from '../components/OpenInPlayground'; import * as demos from '../../docs/gallery/_gallery-demos'; export default function Playground() { - const baseUrl = ExecutionEnvironment.canUseDOM - ? location.origin - : useDocusaurusContext().siteConfig.url; - + const baseUrl = getBaseUrl(); const defaultOptions = demos.datasetPopulation; const config: Partial = { diff --git a/website/static/js/prettier-2.4.1/parser-babel.js b/website/static/js/prettier-2.4.1/parser-babel.js new file mode 100644 index 0000000..76ffbfe --- /dev/null +++ b/website/static/js/prettier-2.4.1/parser-babel.js @@ -0,0 +1,22 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.babel=t())}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){var t={exports:{}};return e(t,t.exports),t.exports}var r,i,a=function(e){return e&&e.Math==Math&&e},n=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},u=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p={f:c&&!h.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:h},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,D=function(e){return d.call(e).slice(8,-1)},m="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==D(e)?m.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},A=function(e){return f(y(e))},E=function(e){return"object"==typeof e?null!==e:"function"==typeof e},C=function(e){return"function"==typeof e?e:void 0},x=function(e,t){return arguments.length<2?C(n[e]):n[e]&&n[e][t]},F=x("navigator","userAgent")||"",g=n.process,b=n.Deno,P=g&&g.versions||b&&b.version,T=P&&P.v8;T?i=(r=T.split("."))[0]<4?1:r[0]+r[1]:F&&(!(r=F.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=F.match(/Chrome\/(\d+)/))&&(i=r[1]);var w=i&&+i,S=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&w&&w<41})),B=S&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,N=B?function(e){return"symbol"==typeof e}:function(e){var t=x("Symbol");return"function"==typeof t&&Object(e)instanceof t},I=function(e,t){try{Object.defineProperty(n,e,{value:t,configurable:!0,writable:!0})}catch(s){n[e]=t}return t},v="__core-js_shared__",k=n[v]||I(v,{}),L=s((function(e){(e.exports=function(e,t){return k[e]||(k[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),O=function(e){return Object(y(e))},M={}.hasOwnProperty,R=Object.hasOwn||function(e,t){return M.call(O(e),t)},j=0,_=Math.random(),U=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++j+_).toString(36)},q=L("wks"),$=n.Symbol,H=B?$:$&&$.withoutSetter||U,V=function(e){return R(q,e)&&(S||"string"==typeof q[e])||(S&&R($,e)?q[e]=$[e]:q[e]=H("Symbol."+e)),q[e]},z=V("toPrimitive"),W=function(e,t){if(!E(e)||N(e))return e;var s,r=e[z];if(void 0!==r){if(void 0===t&&(t="default"),s=r.call(e,t),!E(s)||N(s))return s;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var s,r;if("string"===t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;if("function"==typeof(s=e.valueOf)&&!E(r=s.call(e)))return r;if("string"!==t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},G=function(e){var t=W(e,"string");return N(t)?t:String(t)},K=n.document,X=E(K)&&E(K.createElement),J=!u&&!o((function(){return 7!=Object.defineProperty((e="div",X?K.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),Y=Object.getOwnPropertyDescriptor,Q={f:u?Y:function(e,t){if(e=A(e),t=G(t),J)try{return Y(e,t)}catch(e){}if(R(e,t))return l(!p.f.call(e,t),e[t])}},Z=function(e){if(!E(e))throw TypeError(String(e)+" is not an object");return e},ee=Object.defineProperty,te={f:u?ee:function(e,t,s){if(Z(e),t=G(t),Z(s),J)try{return ee(e,t,s)}catch(e){}if("get"in s||"set"in s)throw TypeError("Accessors not supported");return"value"in s&&(e[t]=s.value),e}},se=u?function(e,t,s){return te.f(e,t,l(1,s))}:function(e,t,s){return e[t]=s,e},re=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(e){return re.call(e)});var ie,ae,ne,oe,ue=k.inspectSource,he=n.WeakMap,ce="function"==typeof he&&/native code/.test(ue(he)),pe=L("keys"),le={},de="Object already initialized",De=n.WeakMap;if(ce||k.state){var me=k.state||(k.state=new De),fe=me.get,ye=me.has,Ae=me.set;ie=function(e,t){if(ye.call(me,e))throw new TypeError(de);return t.facade=e,Ae.call(me,e,t),t},ae=function(e){return fe.call(me,e)||{}},ne=function(e){return ye.call(me,e)}}else{var Ee=pe[oe="state"]||(pe[oe]=U(oe));le[Ee]=!0,ie=function(e,t){if(R(e,Ee))throw new TypeError(de);return t.facade=e,se(e,Ee,t),t},ae=function(e){return R(e,Ee)?e[Ee]:{}},ne=function(e){return R(e,Ee)}}var Ce={set:ie,get:ae,has:ne,enforce:function(e){return ne(e)?ae(e):ie(e,{})},getterFor:function(e){return function(t){var s;if(!E(t)||(s=ae(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return s}}},xe=s((function(e){var t=Ce.get,s=Ce.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var o,u=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||R(i,"name")||se(i,"name",t),(o=s(i)).source||(o.source=r.join("string"==typeof t?t:""))),e!==n?(u?!c&&e[t]&&(h=!0):delete e[t],h?e[t]=i:se(e,t,i)):h?e[t]=i:I(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||ue(this)}))})),Fe=Math.ceil,ge=Math.floor,be=function(e){return isNaN(e=+e)?0:(e>0?ge:Fe)(e)},Pe=Math.min,Te=function(e){return e>0?Pe(be(e),9007199254740991):0},we=Math.max,Se=Math.min,Be=function(e){return function(t,s,r){var i,a=A(t),n=Te(a.length),o=function(e,t){var s=be(e);return s<0?we(s+t,0):Se(s,t)}(r,n);if(e&&s!=s){for(;n>o;)if((i=a[o++])!=i)return!0}else for(;n>o;o++)if((e||o in a)&&a[o]===s)return e||o||0;return!e&&-1}},Ne={includes:Be(!0),indexOf:Be(!1)}.indexOf,Ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ve={f:Object.getOwnPropertyNames||function(e){return function(e,t){var s,r=A(e),i=0,a=[];for(s in r)!R(le,s)&&R(r,s)&&a.push(s);for(;t.length>i;)R(r,s=t[i++])&&(~Ne(a,s)||a.push(s));return a}(e,Ie)}},ke={f:Object.getOwnPropertySymbols},Le=x("Reflect","ownKeys")||function(e){var t=ve.f(Z(e)),s=ke.f;return s?t.concat(s(e)):t},Oe=function(e,t){for(var s=Le(t),r=te.f,i=Q.f,a=0;a0&&ze(u))h=Ke(e,t,u,Te(u.length),h,a-1)-1;else{if(h>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[h]=u}h++}c++}return h},Xe=Ke,Je=V("species"),Ye=function(e,t){return new(function(e){var t;return ze(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!ze(t.prototype)?E(t)&&null===(t=t[Je])&&(t=void 0):t=void 0),void 0===t?Array:t}(e))(0===t?0:t)};Ve({target:"Array",proto:!0},{flatMap:function(e){var t,s=O(this),r=Te(s.length);return We(e),(t=Ye(s,0)).length=Xe(t,s,s,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Qe=function(...e){let t;for(const[s,r]of e.entries())try{return{result:r()}}catch(e){0===s&&(t=e)}return{error:t}},Ze=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const et=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var tt=et,st=et;tt.default=st;const rt=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=Ze(e)).length)return 0;e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let t=0;for(let s=0;s=127&&r<=159||(r>=768&&r<=879||(r>65535&&s++,t+=tt(r)?2:1))}return t};var it=rt,at=rt;it.default=at;var nt=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var ot=e=>e[e.length-1];function ut(e,t){if(null==e)return{};var s,r,i=function(e,t){if(null==e)return{};var s,r,i={},a=Object.keys(e);for(r=0;r=0||(i[s]=e[s]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}var ht,ct,pt=function(e){if(N(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},lt=Math.floor,dt=function(e,t){var s=e.length,r=lt(s/2);return s<8?Dt(e,t):mt(dt(e.slice(0,r),t),dt(e.slice(r),t),t)},Dt=function(e,t){for(var s,r,i=e.length,a=1;a0;)e[r]=e[--r];r!==a++&&(e[r]=s)}return e},mt=function(e,t,s){for(var r=e.length,i=t.length,a=0,n=0,o=[];a3)){if(Et)return!0;if(xt)return xt<603;var e,t,s,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:s=3;break;case 68:case 71:s=4;break;default:s=2}for(r=0;r<47;r++)Ft.push({k:t+r,v:s})}for(Ft.sort((function(e,t){return t.v-e.v})),r=0;rpt(s)?1:-1}}(e))).length,r=0;ra;a++)if((o=y(e[a]))&&o instanceof _t)return o;return new _t(!1)}r=function(e,t){var s=arguments.length<2?Rt(e):t;if("function"!=typeof s)throw TypeError(String(e)+" is not iterable");return Z(s.call(e))}(e,i)}for(u=r.next;!(h=u.call(r)).done;){try{o=y(h.value)}catch(e){jt(r,"throw",e)}if("object"==typeof o&&o&&o instanceof _t)return o}return new _t(!1)};Ve({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Ut(e,(function(e,s){!function(e,t,s){var r=G(t);r in e?te.f(e,r,l(0,s)):e[r]=s}(t,e,s)}),{AS_ENTRIES:!0}),t}});var qt=void 0!==qt?qt:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function $t(){throw new Error("setTimeout has not been defined")}function Ht(){throw new Error("clearTimeout has not been defined")}var Vt=$t,zt=Ht;function Wt(e){if(Vt===setTimeout)return setTimeout(e,0);if((Vt===$t||!Vt)&&setTimeout)return Vt=setTimeout,setTimeout(e,0);try{return Vt(e,0)}catch(t){try{return Vt.call(null,e,0)}catch(t){return Vt.call(this,e,0)}}}"function"==typeof qt.setTimeout&&(Vt=setTimeout),"function"==typeof qt.clearTimeout&&(zt=clearTimeout);var Gt,Kt=[],Xt=!1,Jt=-1;function Yt(){Xt&&Gt&&(Xt=!1,Gt.length?Kt=Gt.concat(Kt):Jt=-1,Kt.length&&Qt())}function Qt(){if(!Xt){var e=Wt(Yt);Xt=!0;for(var t=Kt.length;t;){for(Gt=Kt,Kt=[];++Jt1)for(var s=1;sconsole.error("SEMVER",...e):()=>{};var ds={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Ds=s((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:s}=ds,r=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let n=0;const o=(e,t,s)=>{const o=n++;ls(o,t),a[e]=o,i[o]=t,r[o]=new RegExp(t,s?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),o("FULL",`^${i[a.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),o("LOOSE",`^${i[a.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),o("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),o("COERCE",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?(?:$|[^\\d])`),o("COERCERTL",i[a.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",o("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",o("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const ms=["includePrerelease","loose","rtl"];var fs=e=>e?"object"!=typeof e?{loose:!0}:ms.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const ys=/^[0-9]+$/,As=(e,t)=>{const s=ys.test(e),r=ys.test(t);return s&&r&&(e=+e,t=+t),e===t?0:s&&!r?-1:r&&!s?1:eAs(t,e)};const{MAX_LENGTH:Cs,MAX_SAFE_INTEGER:xs}=ds,{re:Fs,t:gs}=Ds,{compareIdentifiers:bs}=Es;class Ps{constructor(e,t){if(t=fs(t),e instanceof Ps){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>Cs)throw new TypeError(`version is longer than ${Cs} characters`);ls("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const s=e.trim().match(t.loose?Fs[gs.LOOSE]:Fs[gs.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>xs||this.major<0)throw new TypeError("Invalid major version");if(this.minor>xs||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>xs||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var Ts=Ps;var ws=(e,t,s)=>new Ts(e,s).compare(new Ts(t,s));var Ss=(e,t,s)=>ws(e,t,s)<0;var Bs=(e,t,s)=>ws(e,t,s)>=0,Ns=s((function(e,t){function s(){for(var e=[],t=0;t"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Os,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:vs},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Os,description:Is` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:vs},printWidth:{since:"0.0.0",category:Os,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:Ms,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Is` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:ks},rangeStart:{since:"1.4.0",category:Ms,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Is` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:ks},requirePragma:{since:"1.7.0",category:Ms,type:"boolean",default:!1,description:Is` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `,cliCategory:Ls},tabWidth:{type:"int",category:Os,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Os,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Os,type:"choice",default:[{since:"2.1.0",value:"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."}]}};const js=["cliName","cliCategory","cliDescription"],_s={compare:ws,lt:Ss,gte:Bs},Us="2.4.1",qs={CATEGORY_CONFIG:vs,CATEGORY_EDITOR:ks,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:Ls,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Os,CATEGORY_SPECIAL:Ms,options:Rs}.options;var $s={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:s=!1,showInternal:r=!1}={}){const i=Us.split("-",1)[0],a=e.flatMap((e=>e.languages||[])).filter(h),n=(o=Object.assign({},...e.map((({options:e})=>e)),qs),u="name",Object.entries(o).map((([e,t])=>Object.assign({[u]:e},t)))).filter((e=>h(e)&&c(e))).sort(((e,t)=>e.name===t.name?0:e.name{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(h).sort(((e,t)=>_s.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>h(e)&&c(e))),"parser"===t.name&&function(e,t,s){const r=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!r.has(t)){r.add(t);const a=s.find((e=>e.parsers&&e.parsers[t]));let n=i.name;a&&a.name&&(n+=` (plugin: ${a.name})`),e.choices.push({value:t,description:n})}}(t,a,e));const s=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:s})}));var o,u;return{languages:a,options:n};function h(e){return t||!("since"in e)||e.since&&_s.gte(i,e.since)}function c(e){return s||!("deprecated"in e)||e.deprecated&&_s.lt(i,e.deprecated)}}};const{getSupportInfo:Hs}=$s,Vs=/[^\x20-\x7F]/;function zs(e){return(t,s,r)=>{const i=r&&r.backwards;if(!1===s)return!1;const{length:a}=t;let n=s;for(;n>=0&&n(s.match(n.regex)||[]).length?n.quote:a.quote}return o}function ar(e,t,s){const r='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,a)=>i===r?i:a===t?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function nr(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let s=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");s.length>20&&(s=s.slice(0,19)+"\u2026");return t+(s?" "+s:"")}(e)}var or,ur={inferParserByLanguage:function(e,t){const{languages:s}=Hs({plugins:t.plugins}),r=s.find((({name:t})=>t.toLowerCase()===e))||s.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||s.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return r&&r.parsers[0]},getStringWidth:function(e){return e?Vs.test(e)?it(e):e.length:0},getMaxContinuousCount:function(e,t){const s=e.match(new RegExp(`(${nt(t)})+`,"g"));return null===s?0:s.reduce(((e,s)=>Math.max(e,s.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const s=e.match(new RegExp(`(${nt(t)})+`,"g"));if(null===s)return 0;const r=new Map;let i=0;for(const e of s){const s=e.length/t.length;r.set(s,!0),s>i&&(i=s)}for(let e=1;ee[e.length-2],getLast:ot,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:tr,getNextNonSpaceNonCommentCharacterIndex:sr,getNextNonSpaceNonCommentCharacter:function(e,t,s){return e.charAt(sr(e,t,s))},skip:zs,skipWhitespace:Ws,skipSpaces:Gs,skipToLineEnd:Ks,skipEverythingButNewLine:Xs,skipInlineComment:Js,skipTrailingComment:Ys,skipNewline:Qs,isNextLineEmptyAfterIndex:er,isNextLineEmpty:function(e,t,s){return er(e,s(t))},isPreviousLineEmpty:function(e,t,s){let r=s(t)-1;return r=Gs(e,r,{backwards:!0}),r=Qs(e,r,{backwards:!0}),r=Gs(e,r,{backwards:!0}),r!==Qs(e,r,{backwards:!0})},hasNewline:Zs,hasNewlineInRange:function(e,t,s){for(let r=t;r0},createGroupIdMapper:function(e){const t=new WeakMap;return function(s){return t.has(s)||t.set(s,Symbol(e)),t.get(s)}}};function hr(){if(void 0===or){var e=new ArrayBuffer(2),t=new Uint8Array(e),s=new Uint16Array(e);if(t[0]=1,t[1]=2,258===s[0])or="BE";else{if(513!==s[0])throw new Error("unable to figure out endianess");or="LE"}}return or}function cr(){return void 0!==qt.location?qt.location.hostname:""}function pr(){return[]}function lr(){return 0}function dr(){return Number.MAX_VALUE}function Dr(){return Number.MAX_VALUE}function mr(){return[]}function fr(){return"Browser"}function yr(){return void 0!==qt.navigator?qt.navigator.appVersion:""}function Ar(){}function Er(){}function Cr(){return"javascript"}function xr(){return"browser"}function Fr(){return"/tmp"}var gr=Fr,br={EOL:"\n",arch:Cr,platform:xr,tmpdir:gr,tmpDir:Fr,networkInterfaces:Ar,getNetworkInterfaces:Er,release:yr,type:fr,cpus:mr,totalmem:Dr,freemem:dr,uptime:lr,loadavg:pr,hostname:cr,endianness:hr},Pr=Object.freeze({__proto__:null,endianness:hr,hostname:cr,loadavg:pr,uptime:lr,freemem:dr,totalmem:Dr,cpus:mr,type:fr,release:yr,networkInterfaces:Ar,getNetworkInterfaces:Er,arch:Cr,platform:xr,tmpDir:Fr,tmpdir:gr,EOL:"\n",default:br});const Tr=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");const t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const s=t.filter((e=>"\r\n"===e)).length;return s>t.length-s?"\r\n":"\n"};var wr=Tr;wr.graceful=e=>"string"==typeof e&&Tr(e)||"\n";var Sr=t(Pr),Br=function(e){const t=e.match(jr);return t?t[0].trimLeft():""},Nr=function(e){const t=e.match(jr);return t&&t[0]?e.substring(t[0].length):e},Ir=function(e){return zr(e).pragmas},vr=zr,kr=function({comments:e="",pragmas:t={}}){const s=(0,Or().default)(e)||Lr().EOL,r=" *",i=Object.keys(t),a=i.map((e=>Wr(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>" * "+e+s)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){const e=t[i[0]];return`/** ${Wr(i[0],e)[0]} */`}}const n=e.split(s).map((e=>` * ${e}`)).join(s)+s;return"/**"+s+(e?n:"")+(e&&i.length?r+s:"")+a+" */"};function Lr(){const e=Sr;return Lr=function(){return e},e}function Or(){const e=(t=wr)&&t.__esModule?t:{default:t};var t;return Or=function(){return e},e}const Mr=/\*\/$/,Rr=/^\/\*\*/,jr=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,_r=/(^|\s+)\/\/([^\r\n]*)/g,Ur=/^(\r?\n)+/,qr=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,$r=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Hr=/(\r?\n|^) *\* ?/g,Vr=[];function zr(e){const t=(0,Or().default)(e)||Lr().EOL;e=e.replace(Rr,"").replace(Mr,"").replace(Hr,"$1");let s="";for(;s!==e;)s=e,e=e.replace(qr,`${t}$1 $2${t}`);e=e.replace(Ur,"").trimRight();const r=Object.create(null),i=e.replace($r,"").replace(Ur,"").trimRight();let a;for(;a=$r.exec(e);){const e=a[2].replace(_r,"");"string"==typeof r[a[1]]||Array.isArray(r[a[1]])?r[a[1]]=Vr.concat(r[a[1]],e):r[a[1]]=e}return{comments:i,pragmas:r}}function Wr(e,t){return Vr.concat(t).map((t=>`@${e} ${t}`.trim()))}var Gr=Object.defineProperty({extract:Br,strip:Nr,parse:Ir,parseWithComments:vr,print:kr},"__esModule",{value:!0});var Kr={guessEndOfLine:function(e){const t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){let s;if("\n"===t)s=/\n/g;else if("\r"===t)s=/\r/g;else{if("\r\n"!==t)throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);s=/\r\n/g}const r=e.match(s);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}};const{parseWithComments:Xr,strip:Jr,extract:Yr,print:Qr}=Gr,{getShebang:Zr}=ur,{normalizeEndOfLine:ei}=Kr;function ti(e){const t=Zr(e);t&&(e=e.slice(t.length+1));const s=Yr(e),{pragmas:r,comments:i}=Xr(s);return{shebang:t,text:e,pragmas:r,comments:i}}var si={hasPragma:function(e){const t=Object.keys(ti(e).pragmas);return t.includes("prettier")||t.includes("format")},insertPragma:function(e){const{shebang:t,text:s,pragmas:r,comments:i}=ti(e),a=Jr(s),n=Qr({pragmas:Object.assign({format:""},r),comments:i.trimStart()});return(t?`${t}\n`:"")+ei(n)+(a.startsWith("\n")?"\n":"\n\n")+a}};const{isNonEmptyArray:ri}=ur;function ii(e,t){const{ignoreDecorators:s}=t||{};if(!s){const t=e.declaration&&e.declaration.decorators||e.decorators;if(ri(t))return ii(t[0])}return e.range?e.range[0]:e.start}function ai(e){return e.range?e.range[1]:e.end}function ni(e,t){return ii(e)===ii(t)}var oi={locStart:ii,locEnd:ai,hasSameLocStart:ni,hasSameLoc:function(e,t){return ni(e,t)&&function(e,t){return ai(e)===ai(t)}(e,t)}};const{hasPragma:ui}=si,{locStart:hi,locEnd:ci}=oi;var pi=function(e){return e="function"==typeof e?{parse:e}:e,Object.assign({astFormat:"estree",hasPragma:ui,locStart:hi,locEnd:ci},e)};var li=function(e,t){const s=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return s.loc=t,s};var di=function(e){const{message:t,loc:s}=e;return li(t.replace(/ \(.*\)/,""),{start:{line:s?s.line:0,column:s?s.column+1:0}})},Di=s((function(e){!function(){function t(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}e.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:t,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1},trailingStatement:s}}()})),mi=s((function(e){!function(){var t,s,r,i,a,n;function o(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),n=0;n<128;++n)i[n]=n>=97&&n<=122||n>=65&&n<=90||36===n||95===n;for(a=new Array(128),n=0;n<128;++n)a[n]=n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||36===n||95===n;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:s.NonAsciiIdentifierStart.test(o(e))},isIdentifierPartES5:function(e){return e<128?a[e]:s.NonAsciiIdentifierPart.test(o(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(o(e))},isIdentifierPartES6:function(e){return e<128?a[e]:t.NonAsciiIdentifierPart.test(o(e))}}}()})),fi=s((function(e){!function(){var t=mi;function s(e,t){return!(!t&&"yield"===e)&&r(e,t)}function r(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||s(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function n(e){var s,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!t.isIdentifierStartES5(i))return!1;for(s=1,r=e.length;s=r)return!1;if(!(56320<=(a=e.charCodeAt(s))&&a<=57343))return!1;i=1024*(i-55296)+(a-56320)+65536}if(!n(i))return!1;n=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:s,isKeywordES6:r,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:n,isIdentifierNameES6:o,isIdentifierES5:function(e,t){return n(e)&&!i(e,t)},isIdentifierES6:function(e,t){return o(e)&&!a(e,t)}}}()}));const yi=s((function(e,t){t.ast=Di,t.code=mi,t.keyword=fi})).keyword.isIdentifierNameES5,{getLast:Ai,hasNewline:Ei,skipWhitespace:Ci,isNonEmptyArray:xi,isNextLineEmptyAfterIndex:Fi,getStringWidth:gi}=ur,{locStart:bi,locEnd:Pi,hasSameLocStart:Ti}=oi,wi=new RegExp("^(?:(?=.)\\s)*:"),Si=new RegExp("^(?:(?=.)\\s)*::");function Bi(e){return"Block"===e.type||"CommentBlock"===e.type||"MultiLine"===e.type}function Ni(e){return"Line"===e.type||"CommentLine"===e.type||"SingleLine"===e.type||"HashbangComment"===e.type||"HTMLOpen"===e.type||"HTMLClose"===e.type}const Ii=new Set(["ExportDefaultDeclaration","ExportDefaultSpecifier","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration"]);function vi(e){return e&&Ii.has(e.type)}function ki(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Li(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function Oi(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}function Mi(e){return Hi(e)&&"Identifier"===e.callee.type&&("async"===e.callee.name||"inject"===e.callee.name||"fakeAsync"===e.callee.name)}function Ri(e){return"JSXElement"===e.type||"JSXFragment"===e.type}function ji(e){return"get"===e.kind||"set"===e.kind}function _i(e){return ji(e)||Ti(e,e.value)}const Ui=new Set(["BinaryExpression","LogicalExpression","NGPipeExpression"]);const qi=new Set(["AnyTypeAnnotation","TSAnyKeyword","NullLiteralTypeAnnotation","TSNullKeyword","ThisTypeAnnotation","TSThisType","NumberTypeAnnotation","TSNumberKeyword","VoidTypeAnnotation","TSVoidKeyword","BooleanTypeAnnotation","TSBooleanKeyword","BigIntTypeAnnotation","TSBigIntKeyword","SymbolTypeAnnotation","TSSymbolKeyword","StringTypeAnnotation","TSStringKeyword","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType","EmptyTypeAnnotation","MixedTypeAnnotation","TSNeverKeyword","TSObjectKeyword","TSUndefinedKeyword","TSUnknownKeyword"]);const $i=/^(?:skip|[fx]?(?:it|describe|test))$/;function Hi(e){return e&&("CallExpression"===e.type||"OptionalCallExpression"===e.type)}function Vi(e){return e&&("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)}function zi(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function Wi(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function Gi(e){return e.extra?e.extra.raw:e.raw}const Ki={"==":!0,"!=":!0,"===":!0,"!==":!0},Xi={"*":!0,"/":!0,"%":!0},Ji={">>":!0,">>>":!0,"<<":!0};const Yi={};for(const[e,t]of[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].entries())for(const s of t)Yi[s]=e;function Qi(e){return Yi[e]}const Zi=new WeakMap;function ea(e){if(Zi.has(e))return Zi.get(e);const 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),Zi.set(e,t),t}const ta=new WeakMap;function sa(e){if(ta.has(e))return ta.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),ta.set(e,t),t}function ra(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function ia(e){return e&&(e.prettierIgnore||oa(e,aa.PrettierIgnore))}const aa={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},na=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(s,r,i)=>!(e&aa.Leading&&!s.leading||e&aa.Trailing&&!s.trailing||e&aa.Dangling&&(s.leading||s.trailing)||e&aa.Block&&!Bi(s)||e&aa.Line&&!Ni(s)||e&aa.First&&0!==r||e&aa.Last&&r!==i.length-1||e&aa.PrettierIgnore&&!ra(s)||t&&!t(s))};function oa(e,t,s){if(!e||!xi(e.comments))return!1;const r=na(t,s);return!r||e.comments.some(r)}function ua(e,t,s){if(!e||!Array.isArray(e.comments))return[];const r=na(t,s);return r?e.comments.filter(r):e.comments}function ha(e){return Hi(e)||"NewExpression"===e.type||"ImportExpression"===e.type}var ca={getFunctionParameters:ea,iterateFunctionParametersPath:function(e,t){const s=e.getValue();let r=0;const i=e=>t(e,r++);s.this&&e.call(i,"this"),Array.isArray(s.parameters)?e.each(i,"parameters"):Array.isArray(s.params)&&e.each(i,"params"),s.rest&&e.call(i,"rest")},getCallArguments:sa,iterateCallArgumentsPath:function(e,t){const s=e.getValue();"ImportExpression"===s.type?(e.call((e=>t(e,0)),"source"),s.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")},hasRestParameter:function(e){if(e.rest)return!0;const t=ea(e);return t.length>0&&"RestElement"===Ai(t).type},getLeftSide:function(e){return e.expressions?e.expressions[0]:e.left||e.test||e.callee||e.object||e.tag||e.argument||e.expression},getLeftSidePathName:function(e,t){if(t.expressions)return["expressions",0];if(t.left)return["left"];if(t.test)return["test"];if(t.object)return["object"];if(t.callee)return["callee"];if(t.tag)return["tag"];if(t.argument)return["argument"];if(t.expression)return["expression"];throw new Error("Unexpected node has no left side.")},getParentExportDeclaration:function(e){const t=e.getParentNode();return"declaration"===e.getName()&&vi(t)?t:null},getTypeScriptMappedTypeModifier:function(e,t){return"+"===e?"+"+t:"-"===e?"-"+t:t},hasFlowAnnotationComment:function(e){return xi(e)&&Bi(e[0])&&Si.test(e[0].value)},hasFlowShorthandAnnotationComment:function(e){return e.extra&&e.extra.parenthesized&&xi(e.trailingComments)&&Bi(e.trailingComments[0])&&wi.test(e.trailingComments[0].value)},hasLeadingOwnLineComment:function(e,t){return Ri(t)?ia(t):oa(t,aa.Leading,(t=>Ei(e,Pi(t))))},hasNakedLeftSide:function(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||Hi(e)||Vi(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||"TSAsExpression"===e.type||"TSNonNullExpression"===e.type},hasNode:function e(t,s){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t))return t.some((t=>e(t,s)));const r=s(t);return"boolean"==typeof r?r:Object.values(t).some((t=>e(t,s)))},hasIgnoreComment:function(e){return ia(e.getValue())},hasNodeIgnoreComment:ia,identity:function(e){return e},isBinaryish:function(e){return Ui.has(e.type)},isBlockComment:Bi,isCallLikeExpression:ha,isLineComment:Ni,isPrettierIgnoreComment:ra,isCallExpression:Hi,isMemberExpression:Vi,isExportDeclaration:vi,isFlowAnnotationComment:function(e,t){const s=bi(t),r=Ci(e,Pi(t));return!1!==r&&"/*"===e.slice(s,s+2)&&"*/"===e.slice(r,r+2)},isFunctionCompositionArgs:function(e){if(e.length<=1)return!1;let t=0;for(const s of e)if(Oi(s)){if(t+=1,t>1)return!0}else if(Hi(s))for(const e of s.arguments)if(Oi(e))return!0;return!1},isFunctionNotation:_i,isFunctionOrArrowExpression:Oi,isGetterOrSetter:ji,isJestEachTemplateLiteral:function(e,t){const s=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&s.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&s.test(t.tag.object.object.name))},isJsxNode:Ri,isLiteral:function(e){return"BooleanLiteral"===e.type||"DirectiveLiteral"===e.type||"Literal"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"RegExpLiteral"===e.type||"StringLiteral"===e.type||"TemplateLiteral"===e.type||"TSTypeLiteral"===e.type||"JSXText"===e.type},isLongCurriedCallExpression:function(e){const t=e.getValue(),s=e.getParentNode();return Hi(t)&&Hi(s)&&s.callee===t&&t.arguments.length>s.arguments.length&&s.arguments.length>0},isSimpleCallArgument:function e(t,s){if(s>=2)return!1;const r=t=>e(t,s+1),i="Literal"===t.type&&"regex"in t&&t.regex.pattern||"RegExpLiteral"===t.type&&t.pattern;return!(i&&gi(i)>5)&&("Literal"===t.type||"BigIntLiteral"===t.type||"DecimalLiteral"===t.type||"BooleanLiteral"===t.type||"NullLiteral"===t.type||"NumericLiteral"===t.type||"RegExpLiteral"===t.type||"StringLiteral"===t.type||"Identifier"===t.type||"ThisExpression"===t.type||"Super"===t.type||"PrivateName"===t.type||"PrivateIdentifier"===t.type||"ArgumentPlaceholder"===t.type||"Import"===t.type||("TemplateLiteral"===t.type?t.quasis.every((e=>!e.value.raw.includes("\n")))&&t.expressions.every(r):"ObjectExpression"===t.type?t.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value)))):"ArrayExpression"===t.type?t.elements.every((e=>null===e||r(e))):ha(t)?("ImportExpression"===t.type||e(t.callee,s))&&sa(t).every(r):Vi(t)?e(t.object,s)&&e(t.property,s):"UnaryExpression"!==t.type||"!"!==t.operator&&"-"!==t.operator?"TSNonNullExpression"===t.type&&e(t.expression,s):e(t.argument,s)))},isMemberish:function(e){return Vi(e)||"BindExpression"===e.type&&Boolean(e.object)},isNumericLiteral:ki,isSignedNumericLiteral:function(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&ki(e.argument)},isObjectProperty:function(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)},isObjectType:function(e){return"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"TSMappedType"===e.type},isObjectTypePropertyAFunction:function(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||_i(e))},isSimpleType:function(e){return!!e&&(!("GenericTypeAnnotation"!==e.type&&"TSTypeReference"!==e.type||e.typeParameters)||!!qi.has(e.type))},isSimpleNumber:zi,isSimpleTemplateLiteral:function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");const s=e[t];return 0!==s.length&&s.every((e=>{if(oa(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if(Vi(e)){let t=e;for(;Vi(t);){if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type)return!1;if(t=t.object,oa(t))return!1}return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))},isStringLiteral:Li,isStringPropSafeToUnquote:function(e,t){return"json"!==t.parser&&Li(e.key)&&Gi(e.key).slice(1,-1)===e.key.value&&(yi(e.key.value)&&!(("typescript"===t.parser||"babel-ts"===t.parser)&&"ClassProperty"===e.type)||zi(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))},isTemplateOnItsOwnLine:function(e,t){return("TemplateLiteral"===e.type&&Wi(e)||"TaggedTemplateExpression"===e.type&&Wi(e.quasi))&&!Ei(t,bi(e),{backwards:!0})},isTestCall:function e(t,s){if("CallExpression"!==t.type)return!1;if(1===t.arguments.length){if(Mi(t)&&s&&e(s))return Oi(t.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)&&1===e.arguments.length}(t))return Mi(t.arguments[0])}else if((2===t.arguments.length||3===t.arguments.length)&&("Identifier"===t.callee.type&&$i.test(t.callee.name)||function(e){return Vi(e.callee)&&"Identifier"===e.callee.object.type&&"Identifier"===e.callee.property.type&&$i.test(e.callee.object.name)&&("only"===e.callee.property.name||"skip"===e.callee.property.name)}(t))&&(function(e){return"TemplateLiteral"===e.type}(t.arguments[0])||Li(t.arguments[0])))return!(t.arguments[2]&&!ki(t.arguments[2]))&&((2===t.arguments.length?Oi(t.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(t.arguments[1])&&ea(t.arguments[1]).length<=1)||Mi(t.arguments[1]));return!1},isTheOnlyJsxElementInMarkdown:function(e,t){if("markdown"!==e.parentParser&&"mdx"!==e.parentParser)return!1;const s=t.getNode();if(!s.expression||!Ri(s.expression))return!1;const r=t.getParentNode();return"Program"===r.type&&1===r.body.length},isTSXFile:function(e){return e.filepath&&/\.tsx$/i.test(e.filepath)},isTypeAnnotationAFunction:function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||Ti(e,e.typeAnnotation))},isNextLineEmpty:(e,{originalText:t})=>Fi(t,Pi(e)),needsHardlineAfterDanglingComment:function(e){if(!oa(e))return!1;const t=Ai(ua(e,aa.Dangling));return t&&!Bi(t)},rawText:Gi,shouldPrintComma:function(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)},isBitwiseOperator:function(e){return Boolean(Ji[e])||"|"===e||"^"===e||"&"===e},shouldFlatten:function(e,t){return Qi(t)===Qi(e)&&("**"!==e&&((!Ki[e]||!Ki[t])&&(!("%"===t&&Xi[e]||"%"===e&&Xi[t])&&((t===e||!Xi[t]||!Xi[e])&&(!Ji[e]||!Ji[t])))))},startsWithNoLookaheadToken:function e(t,s){switch((t=function(e){for(;e.left;)e=e.left;return e}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return s;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return e(t.object,s);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,s);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,s);case"ConditionalExpression":return e(t.test,s);case"UpdateExpression":return!t.prefix&&e(t.argument,s);case"BindExpression":return t.object&&e(t.object,s);case"SequenceExpression":return e(t.expressions[0],s);case"TSAsExpression":case"TSNonNullExpression":return e(t.expression,s);default:return!1}},getPrecedence:Qi,hasComment:oa,getComments:ua,CommentCheckFlags:aa};const{getLast:pa,hasNewline:la,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:da,getNextNonSpaceNonCommentCharacter:Da,hasNewlineInRange:ma,addLeadingComment:fa,addTrailingComment:ya,addDanglingComment:Aa,getNextNonSpaceNonCommentCharacterIndex:Ea,isNonEmptyArray:Ca}=ur,{isBlockComment:xa,getFunctionParameters:Fa,isPrettierIgnoreComment:ga,isJsxNode:ba,hasFlowShorthandAnnotationComment:Pa,hasFlowAnnotationComment:Ta,hasIgnoreComment:wa,isCallLikeExpression:Sa,getCallArguments:Ba,isCallExpression:Na,isMemberExpression:Ia,isObjectProperty:va,getComments:ka,CommentCheckFlags:La}=ca,{locStart:Oa,locEnd:Ma}=oi;function Ra(e,t){const s=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));s?fa(s,t):Aa(e,t)}function ja(e,t){"BlockStatement"===e.type?Ra(e,t):fa(e,t)}function _a({comment:e,followingNode:t}){return!(!t||!mn(e))&&(fa(t,e),!0)}function Ua({comment:e,precedingNode:t,enclosingNode:s,followingNode:r,text:i}){if(!s||"IfStatement"!==s.type||!r)return!1;return")"===Da(i,e,Ma)?(ya(t,e),!0):t===s.consequent&&r===s.alternate?("BlockStatement"===t.type?ya(t,e):Aa(s,e),!0):"BlockStatement"===r.type?(Ra(r,e),!0):"IfStatement"===r.type?(ja(r.consequent,e),!0):s.consequent===r&&(fa(r,e),!0)}function qa({comment:e,precedingNode:t,enclosingNode:s,followingNode:r,text:i}){if(!s||"WhileStatement"!==s.type||!r)return!1;return")"===Da(i,e,Ma)?(ya(t,e),!0):"BlockStatement"===r.type?(Ra(r,e),!0):s.body===r&&(fa(r,e),!0)}function $a({comment:e,precedingNode:t,enclosingNode:s,followingNode:r}){return!(!s||"TryStatement"!==s.type&&"CatchClause"!==s.type||!r)&&("CatchClause"===s.type&&t?(ya(t,e),!0):"BlockStatement"===r.type?(Ra(r,e),!0):"TryStatement"===r.type?(ja(r.finalizer,e),!0):"CatchClause"===r.type&&(ja(r.body,e),!0))}function Ha({comment:e,enclosingNode:t,followingNode:s}){return!(!Ia(t)||!s||"Identifier"!==s.type)&&(fa(t,e),!0)}function Va({comment:e,precedingNode:t,enclosingNode:s,followingNode:r,text:i}){const a=t&&!ma(i,Ma(t),Oa(e));return!(t&&a||!s||"ConditionalExpression"!==s.type&&"TSConditionalType"!==s.type||!r)&&(fa(r,e),!0)}function za({comment:e,precedingNode:t,enclosingNode:s}){return!(!va(s)||!s.shorthand||s.key!==t||"AssignmentPattern"!==s.value.type)&&(ya(s.value.left,e),!0)}function Wa({comment:e,precedingNode:t,enclosingNode:s,followingNode:r}){if(s&&("ClassDeclaration"===s.type||"ClassExpression"===s.type||"DeclareClass"===s.type||"DeclareInterface"===s.type||"InterfaceDeclaration"===s.type||"TSInterfaceDeclaration"===s.type)){if(Ca(s.decorators)&&(!r||"Decorator"!==r.type))return ya(pa(s.decorators),e),!0;if(s.body&&r===s.body)return Ra(s.body,e),!0;if(r)for(const i of["implements","extends","mixins"])if(s[i]&&r===s[i][0])return!t||t!==s.id&&t!==s.typeParameters&&t!==s.superClass?Aa(s,e,i):ya(t,e),!0}return!1}function Ga({comment:e,precedingNode:t,enclosingNode:s,text:r}){return(s&&t&&("Property"===s.type||"TSDeclareMethod"===s.type||"TSAbstractMethodDefinition"===s.type)&&"Identifier"===t.type&&s.key===t&&":"!==Da(r,t,Ma)||!(!t||!s||"Decorator"!==t.type||"ClassMethod"!==s.type&&"ClassProperty"!==s.type&&"PropertyDefinition"!==s.type&&"TSAbstractClassProperty"!==s.type&&"TSAbstractMethodDefinition"!==s.type&&"TSDeclareMethod"!==s.type&&"MethodDefinition"!==s.type))&&(ya(t,e),!0)}function Ka({comment:e,precedingNode:t,enclosingNode:s,text:r}){return"("===Da(r,e,Ma)&&(!(!t||!s||"FunctionDeclaration"!==s.type&&"FunctionExpression"!==s.type&&"ClassMethod"!==s.type&&"MethodDefinition"!==s.type&&"ObjectMethod"!==s.type)&&(ya(t,e),!0))}function Xa({comment:e,enclosingNode:t,text:s}){if(!t||"ArrowFunctionExpression"!==t.type)return!1;const r=Ea(s,e,Ma);return!1!==r&&"=>"===s.slice(r,r+2)&&(Aa(t,e),!0)}function Ja({comment:e,enclosingNode:t,text:s}){return")"===Da(s,e,Ma)&&(t&&(Dn(t)&&0===Fa(t).length||Sa(t)&&0===Ba(t).length)?(Aa(t,e),!0):!(!t||"MethodDefinition"!==t.type&&"TSAbstractMethodDefinition"!==t.type||0!==Fa(t.value).length)&&(Aa(t.value,e),!0))}function Ya({comment:e,precedingNode:t,enclosingNode:s,followingNode:r,text:i}){if(t&&"FunctionTypeParam"===t.type&&s&&"FunctionTypeAnnotation"===s.type&&r&&"FunctionTypeParam"!==r.type)return ya(t,e),!0;if(t&&("Identifier"===t.type||"AssignmentPattern"===t.type)&&s&&Dn(s)&&")"===Da(i,e,Ma))return ya(t,e),!0;if(s&&"FunctionDeclaration"===s.type&&r&&"BlockStatement"===r.type){const t=(()=>{const e=Fa(s);if(e.length>0)return da(i,Ma(pa(e)));const t=da(i,Ma(s.id));return!1!==t&&da(i,t+1)})();if(Oa(e)>t)return Ra(r,e),!0}return!1}function Qa({comment:e,enclosingNode:t}){return!(!t||"ImportSpecifier"!==t.type)&&(fa(t,e),!0)}function Za({comment:e,enclosingNode:t}){return!(!t||"LabeledStatement"!==t.type)&&(fa(t,e),!0)}function en({comment:e,enclosingNode:t}){return!(!t||"ContinueStatement"!==t.type&&"BreakStatement"!==t.type||t.label)&&(ya(t,e),!0)}function tn({comment:e,precedingNode:t,enclosingNode:s}){return!!(Na(s)&&t&&s.callee===t&&s.arguments.length>0)&&(fa(s.arguments[0],e),!0)}function sn({comment:e,precedingNode:t,enclosingNode:s,followingNode:r}){return!s||"UnionTypeAnnotation"!==s.type&&"TSUnionType"!==s.type?(r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&ga(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1):(ga(e)&&(r.prettierIgnore=!0,e.unignore=!0),!!t&&(ya(t,e),!0))}function rn({comment:e,enclosingNode:t}){return!!va(t)&&(fa(t,e),!0)}function an({comment:e,enclosingNode:t,followingNode:s,ast:r,isLastComment:i}){return r&&r.body&&0===r.body.length?(i?Aa(r,e):fa(r,e),!0):t&&"Program"===t.type&&0===t.body.length&&!Ca(t.directives)?(i?Aa(t,e):fa(t,e),!0):!(!s||"Program"!==s.type||0!==s.body.length||!t||"ModuleExpression"!==t.type)&&(Aa(s,e),!0)}function nn({comment:e,enclosingNode:t}){return!(!t||"ForInStatement"!==t.type&&"ForOfStatement"!==t.type)&&(fa(t,e),!0)}function on({comment:e,precedingNode:t,enclosingNode:s,text:r}){return!!(t&&"ImportSpecifier"===t.type&&s&&"ImportDeclaration"===s.type&&la(r,Ma(e)))&&(ya(t,e),!0)}function un({comment:e,enclosingNode:t}){return!(!t||"AssignmentPattern"!==t.type)&&(fa(t,e),!0)}function hn({comment:e,enclosingNode:t}){return!(!t||"TypeAlias"!==t.type)&&(fa(t,e),!0)}function cn({comment:e,enclosingNode:t,followingNode:s}){return!(!t||"VariableDeclarator"!==t.type&&"AssignmentExpression"!==t.type||!s||"ObjectExpression"!==s.type&&"ArrayExpression"!==s.type&&"TemplateLiteral"!==s.type&&"TaggedTemplateExpression"!==s.type&&!xa(e))&&(fa(s,e),!0)}function pn({comment:e,enclosingNode:t,followingNode:s,text:r}){return!(s||!t||"TSMethodSignature"!==t.type&&"TSDeclareFunction"!==t.type&&"TSAbstractMethodDefinition"!==t.type||";"!==Da(r,e,Ma))&&(ya(t,e),!0)}function ln({comment:e,enclosingNode:t,followingNode:s}){if(ga(e)&&t&&"TSMappedType"===t.type&&s&&"TSTypeParameter"===s.type&&s.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function dn({comment:e,precedingNode:t,enclosingNode:s,followingNode:r}){return!(!s||"TSMappedType"!==s.type)&&(r&&"TSTypeParameter"===r.type&&r.name?(fa(r.name,e),!0):!(!t||"TSTypeParameter"!==t.type||!t.constraint)&&(ya(t.constraint,e),!0))}function Dn(e){return"ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type||"ObjectMethod"===e.type||"ClassMethod"===e.type||"TSDeclareFunction"===e.type||"TSCallSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSMethodSignature"===e.type||"TSConstructorType"===e.type||"TSFunctionType"===e.type||"TSDeclareMethod"===e.type}function mn(e){return xa(e)&&"*"===e.value[0]&&/@type\b/.test(e.value)}var fn={handleOwnLineComment:function(e){return[ln,Ya,Ha,Ua,qa,$a,Wa,Qa,nn,sn,an,on,un,Ga,Za].some((t=>t(e)))},handleEndOfLineComment:function(e){return[_a,Ya,Va,Qa,Ua,qa,$a,Wa,Za,tn,rn,an,hn,cn].some((t=>t(e)))},handleRemainingComment:function(e){return[ln,Ua,qa,za,Ja,Ga,an,Xa,Ka,dn,en,pn].some((t=>t(e)))},isTypeCastComment:mn,getCommentChildNodes:function(e,t){if(("typescript"===t.parser||"flow"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&e.value&&"FunctionExpression"===e.value.type&&0===Fa(e.value).length&&!e.value.returnType&&!Ca(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]},willPrintOwnComments:function(e){const t=e.getValue(),s=e.getParentNode();return(t&&(ba(t)||Pa(t)||Na(s)&&(e=>Ta(ka(e,La.Leading))||Ta(ka(e,La.Trailing)))(t))||s&&("JSXSpreadAttribute"===s.type||"JSXSpreadChild"===s.type||"UnionTypeAnnotation"===s.type||"TSUnionType"===s.type||("ClassDeclaration"===s.type||"ClassExpression"===s.type)&&s.superClass===t))&&(!wa(e)||"UnionTypeAnnotation"===s.type||"TSUnionType"===s.type)}};const{getLast:yn,getNextNonSpaceNonCommentCharacter:An}=ur,{locStart:En,locEnd:Cn}=oi,{isTypeCastComment:xn}=fn;function Fn(e){return"CallExpression"===e.type?(e.type="OptionalCallExpression",e.callee=Fn(e.callee)):"MemberExpression"===e.type?(e.type="OptionalMemberExpression",e.object=Fn(e.object)):"TSNonNullExpression"===e.type&&(e.expression=Fn(e.expression)),e}function gn(e,t){let s;if(Array.isArray(e))s=e.entries();else{if(!e||"object"!=typeof e||"string"!=typeof e.type)return e;s=Object.entries(e)}for(const[r,i]of s)e[r]=gn(i,t);return Array.isArray(e)?e:t(e)||e}function bn(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function Pn(e){return bn(e)?Pn({type:"LogicalExpression",operator:e.operator,left:Pn({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[En(e.left),Cn(e.right.left)]}),right:e.right.right,range:[En(e),Cn(e)]}):e}var Tn=function(e,t){if("typescript"===t.parser&&t.originalText.includes("@")){const{esTreeNodeToTSNodeMap:s,tsNodeToESTreeNodeMap:r}=t.tsParseResult;e=gn(e,(e=>{const t=s.get(e);if(!t)return;const i=t.decorators;if(!Array.isArray(i))return;const a=r.get(t);if(a!==e)return;const n=a.decorators;if(!Array.isArray(n)||n.length!==i.length||i.some((e=>{const t=r.get(e);return!t||!n.includes(t)}))){const{start:e,end:t}=a.loc;throw li("Leading decorators must be attached to a class declaration",{start:{line:e.line,column:e.column+1},end:{line:t.line,column:t.column+1}})}}))}if("typescript"!==t.parser&&"flow"!==t.parser&&"espree"!==t.parser&&"meriyah"!==t.parser){const t=new Set;e=gn(e,(e=>{e.leadingComments&&e.leadingComments.some(xn)&&t.add(En(e))})),e=gn(e,(e=>{if("ParenthesizedExpression"===e.type){const{expression:s}=e;if("TypeCastExpression"===s.type)return s.range=e.range,s;const r=En(e);if(!t.has(r))return s.extra=Object.assign(Object.assign({},s.extra),{},{parenthesized:!0}),s}}))}return e=gn(e,(e=>{switch(e.type){case"ChainExpression":return Fn(e.expression);case"LogicalExpression":if(bn(e))return Pn(e);break;case"VariableDeclaration":{const s=yn(e.declarations);s&&s.init&&function(e,s){if(";"===t.originalText[Cn(s)])return;e.range=[En(e),Cn(s)]}(e,s);break}case"TSParenthesizedType":return e.typeAnnotation.range=[En(e),Cn(e)],e.typeAnnotation;case"TSTypeParameter":if("string"==typeof e.name){const t=En(e);e.name={type:"Identifier",name:e.name,range:[t,t+e.name.length]}}break;case"SequenceExpression":{const t=yn(e.expressions);e.range=[En(e),Math.min(Cn(t),Cn(e))];break}case"ClassProperty":e.key&&"TSPrivateIdentifier"===e.key.type&&"?"===An(t.originalText,e.key,Cn)&&(e.optional=!0)}}))};const wn=!0,Sn=!0,Bn=!0,Nn=!0,In=!0;class vn{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.updateContext=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const kn=new Map;function Ln(e,t={}){t.keyword=e;const s=new vn(e,t);return kn.set(e,s),s}function On(e,t){return new vn(e,{beforeExpr:wn,binop:t})}const Mn={num:new vn("num",{startsExpr:Sn}),bigint:new vn("bigint",{startsExpr:Sn}),decimal:new vn("decimal",{startsExpr:Sn}),regexp:new vn("regexp",{startsExpr:Sn}),string:new vn("string",{startsExpr:Sn}),name:new vn("name",{startsExpr:Sn}),privateName:new vn("#name",{startsExpr:Sn}),eof:new vn("eof"),bracketL:new vn("[",{beforeExpr:wn,startsExpr:Sn}),bracketHashL:new vn("#[",{beforeExpr:wn,startsExpr:Sn}),bracketBarL:new vn("[|",{beforeExpr:wn,startsExpr:Sn}),bracketR:new vn("]"),bracketBarR:new vn("|]"),braceL:new vn("{",{beforeExpr:wn,startsExpr:Sn}),braceBarL:new vn("{|",{beforeExpr:wn,startsExpr:Sn}),braceHashL:new vn("#{",{beforeExpr:wn,startsExpr:Sn}),braceR:new vn("}",{beforeExpr:wn}),braceBarR:new vn("|}"),parenL:new vn("(",{beforeExpr:wn,startsExpr:Sn}),parenR:new vn(")"),comma:new vn(",",{beforeExpr:wn}),semi:new vn(";",{beforeExpr:wn}),colon:new vn(":",{beforeExpr:wn}),doubleColon:new vn("::",{beforeExpr:wn}),dot:new vn("."),question:new vn("?",{beforeExpr:wn}),questionDot:new vn("?."),arrow:new vn("=>",{beforeExpr:wn}),template:new vn("template"),ellipsis:new vn("...",{beforeExpr:wn}),backQuote:new vn("`",{startsExpr:Sn}),dollarBraceL:new vn("${",{beforeExpr:wn,startsExpr:Sn}),at:new vn("@"),hash:new vn("#",{startsExpr:Sn}),interpreterDirective:new vn("#!..."),eq:new vn("=",{beforeExpr:wn,isAssign:Nn}),assign:new vn("_=",{beforeExpr:wn,isAssign:Nn}),slashAssign:new vn("_=",{beforeExpr:wn,isAssign:Nn}),moduloAssign:new vn("_=",{beforeExpr:wn,isAssign:Nn}),incDec:new vn("++/--",{prefix:In,postfix:!0,startsExpr:Sn}),bang:new vn("!",{beforeExpr:wn,prefix:In,startsExpr:Sn}),tilde:new vn("~",{beforeExpr:wn,prefix:In,startsExpr:Sn}),pipeline:On("|>",0),nullishCoalescing:On("??",1),logicalOR:On("||",1),logicalAND:On("&&",2),bitwiseOR:On("|",3),bitwiseXOR:On("^",4),bitwiseAND:On("&",5),equality:On("==/!=/===/!==",6),relational:On("/<=/>=",7),bitShift:On("<>/>>>",8),plusMin:new vn("+/-",{beforeExpr:wn,binop:9,prefix:In,startsExpr:Sn}),modulo:new vn("%",{binop:10,startsExpr:Sn}),star:new vn("*",{binop:10}),slash:On("/",10),exponent:new vn("**",{beforeExpr:wn,binop:11,rightAssociative:!0}),_break:Ln("break"),_case:Ln("case",{beforeExpr:wn}),_catch:Ln("catch"),_continue:Ln("continue"),_debugger:Ln("debugger"),_default:Ln("default",{beforeExpr:wn}),_do:Ln("do",{isLoop:Bn,beforeExpr:wn}),_else:Ln("else",{beforeExpr:wn}),_finally:Ln("finally"),_for:Ln("for",{isLoop:Bn}),_function:Ln("function",{startsExpr:Sn}),_if:Ln("if"),_return:Ln("return",{beforeExpr:wn}),_switch:Ln("switch"),_throw:Ln("throw",{beforeExpr:wn,prefix:In,startsExpr:Sn}),_try:Ln("try"),_var:Ln("var"),_const:Ln("const"),_while:Ln("while",{isLoop:Bn}),_with:Ln("with"),_new:Ln("new",{beforeExpr:wn,startsExpr:Sn}),_this:Ln("this",{startsExpr:Sn}),_super:Ln("super",{startsExpr:Sn}),_class:Ln("class",{startsExpr:Sn}),_extends:Ln("extends",{beforeExpr:wn}),_export:Ln("export"),_import:Ln("import",{startsExpr:Sn}),_null:Ln("null",{startsExpr:Sn}),_true:Ln("true",{startsExpr:Sn}),_false:Ln("false",{startsExpr:Sn}),_in:Ln("in",{beforeExpr:wn,binop:7}),_instanceof:Ln("instanceof",{beforeExpr:wn,binop:7}),_typeof:Ln("typeof",{beforeExpr:wn,prefix:In,startsExpr:Sn}),_void:Ln("void",{beforeExpr:wn,prefix:In,startsExpr:Sn}),_delete:Ln("delete",{beforeExpr:wn,prefix:In,startsExpr:Sn})},Rn=/\r\n?|[\n\u2028\u2029]/,jn=new RegExp(Rn.source,"g");function _n(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const Un=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qn=new RegExp("(?=("+/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function $n(e){switch(e){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 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class Hn{constructor(e,t){this.line=void 0,this.column=void 0,this.line=e,this.column=t}}class Vn{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}}function zn(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Wn(e,t){void 0===e.innerComments?e.innerComments=t:void 0!==t&&e.innerComments.unshift(...t)}function Gn(e,t,s){let r=null,i=t.length;for(;null===r&&i>0;)r=t[--i];null===r||r.start>s.start?Wn(e,s.comments):zn(r,s.comments)}const Kn=Object.freeze({SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),Xn=Qn({AccessorIsGenerator:"A %0ter 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.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accesor must not have any formal parameters.",BadSetterArity:"A 'set' accesor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accesor 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:"'%0' require an initialization value.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",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 default export allowed per module.",DuplicateExport:"`%0` has already been exported. Exported identifiers must be unique.",DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:"'%0' loop variable declaration may not have an initializer.",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:"Unsyntactic %0.",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:"`import()` requires exactly %0.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidDecimal:"Invalid decimal.",InvalidDigit:"Expected number in radix %0.",InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:"Escape sequence in keyword %0.",InvalidIdentifier:"Invalid identifier %0.",InvalidLhs:"Invalid left-hand side in %0.",InvalidLhsBinding:"Binding invalid left-hand side in %0.",InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:"Unexpected character '%0'.",InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:"Private name #%0 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:"Label '%0' is already declared.",LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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.",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:'Duplicate key "%0" is not allowed in module attributes.',ModuleExportNameHasLoneSurrogate:"An export name cannot include a lone surrogate, found '\\u%0'.",ModuleExportUndefined:"Export '%0' 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.",PipeBodyIsTighter:"Unexpected %0 after pipeline body; any %0 expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.',PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PrivateInExpectedIn:"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",PrivateNameRedeclaration:"Duplicate private name #%0.",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 allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:"Assigning to '%0' in strict mode.",StrictEvalArgumentsBinding:"Binding '%0' in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:"Unexpected keyword '%0'.",UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",UnexpectedReservedWord:"Unexpected reserved word '%0'.",UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:"Unexpected token '%0'.",UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:"The only valid meta property for %0 is %0.%1.",UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",VarRedeclaration:"Identifier '%0' has already been declared.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Kn.SyntaxError),Jn=Qn({ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'"},Kn.SourceTypeModuleError);function Yn(e,t){return"flow"===t&&"PatternIsOptional"===e?"OptionalBindingPattern":e}function Qn(e,t,s){const r={};return Object.keys(e).forEach((i=>{r[i]=Object.freeze({code:t,reasonCode:Yn(i,s),template:e[i]})})),Object.freeze(r)}class Zn{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const eo={brace:new Zn("{"),template:new Zn("`",!0)};Mn.braceR.updateContext=e=>{e.pop()},Mn.braceL.updateContext=Mn.braceHashL.updateContext=Mn.dollarBraceL.updateContext=e=>{e.push(eo.brace)},Mn.backQuote.updateContext=e=>{e[e.length-1]===eo.template?e.pop():e.push(eo.template)};let to="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",so="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";const ro=new RegExp("["+to+"]"),io=new RegExp("["+to+so+"]");to=so=null;const ao=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],no=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function oo(e,t){let s=65536;for(let r=0,i=t.length;re)return!1;if(s+=t[r+1],s>=e)return!0}return!1}function uo(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ro.test(String.fromCharCode(e)):oo(e,ao)))}function ho(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&io.test(String.fromCharCode(e)):oo(e,ao)||oo(e,no))))}const co=["implements","interface","let","package","private","protected","public","static","yield"],po=["eval","arguments"],lo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),Do=new Set(co),mo=new Set(po);function fo(e,t){return t&&"await"===e||"enum"===e}function yo(e,t){return fo(e,t)||Do.has(e)}function Ao(e){return mo.has(e)}function Eo(e,t){return yo(e,t)||Ao(e)}function Co(e){return lo.has(e)}const xo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);const Fo=64,go=256,bo=259,Po=128,To=1024,wo=2048;class So{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}}class Bo{constructor(e,t){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=e,this.inModule=t}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(this.currentThisScopeFlags()&Fo)>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(e&Fo)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(323&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new So(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(e){return!!(2&e.flags||!this.inModule&&1&e.flags)}declareName(e,t,s){let r=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(r,e,t,s),16&t?r.functions.add(e):r.lexical.add(e),8&t&&this.maybeExportDefined(r,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,s),r.var.add(e),this.maybeExportDefined(r,e),!(r.flags&bo));--i);this.inModule&&1&r.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,s,r){this.isRedeclaredInScope(e,t,s)&&this.raise(r,Xn.VarRedeclaration,t)}isRedeclaredInScope(e,t,s){return!!(1&s)&&(8&s?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&s?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){const{name:t}=e,s=this.scopeStack[0];s.lexical.has(t)||s.var.has(t)||s.functions.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(t&bo)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(323&t&&!(4&t))return t}}}class No extends So{constructor(...e){super(...e),this.declareFunctions=new Set}}class Io extends Bo{createScope(e){return new No(e)}declareName(e,t,s){const r=this.currentScope();if(t&wo)return this.checkRedeclarationInScope(r,e,t,s),this.maybeExportDefined(r,e),void r.declareFunctions.add(e);super.declareName(...arguments)}isRedeclaredInScope(e,t,s){return!!super.isRedeclaredInScope(...arguments)||!!(s&wo)&&(!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}class vo{constructor(){this.strict=void 0,this.curLine=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.comments=[],this.commentStack=[],this.pos=0,this.lineStart=0,this.type=Mn.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[eo.brace],this.exprAllowed=!0,this.containsEsc=!1,this.strictErrors=new Map,this.tokensLength=0}init(e){this.strict=!1!==e.strictMode&&(!0===e.strictMode||"module"===e.sourceType),this.curLine=e.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new Hn(this.curLine,this.pos-this.lineStart)}clone(e){const t=new vo,s=Object.keys(this);for(let r=0,i=s.length;r=48&&e<=57};const Lo=new Set([103,109,115,105,121,117,100]),Oo={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},Mo={bin:[48,49]};Mo.oct=[...Mo.bin,50,51,52,53,54,55],Mo.dec=[...Mo.oct,56,57],Mo.hex=[...Mo.dec,65,66,67,68,69,70,97,98,99,100,101,102];class Ro{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new Vn(e.startLoc,e.endLoc)}}class jo{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class _o{constructor(e){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new jo)}exit(){const e=this.stack.pop(),t=this.current();for(const[s,r]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(s)||t.undefinedPrivateNames.set(s,r):this.raise(r,Xn.InvalidPrivateFieldResolution,s)}declarePrivateName(e,t,s){const r=this.current();let i=r.privateNames.has(e);if(3&t){const s=i&&r.loneAccessors.get(e);if(s){const a=4&s,n=4&t;i=(3&s)===(3&t)||a!==n,i||r.loneAccessors.delete(e)}else i||r.loneAccessors.set(e,t)}i&&this.raise(s,Xn.PrivateNameRedeclaration,e),r.privateNames.add(e),r.undefinedPrivateNames.delete(e)}usePrivateName(e,t){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,t):this.raise(t,Xn.InvalidPrivateFieldResolution,e)}}class Uo{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class qo extends Uo{constructor(e){super(e),this.errors=new Map}recordDeclarationError(e,t){this.errors.set(e,t)}clearDeclarationError(e){this.errors.delete(e)}iterateErrors(e){this.errors.forEach(e)}}class $o{constructor(e){this.stack=[new Uo],this.raise=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const{stack:s}=this;let r=s.length-1,i=s[r];for(;!i.isCertainlyParameterDeclaration();){if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,t),i=s[--r]}this.raise(e,t)}recordParenthesizedIdentifierError(e,t){const{stack:s}=this,r=s[s.length-1];if(r.isCertainlyParameterDeclaration())this.raise(e,t);else{if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(e,t)}}recordAsyncArrowParametersError(e,t){const{stack:s}=this;let r=s.length-1,i=s[r];for(;i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(e,t),i=s[--r]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(((t,s)=>{this.raise(s,t);let r=e.length-2,i=e[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(s),i=e[--r]}))}}function Ho(){return new Uo}class Vo{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function zo(e,t){return(e?2:0)|(t?1:0)}class Wo{constructor(){this.shorthandAssign=-1,this.doubleProto=-1,this.optionalParameters=-1}}class Go{constructor(e,t,s){this.type="",this.start=t,this.end=0,this.loc=new Vn(s),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}}const Ko=Go.prototype;function Xo(e){const{type:t,start:s,end:r,loc:i,range:a,extra:n,name:o}=e,u=Object.create(Ko);return u.type=t,u.start=s,u.end=r,u.loc=i,u.range=a,u.extra=n,u.name=o,"Placeholder"===t&&(u.expectedNode=e.expectedNode),u}function Jo(e){const{type:t,start:s,end:r,loc:i,range:a,extra:n}=e;if("Placeholder"===t)return function(e){return Xo(e)}(e);const o=Object.create(Ko);return o.type="StringLiteral",o.start=s,o.end=r,o.loc=i,o.range=a,o.extra=n,o.value=e.value,o}Ko.__clone=function(){const e=new Go,t=Object.keys(this);for(let s=0,r=t.length;s async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:"`declare export %0` is not supported. Use `%1` instead.",UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},Kn.SyntaxError,"flow");function Zo(e){return"type"===e.importKind||"typeof"===e.importKind}function eu(e){return(e.type===Mn.name||!!e.type.keyword)&&"from"!==e.value}const tu={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const su=/\*?\s*@((?:no)?flow)\b/;const ru={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},iu=/^[\da-fA-F]+$/,au=/^\d+$/,nu=Qn({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:"Expected corresponding JSX closing tag for <%0>.",MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"},Kn.SyntaxError,"jsx");function ou(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function uu(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return uu(e.object)+"."+uu(e.property);throw new Error("Node had unexpected type: "+e.type)}eo.j_oTag=new Zn("...",!0),Mn.jsxName=new vn("jsxName"),Mn.jsxText=new vn("jsxText",{beforeExpr:!0}),Mn.jsxTagStart=new vn("jsxTagStart",{startsExpr:!0}),Mn.jsxTagEnd=new vn("jsxTagEnd"),Mn.jsxTagStart.updateContext=e=>{e.push(eo.j_expr,eo.j_oTag)};class hu extends So{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}}class cu extends Bo{createScope(e){return new hu(e)}declareName(e,t,s){const r=this.currentScope();if(t&To)return this.maybeExportDefined(r,e),void r.exportOnlyBindings.add(e);super.declareName(...arguments),2&t&&(1&t||(this.checkRedeclarationInScope(r,e,t,s),this.maybeExportDefined(r,e)),r.types.add(e)),256&t&&r.enums.add(e),512&t&&r.constEnums.add(e),t&Po&&r.classes.add(e)}isRedeclaredInScope(e,t,s){if(e.enums.has(t)){if(256&s){return!!(512&s)!==e.constEnums.has(t)}return!0}return s&Po&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&s):!!(2&s&&e.types.has(t))||super.isRedeclaredInScope(...arguments)}checkLocalExport(e){const t=this.scopeStack[0],{name:s}=e;t.types.has(s)||t.exportOnlyBindings.has(s)||super.checkLocalExport(e)}}function pu(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}function lu(e){if(!e)throw new Error("Assert fail")}const du=Qn({AbstractMethodHasImplementation:"Method '%0' cannot have an implementation because it is marked abstract.",AbstractPropertyHasInitializer:"Property '%0' cannot have an initializer because it is marked abstract.",AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:"'declare' is not allowed in %0ters.",DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:"Accessibility modifier already seen.",DuplicateModifier:"Duplicate modifier: '%0'.",EmptyHeritageClauseType:"'%0' list cannot be empty.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:"'%0' modifier cannot be used with '%1' modifier.",IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:"Index signatures cannot have an accessibility modifier ('%0').",IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InvalidModifierOnTypeMember:"'%0' modifier cannot appear on a type member.",InvalidModifiersOrder:"'%0' modifier must precede '%1' modifier.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:"Private elements cannot have an accessibility modifier ('%0').",ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."},Kn.SyntaxError,"typescript");function Du(e){return"private"===e||"public"===e||"protected"===e}Mn.placeholder=new vn("%%",{startsExpr:!0});const mu=Qn({ClassNameIsRequired:"A class name is required."},Kn.SyntaxError);function fu(e,t){return e.some((e=>Array.isArray(e)?e[0]===t:e===t))}function yu(e,t,s){const r=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return r&&Array.isArray(r)?r[1][s]:null}const Au=["minimal","fsharp","hack","smart"],Eu=["%","#"],Cu=["hash","bar"];const xu={estree:e=>class extends e{parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch(e){}const r=this.estreeParseLiteral(s);return r.regex={pattern:e,flags:t},r}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const s=this.estreeParseLiteral(t);return s.bigint=String(s.value||e),s}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const t=e.value,s=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start);return r.value=t.extra.expressionValue,r.raw=t.extra.raw,s.expression=this.finishNodeAt(r,"Literal",t.end,t.loc.end),s.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",e.end,e.loc.end)}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}stmtToDirective(e){const t=e.expression.value,s=super.stmtToDirective(e);return this.addExtra(s.value,"expressionValue",t),s}parseBlockBody(e,...t){super.parseBlockBody(e,...t);const s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}pushClassMethod(e,t,s,r,i,a){this.parseMethod(t,s,r,i,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parseMaybePrivateName(...e){const t=super.parseMaybePrivateName(...e);return"PrivateName"===t.type&&this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete(e=e).id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const s=super.parseLiteral(e,t);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(e,t,s=!1){super.parseFunctionBody(e,t,s),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,s,r,i,a,n=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,s,r,i,a,n),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===a&&(e.computed=!1),a="MethodDefinition",this.finishNode(e,a)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,s,r,i){const a=super.parseObjectMethod(e,t,s,r,i);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,s,r,i){const a=super.parseObjectProperty(e,t,s,r,i);return a&&(a.kind="init",a.type="Property"),a}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){return null!=e&&this.isObjectProperty(e)?(this.toAssignable(e.value,t),e):super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,...t){"get"===e.kind||"set"===e.kind?this.raise(e.key.start,Xn.PatternHasAccessor):e.method?this.raise(e.key.start,Xn.PatternHasMethod):super.toAssignableObjectExpressionProp(e,...t)}finishCallExpression(e,t){if(super.finishCallExpression(e,t),"Import"===e.callee.type){var s;if(e.type="ImportExpression",e.source=e.arguments[0],this.hasPlugin("importAssertions"))e.attributes=null!=(s=e.arguments[1])?s:null;delete e.arguments,delete e.callee}return e}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e){switch(super.parseExport(e),e.type){case"ExportAllDeclaration":e.exported=null;break;case"ExportNamedDeclaration":1===e.specifiers.length&&"ExportNamespaceSpecifier"===e.specifiers[0].type&&(e.type="ExportAllDeclaration",e.exported=e.specifiers[0].exported,delete e.specifiers)}return e}parseSubscript(e,t,s,r,i){const a=super.parseSubscript(e,t,s,r,i);if(i.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),i.stop){const e=this.startNodeAtNode(a);return e.expression=a,this.finishNode(e,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isOptionalChain(e){return"ChainExpression"===e.type}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,nu.UnterminatedJsxContent);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(Mn.jsxTagStart)):super.getTokenFromCode(s):(e+=this.input.slice(t,this.state.pos),this.finishToken(Mn.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:_n(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=e?"\n":"\r\n"):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Xn.UnterminatedString);const r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):_n(r)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return t+=this.input.slice(s,this.state.pos++),this.finishToken(Mn.string,t)}jsxReadEntity(){let e,t="",s=0,r=this.input[this.state.pos];const i=++this.state.pos;for(;this.state.posclass extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Io}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){return e!==Mn.string&&e!==Mn.semi&&e!==Mn.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=su.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||Mn.colon);const s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){const e=this.startNode(),t=this.state.start;return this.next(),this.expectContextual("checks"),this.state.lastTokStart>t+1&&this.raise(t,Qo.UnexpectedSpaceBetweenModuloChecks),this.eat(Mn.parenL)?(e.value=this.parseExpression(),this.expect(Mn.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(Mn.colon);let t=null,s=null;return this.match(Mn.modulo)?(this.state.inType=e,s=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(Mn.modulo)&&(s=this.flowParsePredicate())),[t,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),s=this.startNode(),r=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(Mn.parenL);const i=this.flowParseFunctionTypeParams();return s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(Mn.parenR),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(Mn._class))return this.flowParseDeclareClass(e);if(this.match(Mn._function))return this.flowParseDeclareFunction(e);if(this.match(Mn._var))return this.flowParseDeclareVariable(e);if(this.eatContextual("module"))return this.match(Mn.dot)?this.flowParseDeclareModuleExports(e):(t&&this.raise(this.state.lastTokStart,Qo.NestedDeclareModule),this.flowParseDeclareModule(e));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual("interface"))return this.flowParseDeclareInterface(e);if(this.match(Mn._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(Mn.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),s=t.body=[];for(this.expect(Mn.braceL);!this.match(Mn.braceR);){let e=this.startNode();this.match(Mn._import)?(this.next(),this.isContextual("type")||this.match(Mn._typeof)||this.raise(this.state.lastTokStart,Qo.InvalidNonTypeImportInDeclareModule),this.parseImport(e)):(this.expectContextual("declare",Qo.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),s.push(e)}this.scope.exit(),this.expect(Mn.braceR),this.finishNode(t,"BlockStatement");let r=null,i=!1;return s.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(e.start,Qo.DuplicateDeclareModuleExports),"ES"===r&&this.raise(e.start,Qo.AmbiguousDeclareModuleKind),r="CommonJS",i=!0):("CommonJS"===r&&this.raise(e.start,Qo.AmbiguousDeclareModuleKind),r="ES")})),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(Mn._export),this.eat(Mn._default))return this.match(Mn._function)||this.match(Mn._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(Mn._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!t){const e=this.state.value,t=tu[e];throw this.raise(this.state.start,Qo.UnsupportedDeclareExportKind,e,t)}if(this.match(Mn._var)||this.match(Mn._function)||this.match(Mn._class)||this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(Mn.star)||this.match(Mn.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(e=this.parseExport(e)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){return this.next(),this.flowParseTypeAlias(e),e.type="DeclareTypeAlias",e}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0),e.type="DeclareOpaqueType",e}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t=!1){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(Mn._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(Mn.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(Mn.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(Mn.comma))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(this.state.start,Qo.UnexpectedReservedUnderscore)}checkReservedType(e,t,s){Yo.has(e)&&this.raise(t,s?Qo.AssignReservedType:Qo.UnexpectedReservedType,e)}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.start,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(Mn.eq),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(Mn.colon)&&(e.supertype=this.flowParseTypeInitialiser(Mn.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(Mn.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.start,s=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return s.name=i.name,s.variance=r,s.bound=i.typeAnnotation,this.match(Mn.eq)?(this.eat(Mn.eq),s.default=this.flowParseType()):e&&this.raise(t,Qo.MissingTypeParamDefault),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(Mn.jsxTagStart)?this.next():this.unexpected();let s=!1;do{const e=this.flowParseTypeParameter(s);t.params.push(e),e.default&&(s=!0),this.isRelational(">")||this.expect(Mn.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expectRelational("<");const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(Mn.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(Mn.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(Mn._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(Mn.comma));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(Mn.num)||this.match(Mn.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,s){return e.static=t,this.lookahead().type===Mn.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(Mn.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(Mn.bracketR),this.expect(Mn.bracketR),this.isRelational("<")||this.match(Mn.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(Mn.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(Mn.parenL),this.match(Mn._this)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(Mn.parenR)||this.expect(Mn.comma));!this.match(Mn.parenR)&&!this.match(Mn.ellipsis);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(Mn.parenR)||this.expect(Mn.comma);return this.eat(Mn.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(Mn.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const s=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:s,allowProto:r,allowInexact:i}){const a=this.state.inType;this.state.inType=!0;const n=this.startNode();let o,u;n.callProperties=[],n.properties=[],n.indexers=[],n.internalSlots=[];let h=!1;for(t&&this.match(Mn.braceBarL)?(this.expect(Mn.braceBarL),o=Mn.braceBarR,u=!0):(this.expect(Mn.braceL),o=Mn.braceR,u=!1),n.exact=u;!this.match(o);){let t=!1,a=null,o=null;const c=this.startNode();if(r&&this.isContextual("proto")){const t=this.lookahead();t.type!==Mn.colon&&t.type!==Mn.question&&(this.next(),a=this.state.start,e=!1)}if(e&&this.isContextual("static")){const e=this.lookahead();e.type!==Mn.colon&&e.type!==Mn.question&&(this.next(),t=!0)}const p=this.flowParseVariance();if(this.eat(Mn.bracketL))null!=a&&this.unexpected(a),this.eat(Mn.bracketL)?(p&&this.unexpected(p.start),n.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):n.indexers.push(this.flowParseObjectTypeIndexer(c,t,p));else if(this.match(Mn.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),p&&this.unexpected(p.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";if(this.isContextual("get")||this.isContextual("set")){const t=this.lookahead();t.type!==Mn.name&&t.type!==Mn.string&&t.type!==Mn.num||(e=this.state.value,this.next())}const r=this.flowParseObjectTypeProperty(c,t,a,p,e,s,null!=i?i:!u);null===r?(h=!0,o=this.state.lastTokStart):n.properties.push(r)}this.flowObjectTypeSemicolon(),!o||this.match(Mn.braceR)||this.match(Mn.braceBarR)||this.raise(o,Qo.UnexpectedExplicitInexactInObject)}this.expect(o),s&&(n.inexact=h);const c=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=a,c}flowParseObjectTypeProperty(e,t,s,r,i,a,n){if(this.eat(Mn.ellipsis)){return this.match(Mn.comma)||this.match(Mn.semi)||this.match(Mn.braceR)||this.match(Mn.braceBarR)?(a?n||this.raise(this.state.lastTokStart,Qo.InexactInsideExact):this.raise(this.state.lastTokStart,Qo.InexactInsideNonObject),r&&this.raise(r.start,Qo.InexactVariance),null):(a||this.raise(this.state.lastTokStart,Qo.UnexpectedSpreadType),null!=s&&this.unexpected(s),r&&this.raise(r.start,Qo.SpreadVariance),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=s,e.kind=i;let n=!1;return this.isRelational("<")||this.match(Mn.parenL)?(e.method=!0,null!=s&&this.unexpected(s),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e),!a&&"constructor"===e.key.name&&e.value.this&&this.raise(e.value.this.start,Qo.ThisParamBannedInConstructor)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(Mn.question)&&(n=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=n,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,s=e.start,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.value.this.start,"get"===e.kind?Qo.GetterMayNotHaveThisParam:Qo.SetterMayNotHaveThisParam),r!==t&&("get"===e.kind?this.raise(s,Xn.BadGetterArity):this.raise(s,Xn.BadSetterArity)),"set"===e.kind&&e.value.rest&&this.raise(s,Xn.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(Mn.semi)||this.eat(Mn.comma)||this.match(Mn.braceR)||this.match(Mn.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t,s){e=e||this.state.start,t=t||this.state.startLoc;let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(Mn.dot);){const s=this.startNodeAt(e,t);s.qualification=r,s.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(s,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t,s){const r=this.startNodeAt(e,t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t,s),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(Mn._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(Mn.bracketL);this.state.possuper.parseFunctionBody(e,!0,s))):super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(Mn.colon)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(e,t,s)}parseStatement(e,t){if(this.state.strict&&this.match(Mn.name)&&"interface"===this.state.value){const e=this.lookahead();if(e.type===Mn.name||Co(e.value)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const s=super.parseStatement(e,t);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}parseExpressionStatement(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(Mn._class)||this.match(Mn.name)||this.match(Mn._function)||this.match(Mn._var)||this.match(Mn._export))return this.flowParseDeclare(e)}else if(this.match(Mn.name)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(Mn.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s,r){if(!this.match(Mn.question))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(Mn.question);const i=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(t,s);let{consequent:o,failed:u}=this.tryParseConditionalConsequent(),[h,c]=this.getArrowLikeExpressions(o);if(u||c.length>0){const e=[...a];if(c.length>0){this.state=i,this.state.noArrowAt=e;for(let t=0;t1&&this.raise(i.start,Qo.AmbiguousConditionalArrow),u&&1===h.length&&(this.state=i,e.push(h[0].start),this.state.noArrowAt=e,({consequent:o,failed:u}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(Mn.colon),n.test=e,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(n,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(Mn.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const s=[e],r=[];for(;0!==s.length;){const e=s.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),s.push(e.body)):"ConditionalExpression"===e.type&&(s.push(e.consequent),s.push(e.alternate))}return t?(r.forEach((e=>this.finishArrowValidation(e))),[r,[]]):function(e,t){const s=[],r=[];for(let i=0;ie.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingComma,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=t(),this.state.noArrowParamsConversionAt.pop()):s=t(),s}parseParenItem(e,t,s){if(e=super.parseParenItem(e,t,s),this.eat(Mn.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(Mn.colon)){const r=this.startNodeAt(t,s);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExport(e){const t=super.parseExport(e);return"ExportNamedDeclaration"!==t.type&&"ExportAllDeclaration"!==t.type||(t.exportKind=t.exportKind||"value"),t}parseExportDeclaration(e){if(this.isContextual("type")){e.exportKind="type";const t=this.startNode();return this.next(),this.match(Mn.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual("opaque")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual("interface")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual("enum")){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==Mn.star)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const t=this.state.start,s=super.maybeParseExportNamespaceSpecifier(e);return s&&"type"===e.exportKind&&this.unexpected(t),s}parseClassId(e,t,s){super.parseClassId(e,t,s),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,s){const r=this.state.start;if(this.isContextual("declare")){if(this.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(r,Qo.DeclareClassElement):t.value&&this.raise(t.value.start,Qo.DeclareClassFieldInitializer))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(this.state.pos,Xn.InvalidIdentifier,t),this.finishToken(Mn.name,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);return 123===e&&124===t?this.finishOp(Mn.braceBarL,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(Mn.questionDot,2):this.finishOp(Mn.question,1):function(e,t){return 64===e&&64===t}(e,t)?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(Mn.relational,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){return"TypeCastExpression"===e.type?super.toAssignable(this.typeCastToParameter(e),t):super.toAssignable(e,t)}toAssignableList(e,t,s){for(let t=0;t1)&&t||this.raise(i.typeAnnotation.start,Qo.TypeCastInPattern)}return e}parseArrayLike(e,t,s,r){const i=super.parseArrayLike(e,t,s,r);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}checkLVal(e,...t){if("TypeCastExpression"!==e.type)return super.checkLVal(e,...t)}parseClassProperty(e){return this.match(Mn.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(Mn.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(Mn.colon)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(Mn.colon)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,s,r,i,a){if(t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,r,i,a),t.params&&i){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(t.start,Qo.ThisParamBannedInConstructor)}else if("MethodDefinition"===t.type&&i&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(t.start,Qo.ThisParamBannedInConstructor)}}pushClassPrivateMethod(e,t,s,r){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(Mn.comma))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const s=t[0];this.isThisParam(s)&&"get"===e.kind?this.raise(s.start,Qo.GetterMayNotHaveThisParam):this.isThisParam(s)&&this.raise(s.start,Qo.SetterMayNotHaveThisParam)}}parsePropertyName(e,t){const s=this.flowParseVariance(),r=super.parsePropertyName(e,t);return e.variance=s,r}parseObjPropValue(e,t,s,r,i,a,n,o){let u;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&!n&&(u=this.flowParseTypeParameterDeclaration(),this.match(Mn.parenL)||this.unexpected()),super.parseObjPropValue(e,t,s,r,i,a,n,o),u&&((e.value||e).typeParameters=u)}parseAssignableListItemTypes(e){return this.eat(Mn.question)&&("Identifier"!==e.type&&this.raise(e.start,Qo.PatternIsOptional),this.isThisParam(e)&&this.raise(e.start,Qo.ThisParamMayNotBeOptional),e.optional=!0),this.match(Mn.colon)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(e.start,Qo.ThisParamAnnotationRequired),this.match(Mn.eq)&&this.isThisParam(e)&&this.raise(e.start,Qo.ThisParamNoDefault),this.resetEndLocation(e),e}parseMaybeDefault(e,t,s){const r=super.parseMaybeDefault(e,t,s);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,t)),i),!r.error)return r.node;const{context:s}=this.state,a=s[s.length-1];a===eo.j_oTag?s.length-=2:a===eo.j_expr&&(s.length-=1)}if(null!=(s=r)&&s.error||this.isRelational("<")){var a,n;let s;i=i||this.state.clone();const o=this.tryParse((r=>{var i;s=this.flowParseTypeParameterDeclaration();const a=this.forwardNoArrowParamsConversionAt(s,(()=>{const r=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(r,s),r}));null!=(i=a.extra)&&i.parenthesized&&r();const n=this.maybeUnwrapTypeCastExpression(a);return"ArrowFunctionExpression"!==n.type&&r(),n.typeParameters=s,this.resetStartLocationFromNode(n,s),a}),i);let u=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(s.start,Qo.UnexpectedTypeParameterBeforeAsyncArrowFunction),o.node;u=o.node}if(null!=(a=r)&&a.node)return this.state=r.failState,r.node;if(u)return this.state=o.failState,u;if(null!=(n=r)&&n.thrown)throw r.error;if(o.thrown)throw o.error;throw this.raise(s.start,Qo.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(Mn.colon)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(Mn.arrow)||this.unexpected(),s}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(Mn.colon)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t0&&this.raise(e.params[t].start,Qo.ThisParamMustBeFirst);return super.checkParams(...arguments)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,s,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t)){this.next();const r=this.startNodeAt(t,s);r.callee=e,r.arguments=this.parseCallExpressionArguments(Mn.parenR,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.isRelational("<")){const i=this.state.clone(),a=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t,s)||e()),i);if(!a.error&&!a.aborted)return a.node;const n=this.tryParse((()=>super.parseSubscripts(e,t,s,r)),i);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(e,t,s,r)}parseSubscript(e,t,s,r,i){if(this.match(Mn.questionDot)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,r)return i.stop=!0,e;this.next();const a=this.startNodeAt(t,s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(Mn.parenL),a.arguments=this.parseCallExpressionArguments(Mn.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){const r=this.startNodeAt(t,s);r.callee=e;const a=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(Mn.parenL),r.arguments=this.parseCallExpressionArguments(Mn.parenR,!1),i.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,i.optionalChainMember))));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(e,t,s,r,i)}parseNewArguments(e){let t=null;this.shouldParseTypes()&&this.isRelational("<")&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t,super.parseNewArguments(e)}parseAsyncArrowWithTypeParameters(e,t){const s=this.startNodeAt(e,t);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(Mn.braceBarR,2)}parseTopLevel(e,t){const s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(this.state.pos,Qo.UnterminatedFlowComment),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,Qo.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(!this.state.hasFlowComment)return super.skipBlockComment();{const e=this.input.indexOf("*-/",this.state.pos+=2);if(-1===e)throw this.raise(this.state.pos-2,Xn.UnterminatedComment);this.state.pos=e+3}}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const s=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return 58===s&&58===r?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===s&&58!==r&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,Xn.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(e,Qo.EnumBooleanMemberNotInitialized,s,t)}flowEnumErrorInvalidMemberName(e,{enumName:t,memberName:s}){const r=s[0].toUpperCase()+s.slice(1);this.raise(e,Qo.EnumInvalidMemberName,s,r,t)}flowEnumErrorDuplicateMemberName(e,{enumName:t,memberName:s}){this.raise(e,Qo.EnumDuplicateMemberName,s,t)}flowEnumErrorInconsistentMemberValues(e,{enumName:t}){this.raise(e,Qo.EnumInconsistentMemberValues,t)}flowEnumErrorInvalidExplicitType(e,{enumName:t,suppliedType:s}){return this.raise(e,null===s?Qo.EnumInvalidExplicitTypeUnknownSupplied:Qo.EnumInvalidExplicitType,t,s)}flowEnumErrorInvalidMemberInitializer(e,{enumName:t,explicitType:s,memberName:r}){let i=null;switch(s){case"boolean":case"number":case"string":i=Qo.EnumInvalidMemberInitializerPrimaryType;break;case"symbol":i=Qo.EnumInvalidMemberInitializerSymbolType;break;default:i=Qo.EnumInvalidMemberInitializerUnknownType}return this.raise(e,i,t,r,s)}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(e,Qo.EnumNumberMemberNotInitialized,t,s)}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(e,Qo.EnumStringMemberInconsistentlyInitailized,t)}flowEnumMemberInit(){const e=this.state.start,t=()=>this.match(Mn.comma)||this.match(Mn.braceR);switch(this.state.type){case Mn.num:{const s=this.parseNumericLiteral(this.state.value);return t()?{type:"number",pos:s.start,value:s}:{type:"invalid",pos:e}}case Mn.string:{const s=this.parseStringLiteral(this.state.value);return t()?{type:"string",pos:s.start,value:s}:{type:"invalid",pos:e}}case Mn._true:case Mn._false:{const s=this.parseBooleanLiteral(this.match(Mn._true));return t()?{type:"boolean",pos:s.start,value:s}:{type:"invalid",pos:e}}default:return{type:"invalid",pos:e}}}flowEnumMemberRaw(){const e=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(Mn.eq)?this.flowEnumMemberInit():{type:"none",pos:e}}}flowEnumCheckExplicitTypeMismatch(e,t,s){const{explicitType:r}=t;null!==r&&r!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const s=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let i=!1;for(;!this.match(Mn.braceR);){if(this.eat(Mn.ellipsis)){i=!0;break}const a=this.startNode(),{id:n,init:o}=this.flowEnumMemberRaw(),u=n.name;if(""===u)continue;/^[a-z]/.test(u)&&this.flowEnumErrorInvalidMemberName(n.start,{enumName:e,memberName:u}),s.has(u)&&this.flowEnumErrorDuplicateMemberName(n.start,{enumName:e,memberName:u}),s.add(u);const h={enumName:e,explicitType:t,memberName:u};switch(a.id=n,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"boolean"),a.init=o.value,r.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"number"),a.init=o.value,r.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"string"),a.init=o.value,r.stringMembers.push(this.finishNode(a,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,h);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,h);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,h);break;default:r.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(Mn.braceR)||this.expect(Mn.comma)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:s}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t.start,{enumName:s});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start,{enumName:s});return e}flowEnumParseExplicitType({enumName:e}){if(this.eatContextual("of")){if(!this.match(Mn.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:null});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:t}),t}return null}flowEnumBody(e,{enumName:t,nameLoc:s}){const r=this.flowEnumParseExplicitType({enumName:t});this.expect(Mn.braceL);const{members:i,hasUnknownMembers:a}=this.flowEnumMembers({enumName:t,explicitType:r});switch(e.hasUnknownMembers=a,r){case"boolean":return e.explicitType=!0,e.members=i.booleanMembers,this.expect(Mn.braceR),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=i.numberMembers,this.expect(Mn.braceR),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:t}),this.expect(Mn.braceR),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=i.defaultedMembers,this.expect(Mn.braceR),this.finishNode(e,"EnumSymbolBody");default:{const r=()=>(e.members=[],this.expect(Mn.braceR),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const a=i.booleanMembers.length,n=i.numberMembers.length,o=i.stringMembers.length,u=i.defaultedMembers.length;if(a||n||o||u){if(a||n){if(!n&&!o&&a>=u){for(const e of i.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.start,{enumName:t,memberName:e.id.name});return e.members=i.booleanMembers,this.expect(Mn.braceR),this.finishNode(e,"EnumBooleanBody")}if(!a&&!o&&n>=u){for(const e of i.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.start,{enumName:t,memberName:e.id.name});return e.members=i.numberMembers,this.expect(Mn.braceR),this.finishNode(e,"EnumNumberBody")}return this.flowEnumErrorInconsistentMemberValues(s,{enumName:t}),r()}return e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:t}),this.expect(Mn.braceR),this.finishNode(e,"EnumStringBody")}return r()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),{enumName:t.name,nameLoc:t.start}),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{getScopeHandler(){return cu}tsIsIdentifier(){return this.match(Mn.name)}tsTokenCanFollowModifier(){return(this.match(Mn.bracketL)||this.match(Mn.braceL)||this.match(Mn.star)||this.match(Mn.ellipsis)||this.match(Mn.privateName)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!this.match(Mn.name))return;const s=this.state.value;if(-1!==e.indexOf(s)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers(e,t,s,r,i){const a=(t,s,r,i)=>{s===r&&e[i]&&this.raise(t,du.InvalidModifiersOrder,r,i)},n=(t,s,r,i)=>{(e[r]&&s===i||e[i]&&s===r)&&this.raise(t,du.IncompatibleModifiers,r,i)};for(;;){const o=this.state.start,u=this.tsParseModifier(t.concat(null!=s?s:[]),i);if(!u)break;Du(u)?e.accessibility?this.raise(o,du.DuplicateAccessibilityModifier):(a(o,u,u,"override"),a(o,u,u,"static"),a(o,u,u,"readonly"),e.accessibility=u):(Object.hasOwnProperty.call(e,u)?this.raise(o,du.DuplicateModifier,u):(a(o,u,"static","readonly"),a(o,u,"static","override"),a(o,u,"override","readonly"),a(o,u,"abstract","override"),n(o,u,"declare","override"),n(o,u,"static","abstract")),e[u]=!0),null!=s&&s.includes(u)&&this.raise(o,r,u)}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(Mn.braceR);case"HeritageClauseElement":return this.match(Mn.braceL);case"TupleElementTypes":return this.match(Mn.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(e,t){const s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t){return pu(this.tsParseDelimitedListWorker(e,t,!0))}tsParseDelimitedListWorker(e,t,s){const r=[];for(;!this.tsIsListTerminator(e);){const i=t();if(null==i)return;if(r.push(i),!this.eat(Mn.comma)){if(this.tsIsListTerminator(e))break;return void(s&&this.expect(Mn.comma))}}return r}tsParseBracketedList(e,t,s,r){r||(s?this.expect(Mn.bracketL):this.expectRelational("<"));const i=this.tsParseDelimitedList(e,t);return s?this.expect(Mn.bracketR):this.expectRelational(">"),i}tsParseImportType(){const e=this.startNode();return this.expect(Mn._import),this.expect(Mn.parenL),this.match(Mn.string)||this.raise(this.state.start,du.UnsupportedImportTypeArgument),e.argument=this.parseExprAtom(),this.expect(Mn.parenR),this.eat(Mn.dot)&&(e.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e){let t=this.parseIdentifier();for(;this.eat(Mn.dot);){const s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(Mn._typeof),this.match(Mn._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsEatThenParseType(Mn._extends),e.default=this.tsEatThenParseType(Mn.eq),this.finishNode(e,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const e=this.startNode();return this.isRelational("<")||this.match(Mn.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),0===e.params.length&&this.raise(e.start,du.EmptyTypeParameters),this.finishNode(e,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===Mn._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(e,t){const s=e===Mn.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(Mn.parenL),t.parameters=this.tsParseBindingListForSignature(),(s||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){return this.parseBindingList(Mn.parenR,41).map((e=>("Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&this.raise(e.start,du.UnsupportedSignatureParameterKind,e.type),e)))}tsParseTypeMemberSemicolon(){this.eat(Mn.comma)||this.isLineTerminator()||this.expect(Mn.semi)}tsParseSignatureMember(e,t){return this.tsFillSignature(Mn.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(Mn.name)&&this.match(Mn.colon)}tsTryParseIndexSignature(e){if(!this.match(Mn.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(Mn.bracketL);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(Mn.bracketR),e.parameters=[t];const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(Mn.question)&&(e.optional=!0);const s=e;if(this.match(Mn.parenL)||this.isRelational("<")){t&&this.raise(e.start,du.ReadonlyForMethodSignature);const r=s;if(r.kind&&this.isRelational("<")&&this.raise(this.state.pos,du.AccesorCannotHaveTypeParameters),this.tsFillSignature(Mn.colon,r),this.tsParseTypeMemberSemicolon(),"get"===r.kind)r.parameters.length>0&&(this.raise(this.state.pos,Xn.BadGetterArity),this.isThisParam(r.parameters[0])&&this.raise(this.state.pos,du.AccesorCannotDeclareThisParameter));else if("set"===r.kind){if(1!==r.parameters.length)this.raise(this.state.pos,Xn.BadSetterArity);else{const e=r.parameters[0];this.isThisParam(e)&&this.raise(this.state.pos,du.AccesorCannotDeclareThisParameter),"Identifier"===e.type&&e.optional&&this.raise(this.state.pos,du.SetAccesorCannotHaveOptionalParameter),"RestElement"===e.type&&this.raise(this.state.pos,du.SetAccesorCannotHaveRestParameter)}r.typeAnnotation&&this.raise(r.typeAnnotation.start,du.SetAccesorCannotHaveReturnType)}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}{const e=s;t&&(e.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(Mn.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(Mn._new)){const t=this.startNode();return this.next(),this.match(Mn.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers(e,["readonly"],["declare","abstract","private","protected","public","static","override"],du.InvalidModifierOnTypeMember);const t=this.tsTryParseIndexSignature(e);return t||(this.parsePropertyName(e,!1),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,this.parsePropertyName(e,!1)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(Mn.braceL);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(Mn.braceR),e}tsIsStartOfMappedType(){return this.next(),this.eat(Mn.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(Mn.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(Mn._in))))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(Mn._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(Mn.braceL),this.match(Mn.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(Mn.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(Mn.bracketR),this.match(Mn.plusMin)?(e.optional=this.state.value,this.next(),this.expect(Mn.question)):this.eat(Mn.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(Mn.braceR),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,s=null;return e.elementTypes.forEach((e=>{var r;let{type:i}=e;!t||"TSRestType"===i||"TSOptionalType"===i||"TSNamedTupleMember"===i&&e.optional||this.raise(e.start,du.OptionalTypeBeforeRequired),t=t||"TSNamedTupleMember"===i&&e.optional||"TSOptionalType"===i,"TSRestType"===i&&(i=(e=e.typeAnnotation).type);const a="TSNamedTupleMember"===i;s=null!=(r=s)?r:a,s!==a&&this.raise(e.start,du.MixedLabeledAndUnlabeledElements)})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{start:e,startLoc:t}=this.state,s=this.eat(Mn.ellipsis);let r=this.tsParseType();const i=this.eat(Mn.question);if(this.eat(Mn.colon)){const e=this.startNodeAtNode(r);e.optional=i,"TSTypeReference"!==r.type||r.typeParameters||"Identifier"!==r.typeName.type?(this.raise(r.start,du.InvalidTupleMemberLabel),e.label=r):e.label=r.typeName,e.elementType=this.tsParseType(),r=this.finishNode(e,"TSNamedTupleMember")}else if(i){const e=this.startNodeAtNode(r);e.typeAnnotation=r,r=this.finishNode(e,"TSOptionalType")}if(s){const s=this.startNodeAt(e,t);s.typeAnnotation=r,r=this.finishNode(s,"TSRestType")}return r}tsParseParenthesizedType(){const e=this.startNode();return this.expect(Mn.parenL),e.typeAnnotation=this.tsParseType(),this.expect(Mn.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const s=this.startNode();return"TSConstructorType"===e&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsFillSignature(Mn.arrow,s),this.finishNode(s,e)}tsParseLiteralTypeNode(){const e=this.startNode();return e.literal=(()=>{switch(this.state.type){case Mn.num:case Mn.bigint:case Mn.string:case Mn._true:case Mn._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=this.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case Mn.name:case Mn._void:case Mn._null:{const e=this.match(Mn._void)?"TSVoidKeyword":this.match(Mn._null)?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}case Mn.string:case Mn.num:case Mn.bigint:case Mn._true:case Mn._false:return this.tsParseLiteralTypeNode();case Mn.plusMin:if("-"===this.state.value){const e=this.startNode(),t=this.lookahead();if(t.type!==Mn.num&&t.type!==Mn.bigint)throw this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case Mn._this:return this.tsParseThisTypeOrThisTypePredicate();case Mn._typeof:return this.tsParseTypeQuery();case Mn._import:return this.tsParseImportType();case Mn.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case Mn.bracketL:return this.tsParseTupleType();case Mn.parenL:return this.tsParseParenthesizedType();case Mn.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(Mn.bracketL);)if(this.match(Mn.bracketR)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(Mn.bracketR),e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(Mn.bracketR),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(e){const t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,du.UnexpectedReadonly)}}tsParseInferType(){const e=this.startNode();this.expectContextual("infer");const t=this.startNode();return t.name=this.tsParseTypeParameterName(),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseTypeOperatorOrHigher(){const e=["keyof","unique","readonly"].find((e=>this.isContextual(e)));return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(e,t,s){const r=this.startNode(),i=this.eat(s),a=[];do{a.push(t())}while(this.eat(s));return 1!==a.length||i?(r.types=a,this.finishNode(r,e)):a[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),Mn.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),Mn.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(Mn.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(Mn.name)||this.match(Mn._this))return this.next(),!0;if(this.match(Mn.braceL)){let e=1;for(this.next();e>0;)this.match(Mn.braceL)?++e:this.match(Mn.braceR)&&--e,this.next();return!0}if(this.match(Mn.bracketL)){let e=1;for(this.next();e>0;)this.match(Mn.bracketL)?++e:this.match(Mn.bracketR)&&--e,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(Mn.parenR)||this.match(Mn.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(Mn.colon)||this.match(Mn.comma)||this.match(Mn.question)||this.match(Mn.eq))return!0;if(this.match(Mn.parenR)&&(this.next(),this.match(Mn.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const s=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(Mn._this)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(s.parameterName=e,s.asserts=!0,s.typeAnnotation=null,e=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(e,s),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return r?(s.parameterName=this.parseIdentifier(),s.asserts=r,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const a=this.tsParseTypeAnnotation(!1);return s.parameterName=i,s.typeAnnotation=a,s.asserts=r,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(Mn.colon)?this.tsParseTypeOrTypePredicateAnnotation(Mn.colon):void 0}tsTryParseTypeAnnotation(){return this.match(Mn.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(Mn.colon)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(!this.match(Mn.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const e=this.state.containsEsc;return this.next(),!(!this.match(Mn.name)&&!this.match(Mn._this))&&(e&&this.raise(this.state.lastTokStart,Xn.InvalidEscapedReservedWord,"asserts"),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(Mn.colon),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){lu(this.state.inType);const e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(Mn._extends))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(Mn.question),t.trueType=this.tsParseType(),this.expect(Mn.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual("abstract")&&this.lookahead().type===Mn._new}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(Mn._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(t,du.EmptyHeritageClauseType,e),s}tsParseExpressionWithTypeArguments(){const e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(e){this.match(Mn.name)?(e.id=this.parseIdentifier(),this.checkLVal(e.id,"typescript interface declaration",130)):(e.id=null,this.raise(this.state.start,du.MissingInterfaceName)),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(Mn._extends)&&(e.extends=this.tsParseHeritageClause("extends"));const t=this.startNode();return t.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkLVal(e.id,"typescript type alias",2),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsInType((()=>{if(this.expect(Mn.eq),this.isContextual("intrinsic")&&this.lookahead().type!==Mn.dot){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType((()=>this.expect(e)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(e){return this.tsInType((()=>(e(),this.tsParseType())))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(Mn.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(Mn.eq)&&(e.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.checkLVal(e.id,"typescript enum declaration",t?779:267),this.expect(Mn.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(Mn.braceR),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(Mn.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,Mn.braceR),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkLVal(e.id,"module or namespace declaration",1024),this.eat(Mn.dot)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(go),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(Mn.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(Mn.braceL)?(this.scope.enter(go),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkLVal(e.id,"import equals declaration",9),this.expect(Mn.eq);const s=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(s.start,du.ImportAliasHasImportType),e.moduleReference=s,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();if(this.expectContextual("require"),this.expect(Mn.parenL),!this.match(Mn.string))throw this.unexpected();return e.expression=this.parseExprAtom(),this.expect(Mn.parenR),this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),s=e();return void 0!==s&&!1!==s?s:void(this.state=t)}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,s=this.state.type;return this.isContextual("let")&&(s=Mn._var,t="let"),this.tsInAmbientContext((()=>{switch(s){case Mn._function:return e.declare=!0,this.parseFunctionStatement(e,!1,!0);case Mn._class:return e.declare=!0,this.parseClass(e,!0,!1);case Mn._const:if(this.match(Mn._const)&&this.isLookaheadContextual("enum"))return this.expect(Mn._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0);case Mn._var:return t=t||this.state.value,this.parseVarStatement(e,t);case Mn.name:{const t=this.state.value;return"global"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(e,t){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);if(t)return t.declare=!0,t;break}case"global":if(this.match(Mn.braceL)){this.scope.enter(go),this.prodParam.enter(0);const s=e;return s.global=!0,s.id=t,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}tsParseDeclaration(e,t,s){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(Mn._class)||this.match(Mn.name)))return this.tsParseAbstractDeclaration(e);break;case"enum":if(s||this.match(Mn.name))return s&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(this.tsCheckLineTerminator(s)&&this.match(Mn.name))return this.tsParseInterfaceDeclaration(e);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(Mn.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(this.match(Mn.name))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&this.match(Mn.name))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&this.match(Mn.name))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e,t){if(!this.isRelational("<"))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch((()=>{const s=this.startNodeAt(e,t);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(Mn.arrow),s}));return this.state.maybeInArrowParameters=s,r?this.parseArrowExpression(r,null,!0):void 0}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length&&this.raise(e.start,du.EmptyTypeArguments),this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(Mn.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const s=this.state.start,r=this.state.startLoc;let i,a=!1,n=!1;if(void 0!==e){const t={};this.tsParseModifiers(t,["public","private","protected","override","readonly"]),i=t.accessibility,n=t.override,a=t.readonly,!1===e&&(i||a||n)&&this.raise(s,du.UnexpectedParameterModifier)}const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const u=this.parseMaybeDefault(o.start,o.loc.start,o);if(i||a||n){const e=this.startNodeAt(s,r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),n&&(e.override=n),"Identifier"!==u.type&&"AssignmentPattern"!==u.type&&this.raise(e.start,du.UnsupportedParameterPropertyKind),e.parameter=u,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),u}parseFunctionBodyAndFinish(e,t,s=!1){this.match(Mn.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(Mn.colon));const r="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t?"TSDeclareMethod":void 0;r&&!this.match(Mn.braceL)&&this.isLineTerminator()?this.finishNode(e,r):"TSDeclareFunction"===r&&this.state.isAmbientContext&&(this.raise(e.start,du.DeclareFunctionHasImplementation),e.declare)?super.parseFunctionBodyAndFinish(e,r,s):super.parseFunctionBodyAndFinish(e,t,s)}registerFunctionStatementId(e){!e.body&&e.id?this.checkLVal(e.id,"function name",1024):super.registerFunctionStatementId(...arguments)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(e.typeAnnotation.start,du.UnexpectedTypeAnnotation)}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(...e){const t=super.parseArrayLike(...e);return"ArrayExpression"===t.type&&this.tsCheckForInvalidTypeCasts(t.elements),t}parseSubscript(e,t,s,r,i){if(!this.hasPrecedingLineBreak()&&this.match(Mn.bang)){this.state.exprAllowed=!1,this.next();const r=this.startNodeAt(t,s);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let a=!1;if(this.match(Mn.questionDot)&&60===this.lookaheadCharCode()){if(r)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.isRelational("<")){let n;const o=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t,s);if(e)return e}const o=this.startNodeAt(t,s);o.callee=e;const u=this.tsParseTypeArguments();if(u){if(a&&!this.match(Mn.parenL)&&(n=this.state.pos,this.unexpected()),!r&&this.eat(Mn.parenL))return o.arguments=this.parseCallExpressionArguments(Mn.parenR,!1),this.tsCheckForInvalidTypeCasts(o.arguments),o.typeParameters=u,i.optionalChainMember&&(o.optional=a),this.finishCallExpression(o,i.optionalChainMember);if(this.match(Mn.backQuote)){const r=this.parseTaggedTemplateExpression(e,t,s,i);return r.typeParameters=u,r}}this.unexpected()}));if(n&&this.unexpected(n,Mn.parenL),o)return o}return super.parseSubscript(e,t,s,r,i)}parseNewArguments(e){if(this.isRelational("<")){const t=this.tsTryParseAndCatch((()=>{const e=this.tsParseTypeArguments();return this.match(Mn.parenL)||this.unexpected(),e}));t&&(e.typeParameters=t)}super.parseNewArguments(e)}parseExprOp(e,t,s,r){if(pu(Mn._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const i=this.startNodeAt(t,s);i.expression=e;const a=this.tsTryNextParseConstantContext();return i.typeAnnotation=a||this.tsNextThenParseType(),this.finishNode(i,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,s,r)}return super.parseExprOp(e,t,s,r)}checkReservedWord(e,t,s,r){}checkDuplicateExports(){}parseImport(e){if(e.importKind="value",this.match(Mn.name)||this.match(Mn.star)||this.match(Mn.braceL)){let t=this.lookahead();if(!this.isContextual("type")||t.type===Mn.comma||t.type===Mn.name&&"from"===t.value||t.type===Mn.eq||(e.importKind="type",this.next(),t=this.lookahead()),this.match(Mn.name)&&t.type===Mn.eq)return this.tsParseImportEqualsDeclaration(e)}const t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(t.start,du.TypeImportCannotSpecifyDefaultAndNamed),t}parseExport(e){if(this.match(Mn._import))return this.next(),this.isContextual("type")&&61!==this.lookaheadCharCode()?(e.importKind="type",this.next()):e.importKind="value",this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(Mn.eq)){const t=e;return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual("as")){const t=e;return this.expectContextual("namespace"),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return this.isContextual("type")&&this.lookahead().type===Mn.braceL?(this.next(),e.exportKind="type"):e.exportKind="value",super.parseExport(e)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===Mn._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0),e}if("interface"===this.state.value){const e=this.startNode();this.next();const t=this.tsParseInterfaceDeclaration(e);if(t)return t}return super.parseExportDefaultExpression()}parseStatementContent(e,t){if(this.state.type===Mn._const){const e=this.lookahead();if(e.type===Mn.name&&"enum"===e.value){const e=this.startNode();return this.expect(Mn._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>Du(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&123===this.lookaheadCharCode()}parseClassMember(e,t,s){const r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers(t,r,void 0,void 0,!0);const i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,r)&&this.raise(this.state.pos,du.StaticBlockCannotHaveModifier),this.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,s,r){const i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(t.start,du.IndexSignatureHasAbstract),t.accessibility&&this.raise(t.start,du.IndexSignatureHasAccessibility,t.accessibility),t.declare&&this.raise(t.start,du.IndexSignatureHasDeclare),void(t.override&&this.raise(t.start,du.IndexSignatureHasOverride));!this.state.inAbstractClass&&t.abstract&&this.raise(t.start,du.NonAbstractClassHasAbstractMethod),t.override&&(s.hadSuperClass||this.raise(t.start,du.OverrideNotInSubClass)),super.parseClassMemberWithIsStatic(e,t,s,r)}parsePostMemberNameModifiers(e){this.eat(Mn.question)&&(e.optional=!0),e.readonly&&this.match(Mn.parenL)&&this.raise(e.start,du.ClassMethodHasReadonly),e.declare&&this.match(Mn.parenL)&&this.raise(e.start,du.ClassMethodHasDeclare)}parseExpressionStatement(e,t){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t):void 0)||super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,s,r){if(!this.state.maybeInArrowParameters||!this.match(Mn.question))return super.parseConditional(e,t,s,r);const i=this.tryParse((()=>super.parseConditional(e,t,s)));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(r,i.error),e)}parseParenItem(e,t,s){if(e=super.parseParenItem(e,t,s),this.eat(Mn.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(Mn.colon)){const r=this.startNodeAt(t,s);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){const t=this.state.start,s=this.state.startLoc,r=this.eatContextual("declare");if(r&&(this.isContextual("declare")||!this.shouldParseExportDeclaration()))throw this.raise(this.state.start,du.ExpectedAmbientAfterExportDeclare);let i;return this.match(Mn.name)&&(i=this.tsTryParseExportDeclaration()),i||(i=super.parseExportDeclaration(e)),i&&("TSInterfaceDeclaration"===i.type||"TSTypeAliasDeclaration"===i.type||r)&&(e.exportKind="type"),i&&r&&(this.resetStartLocation(i,t,s),i.declare=!0),i}parseClassId(e,t,s){if((!t||s)&&this.isContextual("implements"))return;super.parseClassId(e,t,s,e.declare?1024:139);const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r)}parseClassPropertyAnnotation(e){!e.optional&&this.eat(Mn.bang)&&(e.definite=!0);const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&this.match(Mn.eq)&&this.raise(this.state.start,du.DeclareClassFieldHasInitializer),e.abstract&&this.match(Mn.eq)){const{key:t}=e;this.raise(this.state.start,du.AbstractPropertyHasInitializer,"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name)}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(e.start,du.PrivateElementHasAbstract),e.accessibility&&this.raise(e.start,du.PrivateElementHasAccessibility,e.accessibility),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}pushClassMethod(e,t,s,r,i,a){const n=this.tsTryParseTypeParameters();n&&i&&this.raise(n.start,du.ConstructorHasTypeParameters),!t.declare||"get"!==t.kind&&"set"!==t.kind||this.raise(t.start,du.DeclareAccessor,t.kind),n&&(t.typeParameters=n),super.pushClassMethod(e,t,s,r,i,a)}pushClassPrivateMethod(e,t,s,r){const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,s,r)}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,...t){const s=this.tsTryParseTypeParameters();s&&(e.typeParameters=s),super.parseObjPropValue(e,...t)}parseFunctionParams(e,t){const s=this.tsTryParseTypeParameters();s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&this.eat(Mn.bang)&&(e.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(Mn.colon)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(...e){var t,s,r,i,a,n,o;let u,h,c,p;if(this.hasPlugin("jsx")&&(this.match(Mn.jsxTagStart)||this.isRelational("<"))){if(u=this.state.clone(),h=this.tryParse((()=>super.parseMaybeAssign(...e)),u),!h.error)return h.node;const{context:t}=this.state;t[t.length-1]===eo.j_oTag?t.length-=2:t[t.length-1]===eo.j_expr&&(t.length-=1)}if(!(null!=(t=h)&&t.error||this.isRelational("<")))return super.parseMaybeAssign(...e);u=u||this.state.clone();const l=this.tryParse((t=>{var s,r;p=this.tsParseTypeParameters();const i=super.parseMaybeAssign(...e);return("ArrowFunctionExpression"!==i.type||null!=(s=i.extra)&&s.parenthesized)&&t(),0!==(null==(r=p)?void 0:r.params.length)&&this.resetStartLocationFromNode(i,p),i.typeParameters=p,i}),u);if(!l.error&&!l.aborted)return l.node;if(!h&&(lu(!this.hasPlugin("jsx")),c=this.tryParse((()=>super.parseMaybeAssign(...e)),u),!c.error))return c.node;if(null!=(s=h)&&s.node)return this.state=h.failState,h.node;if(l.node)return this.state=l.failState,l.node;if(null!=(r=c)&&r.node)return this.state=c.failState,c.node;if(null!=(i=h)&&i.thrown)throw h.error;if(l.thrown)throw l.error;if(null!=(a=c)&&a.thrown)throw c.error;throw(null==(n=h)?void 0:n.error)||l.error||(null==(o=c)?void 0:o.error)}parseMaybeUnary(e){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(e)}parseArrow(e){if(this.match(Mn.colon)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(Mn.colon);return!this.canInsertSemicolon()&&this.match(Mn.arrow)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e){this.eat(Mn.question)&&("Identifier"===e.type||this.state.isAmbientContext||this.state.inType||this.raise(e.start,du.PatternIsOptional),e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(e),t);case"TSParameterProperty":return super.toAssignable(e,t);case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(e,t);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return e.expression=this.toAssignable(e.expression,t),e;default:return super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return e.expression=this.toAssignable(e.expression,t),e;default:return super.toAssignable(e,t)}}checkLVal(e,t,...s){var r;switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,"parameter property",...s);case"TSAsExpression":case"TSTypeAssertion":if(!(s[0]||"parenthesized expression"===t||null!=(r=e.extra)&&r.parenthesized)){this.raise(e.start,Xn.InvalidLhs,t);break}return void this.checkLVal(e.expression,"parenthesized expression",...s);case"TSNonNullExpression":return void this.checkLVal(e.expression,t,...s);default:return void super.checkLVal(e,t,...s)}}parseBindingAtom(){switch(this.state.type){case Mn._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.isRelational("<")){const t=this.tsParseTypeArguments();if(this.match(Mn.parenL)){const s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(this.state.start,Mn.parenL)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){this.state.isAmbientContext&&this.match(Mn.comma)&&this.lookaheadCharCode()===e?this.next():super.checkCommaAfterRest(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(Mn.bang)||this.match(Mn.colon)||super.isClassProperty()}parseMaybeDefault(...e){const t=super.parseMaybeDefault(...e);return"AssignmentPattern"===t.type&&t.typeAnnotation&&t.right.startthis.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(Mn.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.isRelational("<")){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArguments()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e)[0];return s&&this.isThisParam(s)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,...t){const s=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,...t)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(e){if(this.match(Mn._class))return e.abstract=!0,this.parseClass(e,!0,!1);if(this.isContextual("interface")){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(e.start,du.NonClassMethodPropertyHasAbstractModifer),this.next(),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,Mn._class)}parseMethod(...e){const t=super.parseMethod(...e);if(t.abstract){if(this.hasPlugin("estree")?!!t.value.body:!!t.body){const{key:e}=t;this.raise(t.start,du.AbstractMethodHasImplementation,"Identifier"!==e.type||t.computed?`[${this.input.slice(e.start,e.end)}]`:e.name)}}return t}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(Mn.modulo)){const e=this.state.start,t=this.startNode();if(this.eat(Mn.modulo),this.match(Mn.name)){const e=this.parseIdentifierName(this.state.start),s=this.createIdentifier(t,e);if(s.type="V8IntrinsicIdentifier",this.match(Mn.parenL))return s}this.unexpected(e)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(Mn.placeholder)){const t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),t.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(Mn.placeholder),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const s=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,s?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){return 37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mn.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(e){void 0!==e&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(e){"Placeholder"!==e.type&&super.checkLVal(...arguments)}toAssignable(e){return e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?(e.expectedNode="Pattern",e):super.toAssignable(...arguments)}isLet(e){if(super.isLet(e))return!0;if(!this.isContextual("let"))return!1;if(e)return!1;return this.lookahead().type===Mn.placeholder}verifyBreakContinue(e){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(Mn.colon)){const s=e;return s.label=this.finishPlaceholder(t,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(e,t,s){const r=t?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(e);const i=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(Mn._extends)||this.match(Mn.placeholder)||this.match(Mn.braceL))e.id=a;else{if(s||!t)return e.id=null,e.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(e,r);this.unexpected(null,mu.ClassNameIsRequired)}else this.parseClassId(e,t,s);return this.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!e.superClass,i),this.finishNode(e,r)}parseExport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(Mn.comma))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(t,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=t,e.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(e)}isExportDefaultSpecifier(){if(this.match(Mn._default)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Mn.placeholder.label,this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e){return!!(e.specifiers&&e.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(...arguments);if(e.specifiers=[],!this.isContextual("from")&&!this.match(Mn.comma))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const s=this.startNodeAtNode(t);if(s.local=t,this.finishNode(s,"ImportDefaultSpecifier"),e.specifiers.push(s),this.eat(Mn.comma)){this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)}return this.expectContextual("from"),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},Fu=Object.keys(xu),gu={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0};const bu=e=>"ParenthesizedExpression"===e.type?bu(e.expression):e;const Pu={kind:"loop"},Tu={kind:"switch"},wu=/[\uD800-\uDFFF]/u,Su=/in(?:stanceof)?/y;class Bu extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){return this.plugins.has(e)}getPluginOption(e,t){if(this.hasPlugin(e))return this.plugins.get(e)[t]}}{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){const{commentStack:t}=this.state,s=t.length;if(0===s)return;let r=s-1;const i=t[r];i.start===e.end&&(i.leadingNode=e,r--);const{start:a}=e;for(;r>=0;r--){const s=t[r],i=s.end;if(!(i>a)){i===a&&(s.trailingNode=e);break}s.containingNode=e,this.finalizeComment(s),t.splice(r,1)}}finalizeComment(e){const{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&zn(e.leadingNode,t),null!==e.trailingNode&&(e.trailingNode.leadingComments=t);else{const{containingNode:s,start:r}=e;if(44===this.input.charCodeAt(r-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Gn(s,s.properties,e);break;case"CallExpression":case"OptionalCallExpression":Gn(s,s.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Gn(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Gn(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Gn(s,s.specifiers,e);break;default:Wn(s,t)}else Wn(s,t)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:s}=t;if(0===s)return;const r=t[s-1];r.leadingNode===e&&(r.leadingNode=null)}}{getLocationForPosition(e){let t;return t=e===this.state.start?this.state.startLoc:e===this.state.lastTokStart?this.state.lastTokStartLoc:e===this.state.end?this.state.endLoc:e===this.state.lastTokEnd?this.state.lastTokEndLoc:function(e,t){let s,r=1,i=0;for(jn.lastIndex=0;(s=jn.exec(e))&&s.indexr[t]))+` (${i.line}:${i.column})`;if(this.options.errorRecovery){const t=this.state.errors;for(let s=t.length-1;s>=0;s--){const r=t[s];if(r.pos===e)return Object.assign(r,{message:a});if(r.posr[t]))+` (${i.line}:${i.column})`;return this._raise(Object.assign({loc:i,pos:e},t),a)}_raise(e,t){const s=new SyntaxError(t);if(Object.assign(s,e),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(s),s;throw s}}{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.state=new vo,this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ro(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,lastTokEnd:e.end,context:[this.curContext()],inType:e.inType}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Un.lastIndex=e,Un.test(this.input)?Un.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++ethis.raise(t,e))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const e=this.curContext();e.preserveSpace||this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(Mn.eof):e===eo.template?this.readTmplToken():this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(){let e;this.isLookahead||(e=this.state.curPosition());const t=this.state.pos,s=this.input.indexOf("*/",t+2);if(-1===s)throw this.raise(t,Xn.UnterminatedComment);for(this.state.pos=s+2,jn.lastIndex=t+2;jn.test(this.input)&&jn.lastIndex<=s;)++this.state.curLine,this.state.lineStart=jn.lastIndex;if(this.isLookahead)return;const r={type:"CommentBlock",value:this.input.slice(t+2,s),start:t,end:s+2,loc:new Vn(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(e){const t=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=e);if(this.state.pose))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}if(t.length>0){const s={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(e,t){this.state.end=this.state.pos;const s=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||(this.state.endLoc=this.state.curPosition(),this.updateContext(s))}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(this.state.pos,Xn.UnexpectedDigitAfterHash);if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===t?Xn.RecordExpressionHashIncorrectStartSyntaxType:Xn.TupleExpressionHashIncorrectStartSyntaxType);this.state.pos+=2,123===t?this.finishToken(Mn.braceHashL):this.finishToken(Mn.bracketHashL)}else uo(t)?(++this.state.pos,this.finishToken(Mn.privateName,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(Mn.privateName,this.readWord1())):this.finishOp(Mn.hash,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(Mn.ellipsis)):(++this.state.pos,this.finishToken(Mn.dot))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mn.slashAssign,2):this.finishOp(Mn.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!_n(e)&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(Mn.question)):(this.state.pos+=2,this.finishToken(Mn.questionDot))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(Mn.parenL);case 41:return++this.state.pos,void this.finishToken(Mn.parenR);case 59:return++this.state.pos,void this.finishToken(Mn.semi);case 44:return++this.state.pos,void this.finishToken(Mn.comma);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Xn.TupleExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(Mn.bracketBarL)}else++this.state.pos,this.finishToken(Mn.bracketL);return;case 93:return++this.state.pos,void this.finishToken(Mn.bracketR);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Xn.RecordExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(Mn.braceBarL)}else++this.state.pos,this.finishToken(Mn.braceL);return;case 125:return++this.state.pos,void this.finishToken(Mn.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mn.doubleColon,2):(++this.state.pos,this.finishToken(Mn.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(Mn.backQuote);case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(Mn.tilde,1);case 64:return++this.state.pos,void this.finishToken(Mn.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(uo(e))return void this.readWord(e)}throw this.raise(this.state.pos,Xn.InvalidOrUnexpectedToken,String.fromCodePoint(e))}finishOp(e,t){const s=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,s)}readRegexp(){const e=this.state.start+1;let t,s,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(e,Xn.UnterminatedRegExp);const i=this.input.charCodeAt(r);if(_n(i))throw this.raise(e,Xn.UnterminatedRegExp);if(t)t=!1;else{if(91===i)s=!0;else if(93===i&&s)s=!1;else if(47===i&&!s)break;t=92===i}}const i=this.input.slice(e,r);++r;let a="";for(;r=97?t-97+10:t>=65?t-65+10:ko(t)?t-48:1/0,h>=e)if(this.options.errorRecovery&&h<=9)h=0,this.raise(this.state.start+i+2,Xn.InvalidDigit,e);else{if(!s)break;h=0,o=!0}++this.state.pos,u=u*e+h}else{const e=this.input.charCodeAt(this.state.pos-1),t=this.input.charCodeAt(this.state.pos+1);(-1===n.indexOf(t)||a.indexOf(e)>-1||a.indexOf(t)>-1||Number.isNaN(t))&&this.raise(this.state.pos,Xn.UnexpectedNumericSeparator),r||this.raise(this.state.pos,Xn.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===i||null!=t&&this.state.pos-i!==t||o?null:u}readRadixNumber(e){const t=this.state.pos;let s=!1;this.state.pos+=2;const r=this.readInt(e);null==r&&this.raise(this.state.start+2,Xn.InvalidDigit,e);const i=this.input.charCodeAt(this.state.pos);if(110===i)++this.state.pos,s=!0;else if(109===i)throw this.raise(t,Xn.InvalidDecimal);if(uo(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,Xn.NumberIdentifier);if(s){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(Mn.bigint,e)}else this.finishToken(Mn.num,r)}readNumber(e){const t=this.state.pos;let s=!1,r=!1,i=!1,a=!1,n=!1;e||null!==this.readInt(10)||this.raise(t,Xn.InvalidNumber);const o=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(o){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(t,Xn.StrictOctalLiteral),!this.state.strict){const s=e.indexOf("_");s>0&&this.raise(s+t,Xn.ZeroDigitNumericSeparator)}n=o&&!/[89]/.test(e)}let u=this.input.charCodeAt(this.state.pos);if(46!==u||n||(++this.state.pos,this.readInt(10),s=!0,u=this.input.charCodeAt(this.state.pos)),69!==u&&101!==u||n||(u=this.input.charCodeAt(++this.state.pos),43!==u&&45!==u||++this.state.pos,null===this.readInt(10)&&this.raise(t,Xn.InvalidOrMissingExponent),s=!0,a=!0,u=this.input.charCodeAt(this.state.pos)),110===u&&((s||o)&&this.raise(t,Xn.InvalidBigIntLiteral),++this.state.pos,r=!0),109===u&&(this.expectPlugin("decimal",this.state.pos),(a||o)&&this.raise(t,Xn.InvalidDecimal),++this.state.pos,i=!0),uo(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,Xn.NumberIdentifier);const h=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(r)return void this.finishToken(Mn.bigint,h);if(i)return void this.finishToken(Mn.decimal,h);const c=n?parseInt(h,8):parseFloat(h);this.finishToken(Mn.num,c)}readCodePoint(e){let t;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,e),++this.state.pos,null!==t&&t>1114111){if(!e)return null;this.raise(s,Xn.InvalidCodePoint)}}else t=this.readHexChar(4,!1,e);return t}readString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Xn.UnterminatedString);const r=this.input.charCodeAt(this.state.pos);if(r===e)break;if(92===r)t+=this.input.slice(s,this.state.pos),t+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===r||8233===r)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(_n(r))throw this.raise(this.state.start,Xn.UnterminatedString);++this.state.pos}}t+=this.input.slice(s,this.state.pos++),this.finishToken(Mn.string,t)}readTmplToken(){let e="",t=this.state.pos,s=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Xn.UnterminatedTemplate);const r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(Mn.template)?36===r?(this.state.pos+=2,void this.finishToken(Mn.dollarBraceL)):(++this.state.pos,void this.finishToken(Mn.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(Mn.template,s?null:e));if(92===r){e+=this.input.slice(t,this.state.pos);const r=this.readEscapedChar(!0);null===r?s=!0:e+=r,t=this.state.pos}else if(_n(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}recordStrictModeErrors(e,t){this.state.strict&&!this.state.strictErrors.has(e)?this.raise(e,t):this.state.strictErrors.set(e,t)}readEscapedChar(e){const t=!e,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const e=this.readHexChar(2,!1,t);return null===e?null:String.fromCharCode(e)}case 117:{const e=this.readCodePoint(t);return null===e?null:String.fromCodePoint(e)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(e)return null;this.recordStrictModeErrors(this.state.pos-1,Xn.StrictNumericEscape);default:if(s>=48&&s<=55){const t=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.state.pos+=s.length-1;const i=this.input.charCodeAt(this.state.pos);if("0"!==s||56===i||57===i){if(e)return null;this.recordStrictModeErrors(t,Xn.StrictNumericEscape)}return String.fromCharCode(r)}return String.fromCharCode(s)}}readHexChar(e,t,s){const r=this.state.pos,i=this.readInt(16,e,t,!1);return null===i&&(s?this.raise(r,Xn.InvalidEscapeSequence):this.state.pos=r-1),i}readWord1(e){this.state.containsEsc=!1;let t="";const s=this.state.pos;let r=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.posthis.state.lastTokEnd&&this.raise(this.state.lastTokEnd,{code:Kn.SyntaxError,reasonCode:"UnexpectedSpace",template:e})}unexpected(e,t={code:Kn.SyntaxError,reasonCode:"UnexpectedToken",template:"Unexpected token"}){throw t instanceof vn&&(t={code:Kn.SyntaxError,reasonCode:"UnexpectedToken",template:`Unexpected token, expected "${t.label}"`}),this.raise(null!=e?e:this.state.start,t)}expectPlugin(e,t){if(!this.hasPlugin(e))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:[e]},`This experimental syntax requires enabling the parser plugin: '${e}'`);return!0}expectOnePlugin(e,t){if(!e.some((e=>this.hasPlugin(e))))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:e},`This experimental syntax requires enabling one of the following parser plugin(s): '${e.join(", ")}'`)}tryParse(e,t=this.state.clone()){const s={node:null};try{const r=e(((e=null)=>{throw s.node=e,s}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssign:s,doubleProto:r,optionalParameters:i}=e;if(!t)return s>=0||r>=0||i>=0;s>=0&&this.unexpected(s),r>=0&&this.raise(r,Xn.DuplicateProto),i>=0&&this.unexpected(i)}isLiteralPropertyName(){return this.match(Mn.name)||!!this.state.type.keyword||this.match(Mn.string)||this.match(Mn.num)||this.match(Mn.bigint)||this.match(Mn.decimal)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isOptionalChain(e){return"OptionalMemberExpression"===e.type||"OptionalCallExpression"===e.type}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=e;const i=this.scope,a=this.getScopeHandler();this.scope=new a(this.raise.bind(this),this.inModule);const n=this.prodParam;this.prodParam=new Vo;const o=this.classScope;this.classScope=new _o(this.raise.bind(this));const u=this.expressionScope;return this.expressionScope=new $o(this.raise.bind(this)),()=>{this.state.labels=t,this.exportedIdentifiers=s,this.inModule=r,this.scope=i,this.prodParam=n,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}}{startNode(){return new Go(this,this.state.start,this.state.startLoc)}startNodeAt(e,t){return new Go(this,e,t)}startNodeAtNode(e){return this.startNodeAt(e.start,e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(e,t,s,r){return e.type=t,e.end=s,e.loc.end=r,this.options.ranges&&(e.range[1]=s),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t,s){e.start=t,e.loc.start=s,this.options.ranges&&(e.range[0]=t)}resetEndLocation(e,t=this.state.lastTokEnd,s=this.state.lastTokEndLoc){e.end=t,e.loc.end=s,this.options.ranges&&(e.range[1]=t)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.start,t.loc.start)}}{toAssignable(e,t=!1){var s,r;let i;switch(("ParenthesizedExpression"===e.type||null!=(s=e.extra)&&s.parenthesized)&&(i=bu(e),t?"Identifier"===i.type?this.expressionScope.recordParenthesizedIdentifierError(e.start,Xn.InvalidParenthesizedAssignment):"MemberExpression"!==i.type&&this.raise(e.start,Xn.InvalidParenthesizedAssignment):this.raise(e.start,Xn.InvalidParenthesizedAssignment)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let s=0,r=e.properties.length,i=r-1;s"ObjectMethod"!==e.type&&(s===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e,t){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(e,void 0,t),this.finishNode(s,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case Mn.bracketL:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(Mn.bracketR,93,!0),this.finishNode(e,"ArrayPattern")}case Mn.braceL:return this.parseObjectLike(Mn.braceR,!0)}return this.parseIdentifier()}parseBindingList(e,t,s,r){const i=[];let a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(Mn.comma),s&&this.match(Mn.comma))i.push(null);else{if(this.eat(e))break;if(this.match(Mn.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(t),this.expect(e);break}{const e=[];for(this.match(Mn.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,Xn.UnsupportedParameterDecorator);this.match(Mn.at);)e.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,e))}}return i}parseAssignableListItem(e,t){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const r=this.parseMaybeDefault(s.start,s.loc.start,s);return t.length&&(s.decorators=t),r}parseAssignableListItemTypes(e){return e}parseMaybeDefault(e,t,s){var r,i,a;if(t=null!=(r=t)?r:this.state.startLoc,e=null!=(i=e)?i:this.state.start,s=null!=(a=s)?a:this.parseBindingAtom(),!this.eat(Mn.eq))return s;const n=this.startNodeAt(e,t);return n.left=s,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}checkLVal(e,t,s=64,r,i,a=!1){switch(e.type){case"Identifier":{const{name:t}=e;this.state.strict&&(a?Eo(t,this.inModule):Ao(t))&&this.raise(e.start,64===s?Xn.StrictEvalArguments:Xn.StrictEvalArgumentsBinding,t),r&&(r.has(t)?this.raise(e.start,Xn.ParamDupe):r.add(t)),i&&"let"===t&&this.raise(e.start,Xn.LetInLexicalBinding),64&s||this.scope.declareName(t,s,e.start);break}case"MemberExpression":64!==s&&this.raise(e.start,Xn.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(let t of e.properties){if(this.isObjectProperty(t))t=t.value;else if(this.isObjectMethod(t))continue;this.checkLVal(t,"object destructuring pattern",s,r,i)}break;case"ArrayPattern":for(const t of e.elements)t&&this.checkLVal(t,"array destructuring pattern",s,r,i);break;case"AssignmentPattern":this.checkLVal(e.left,"assignment pattern",s,r);break;case"RestElement":this.checkLVal(e.argument,"rest element",s,r);break;case"ParenthesizedExpression":this.checkLVal(e.expression,"parenthesized expression",s,r);break;default:this.raise(e.start,64===s?Xn.InvalidLhs:Xn.InvalidLhsBinding,t)}}checkToRestConversion(e){"Identifier"!==e.argument.type&&"MemberExpression"!==e.argument.type&&this.raise(e.argument.start,Xn.InvalidRestAssignmentPattern)}checkCommaAfterRest(e){this.match(Mn.comma)&&(this.lookaheadCharCode()===e?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(e){throw this.raise(e,Xn.ElementAfterRest)}raiseTrailingCommaAfterRest(e){this.raise(e,Xn.RestTrailingComma)}}{checkProto(e,t,s,r){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;const i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(i.start,Xn.RecordNoProto);s.used&&(r?-1===r.doubleProto&&(r.doubleProto=i.start):this.raise(i.start,Xn.DuplicateProto)),s.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();const e=this.parseExpression();return this.match(Mn.eof)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.start,s=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(Mn.comma)){const i=this.startNodeAt(t,s);for(i.expressions=[r];this.eat(Mn.comma);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var s;e.optionalParameters=null!=(s=null==t?void 0:t.pos)?s:this.state.start}parseMaybeAssign(e,t){const s=this.state.start,r=this.state.startLoc;if(this.isContextual("yield")&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,s,r)),e}let i;e?i=!1:(e=new Wo,i=!0),(this.match(Mn.parenL)||this.match(Mn.name))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,s,r)),this.state.type.isAssign){const t=this.startNodeAt(s,r),i=this.state.value;t.operator=i;if("BinaryExpression"===a.type&&"|>"===a.operator&&"hack"===this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.start,Xn.PipeBodyIsTighter,i);return this.match(Mn.eq)?(t.left=this.toAssignable(a,!0),e.doubleProto=-1):t.left=a,e.shorthandAssign>=t.left.start&&(e.shorthandAssign=-1),this.checkLVal(a,"assignment expression"),this.next(),t.right=this.parseMaybeAssign(),this.finishNode(t,"AssignmentExpression")}return i&&this.checkExpressionErrors(e,!0),a}parseMaybeConditional(e){const t=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,r)?i:this.parseConditional(i,t,s,e)}parseConditional(e,t,s,r){if(this.eat(Mn.question)){const r=this.startNodeAt(t,s);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(Mn.colon),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(Mn.privateName)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,r)?i:this.parseExprOp(i,t,s,-1)}parseExprOp(e,t,s,r){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e),{start:s}=e;(r>=Mn._in.binop||!this.prodParam.hasIn||!this.match(Mn._in))&&this.raise(s,Xn.PrivateInExpectedIn,t),this.classScope.usePrivateName(t,s)}let i=this.state.type.binop;if(null!=i&&(this.prodParam.hasIn||!this.match(Mn._in))&&i>r){const a=this.state.type;if(a===Mn.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}const n=this.startNodeAt(t,s);n.left=e,n.operator=this.state.value;const o=a===Mn.logicalOR||a===Mn.logicalAND,u=a===Mn.nullishCoalescing;if(u&&(i=Mn.logicalAND.binop),this.next(),a===Mn.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(Mn.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,Xn.UnexpectedAwaitAfterPipelineBody);n.right=this.parseExprOpRightExpr(a,i),this.finishNode(n,o||u?"LogicalExpression":"BinaryExpression");const h=this.state.type;if(u&&(h===Mn.logicalOR||h===Mn.logicalAND)||o&&h===Mn.nullishCoalescing)throw this.raise(this.state.start,Xn.MixingCoalesceWithLogical);return this.parseExprOp(n,t,s,r)}return e}parseExprOpRightExpr(e,t){const s=this.state.start,r=this.state.startLoc;switch(e){case Mn.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>{const r=this.parseHackPipeBody(e,t);return this.checkHackPipeBodyEarlyErrors(s),r}));case"smart":return this.withTopicBindingContext((()=>{const i=this.parseHackPipeBody(e,t);return this.parseSmartPipelineBodyInStyle(i,s,r)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){const s=this.state.start,r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,r,e.rightAssociative?t-1:t)}parseHackPipeBody(e,t){if(this.prodParam.hasYield&&this.isContextual("yield"))throw this.raise(this.state.start,Xn.PipeBodyIsTighter,this.state.value);return this.parseExprOpBaseRightExpr(e,t)}checkExponentialAfterUnary(e){this.match(Mn.exponent)&&this.raise(e.argument.start,Xn.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(e,t){const s=this.state.start,r=this.state.startLoc,i=this.isContextual("await");if(i&&this.isAwaitAllowed()){this.next();const e=this.parseAwait(s,r);return t||this.checkExponentialAfterUnary(e),e}const a=this.match(Mn.incDec),n=this.startNode();if(this.state.type.prefix){n.operator=this.state.value,n.prefix=!0,this.match(Mn._throw)&&this.expectPlugin("throwExpressions");const s=this.match(Mn._delete);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&s){const e=n.argument;"Identifier"===e.type?this.raise(n.start,Xn.StrictDelete):this.hasPropertyAsPrivateName(e)&&this.raise(n.start,Xn.DeletePrivateField)}if(!a)return t||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}const o=this.parseUpdate(n,a,e);if(i){if((this.hasPlugin("v8intrinsic")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(Mn.modulo))&&!this.isAmbiguousAwait())return this.raiseOverwrite(s,Xn.AwaitNotInAsyncContext),this.parseAwait(s,r)}return o}parseUpdate(e,t,s){if(t)return this.checkLVal(e.argument,"prefix operation"),this.finishNode(e,"UpdateExpression");const r=this.state.start,i=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const e=this.startNodeAt(r,i);e.operator=this.state.value,e.prefix=!1,e.argument=a,this.checkLVal(a,"postfix operation"),this.next(),a=this.finishNode(e,"UpdateExpression")}return a}parseExprSubscripts(e){const t=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,r)?i:this.parseSubscripts(i,t,s)}parseSubscripts(e,t,s,r){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,s,r,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,s,r,i){if(!r&&this.eat(Mn.doubleColon))return this.parseBind(e,t,s,r,i);if(this.match(Mn.backQuote))return this.parseTaggedTemplateExpression(e,t,s,i);let a=!1;if(this.match(Mn.questionDot)){if(r&&40===this.lookaheadCharCode())return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(!r&&this.match(Mn.parenL))return this.parseCoverCallAndAsyncArrowHead(e,t,s,i,a);{const r=this.eat(Mn.bracketL);return r||a||this.eat(Mn.dot)?this.parseMember(e,t,s,i,r,a):(i.stop=!0,e)}}parseMember(e,t,s,r,i,a){const n=this.startNodeAt(t,s);n.object=e,n.computed=i;const o=!i&&this.match(Mn.privateName)&&this.state.value,u=i?this.parseExpression():o?this.parsePrivateName():this.parseIdentifier(!0);return!1!==o&&("Super"===n.object.type&&this.raise(t,Xn.SuperPrivateField),this.classScope.usePrivateName(o,u.start)),n.property=u,i&&this.expect(Mn.bracketR),r.optionalChainMember?(n.optional=a,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(e,t,s,r,i){const a=this.startNodeAt(t,s);return a.object=e,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),t,s,r)}parseCoverCallAndAsyncArrowHead(e,t,s,r,i){const a=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(t,s);return o.callee=e,r.maybeAsyncArrow&&(this.expressionScope.enter(new qo(2)),n=new Wo),r.optionalChainMember&&(o.optional=i),o.arguments=i?this.parseCallExpressionArguments(Mn.parenR):this.parseCallExpressionArguments(Mn.parenR,"Import"===e.type,"Super"!==e.type,o,n),this.finishCallExpression(o,r.optionalChainMember),r.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!i?(r.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,s),o)):(r.maybeAsyncArrow&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(o)),this.state.maybeInArrowParameters=a,o}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,s,r){const i=this.startNodeAt(t,s);return i.tag=e,i.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(t,Xn.OptionalChainingNoTemplate),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===e.arguments.length||e.arguments.length>2)this.raise(e.start,Xn.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(t.start,Xn.ImportCallSpreadArgument);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,s,r,i){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(n)n=!1;else if(this.expect(Mn.comma),this.match(e)){!t||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(this.state.lastTokStart,Xn.ImportCallArgumentTrailingComma),r&&this.addExtra(r,"trailingComma",this.state.lastTokStart),this.next();break}a.push(this.parseExprListItem(!1,i,s))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(Mn.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var s;return this.resetPreviousNodeTrailingComments(t),this.expect(Mn.arrow),this.parseArrowExpression(e,t.arguments,!0,null==(s=t.extra)?void 0:s.trailingComma),Wn(e,t.innerComments),Wn(e,t.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)}parseExprAtom(e){let t;switch(this.state.type){case Mn._super:return this.parseSuper();case Mn._import:return t=this.startNode(),this.next(),this.match(Mn.dot)?this.parseImportMetaProperty(t):(this.match(Mn.parenL)||this.raise(this.state.lastTokStart,Xn.UnsupportedImport),this.finishNode(t,"Import"));case Mn._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case Mn.name:{if(this.isContextual("module")&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){if(this.match(Mn._function))return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseFunction(this.startNodeAtNode(s),void 0,!0);if(this.match(Mn.name))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(this.match(Mn._do))return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return e&&this.match(Mn.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}case Mn._do:return this.parseDo(this.startNode(),!1);case Mn.slash:case Mn.slashAssign:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case Mn.num:return this.parseNumericLiteral(this.state.value);case Mn.bigint:return this.parseBigIntLiteral(this.state.value);case Mn.decimal:return this.parseDecimalLiteral(this.state.value);case Mn.string:return this.parseStringLiteral(this.state.value);case Mn._null:return this.parseNullLiteral();case Mn._true:return this.parseBooleanLiteral(!0);case Mn._false:return this.parseBooleanLiteral(!1);case Mn.parenL:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case Mn.bracketBarL:case Mn.bracketHashL:return this.parseArrayLike(this.state.type===Mn.bracketBarL?Mn.bracketBarR:Mn.bracketR,!1,!0,e);case Mn.bracketL:return this.parseArrayLike(Mn.bracketR,!0,!1,e);case Mn.braceBarL:case Mn.braceHashL:return this.parseObjectLike(this.state.type===Mn.braceBarL?Mn.braceBarR:Mn.braceR,!1,!0,e);case Mn.braceL:return this.parseObjectLike(Mn.braceR,!1,!1,e);case Mn._function:return this.parseFunctionOrFunctionSent();case Mn.at:this.parseDecorators();case Mn._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case Mn._new:return this.parseNewOrNewTarget();case Mn.backQuote:return this.parseTemplate(!1);case Mn.doubleColon:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(e.start,Xn.UnsupportedBind)}case Mn.privateName:return this.raise(this.state.start,Xn.PrivateInExpectedIn,this.state.value),this.parsePrivateName();case Mn.moduloAssign:if("hack"!==this.getPluginOption("pipelineOperator","proposal")||"%"!==this.getPluginOption("pipelineOperator","topicToken"))throw this.unexpected();this.state.value="%",this.state.type=Mn.modulo,this.state.pos--,this.state.end--,this.state.endLoc.column--;case Mn.modulo:case Mn.hash:{const e=this.getPluginOption("pipelineOperator","proposal");if(e){t=this.startNode();const s=this.state.start,r=this.state.type;return this.next(),this.finishTopicReference(t,s,e,r)}}case Mn.relational:if("<"===this.state.value){const e=this.input.codePointAt(this.nextTokenStart());(uo(e)||62===e)&&this.expectOnePlugin(["jsx","flow","typescript"])}default:throw this.unexpected()}}finishTopicReference(e,t,s,r){if(this.testTopicReferenceConfiguration(s,t,r)){let r;return r="smart"===s?"PipelinePrimaryTopicReference":"TopicReference",this.topicReferenceIsAllowedInCurrentContext()||("smart"===s?this.raise(t,Xn.PrimaryTopicNotAllowed):this.raise(t,Xn.PipeTopicUnbound)),this.registerTopicReference(),this.finishNode(e,r)}throw this.raise(t,Xn.PipeTopicUnconfiguredToken,r.label)}testTopicReferenceConfiguration(e,t,s){switch(e){case"hack":{const e=this.getPluginOption("pipelineOperator","topicToken");return s.label===e}case"smart":return s===Mn.hash;default:throw this.raise(t,Xn.PipeTopicRequiresHackPipes)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(zo(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,Xn.LineTerminatorBeforeArrow),this.expect(Mn.arrow),this.parseArrowExpression(e,t,!0),e}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();const s=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),!this.match(Mn.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(e.start,Xn.UnexpectedSuper):this.raise(e.start,Xn.SuperNotAllowed),this.match(Mn.parenL)||this.match(Mn.bracketL)||this.match(Mn.dot)||this.raise(e.start,Xn.UnsupportedSuper),this.finishNode(e,"Super")}parseMaybePrivateName(e){return this.match(Mn.privateName)?(e||this.raise(this.state.start+1,Xn.UnexpectedPrivateField),this.parsePrivateName()):this.parseIdentifier(!0)}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(this.state.start+1,new Hn(this.state.curLine,this.state.start+1-this.state.lineStart)),s=this.state.value;return this.next(),e.id=this.createIdentifier(t,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(Mn.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,s){e.meta=t,"function"===t.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||r)&&this.raise(e.property.start,Xn.UnsupportedMetaProperty,t.name,s),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual("meta")&&(this.inModule||this.raise(t.start,Jn.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=e,this.next(),this.finishNode(s,t)}parseLiteral(e,t){const s=this.startNode();return this.parseLiteralAtNode(e,t,s)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.start,s=this.state.startLoc;let r;this.next(),this.expressionScope.enter(new qo(1));const i=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.start,o=this.state.startLoc,u=[],h=new Wo;let c,p,l=!0;for(;!this.match(Mn.parenR);){if(l)l=!1;else if(this.expect(Mn.comma,-1===h.optionalParameters?null:h.optionalParameters),this.match(Mn.parenR)){p=this.state.start;break}if(this.match(Mn.ellipsis)){const e=this.state.start,t=this.state.startLoc;c=this.state.start,u.push(this.parseParenItem(this.parseRestBinding(),e,t)),this.checkCommaAfterRest(41);break}u.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem))}const d=this.state.lastTokEnd,D=this.state.lastTokEndLoc;this.expect(Mn.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=a;let m=this.startNodeAt(t,s);if(e&&this.shouldParseArrow(u)&&(m=this.parseArrow(m)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,u,!1),m;if(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),this.checkExpressionErrors(h,!0),this.toReferencedListDeep(u,!0),u.length>1?(r=this.startNodeAt(n,o),r.expressions=u,this.finishNode(r,"SequenceExpression"),r.end=d,r.loc.end=D):r=u[0],!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t),r;const f=this.startNodeAt(t,s);return f.expression=r,this.finishNode(f,"ParenthesizedExpression"),f}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(Mn.arrow))return e}parseParenItem(e,t,s){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(Mn.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,t,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.raise(s.start,Xn.UnexpectedNewTarget),s}return this.parseNew(e)}parseNew(e){return e.callee=this.parseNoCallExpr(),"Import"===e.callee.type?this.raise(e.callee.start,Xn.ImportCallNotNewExpression):this.isOptionalChain(e.callee)?this.raise(this.state.lastTokEnd,Xn.OptionalChainingNoNew):this.eat(Mn.questionDot)&&this.raise(this.state.start,Xn.OptionalChainingNoNew),this.parseNewArguments(e),this.finishNode(e,"NewExpression")}parseNewArguments(e){if(this.eat(Mn.parenL)){const t=this.parseExprList(Mn.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]}parseTemplateElement(e){const t=this.startNode();return null===this.state.value&&(e||this.raise(this.state.start+1,Xn.InvalidEscapeSequenceTemplate)),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(Mn.backQuote),this.finishNode(t,"TemplateElement")}parseTemplate(e){const t=this.startNode();this.next(),t.expressions=[];let s=this.parseTemplateElement(e);for(t.quasis=[s];!s.tail;)this.expect(Mn.dollarBraceL),t.expressions.push(this.parseTemplateSubstitution()),this.expect(Mn.braceR),t.quasis.push(s=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s,r){s&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let n=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(Mn.comma),this.match(e)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}const i=this.parsePropertyDefinition(t,r);t||this.checkProto(i,s,a,r),s&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(i.start,Xn.InvalidRecordProperty),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return t?u="ObjectPattern":s&&(u="RecordExpression"),this.finishNode(o,u)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(Mn.bracketL)||this.match(Mn.star))}parsePropertyDefinition(e,t){let s=[];if(this.match(Mn.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,Xn.UnsupportedPropertyDecorator);this.match(Mn.at);)s.push(this.parseDecorator());const r=this.startNode();let i,a,n=!1,o=!1,u=!1;if(this.match(Mn.ellipsis))return s.length&&this.unexpected(),e?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();s.length&&(r.decorators=s,s=[]),r.method=!1,(e||t)&&(i=this.state.start,a=this.state.startLoc),e||(n=this.eat(Mn.star));const h=this.state.containsEsc,c=this.parsePropertyName(r,!1);if(!e&&!n&&!h&&this.maybeAsyncOrAccessorProp(r)){const e=c.name;"async"!==e||this.hasPrecedingLineBreak()||(o=!0,this.resetPreviousNodeTrailingComments(c),n=this.eat(Mn.star),this.parsePropertyName(r,!1)),"get"!==e&&"set"!==e||(u=!0,this.resetPreviousNodeTrailingComments(c),r.kind=e,this.match(Mn.star)&&(n=!0,this.raise(this.state.pos,Xn.AccessorIsGenerator,e),this.next()),this.parsePropertyName(r,!1))}return this.parseObjPropValue(r,i,a,n,o,e,u,t),r}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const s=this.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e),i=e.start;r.length!==s&&("get"===e.kind?this.raise(i,Xn.BadGetterArity):this.raise(i,Xn.BadSetterArity)),"set"===e.kind&&"RestElement"===(null==(t=r[r.length-1])?void 0:t.type)&&this.raise(i,Xn.BadSetterRestParameter)}parseObjectMethod(e,t,s,r,i){return i?(this.parseMethod(e,t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):s||t||this.match(Mn.parenL)?(r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(e,t,s,r,i){return e.shorthand=!1,this.eat(Mn.colon)?(e.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!1),r?e.value=this.parseMaybeDefault(t,s,Xo(e.key)):this.match(Mn.eq)&&i?(-1===i.shorthandAssign&&(i.shorthandAssign=this.state.start),e.value=this.parseMaybeDefault(t,s,Xo(e.key))):e.value=Xo(e.key),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))}parseObjPropValue(e,t,s,r,i,a,n,o){const u=this.parseObjectMethod(e,r,i,a,n)||this.parseObjectProperty(e,t,s,a,o);return u||this.unexpected(),u}parsePropertyName(e,t){if(this.eat(Mn.bracketL))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(Mn.bracketR);else{const s=this.state.inPropertyName;this.state.inPropertyName=!0;const r=this.state.type;e.key=r===Mn.num||r===Mn.string||r===Mn.bigint||r===Mn.decimal?this.parseExprAtom():this.parseMaybePrivateName(t),r!==Mn.privateName&&(e.computed=!1),this.state.inPropertyName=s}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=!!t}parseMethod(e,t,s,r,i,a,n=!1){this.initFunction(e,s),e.generator=!!t;const o=r;return this.scope.enter(18|(n?Fo:0)|(i?32:0)),this.prodParam.enter(zo(s,e.generator)),this.parseFunctionParams(e,o),this.parseFunctionBodyAndFinish(e,a,!0),this.prodParam.exit(),this.scope.exit(),e}parseArrayLike(e,t,s,r){s&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!s,r,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,s,r){this.scope.enter(6);let i=zo(s,!1);!this.match(Mn.bracketL)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,s);const a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,s){e.params=this.toAssignableList(t,s,!1)}parseFunctionBodyAndFinish(e,t,s=!1){this.parseFunctionBody(e,!1,s),this.finishNode(e,t)}parseFunctionBody(e,t,s=!1){const r=t&&!this.match(Mn.braceL);if(this.expressionScope.enter(Ho()),r)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const r=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{const a=!this.isSimpleParamList(e.params);if(i&&a){const t="method"!==e.kind&&"constructor"!==e.kind||!e.key?e.start:e.key.end;this.raise(t,Xn.IllegalLanguageModeDirective)}const n=!r&&this.state.strict;this.checkParams(e,!(this.state.strict||t||s||a),t,n),this.state.strict&&e.id&&this.checkLVal(e.id,"function name",65,void 0,void 0,n)})),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=i}}isSimpleParamList(e){for(let t=0,s=e.length;t10)return;if(!function(e){return xo.has(e)}(e))return;if("yield"===e){if(this.prodParam.hasYield)return void this.raise(t,Xn.YieldBindingIdentifier)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(t,Xn.AwaitBindingIdentifier);if(this.scope.inStaticBlock)return void this.raise(t,Xn.AwaitBindingIdentifierInStaticBlock);this.expressionScope.recordAsyncArrowParametersError(t,Xn.AwaitBindingIdentifier)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(t,Xn.ArgumentsInClass);if(s&&Co(e))return void this.raise(t,Xn.UnexpectedKeyword,e);(this.state.strict?r?Eo:yo:fo)(e,this.inModule)&&this.raise(t,Xn.UnexpectedReservedWord,e)}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}parseAwait(e,t){const s=this.startNodeAt(e,t);return this.expressionScope.recordParameterInitializerError(s.start,Xn.AwaitExpressionFormalParameter),this.eat(Mn.star)&&this.raise(s.start,Xn.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousAwait(){return this.hasPrecedingLineBreak()||this.match(Mn.plusMin)||this.match(Mn.parenL)||this.match(Mn.bracketL)||this.match(Mn.backQuote)||this.match(Mn.regexp)||this.match(Mn.slash)||this.hasPlugin("v8intrinsic")&&this.match(Mn.modulo)}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(e.start,Xn.YieldInParameter),this.next();let t=!1,s=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(Mn.star),this.state.type){case Mn.semi:case Mn.eof:case Mn.braceR:case Mn.parenR:case Mn.bracketR:case Mn.braceBarR:case Mn.colon:case Mn.comma:if(!t)break;default:s=this.parseMaybeAssign()}return e.delegate=t,e.argument=s,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){"smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===e.type&&this.raise(t,Xn.PipelineHeadSequenceExpression)}checkHackPipeBodyEarlyErrors(e){if(this.match(Mn.arrow))throw this.raise(this.state.start,Xn.PipeBodyIsTighter,Mn.arrow.label);this.topicReferenceWasUsedInCurrentContext()||this.raise(e,Xn.PipeTopicUnused)}parseSmartPipelineBodyInStyle(e,t,s){const r=this.startNodeAt(t,s);return this.isSimpleReference(e)?(r.callee=e,this.finishNode(r,"PipelineBareFunction")):(this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression"))}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(Mn.arrow))throw this.raise(this.state.start,Xn.PipelineBodyNoArrow);this.topicReferenceWasUsedInCurrentContext()||this.raise(e,Xn.PipelineTopicUnused)}withTopicBindingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if("smart"!==this.getPluginOption("pipelineOperator","proposal"))return e();{const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.start,s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,s,e);return this.state.inFSharpPipelineDirectBody=r,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.eat(Mn.braceL);const t=this.initializeScopes(!0);this.enterInitialScopes();const s=this.startNode();try{e.body=this.parseProgram(s,Mn.braceR,"module")}finally{t()}return this.eat(Mn.braceR),this.finishNode(e,"ModuleExpression")}}{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e){for(let t=0;t0)for(const[e]of Array.from(this.scope.undefinedExports)){const t=this.scope.undefinedExports.get(e);this.raise(t,Xn.ModuleExportUndefined,e)}return this.finishNode(e,"Program")}stmtToDirective(e){const t=e;t.type="Directive",t.value=t.expression,delete t.expression;const s=t.value,r=this.input.slice(s.start,s.end),i=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",i),s.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(Mn.interpreterDirective))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(e){return!!this.isContextual("let")&&this.isLetKeyword(e)}isLetKeyword(e){const t=this.nextTokenStart(),s=this.codePointAtPos(t);if(92===s||91===s)return!0;if(e)return!1;if(123===s)return!0;if(uo(s)){if(Su.lastIndex=t,Su.test(this.input)){const e=this.codePointAtPos(Su.lastIndex);if(!ho(e)&&92!==e)return!1}return!0}return!1}parseStatement(e,t){return this.match(Mn.at)&&this.parseDecorators(!0),this.parseStatementContent(e,t)}parseStatementContent(e,t){let s=this.state.type;const r=this.startNode();let i;switch(this.isLet(e)&&(s=Mn._var,i="let"),s){case Mn._break:case Mn._continue:return this.parseBreakContinueStatement(r,s.keyword);case Mn._debugger:return this.parseDebuggerStatement(r);case Mn._do:return this.parseDoStatement(r);case Mn._for:return this.parseForStatement(r);case Mn._function:if(46===this.lookaheadCharCode())break;return e&&(this.state.strict?this.raise(this.state.start,Xn.StrictFunction):"if"!==e&&"label"!==e&&this.raise(this.state.start,Xn.SloppyFunction)),this.parseFunctionStatement(r,!1,!e);case Mn._class:return e&&this.unexpected(),this.parseClass(r,!0);case Mn._if:return this.parseIfStatement(r);case Mn._return:return this.parseReturnStatement(r);case Mn._switch:return this.parseSwitchStatement(r);case Mn._throw:return this.parseThrowStatement(r);case Mn._try:return this.parseTryStatement(r);case Mn._const:case Mn._var:return i=i||this.state.value,e&&"var"!==i&&this.raise(this.state.start,Xn.UnexpectedLexicalDeclaration),this.parseVarStatement(r,i);case Mn._while:return this.parseWhileStatement(r);case Mn._with:return this.parseWithStatement(r);case Mn.braceL:return this.parseBlock();case Mn.semi:return this.parseEmptyStatement(r);case Mn._import:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case Mn._export:{let e;return this.options.allowImportExportEverywhere||t||this.raise(this.state.start,Xn.UnexpectedImportExport),this.next(),s===Mn._import?(e=this.parseImport(r),"ImportDeclaration"!==e.type||e.importKind&&"value"!==e.importKind||(this.sawUnambiguousESM=!0)):(e=this.parseExport(r),("ExportNamedDeclaration"!==e.type||e.exportKind&&"value"!==e.exportKind)&&("ExportAllDeclaration"!==e.type||e.exportKind&&"value"!==e.exportKind)&&"ExportDefaultDeclaration"!==e.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(r),e}default:if(this.isAsyncFunction())return e&&this.raise(this.state.start,Xn.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(r,!0,!e)}const a=this.state.value,n=this.parseExpression();return s===Mn.name&&"Identifier"===n.type&&this.eat(Mn.colon)?this.parseLabeledStatement(r,a,n,e):this.parseExpressionStatement(r,n)}assertModuleNodeAllowed(e){this.options.allowImportExportEverywhere||this.inModule||this.raise(e.start,Jn.ImportOutsideModule)}takeDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];t.length&&(e.decorators=t,this.resetStartLocationFromNode(e,t[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(Mn._class)}parseDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(Mn.at);){const e=this.parseDecorator();t.push(e)}if(this.match(Mn._export))e||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,Xn.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,Xn.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const t=this.state.start,s=this.state.startLoc;let r;if(this.eat(Mn.parenL))r=this.parseExpression(),this.expect(Mn.parenR);else for(r=this.parseIdentifier(!1);this.eat(Mn.dot);){const e=this.startNodeAt(t,s);e.object=r,e.property=this.parseIdentifier(!0),e.computed=!1,r=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(r),this.state.decoratorStack.pop()}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(Mn.parenL)){const t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(Mn.parenR,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){const s="break"===t;return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){const s="break"===t;let r;for(r=0;rthis.parseStatement("do"))),this.state.labels.pop(),this.expect(Mn._while),e.test=this.parseHeaderExpression(),this.eat(Mn.semi),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Pu);let t=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(t=this.state.lastTokStart),this.scope.enter(0),this.expect(Mn.parenL),this.match(Mn.semi))return t>-1&&this.unexpected(t),this.parseFor(e,null);const s=this.isContextual("let"),r=s&&this.isLetKeyword();if(this.match(Mn._var)||this.match(Mn._const)||r){const s=this.startNode(),i=r?"let":this.state.value;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),(this.match(Mn._in)||this.isContextual("of"))&&1===s.declarations.length?this.parseForIn(e,s,t):(t>-1&&this.unexpected(t),this.parseFor(e,s))}const i=this.match(Mn.name)&&!this.state.containsEsc,a=new Wo,n=this.parseExpression(!0,a),o=this.isContextual("of");if(o&&(s?this.raise(n.start,Xn.ForOfLet):-1===t&&i&&"Identifier"===n.type&&"async"===n.name&&this.raise(n.start,Xn.ForOfAsync)),o||this.match(Mn._in)){this.toAssignable(n,!0);const s=o?"for-of statement":"for-in statement";return this.checkLVal(n,s),this.parseForIn(e,n,t)}return this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,n)}parseFunctionStatement(e,t,s){return this.next(),this.parseFunction(e,1|(s?0:2),t)}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Mn._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,Xn.IllegalReturn),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let s,r;for(this.expect(Mn.braceL),this.state.labels.push(Tu),this.scope.enter(0);!this.match(Mn.braceR);)if(this.match(Mn._case)||this.match(Mn._default)){const e=this.match(Mn._case);s&&this.finishNode(s,"SwitchCase"),t.push(s=this.startNode()),s.consequent=[],this.next(),e?s.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,Xn.MultipleDefaultsInSwitch),r=!0,s.test=null),this.expect(Mn.colon)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,Xn.NewlineAfterThrow),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom(),t="Identifier"===e.type;return this.scope.enter(t?8:0),this.checkLVal(e,"catch clause",9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(Mn._catch)){const t=this.startNode();this.next(),this.match(Mn.parenL)?(this.expect(Mn.parenL),t.param=this.parseCatchClauseParam(),this.expect(Mn.parenR)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Mn._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,Xn.NoCatchOrFinally),this.finishNode(e,"TryStatement")}parseVarStatement(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Pu),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("while"))),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(this.state.start,Xn.StrictWith),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("with"))),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,s,r){for(const e of this.state.labels)e.name===t&&this.raise(s.start,Xn.LabelRedeclaration,t);const i=this.state.type.isLoop?"loop":this.match(Mn._switch)?"switch":null;for(let t=this.state.labels.length-1;t>=0;t--){const s=this.state.labels[t];if(s.statementStart!==e.start)break;s.statementStart=this.state.start,s.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,s){const r=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(Mn.braceL),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,Mn.braceR,s),t&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,s,r,i){const a=e.body=[],n=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?n:void 0,s,r,i)}parseBlockOrModuleBlockBody(e,t,s,r,i){const a=this.state.strict;let n=!1,o=!1;for(;!this.match(r);){const r=this.parseStatement(null,s);if(t&&!o){if(this.isValidDirective(r)){const e=this.stmtToDirective(r);t.push(e),n||"use strict"!==e.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(r)}i&&i.call(this,n),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(Mn.semi)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(Mn.parenR)?null:this.parseExpression(),this.expect(Mn.parenR),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,s){const r=this.match(Mn._in);return this.next(),r?s>-1&&this.unexpected(s):e.await=s>-1,"VariableDeclaration"!==t.type||null==t.declarations[0].init||r&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type?"AssignmentPattern"===t.type&&this.raise(t.start,Xn.InvalidLhs,"for-loop"):this.raise(t.start,Xn.ForInOfLoopInitializer,r?"for-in":"for-of"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(Mn.parenR),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,s){const r=e.declarations=[],i=this.hasPlugin("typescript");for(e.kind=s;;){const e=this.startNode();if(this.parseVarId(e,s),this.eat(Mn.eq)?e.init=t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():("const"!==s||this.match(Mn._in)||this.isContextual("of")?"Identifier"===e.id.type||t&&(this.match(Mn._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,Xn.DeclarationMissingInitializer,"Complex binding patterns"):i||this.raise(this.state.lastTokEnd,Xn.DeclarationMissingInitializer,"Const declarations"),e.init=null),r.push(this.finishNode(e,"VariableDeclarator")),!this.eat(Mn.comma))break}return e}parseVarId(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"variable declaration","var"===t?5:9,void 0,"var"!==t)}parseFunction(e,t=0,s=!1){const r=1&t,i=2&t,a=!(!r||4&t);this.initFunction(e,s),this.match(Mn.star)&&i&&this.raise(this.state.start,Xn.GeneratorInSingleStatementContext),e.generator=this.eat(Mn.star),r&&(e.id=this.parseFunctionId(a));const n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(zo(s,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=n,e}parseFunctionId(e){return e||this.match(Mn.name)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(Mn.parenL),this.expressionScope.enter(new Uo(3)),e.params=this.parseBindingList(Mn.parenR,41,!1,t),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:9:17,e.id.start)}parseClass(e,t,s){this.next(),this.takeDecorators(e);const r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(Mn.eq)||this.match(Mn.semi)||this.match(Mn.braceR)}isClassMethod(){return this.match(Mn.parenL)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let r=[];const i=this.startNode();if(i.body=[],this.expect(Mn.braceL),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(Mn.braceR);){if(this.eat(Mn.semi)){if(r.length>0)throw this.raise(this.state.lastTokEnd,Xn.DecoratorSemicolon);continue}if(this.match(Mn.at)){r.push(this.parseDecorator());continue}const e=this.startNode();r.length&&(e.decorators=r,this.resetStartLocationFromNode(e,r[0]),r=[]),this.parseClassMember(i,e,s),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(e.start,Xn.DecoratorConstructor)}})),this.state.strict=t,this.next(),r.length)throw this.raise(this.state.start,Xn.TrailingDecorator);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=t;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}if(this.isClassProperty()){const r=t;return r.computed=!1,r.key=s,r.static=!1,e.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,t,s){const r=this.isContextual("static");if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(Mn.braceL))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,s,r)}parseClassMemberWithIsStatic(e,t,s,r){const i=t,a=t,n=t,o=t,u=i,h=i;if(t.static=r,this.eat(Mn.star)){u.kind="method";const t=this.match(Mn.privateName);return this.parseClassElementName(u),t?void this.pushClassPrivateMethod(e,a,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Xn.ConstructorIsGenerator),void this.pushClassMethod(e,i,!0,!1,!1,!1))}const c=this.match(Mn.name)&&!this.state.containsEsc,p=this.match(Mn.privateName),l=this.parseClassElementName(t),d=this.state.start;if(this.parsePostMemberNameModifiers(h),this.isClassMethod()){if(u.kind="method",p)return void this.pushClassPrivateMethod(e,a,!1,!1);const r=this.isNonstaticConstructor(i);let n=!1;r&&(i.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(l.start,Xn.DuplicateConstructor),r&&this.hasPlugin("typescript")&&t.override&&this.raise(l.start,Xn.OverrideOnConstructor),s.hadConstructor=!0,n=s.hadSuperClass),this.pushClassMethod(e,i,!1,!1,r,n)}else if(this.isClassProperty())p?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n);else if(c&&"async"===l.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(l);const t=this.eat(Mn.star);h.optional&&this.unexpected(d),u.kind="method";const s=this.match(Mn.privateName);this.parseClassElementName(u),this.parsePostMemberNameModifiers(h),s?this.pushClassPrivateMethod(e,a,t,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Xn.ConstructorIsAsync),this.pushClassMethod(e,i,t,!0,!1,!1))}else if(!c||"get"!==l.name&&"set"!==l.name||this.match(Mn.star)&&this.isLineTerminator())this.isLineTerminator()?p?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n):this.unexpected();else{this.resetPreviousNodeTrailingComments(l),u.kind=l.name;const t=this.match(Mn.privateName);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Xn.ConstructorIsAccessor),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}}parseClassElementName(e){const{type:t,value:s,start:r}=this.state;return t!==Mn.name&&t!==Mn.string||!e.static||"prototype"!==s||this.raise(r,Xn.StaticPrototype),t===Mn.privateName&&"constructor"===s&&this.raise(r,Xn.ConstructorClassPrivateField),this.parsePropertyName(e,!0)}parseClassStaticBlock(e,t){var s;this.expectPlugin("classStaticBlock",t.start),this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,Mn.braceR),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,e.body.push(this.finishNode(t,"StaticBlock")),null!=(s=t.decorators)&&s.length&&this.raise(t.start,Xn.DecoratorStaticBlock)}pushClassProperty(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(t.key.start,Xn.ConstructorClassField),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const s=this.parseClassPrivateProperty(t);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassMethod(e,t,s,r,i,a){e.body.push(this.parseMethod(t,s,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,s,r){const i=this.parseMethod(t,s,r,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);const a="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),a,i.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(Ho()),this.prodParam.enter(0),e.value=this.eat(Mn.eq)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,s,r=139){this.match(Mn.name)?(e.id=this.parseIdentifier(),t&&this.checkLVal(e.id,"class name",r)):s||!t?e.id=null:this.unexpected(null,Xn.MissingClassName)}parseClassSuper(e){e.superClass=this.eat(Mn._extends)?this.parseExprSubscripts():null}parseExport(e){const t=this.maybeParseExportDefaultSpecifier(e),s=!t||this.eat(Mn.comma),r=s&&this.eatExportStar(e),i=r&&this.maybeParseExportNamespaceSpecifier(e),a=s&&(!i||this.eat(Mn.comma)),n=t||r;if(r&&!i)return t&&this.unexpected(),this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");const o=this.maybeParseExportNamedSpecifiers(e);if(t&&s&&!r&&!o||i&&a&&!o)throw this.unexpected(null,Mn.braceL);let u;if(n||o?(u=!1,this.parseExportFrom(e,n)):u=this.maybeParseExportDeclaration(e),n||o||u)return this.checkExport(e,!0,!1,!!e.source),this.finishNode(e,"ExportNamedDeclaration");if(this.eat(Mn._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");throw this.unexpected(null,Mn.braceL)}eatExportStar(e){return this.eat(Mn.star)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual("as")){e.specifiers||(e.specifiers=[]);const t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){return!!this.match(Mn.braceL)&&(e.specifiers||(e.specifiers=[]),e.specifiers.push(...this.parseExportSpecifiers()),e.source=null,e.declaration=null,!0)}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual("async"))return!1;const e=this.nextTokenStart();return!Rn.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode(),t=this.isAsyncFunction();if(this.match(Mn._function)||t)return this.next(),t&&this.next(),this.parseFunction(e,5,t);if(this.match(Mn._class))return this.parseClass(e,!0,!0);if(this.match(Mn.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,Xn.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(Mn._const)||this.match(Mn._var)||this.isLet())throw this.raise(this.state.start,Xn.UnsupportedDefaultExport);{const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}}parseExportDeclaration(e){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(Mn.name)){const e=this.state.value;if("async"===e&&!this.state.containsEsc||"let"===e)return!1;if(("type"===e||"interface"===e)&&!this.state.containsEsc){const e=this.lookahead();if(e.type===Mn.name&&"from"!==e.value||e.type===Mn.braceL)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(Mn._default))return!1;const e=this.nextTokenStart(),t=this.isUnparsedContextual(e,"from");if(44===this.input.charCodeAt(e)||this.match(Mn.name)&&t)return!0;if(this.match(Mn._default)&&t){const t=this.input.charCodeAt(this.nextTokenStartSince(e+4));return 34===t||39===t}return!1}parseExportFrom(e,t){if(this.eatContextual("from")){e.source=this.parseImportSource(),this.checkExport(e);const t=this.maybeParseImportAssertions();t&&(e.assertions=t)}else t?this.unexpected():e.source=null;this.semicolon()}shouldParseExportDeclaration(){if(this.match(Mn.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,Xn.DecoratorBeforeExport)}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(e,t,s,r){if(t)if(s){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;const t=e.declaration;"Identifier"!==t.type||"from"!==t.name||t.end-t.start!=4||null!=(i=t.extra)&&i.parenthesized||this.raise(t.start,Xn.ExportDefaultFromAsIdentifier)}}else if(e.specifiers&&e.specifiers.length)for(const t of e.specifiers){const{exported:e}=t,s="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,s),!r&&t.local){const{local:e}=t;"Identifier"!==e.type?this.raise(t.start,Xn.ExportBindingIsString,e.value,s):(this.checkReservedWord(e.name,e.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){const t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(const t of e.declaration.declarations)this.checkDeclaration(t.id);if(this.state.decoratorStack[this.state.decoratorStack.length-1].length)throw this.raise(e.start,Xn.UnsupportedDecoratorExport)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&this.raise(e.start,"default"===t?Xn.DuplicateDefaultExport:Xn.DuplicateExport,t),this.exportedIdentifiers.add(t)}parseExportSpecifiers(){const e=[];let t=!0;for(this.expect(Mn.braceL);!this.eat(Mn.braceR);){if(t)t=!1;else if(this.expect(Mn.comma),this.eat(Mn.braceR))break;const s=this.startNode(),r=this.match(Mn.string),i=this.parseModuleExportName();s.local=i,this.eatContextual("as")?s.exported=this.parseModuleExportName():s.exported=r?Jo(i):Xo(i),e.push(this.finishNode(s,"ExportSpecifier"))}return e}parseModuleExportName(){if(this.match(Mn.string)){const e=this.parseStringLiteral(this.state.value),t=e.value.match(wu);return t&&this.raise(e.start,Xn.ModuleExportNameHasLoneSurrogate,t[0].charCodeAt(0).toString(16)),e}return this.parseIdentifier(!0)}parseImport(e){if(e.specifiers=[],!this.match(Mn.string)){const t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(Mn.comma),s=t&&this.maybeParseStarImportSpecifier(e);t&&!s&&this.parseNamedImportSpecifiers(e),this.expectContextual("from")}e.source=this.parseImportSource();const t=this.maybeParseImportAssertions();if(t)e.assertions=t;else{const t=this.maybeParseModuleAttributes();t&&(e.attributes=t)}return this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(Mn.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(e){return this.match(Mn.name)}parseImportSpecifierLocal(e,t,s,r){t.local=this.parseIdentifier(),this.checkLVal(t.local,r,9),e.specifiers.push(this.finishNode(t,s))}parseAssertEntries(){const e=[],t=new Set;do{if(this.match(Mn.braceR))break;const s=this.startNode(),r=this.state.value;if(t.has(r)&&this.raise(this.state.start,Xn.ModuleAttributesWithDuplicateKeys,r),t.add(r),this.match(Mn.string)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(Mn.colon),!this.match(Mn.string))throw this.unexpected(this.state.start,Xn.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),e.push(s)}while(this.eat(Mn.comma));return e}maybeParseModuleAttributes(){if(!this.match(Mn._with)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const e=[],t=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(s.key.start,Xn.ModuleAttributeDifferentFromType,s.key.name),t.has(s.key.name)&&this.raise(s.key.start,Xn.ModuleAttributesWithDuplicateKeys,s.key.name),t.add(s.key.name),this.expect(Mn.colon),!this.match(Mn.string))throw this.unexpected(this.state.start,Xn.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),e.push(s)}while(this.eat(Mn.comma));return e}maybeParseImportAssertions(){if(!this.isContextual("assert")||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(Mn.braceL);const e=this.parseAssertEntries();return this.eat(Mn.braceR),e}maybeParseDefaultImportSpecifier(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(Mn.star)){const t=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(Mn.braceL);!this.eat(Mn.braceR);){if(t)t=!1;else{if(this.eat(Mn.colon))throw this.raise(this.state.start,Xn.DestructureNamedImport);if(this.expect(Mn.comma),this.eat(Mn.braceR))break}this.parseImportSpecifier(e)}}parseImportSpecifier(e){const t=this.startNode(),s=this.match(Mn.string);if(t.imported=this.parseModuleExportName(),this.eatContextual("as"))t.local=this.parseIdentifier();else{const{imported:e}=t;if(s)throw this.raise(t.start,Xn.ImportBindingIsString,e.value);this.checkReservedWord(e.name,t.start,!0,!0),t.local=Xo(e)}this.checkLVal(t.local,"import specifier",9),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}{constructor(e,t){super(e=function(e){const t={};for(const s of Object.keys(gu))t[s]=e&&null!=e[s]?e[s]:gu[s];return t}(e),t),this.options=e,this.initializeScopes(),this.plugins=function(e){const t=new Map;for(const s of e){const[e,r]=Array.isArray(s)?s:[s,{}];t.has(e)||t.set(e,r||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return Bo}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}}function Nu(e,t){let s=Bu;return null!=e&&e.plugins&&(!function(e){if(fu(e,"decorators")){if(fu(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=yu(e,"decorators","decoratorsBeforeExport");if(null==t)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(fu(e,"flow")&&fu(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(fu(e,"placeholders")&&fu(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(fu(e,"pipelineOperator")){const t=yu(e,"pipelineOperator","proposal");if(!Au.includes(t)){const e=Au.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}const s=fu(e,"recordAndTuple")&&"hash"===yu(e,"recordAndTuple","syntaxType");if("hack"===t){if(fu(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(fu(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=yu(e,"pipelineOperator","topicToken");if(!Eu.includes(t)){const e=Eu.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(fu(e,"moduleAttributes")){if(fu(e,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==yu(e,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(fu(e,"recordAndTuple")&&!Cu.includes(yu(e,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+Cu.map((e=>`'${e}'`)).join(", "));if(fu(e,"asyncDoExpressions")&&!fu(e,"doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),s=function(e){const t=Fu.filter((t=>fu(e,t))),s=t.join("/");let r=Iu[s];if(!r){r=Bu;for(const e of t)r=xu[e](r);Iu[s]=r}return r}(e.plugins)),new s(e,t)}const Iu={};var vu=function(e,t){var s;if("unambiguous"!==(null==(s=t)?void 0:s.sourceType))return Nu(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";const s=Nu(t,e),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Nu(t,e).parse()}catch(e){}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",Nu(t,e).parse()}catch(e){}throw s}},ku=function(e,t){const s=Nu(t,e);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},Lu=Mn,Ou=Object.defineProperty({parse:vu,parseExpression:ku,tokTypes:Lu},"__esModule",{value:!0});const{isNonEmptyArray:Mu}=ur;function Ru(e={}){const{allowComments:t=!0}=e;return function(e){const{parseExpression:s}=Ou;let r;try{r=s(e,{tokens:!0,ranges:!0})}catch(e){throw di(e)}if(!t&&Mu(r.comments))throw ju(r.comments[0],"Comment");return _u(r),r}}function ju(e,t){const[s,r]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return li(`${t} is not allowed in JSON.`,{start:s,end:r})}function _u(e){switch(e.type){case"ArrayExpression":for(const t of e.elements)null!==t&&_u(t);return;case"ObjectExpression":for(const t of e.properties)_u(t);return;case"ObjectProperty":if(e.computed)throw ju(e.key,"Computed key");if(e.shorthand)throw ju(e.key,"Shorthand property");return"Identifier"!==e.key.type&&_u(e.key),void _u(e.value);case"UnaryExpression":{const{operator:t,argument:s}=e;if("+"!==t&&"-"!==t)throw ju(e,`Operator '${e.operator}'`);if("NumericLiteral"===s.type||"Identifier"===s.type&&("Infinity"===s.name||"NaN"===s.name))return;throw ju(s,`Operator '${t}' before '${s.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw ju(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(Mu(e.expressions))throw ju(e.expressions[0],"'TemplateLiteral' with expression");for(const t of e.quasis)_u(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw ju(e,`'${e.type}'`)}}const Uu=Ru();var qu={json:pi({parse:Uu,hasPragma:()=>!0}),json5:pi(Uu),"json-stringify":pi({parse:Ru({allowComments:!1}),astFormat:"estree-json"})};const{getNextNonSpaceNonCommentCharacterIndexWithStartIndex:$u,getShebang:Hu}=ur,Vu={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"importAssertions","decimal","classStaticBlock","moduleBlocks","asyncDoExpressions"],tokens:!0,ranges:!0},zu=["recordAndTuple",{syntaxType:"hash"}],Wu="v8intrinsic",Gu=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],Ku=(e,t=Vu)=>Object.assign(Object.assign({},t),{},{plugins:[...t.plugins,...e]}),Xu=/@(?:no)?flow\b/;function Ju(e,...t){return(s,r,i={})=>{if(("babel"===i.parser||"__babel_estree"===i.parser)&&function(e,t){if(t.filepath&&t.filepath.endsWith(".js.flow"))return!0;const s=Hu(e);s&&(e=e.slice(s.length));const r=$u(e,0);return!1!==r&&(e=e.slice(0,r)),Xu.test(e)}(s,i))return i.parser="babel-flow",Qu(s,r,i);let a=t;"script"===i.__babelSourceType&&(a=a.map((e=>Object.assign(Object.assign({},e),{},{sourceType:"script"})))),/#[[{]/.test(s)&&(a=a.map((e=>Ku([zu],e))));const n=/%[A-Z]/.test(s);if(s.includes("|>")){const e=n?[...Gu,Wu]:Gu;a=e.flatMap((e=>a.map((t=>Ku([e],t)))))}else n&&(a=a.map((e=>Ku([Wu],e))));const{result:o,error:u}=Qe(...a.map((t=>()=>function(e,t,s){const r=(0,Ou[e])(t,s),i=r.errors.find((e=>!sh.has(e.reasonCode)));if(i)throw i;return r}(e,s,t))));if(!o)throw di(u);return Tn(o,Object.assign(Object.assign({},i),{},{originalText:s}))}}const Yu=Ju("parse",Ku(["jsx","flow"])),Qu=Ju("parse",Ku(["jsx",["flow",{all:!0,enums:!0}]])),Zu=Ju("parse",Ku(["jsx","typescript"]),Ku(["typescript"])),eh=Ju("parse",Ku(["jsx","flow","estree"])),th=Ju("parseExpression",Ku(["jsx"])),sh=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","UnexpectedParameterModifier","MixedLabeledAndUnlabeledElements","InvalidTupleMemberLabel","NonClassMethodPropertyHasAbstractModifer","ReadonlyForMethodSignature","ClassMethodHasDeclare","ClassMethodHasReadonly","InvalidModifierOnTypeMember","DuplicateAccessibilityModifier","IndexSignatureHasDeclare","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","UnsupportedPropertyDecorator","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),rh=pi(Yu),ih=pi(th);return{parsers:Object.assign(Object.assign({babel:rh,"babel-flow":pi(Qu),"babel-ts":pi(Zu)},qu),{},{__js_expression:ih,__vue_expression:ih,__vue_event_binding:rh,__babel_estree:pi(eh)})}})); diff --git a/website/static/js/prettier-2.4.1/parser-html.js b/website/static/js/prettier-2.4.1/parser-html.js new file mode 100644 index 0000000..a90ee38 --- /dev/null +++ b/website/static/js/prettier-2.4.1/parser-html.js @@ -0,0 +1,132 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html=t())}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports}var r=t((function(e,t){function r(e){return t.$0<=e&&e<=t.$9} +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=r,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||r(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */class n{constructor(e,t,r){this.filePath=e,this.name=t,this.members=r}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}}var i=n;var s=class{constructor(){this.cache=new Map}get(e,t,r){const i=`"${e}".${t}${(r=r||[]).length?`.${r.join(".")}`:""}`;let s=this.cache.get(i);return s||(s=new n(e,t,r),this.cache.set(i,s)),s}},o=Object.defineProperty({StaticSymbol:i,StaticSymbolCache:s},"__esModule",{value:!0}); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +const a=/-+([a-z0-9])/g;var u=function(e){return e.replace(a,((...e)=>e[1].toUpperCase()))};var c=function(e,t){return p(e,":",t)};var l=function(e,t){return p(e,".",t)};function p(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function h(e,t,r){return Array.isArray(e)?t.visitArray(e,r):"object"==typeof(n=e)&&null!==n&&Object.getPrototypeOf(n)===v?t.visitStringMap(e,r):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,r):t.visitOther(e,r);var n}var D=h;var f=function(e){return null!=e};var d=function(e){return void 0===e?null:e};var g=class{visitArray(e,t){return e.map((e=>h(e,this,t)))}visitStringMap(e,t){const r={};return Object.keys(e).forEach((n=>{r[n]=h(e[n],this,t)})),r}visitPrimitive(e,t){return e}visitOther(e,t){return e}},m={assertSync:e=>{if(k(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>k(e)?e.then(t):t(e),all:e=>e.some(k)?Promise.all(e):e};var E=function(e){throw new Error(`Internal Error: ${e}`)};var C=function(e,t){const r=Error(e);return r[y]=!0,t&&(r[b]=t),r};const y="ngSyntaxError",b="ngParseErrors";var T=function(e){return e[y]};var S=function(e){return e[b]||[]};var _=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const v=Object.getPrototypeOf({});var A=function(e){let t="";for(let r=0;r=55296&&n<=56319&&e.length>r+1){const t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(r++,n=(n-55296<<10)+t-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t};var F=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;if(!t.toString)return"object";const r=t.toString();if(null==r)return""+r;const n=r.indexOf("\n");return-1===n?r:r.substring(0,n)};var w=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e};function k(e){return!!e&&"function"==typeof e.then}var N=k;var O=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const x="undefined"!=typeof window&&window,I="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;var P=void 0!==e&&e||x||I,R=Object.defineProperty({dashCaseToCamelCase:u,splitAtColon:c,splitAtPeriod:l,visitValue:D,isDefined:f,noUndefined:d,ValueTransformer:g,SyncAsync:m,error:E,syntaxError:C,isSyntaxError:T,getParseErrors:S,escapeRegExp:_,utf8Encode:A,stringify:F,resolveForwardRef:w,isPromise:N,Version:O,global:P},"__esModule",{value:!0}),L=t((function(e,t){ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let i=0;function s(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof o.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=R.stringify(t);return r.indexOf("(")>=0?(r="anonymous_"+i++,t.__anonymousType=r):r=n(r),r}var a;t.identifierName=s,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof o.StaticSymbol?t.filePath:`./${R.stringify(t)}`},t.viewClassName=function(e,t){return`View_${s({reference:e})}_${t}`},t.rendererTypeName=function(e){return`RenderType_${s({reference:e})}`},t.hostViewClassName=function(e){return`HostView_${s({reference:e})}`},t.componentFactoryName=function(e){return`${s({reference:e})}NgFactory`},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(a=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:r}={}){this.moduleUrl=e||null,this.styles=c(t),this.styleUrls=c(r)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:r,htmlAst:n,styles:i,styleUrls:s,externalStylesheets:o,animations:a,ngContentSelectors:u,interpolation:p,isInline:h,preserveWhitespaces:D}){if(this.encapsulation=e,this.template=t,this.templateUrl=r,this.htmlAst=n,this.styles=c(i),this.styleUrls=c(s),this.externalStylesheets=c(o),this.animations=a?l(a):[],this.ngContentSelectors=u||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=h,this.preserveWhitespaces=D}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class u{static create({isHost:e,type:t,isComponent:n,selector:i,exportAs:s,changeDetection:o,inputs:a,outputs:c,host:l,providers:p,viewProviders:h,queries:D,guards:f,viewQueries:d,entryComponents:g,template:m,componentViewType:E,rendererType:C,componentFactory:y}){const b={},T={},S={};null!=l&&Object.keys(l).forEach((e=>{const t=l[e],n=e.match(r);null===n?S[e]=t:null!=n[1]?T[n[1]]=t:null!=n[2]&&(b[n[2]]=t)}));const _={};null!=a&&a.forEach((e=>{const t=R.splitAtColon(e,[e,e]);_[t[0]]=t[1]}));const v={};return null!=c&&c.forEach((e=>{const t=R.splitAtColon(e,[e,e]);v[t[0]]=t[1]})),new u({isHost:e,type:t,isComponent:!!n,selector:i,exportAs:s,changeDetection:o,inputs:_,outputs:v,hostListeners:b,hostProperties:T,hostAttributes:S,providers:p,viewProviders:h,queries:D,guards:f,viewQueries:d,entryComponents:g,template:m,componentViewType:E,rendererType:C,componentFactory:y})}constructor({isHost:e,type:t,isComponent:r,selector:n,exportAs:i,changeDetection:s,inputs:o,outputs:a,hostListeners:u,hostProperties:l,hostAttributes:p,providers:h,viewProviders:D,queries:f,guards:d,viewQueries:g,entryComponents:m,template:E,componentViewType:C,rendererType:y,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=r,this.selector=n,this.exportAs=i,this.changeDetection=s,this.inputs=o,this.outputs=a,this.hostListeners=u,this.hostProperties=l,this.hostAttributes=p,this.providers=c(h),this.viewProviders=c(D),this.queries=c(f),this.guards=d,this.viewQueries=c(g),this.entryComponents=c(m),this.template=E,this.componentViewType=C,this.rendererType=y,this.componentFactory=b}toSummary(){return{summaryKind:a.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}t.CompileDirectiveMetadata=u;t.CompilePipeMetadata=class{constructor({type:e,name:t,pure:r}){this.type=e,this.name=t,this.pure=!!r}toSummary(){return{summaryKind:a.Pipe,type:this.type,name:this.name,pure:this.pure}}};t.CompileShallowModuleMetadata=class{};t.CompileNgModuleMetadata=class{constructor({type:e,providers:t,declaredDirectives:r,exportedDirectives:n,declaredPipes:i,exportedPipes:s,entryComponents:o,bootstrapComponents:a,importedModules:u,exportedModules:l,schemas:p,transitiveModule:h,id:D}){this.type=e||null,this.declaredDirectives=c(r),this.exportedDirectives=c(n),this.declaredPipes=c(i),this.exportedPipes=c(s),this.providers=c(t),this.entryComponents=c(o),this.bootstrapComponents=c(a),this.importedModules=c(u),this.exportedModules=c(l),this.schemas=c(p),this.id=D||null,this.transitiveModule=h||null}toSummary(){const e=this.transitiveModule;return{summaryKind:a.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}};function c(e){return e||[]}t.TransitiveCompileNgModuleMetadata=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(e,t){this.providers.push({provider:e,module:t})}addDirective(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}addExportedDirective(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}addPipe(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}addExportedPipe(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}addModule(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}addEntryComponent(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}};function l(e){return e.reduce(((e,t)=>{const r=Array.isArray(t)?l(t):t;return e.concat(r)}),[])}function p(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=class{constructor(e,{useClass:t,useValue:r,useExisting:n,useFactory:i,deps:s,multi:o}){this.token=e,this.useClass=t||null,this.useValue=r,this.useExisting=n,this.useFactory=i||null,this.dependencies=s||null,this.multi=!!o}},t.flatten=l,t.templateSourceUrl=function(e,t,r){let n;return n=r.isInline?t.type.reference instanceof o.StaticSymbol?`${t.type.reference.filePath}.${t.type.reference.name}.html`:`${s(e)}/${s(t.type)}.html`:r.templateUrl,t.type.reference instanceof o.StaticSymbol?n:p(n)},t.sharedStylesheetJitUrl=function(e,t){const r=e.moduleUrl.split(/\/\\/g);return p(`css/${t}${r[r.length-1]}.ngstyle.js`)},t.ngModuleJitUrl=function(e){return p(`${s(e.type)}/module.ngfactory.js`)},t.templateJitUrl=function(e,t){return p(`${s(e)}/${s(t.type)}.ngfactory.js`)}})),B=t((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class n{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,i=t.length;let s=this.offset,o=this.line,a=this.col;for(;s>0&&e<0;){s--,e++;if(t.charCodeAt(s)==r.$LF){o--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(r.$LF));a=e>0?s-e:s}else a--}for(;s0;){const n=t.charCodeAt(s);s++,e--,n==r.$LF?(o++,a=0):a++}return new n(this.file,s,o,a)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let i=n,s=0,o=0;for(;s0&&(n--,s++,"\n"!=r[n]||++o!=t););for(s=0,o=0;s]${e.after}")`:this.msg}toString(){const e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}},t.typeSourceSpan=function(e,t){const r=L.identifierModuleUrl(t),o=null!=r?`in ${e} ${L.identifierName(t)} in ${r}`:`in ${e} ${L.identifierName(t)}`,a=new i("",o);return new s(new n(a,-1,-1,-1),new n(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,r){const o=new i("",`in ${e} ${t} in ${r}`);return new s(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));const $=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");var q=function(e){const t=e.match($);if(!t)return{content:e};const{startDelimiter:r,language:n,value:i="",endDelimiter:s}=t.groups;let o=n.trim()||"yaml";if("+++"===r&&(o="toml"),"yaml"!==o&&r!==s)return{content:e};const[a]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:r,endDelimiter:s,raw:a.replace(/\n$/,"")},content:a.replace(/[^\n]/g," ")+e.slice(a.length)}};var M=e=>e[e.length-1];var j=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r},U=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const V=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var G=V,H=V;G.default=H;const X=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=U(e)).length)return 0;e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=G(n)?2:1))}return t};var W=X,z=X;W.default=z;var Y=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Q(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var J,K,Z=function(e){return e&&e.Math==Math&&e},ee=Z("object"==typeof globalThis&&globalThis)||Z("object"==typeof window&&window)||Z("object"==typeof self&&self)||Z("object"==typeof e&&e)||function(){return this}()||Function("return this")(),te=function(e){try{return!!e()}catch(e){return!0}},re=!te((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ne={}.propertyIsEnumerable,ie=Object.getOwnPropertyDescriptor,se={f:ie&&!ne.call({1:2},1)?function(e){var t=ie(this,e);return!!t&&t.enumerable}:ne},oe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ae={}.toString,ue=function(e){return ae.call(e).slice(8,-1)},ce="".split,le=te((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==ue(e)?ce.call(e,""):Object(e)}:Object,pe=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},he=function(e){return le(pe(e))},De=function(e){return"object"==typeof e?null!==e:"function"==typeof e},fe=function(e){return"function"==typeof e?e:void 0},de=function(e,t){return arguments.length<2?fe(ee[e]):ee[e]&&ee[e][t]},ge=de("navigator","userAgent")||"",me=ee.process,Ee=ee.Deno,Ce=me&&me.versions||Ee&&Ee.version,ye=Ce&&Ce.v8;ye?K=(J=ye.split("."))[0]<4?1:J[0]+J[1]:ge&&(!(J=ge.match(/Edge\/(\d+)/))||J[1]>=74)&&(J=ge.match(/Chrome\/(\d+)/))&&(K=J[1]);var be=K&&+K,Te=!!Object.getOwnPropertySymbols&&!te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&be&&be<41})),Se=Te&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_e=Se?function(e){return"symbol"==typeof e}:function(e){var t=de("Symbol");return"function"==typeof t&&Object(e)instanceof t},ve=function(e,t){try{Object.defineProperty(ee,e,{value:t,configurable:!0,writable:!0})}catch(r){ee[e]=t}return t},Ae="__core-js_shared__",Fe=ee[Ae]||ve(Ae,{}),we=t((function(e){(e.exports=function(e,t){return Fe[e]||(Fe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),ke=function(e){return Object(pe(e))},Ne={}.hasOwnProperty,Oe=Object.hasOwn||function(e,t){return Ne.call(ke(e),t)},xe=0,Ie=Math.random(),Pe=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++xe+Ie).toString(36)},Re=we("wks"),Le=ee.Symbol,Be=Se?Le:Le&&Le.withoutSetter||Pe,$e=function(e){return Oe(Re,e)&&(Te||"string"==typeof Re[e])||(Te&&Oe(Le,e)?Re[e]=Le[e]:Re[e]=Be("Symbol."+e)),Re[e]},qe=$e("toPrimitive"),Me=function(e,t){if(!De(e)||_e(e))return e;var r,n=e[qe];if(void 0!==n){if(void 0===t&&(t="default"),r=n.call(e,t),!De(r)||_e(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&"function"==typeof(r=e.toString)&&!De(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!De(n=r.call(e)))return n;if("string"!==t&&"function"==typeof(r=e.toString)&&!De(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")}(e,t)},je=function(e){var t=Me(e,"string");return _e(t)?t:String(t)},Ue=ee.document,Ve=De(Ue)&&De(Ue.createElement),Ge=!re&&!te((function(){return 7!=Object.defineProperty((e="div",Ve?Ue.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),He=Object.getOwnPropertyDescriptor,Xe={f:re?He:function(e,t){if(e=he(e),t=je(t),Ge)try{return He(e,t)}catch(e){}if(Oe(e,t))return oe(!se.f.call(e,t),e[t])}},We=function(e){if(!De(e))throw TypeError(String(e)+" is not an object");return e},ze=Object.defineProperty,Ye={f:re?ze:function(e,t,r){if(We(e),t=je(t),We(r),Ge)try{return ze(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Qe=re?function(e,t,r){return Ye.f(e,t,oe(1,r))}:function(e,t,r){return e[t]=r,e},Je=Function.toString;"function"!=typeof Fe.inspectSource&&(Fe.inspectSource=function(e){return Je.call(e)});var Ke,Ze,et,tt,rt=Fe.inspectSource,nt=ee.WeakMap,it="function"==typeof nt&&/native code/.test(rt(nt)),st=we("keys"),ot={},at="Object already initialized",ut=ee.WeakMap;if(it||Fe.state){var ct=Fe.state||(Fe.state=new ut),lt=ct.get,pt=ct.has,ht=ct.set;Ke=function(e,t){if(pt.call(ct,e))throw new TypeError(at);return t.facade=e,ht.call(ct,e,t),t},Ze=function(e){return lt.call(ct,e)||{}},et=function(e){return pt.call(ct,e)}}else{var Dt=st[tt="state"]||(st[tt]=Pe(tt));ot[Dt]=!0,Ke=function(e,t){if(Oe(e,Dt))throw new TypeError(at);return t.facade=e,Qe(e,Dt,t),t},Ze=function(e){return Oe(e,Dt)?e[Dt]:{}},et=function(e){return Oe(e,Dt)}}var ft={set:Ke,get:Ze,has:et,enforce:function(e){return et(e)?Ze(e):Ke(e,{})},getterFor:function(e){return function(t){var r;if(!De(t)||(r=Ze(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},dt=t((function(e){var t=ft.get,r=ft.enforce,n=String(String).split("String");(e.exports=function(e,t,i,s){var o,a=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof t||Oe(i,"name")||Qe(i,"name",t),(o=r(i)).source||(o.source=n.join("string"==typeof t?t:""))),e!==ee?(a?!c&&e[t]&&(u=!0):delete e[t],u?e[t]=i:Qe(e,t,i)):u?e[t]=i:ve(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||rt(this)}))})),gt=Math.ceil,mt=Math.floor,Et=function(e){return isNaN(e=+e)?0:(e>0?mt:gt)(e)},Ct=Math.min,yt=function(e){return e>0?Ct(Et(e),9007199254740991):0},bt=Math.max,Tt=Math.min,St=function(e){return function(t,r,n){var i,s=he(t),o=yt(s.length),a=function(e,t){var r=Et(e);return r<0?bt(r+t,0):Tt(r,t)}(n,o);if(e&&r!=r){for(;o>a;)if((i=s[a++])!=i)return!0}else for(;o>a;a++)if((e||a in s)&&s[a]===r)return e||a||0;return!e&&-1}},_t={includes:St(!0),indexOf:St(!1)}.indexOf,vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),At={f:Object.getOwnPropertyNames||function(e){return function(e,t){var r,n=he(e),i=0,s=[];for(r in n)!Oe(ot,r)&&Oe(n,r)&&s.push(r);for(;t.length>i;)Oe(n,r=t[i++])&&(~_t(s,r)||s.push(r));return s}(e,vt)}},Ft={f:Object.getOwnPropertySymbols},wt=de("Reflect","ownKeys")||function(e){var t=At.f(We(e)),r=Ft.f;return r?t.concat(r(e)):t},kt=function(e,t){for(var r=wt(t),n=Ye.f,i=Xe.f,s=0;s0&&qt(u))c=Ut(e,t,u,yt(u.length),c,s-1)-1;else{if(c>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[c]=u}c++}l++}return c},Vt=Ut,Gt=$e("species"),Ht=function(e,t){return new(function(e){var t;return qt(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!qt(t.prototype)?De(t)&&null===(t=t[Gt])&&(t=void 0):t=void 0),void 0===t?Array:t}(e))(0===t?0:t)};$t({target:"Array",proto:!0},{flatMap:function(e){var t,r=ke(this),n=yt(r.length);return Mt(e),(t=Ht(r,0)).length=Vt(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Xt,Wt,zt=function(e){if(_e(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Yt=Math.floor,Qt=function(e,t){var r=e.length,n=Yt(r/2);return r<8?Jt(e,t):Kt(Qt(e.slice(0,n),t),Qt(e.slice(n),t),t)},Jt=function(e,t){for(var r,n,i=e.length,s=1;s0;)e[n]=e[--n];n!==s++&&(e[n]=r)}return e},Kt=function(e,t,r){for(var n=e.length,i=t.length,s=0,o=0,a=[];s3)){if(rr)return!0;if(ir)return ir<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)sr.push({k:t+n,v:r})}for(sr.sort((function(e,t){return t.v-e.v})),n=0;nzt(r)?1:-1}}(e))).length,n=0;ns;s++)if((a=m(e[s]))&&a instanceof Tr)return a;return new Tr(!1)}n=function(e,t){var r=arguments.length<2?yr(e):t;if("function"!=typeof r)throw TypeError(String(e)+" is not iterable");return We(r.call(e))}(e,i)}for(u=n.next;!(c=u.call(n)).done;){try{a=m(c.value)}catch(e){br(n,"throw",e)}if("object"==typeof a&&a&&a instanceof Tr)return a}return new Tr(!1)};$t({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Sr(e,(function(e,r){!function(e,t,r){var n=je(t);n in e?Ye.f(e,n,oe(0,r)):e[n]=r}(t,e,r)}),{AS_ENTRIES:!0}),t}});var _r=void 0!==_r?_r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function vr(){throw new Error("setTimeout has not been defined")}function Ar(){throw new Error("clearTimeout has not been defined")}var Fr=vr,wr=Ar;function kr(e){if(Fr===setTimeout)return setTimeout(e,0);if((Fr===vr||!Fr)&&setTimeout)return Fr=setTimeout,setTimeout(e,0);try{return Fr(e,0)}catch(t){try{return Fr.call(null,e,0)}catch(t){return Fr.call(this,e,0)}}}"function"==typeof _r.setTimeout&&(Fr=setTimeout),"function"==typeof _r.clearTimeout&&(wr=clearTimeout);var Nr,Or=[],xr=!1,Ir=-1;function Pr(){xr&&Nr&&(xr=!1,Nr.length?Or=Nr.concat(Or):Ir=-1,Or.length&&Rr())}function Rr(){if(!xr){var e=kr(Pr);xr=!0;for(var t=Or.length;t;){for(Nr=Or,Or=[];++Ir1)for(var r=1;rconsole.error("SEMVER",...e):()=>{};var Qr={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Jr=t((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Qr,n=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let o=0;const a=(e,t,r)=>{const a=o++;Yr(a,t),s[e]=a,i[a]=t,n[a]=new RegExp(t,r?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),a("FULL",`^${i[s.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),a("LOOSE",`^${i[s.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),a("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),a("COERCERTL",i[s.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const Kr=["includePrerelease","loose","rtl"];var Zr=e=>e?"object"!=typeof e?{loose:!0}:Kr.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const en=/^[0-9]+$/,tn=(e,t)=>{const r=en.test(e),n=en.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:etn(t,e)};const{MAX_LENGTH:nn,MAX_SAFE_INTEGER:sn}=Qr,{re:on,t:an}=Jr,{compareIdentifiers:un}=rn;class cn{constructor(e,t){if(t=Zr(t),e instanceof cn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>nn)throw new TypeError(`version is longer than ${nn} characters`);Yr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?on[an.LOOSE]:on[an.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>sn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>sn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>sn||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var ln=cn;var pn=(e,t,r)=>new ln(e,r).compare(new ln(t,r));var hn=(e,t,r)=>pn(e,t,r)<0;var Dn=(e,t,r)=>pn(e,t,r)>=0,fn=t((function(e,t){function r(){for(var e=[],t=0;t"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Cn,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:gn},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Cn,description:dn` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:gn},printWidth:{since:"0.0.0",category:Cn,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:yn,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:dn` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:mn},rangeStart:{since:"1.4.0",category:yn,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:dn` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:mn},requirePragma:{since:"1.7.0",category:yn,type:"boolean",default:!1,description:dn` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `,cliCategory:En},tabWidth:{type:"int",category:Cn,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Cn,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Cn,type:"choice",default:[{since:"2.1.0",value:"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."}]}};const Tn=["cliName","cliCategory","cliDescription"],Sn={compare:pn,lt:hn,gte:Dn},_n="2.4.1",vn={CATEGORY_CONFIG:gn,CATEGORY_EDITOR:mn,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:En,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Cn,CATEGORY_SPECIAL:yn,options:bn}.options;var An={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=_n.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(a),o=((e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r))))(Object.assign({},...e.map((({options:e})=>e)),vn),"name").filter((e=>a(e)&&u(e))).sort(((e,t)=>e.name===t.name?0:e.name{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(a).sort(((e,t)=>Sn.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>a(e)&&u(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let o=i.name;s&&s.name&&(o+=` (plugin: ${s.name})`),e.choices.push({value:t,description:o})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));return{languages:s,options:o};function a(e){return t||!("since"in e)||e.since&&Sn.gte(i,e.since)}function u(e){return r||!("deprecated"in e)||e.deprecated&&Sn.lt(i,e.deprecated)}}};const{getSupportInfo:Fn}=An,wn=/[^\x20-\x7F]/;function kn(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let o=r;for(;o>=0&&o(r.match(o.regex)||[]).length?o.quote:s.quote}return a}function Vn(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function Gn(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");r.length>20&&(r=r.slice(0,19)+"\u2026");return t+(r?" "+r:"")}(e)}var Hn={inferParserByLanguage:function(e,t){const{languages:r}=Fn({plugins:t.plugins}),n=r.find((({name:t})=>t.toLowerCase()===e))||r.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||r.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return n&&n.parsers[0]},getStringWidth:function(e){return e?wn.test(e)?W(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;ee[e.length-2],getLast:M,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:qn,getNextNonSpaceNonCommentCharacterIndex:Mn,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(Mn(e,t,r))},skip:kn,skipWhitespace:Nn,skipSpaces:On,skipToLineEnd:xn,skipEverythingButNewLine:In,skipInlineComment:Pn,skipTrailingComment:Rn,skipNewline:Ln,isNextLineEmptyAfterIndex:$n,isNextLineEmpty:function(e,t,r){return $n(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=On(e,n,{backwards:!0}),n=Ln(e,n,{backwards:!0}),n=On(e,n,{backwards:!0}),n!==Ln(e,n,{backwards:!0})},hasNewline:Bn,hasNewlineInRange:function(e,t,r){for(let n=t;n0},createGroupIdMapper:function(e){const t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}},Xn={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]};function Wn(e){return{type:"concat",parts:e}}function zn(e){return{type:"indent",contents:e}}function Yn(e,t){return{type:"align",contents:t,n:e}}function Qn(e,t={}){return{type:"group",id:t.id,contents:e,break:Boolean(t.shouldBreak),expandedStates:t.expandedStates}}const Jn={type:"break-parent"},Kn={type:"line",hard:!0},Zn={type:"line",hard:!0,literal:!0},ei=Wn([Kn,Jn]),ti=Wn([Zn,Jn]);var ri={concat:Wn,join:function(e,t){const r=[];for(let n=0;n0){for(let e=0;e=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){let r;if("\n"===t)r=/\n/g;else if("\r"===t)r=/\r/g;else{if("\r\n"!==t)throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);r=/\r\n/g}const n=e.match(r);return n?n.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}};const{literalline:ii,join:si}=ri,oi=e=>Array.isArray(e)||e&&"concat"===e.type,ai=e=>{if(Array.isArray(e))return e;if("concat"!==e.type&&"fill"!==e.type)throw new Error("Expect doc type to be `concat` or `fill`.");return e.parts},ui={};function ci(e,t,r,n){const i=[e];for(;i.length>0;){const e=i.pop();if(e!==ui){if(r&&i.push(e,ui),!t||!1!==t(e))if(oi(e)||"fill"===e.type){const t=ai(e);for(let e=t.length-1;e>=0;--e)i.push(t[e])}else if("if-break"===e.type)e.flatContents&&i.push(e.flatContents),e.breakContents&&i.push(e.breakContents);else if("group"===e.type&&e.expandedStates)if(n)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);else e.contents&&i.push(e.contents)}else r(i.pop())}}function li(e,t){const r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);const i=function(e){if(Array.isArray(e))return t(e.map(n));if("concat"===e.type||"fill"===e.type){const r=e.parts.map(n);return t(Object.assign(Object.assign({},e),{},{parts:r}))}if("if-break"===e.type){const r=e.breakContents&&n(e.breakContents),i=e.flatContents&&n(e.flatContents);return t(Object.assign(Object.assign({},e),{},{breakContents:r,flatContents:i}))}if("group"===e.type&&e.expandedStates){const r=e.expandedStates.map(n),i=r[0];return t(Object.assign(Object.assign({},e),{},{contents:i,expandedStates:r}))}if(e.contents){const r=n(e.contents);return t(Object.assign(Object.assign({},e),{},{contents:r}))}return t(e)}(e);return r.set(e,i),i}}function pi(e,t,r){let n=r,i=!1;return ci(e,(function(e){const r=t(e);if(void 0!==r&&(i=!0,n=r),i)return!1})),n}function hi(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function Di(e){if(e.length>0){const t=M(e);t.expandedStates||t.break||(t.break="propagated")}return null}function fi(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}const di=(e,t)=>e&&"line"===e.type&&e.hard&&t&&"break-parent"===t.type;function gi(e){if(!e)return e;if(oi(e)||"fill"===e.type){const t=ai(e);for(;t.length>1&&di(...t.slice(-2));)t.length-=2;if(t.length>0){const e=gi(M(t));t[t.length-1]=e}return Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}switch(e.type){case"align":case"indent":case"indent-if-break":case"group":case"line-suffix":case"label":{const t=gi(e.contents);return Object.assign(Object.assign({},e),{},{contents:t})}case"if-break":{const t=gi(e.breakContents),r=gi(e.flatContents);return Object.assign(Object.assign({},e),{},{breakContents:t,flatContents:r})}}return e}function mi(e){return li(e,(e=>function(e){switch(e.type){case"fill":if(0===e.parts.length||e.parts.every((e=>""===e)))return"";break;case"group":if(!(e.contents||e.id||e.break||e.expandedStates))return"";if("group"===e.contents.type&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case"align":case"indent":case"indent-if-break":case"line-suffix":if(!e.contents)return"";break;case"if-break":if(!e.flatContents&&!e.breakContents)return""}if(!oi(e))return e;const t=[];for(const r of ai(e)){if(!r)continue;const[e,...n]=oi(r)?ai(r):[r];"string"==typeof e&&"string"==typeof M(t)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}(e)))}function Ei(e){const t=[],r=e.filter(Boolean);for(;r.length>0;){const e=r.shift();e&&(oi(e)?r.unshift(...ai(e)):t.length>0&&"string"==typeof M(t)&&"string"==typeof e?t[t.length-1]+=e:t.push(e))}return t}function Ci(e,t=ii){return si(t,e.split("\n")).parts}var yi={isConcat:oi,getDocParts:ai,willBreak:function(e){return pi(e,hi,!1)},traverseDoc:ci,findInDoc:pi,mapDoc:li,propagateBreaks:function(e){const t=new Set,r=[];ci(e,(function(e){if("break-parent"===e.type&&Di(r),"group"===e.type){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){if("group"===e.type){r.pop().break&&Di(r)}}),!0)},removeLines:function(e){return li(e,fi)},stripTrailingHardline:function(e){return gi(mi(e))},normalizeParts:Ei,normalizeDoc:function(e){return li(e,(e=>Array.isArray(e)?Ei(e):e.parts?Object.assign(Object.assign({},e),{},{parts:Ei(e.parts)}):e))},cleanDoc:mi,replaceTextEndOfLine:Ci,replaceEndOfLine:function(e){return li(e,(e=>"string"==typeof e&&e.includes("\n")?Ci(e):e))}};const{getStringWidth:bi,getLast:Ti}=Hn,{convertEndOfLineToChars:Si}=ni,{fill:_i,cursor:vi,indent:Ai}=ri,{isConcat:Fi,getDocParts:wi}=yi;let ki;function Ni(e,t){return xi(e,{type:"indent"},t)}function Oi(e,t,r){if(t===Number.NEGATIVE_INFINITY)return e.root||{value:"",length:0,queue:[]};if(t<0)return xi(e,{type:"dedent"},r);if(!t)return e;if("root"===t.type)return Object.assign(Object.assign({},e),{},{root:e});return xi(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r)}function xi(e,t,r){const n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t];let i="",s=0,o=0,a=0;for(const e of n)switch(e.type){case"indent":l(),r.useTabs?u(1):c(r.tabWidth);break;case"stringAlign":l(),i+=e.n,s+=e.n.length;break;case"numberAlign":o+=1,a+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),Object.assign(Object.assign({},e),{},{value:i,length:s,queue:n});function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function c(e){i+=" ".repeat(e),s+=e}function l(){r.useTabs?function(){o>0&&u(o);h()}():p()}function p(){a>0&&c(a),h()}function h(){o=0,a=0}}function Ii(e){if(0===e.length)return 0;let t=0;for(;e.length>0&&"string"==typeof Ti(e)&&/^[\t ]*$/.test(Ti(e));)t+=e.pop().length;if(e.length>0&&"string"==typeof Ti(e)){const r=Ti(e).replace(/[\t ]*$/,"");t+=Ti(e).length-r.length,e[e.length-1]=r}return t}function Pi(e,t,r,n,i,s){let o=t.length;const a=[e],u=[];for(;r>=0;){if(0===a.length){if(0===o)return!0;a.push(t[o-1]),o--;continue}const[e,c,l]=a.pop();if("string"==typeof l)u.push(l),r-=bi(l);else if(Fi(l)){const t=wi(l);for(let r=t.length-1;r>=0;r--)a.push([e,c,t[r]])}else switch(l.type){case"indent":a.push([Ni(e,n),c,l.contents]);break;case"align":a.push([Oi(e,l.n,n),c,l.contents]);break;case"trim":r+=Ii(u);break;case"group":{if(s&&l.break)return!1;const t=l.break?1:c;a.push([e,t,l.expandedStates&&1===t?Ti(l.expandedStates):l.contents]),l.id&&(ki[l.id]=t);break}case"fill":for(let t=l.parts.length-1;t>=0;t--)a.push([e,c,l.parts[t]]);break;case"if-break":case"indent-if-break":{const t=l.groupId?ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ai(l.contents);t&&a.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ai(l.contents):l.contents;t&&a.push([e,c,t])}break}case"line":switch(c){case 2:if(!l.hard){l.soft||(u.push(" "),r-=1);break}return!0;case 1:return!0}break;case"line-suffix":i=!0;break;case"line-suffix-boundary":if(i)return!1;break;case"label":a.push([e,c,l.contents])}}return!1}var Ri={printDocToString:function(e,t){ki={};const r=t.printWidth,n=Si(t.endOfLine);let i=0;const s=[[{value:"",length:0,queue:[]},1,e]],o=[];let a=!1,u=[];for(;s.length>0;){const[e,c,l]=s.pop();if("string"==typeof l){const e="\n"!==n?l.replace(/\n/g,n):l;o.push(e),i+=bi(e)}else if(Fi(l)){const t=wi(l);for(let r=t.length-1;r>=0;r--)s.push([e,c,t[r]])}else switch(l.type){case"cursor":o.push(vi.placeholder);break;case"indent":s.push([Ni(e,t),c,l.contents]);break;case"align":s.push([Oi(e,l.n,t),c,l.contents]);break;case"trim":i-=Ii(o);break;case"group":switch(c){case 2:if(!a){s.push([e,l.break?1:2,l.contents]);break}case 1:{a=!1;const n=[e,2,l.contents],o=r-i,c=u.length>0;if(!l.break&&Pi(n,s,o,t,c))s.push(n);else if(l.expandedStates){const r=Ti(l.expandedStates);if(l.break){s.push([e,1,r]);break}for(let n=1;n=l.expandedStates.length){s.push([e,1,r]);break}{const r=[e,2,l.expandedStates[n]];if(Pi(r,s,o,t,c)){s.push(r);break}}}}else s.push([e,1,l.contents]);break}}l.id&&(ki[l.id]=Ti(s)[1]);break;case"fill":{const n=r-i,{parts:o}=l;if(0===o.length)break;const[a,p]=o,h=[e,2,a],D=[e,1,a],f=Pi(h,[],n,t,u.length>0,!0);if(1===o.length){f?s.push(h):s.push(D);break}const d=[e,2,p],g=[e,1,p];if(2===o.length){f?s.push(d,h):s.push(g,D);break}o.splice(0,2);const m=[e,c,_i(o)];Pi([e,2,[a,p,o[0]]],[],n,t,u.length>0,!0)?s.push(m,d,h):f?s.push(m,g,h):s.push(m,g,D);break}case"if-break":case"indent-if-break":{const t=l.groupId?ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ai(l.contents);t&&s.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ai(l.contents):l.contents;t&&s.push([e,c,t])}break}case"line-suffix":u.push([e,c,l.contents]);break;case"line-suffix-boundary":u.length>0&&s.push([e,c,{type:"line",hard:!0}]);break;case"line":switch(c){case 2:if(!l.hard){l.soft||(o.push(" "),i+=1);break}a=!0;case 1:if(u.length>0){s.push([e,c,l],...u.reverse()),u=[];break}l.literal?e.root?(o.push(n,e.root.value),i=e.root.length):(o.push(n),i=0):(i-=Ii(o),o.push(n+e.value),i=e.length)}break;case"label":s.push([e,c,l.contents])}0===s.length&&u.length>0&&(s.push(...u.reverse()),u=[])}const c=o.indexOf(vi.placeholder);if(-1!==c){const e=o.indexOf(vi.placeholder,c+1),t=o.slice(0,c).join(""),r=o.slice(c+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}};const{isConcat:Li,getDocParts:Bi}=yi;function $i(e){if(!e)return"";if(Li(e)){const t=[];for(const r of Bi(e))if(Li(r))t.push(...$i(r).parts);else{const e=$i(r);""!==e&&t.push(e)}return{type:"concat",parts:t}}return"if-break"===e.type?Object.assign(Object.assign({},e),{},{breakContents:$i(e.breakContents),flatContents:$i(e.flatContents)}):"group"===e.type?Object.assign(Object.assign({},e),{},{contents:$i(e.contents),expandedStates:e.expandedStates&&e.expandedStates.map($i)}):"fill"===e.type?{type:"fill",parts:e.parts.map($i)}:e.contents?Object.assign(Object.assign({},e),{},{contents:$i(e.contents)}):e}var qi={builders:ri,printer:Ri,utils:yi,debug:{printDocToDebug:function(e){const t=Object.create(null),r=new Set;return function e(t,r,i){if("string"==typeof t)return JSON.stringify(t);if(Li(t)){const r=Bi(t).map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if("line"===t.type){const e=Array.isArray(i)&&i[r+1]&&"break-parent"===i[r+1].type;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if("break-parent"===t.type){return Array.isArray(i)&&i[r-1]&&"line"===i[r-1].type&&i[r-1].hard?void 0:"breakParent"}if("trim"===t.type)return"trim";if("indent"===t.type)return"indent("+e(t.contents)+")";if("align"===t.type)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if("if-break"===t.type)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if("indent-if-break"===t.type){const r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);const i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if("group"===t.type){const r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);const i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if("fill"===t.type)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if("line-suffix"===t.type)return"lineSuffix("+e(t.contents)+")";if("line-suffix-boundary"===t.type)return"lineSuffixBoundary";if("label"===t.type)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}($i(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];const n=String(e).slice(7,-1)||"symbol";for(let i=0;;i++){const s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}}};const{inferParserByLanguage:Mi,isFrontMatterNode:ji}=Hn,{builders:{line:Ui,hardline:Vi,join:Gi},utils:{getDocParts:Hi,replaceTextEndOfLine:Xi}}=qi,{CSS_DISPLAY_TAGS:Wi,CSS_DISPLAY_DEFAULT:zi,CSS_WHITE_SPACE_TAGS:Yi,CSS_WHITE_SPACE_DEFAULT:Qi}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"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",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",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",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},Ji=rs(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),Ki=function(e,t){const r=Object.create(null);for(const[n,i]of Object.entries(e))r[n]=t(i,n);return r}(Xn,rs),Zi=new Set(["\t","\n","\f","\r"," "]),es=e=>e.replace(/[\t\n\f\r ]+$/,""),ts=e=>(e=>e.replace(/^[\t\f\r ]*?\n/g,""))(es(e));function rs(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function ns(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||fs(e)&&("script"===e.name||"style"===e.name))}function is(e){return ds(e).startsWith("pre")}function ss(e){return"element"===e.type&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function os(e){return ls(e)||"element"===e.type&&"br"===e.fullName||as(e)}function as(e){return us(e)&&cs(e)}function us(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function ls(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function ps(e){const{type:t,lang:r}=e.attrMap;return"module"===t||"text/javascript"===t||"text/babel"===t||"application/javascript"===t||"jsx"===r?"babel":"application/x-typescript"===t||"ts"===r||"tsx"===r?"typescript":"text/markdown"===t?"markdown":"text/html"===t?"html":t&&(t.endsWith("json")||t.endsWith("importmap"))?"json":"text/x-handlebars-template"===t?"glimmer":void 0}function hs(e){return"block"===e||"list-item"===e||e.startsWith("table")}function Ds(e){return ds(e).startsWith("pre")}function fs(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function ds(e){return"element"===e.type&&(!e.namespace||fs(e))&&Yi[e.name]||Qi}function gs(e,t=function(e){let t=Number.POSITIVE_INFINITY;for(const n of e.split("\n")){if(0===n.length)continue;if(!Zi.has(n[0]))return 0;const e=(r=n,r.match(/^[\t\n\f\r ]*/)[0]).length;n.length!==e&&ee.slice(t))).join("\n")}const ms=new Set(["template","style","script"]);function Es(e,t){return Cs(e,t)&&!ms.has(e.fullName)}function Cs(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function ys(e,t){return Cs(e,t)&&(Es(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var bs={HTML_ELEMENT_ATTRIBUTES:Ki,HTML_TAGS:Ji,htmlTrim:e=>(e=>e.replace(/^[\t\n\f\r ]+/,""))(es(e)),htmlTrimPreserveIndentation:ts,hasHtmlWhitespace:e=>/[\t\n\f\r ]/.test(e),getLeadingAndTrailingHtmlWhitespace:e=>{const[,t,r,n]=e.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s);return{leadingWhitespace:t,trailingWhitespace:n,text:r}},canHaveInterpolation:function(e){return e.children&&!ns(e)},countChars:function(e,t){let r=0;for(let n=0;n=0;n--){const i=e.stack[n];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&r++}return r},dedentString:gs,forceBreakChildren:ss,forceBreakContent:function(e){return ss(e)||"element"===e.type&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some((e=>function(e){return e.children&&e.children.some((e=>"text"!==e.type))}(e))))||e.firstChild&&e.firstChild===e.lastChild&&"text"!==e.firstChild.type&&us(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||cs(e.lastChild))},forceNextEmptyLine:function(e){return ji(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1"svg:foreignObject"===e.fullName)))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"vue"===t.parser&&e.parent&&"root"===e.parent.type?"block":"element"===e.type&&(!e.namespace||r||fs(e))&&Wi[e.name]||zi}},getNodeCssStyleWhiteSpace:ds,hasPrettierIgnore:function(e){return"attribute"!==e.type&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))},inferScriptParser:function(e,t){return"script"!==e.name||e.attrMap.src?"style"===e.name?function(e){const{lang:t}=e.attrMap;return t&&"postcss"!==t&&"css"!==t?"scss"===t?"scss":"less"===t?"less":void 0:"css"}(e):t&&ys(e,t)?ps(e)||!("src"in e.attrMap)&&Mi(e.attrMap.lang,t):void 0:e.attrMap.lang||e.attrMap.type?ps(e):"babel"},isVueCustomBlock:Es,isVueNonHtmlBlock:ys,isVueSlotAttribute:function(e){const t=e.fullName;return"#"===t.charAt(0)||"slot-scope"===t||"v-slot"===t||t.startsWith("v-slot:")},isVueSfcBindingsAttribute:function(e,t){const r=e.parent;if(!Cs(r,t))return!1;const n=r.fullName,i=e.fullName;return"script"===n&&"setup"===i||"style"===n&&"vars"===i},isDanglingSpaceSensitiveNode:function(e){return!(t=e.cssDisplay,hs(t)||"inline-block"===t||ns(e));var t},isIndentationSensitiveNode:is,isLeadingSpaceSensitiveNode:function(e,t){const r=function(){if(ji(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(Ds(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||Ds(e)&&e.parent||ns(e.parent)||Es(e.parent,t)||(r=e.parent.cssDisplay,hs(r)||"inline-block"===r)))return!1;var r;if(e.prev&&!function(e){return!hs(e)}(e.prev.cssDisplay))return!1;return!0}();return r&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:r},isPreLikeNode:Ds,isScriptLikeTag:ns,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e,t){return!ji(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!Ds(e.parent)||!(!e.next&&("root"===e.parent.type||Ds(e)&&e.parent||ns(e.parent)||Es(e.parent,t)||(r=e.parent.cssDisplay,hs(r)||"inline-block"===r)))&&!(e.next&&!function(e){return!hs(e)}(e.next.cssDisplay))));var r},isWhitespaceSensitiveNode:function(e){return ns(e)||"interpolation"===e.type||is(e)},isUnknownNamespace:fs,preferHardlineAsLeadingSpaces:function(e){return ls(e)||e.prev&&os(e.prev)||as(e)},preferHardlineAsTrailingSpaces:os,shouldPreserveContent:function(e,t){return!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||(!(!Ds(e)||!e.children.some((e=>"text"!==e.type&&"interpolation"!==e.type)))||!(!ys(e,t)||ns(e)||"interpolation"===e.type)))},unescapeQuoteEntities:function(e){return e.replace(/'/g,"'").replace(/"/g,'"')},getTextValueParts:function(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?Xi(t):Xi(gs(ts(t)),Vi):Hi(Gi(Ui,t.split(/[\t\n\f\r ]+/)))}};var Ts={hasPragma:function(e){return/^\s*/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};const{isNonEmptyArray:Ss}=Hn,_s={attrs:!0,children:!0};class vs{constructor(e={}){for(const[t,r]of Object.entries(e))t in _s?this._setNodes(t,r):this[t]=r}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map((e=>e instanceof vs?e.clone():new vs(e)));let n=null,i=r[0],s=r[1]||null;for(let e=0;e[e.fullName,e.value])))}))}map(e){let t=null;for(const r in _s){const n=this[r];if(n){const i=As(n,(t=>t.map(e)));t!==n&&(t||(t=new vs),t._setNodes(r,i))}}if(t){for(const e in this)e in _s||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:i,parent:s}=this;Fs(t,{index:e,siblings:r,prev:n,next:i,parent:s})}return e(t||this)}walk(e){for(const t in _s){const r=this[t];if(r)for(let t=0;tt!==e[r]))?r:e}function Fs(e,t){const r=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,{value:t,enumerable:!1}])));Object.defineProperties(e,r)}var ws={Node:vs};const{ParseSourceSpan:ks}=B,Ns=[{regex:/^(\[if([^\]]*?)]>)(.*?){try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new ks(a,u)}]]}})();return{type:"ieConditionalComment",complete:c,children:l,condition:i.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new ks(e.sourceSpan.start,a),endSourceSpan:new ks(u,e.sourceSpan.end)}}},{regex:/^\[if([^\]]*?)]>",Gt:"\u226b",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",LT:"<",Lt:"\u226a",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",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:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",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:"\u2115",nopf:"\ud835\udd5f",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",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",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",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",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",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:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",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:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",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:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},t.NGSP_UNICODE="\ue500",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE})); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class Ps{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=Is.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach((e=>this.closedByChildren[e]=!0)),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}var Rs=Ps;let Ls,Bs;var $s=function(e){return Bs||(Ls=new Ps,Bs={base:new Ps({isVoid:!0}),meta:new Ps({isVoid:!0}),area:new Ps({isVoid:!0}),embed:new Ps({isVoid:!0}),link:new Ps({isVoid:!0}),img:new Ps({isVoid:!0}),input:new Ps({isVoid:!0}),param:new Ps({isVoid:!0}),hr:new Ps({isVoid:!0}),br:new Ps({isVoid:!0}),source:new Ps({isVoid:!0}),track:new Ps({isVoid:!0}),wbr:new Ps({isVoid:!0}),p:new Ps({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 Ps({closedByChildren:["tbody","tfoot"]}),tbody:new Ps({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Ps({closedByChildren:["tbody"],closedByParent:!0}),tr:new Ps({closedByChildren:["tr"],closedByParent:!0}),td:new Ps({closedByChildren:["td","th"],closedByParent:!0}),th:new Ps({closedByChildren:["td","th"],closedByParent:!0}),col:new Ps({isVoid:!0}),svg:new Ps({implicitNamespacePrefix:"svg"}),math:new Ps({implicitNamespacePrefix:"math"}),li:new Ps({closedByChildren:["li"],closedByParent:!0}),dt:new Ps({closedByChildren:["dt","dd"]}),dd:new Ps({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Ps({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Ps({closedByChildren:["optgroup"],closedByParent:!0}),option:new Ps({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Ps({ignoreFirstLf:!0}),listing:new Ps({ignoreFirstLf:!0}),style:new Ps({contentType:Is.TagContentType.RAW_TEXT}),script:new Ps({contentType:Is.TagContentType.RAW_TEXT}),title:new Ps({contentType:Is.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new Ps({contentType:Is.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),Bs[e]||Ls},qs=Object.defineProperty({HtmlTagDefinition:Rs,getHtmlTagDefinition:$s},"__esModule",{value:!0});var Ms= +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}},js=Object.defineProperty({AstPath:Ms},"__esModule",{value:!0});var Us= +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r,this.type="text"}visit(e,t){return e.visitText(this,t)}};var Vs=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}};var Gs=class{constructor(e,t,r,n,i,s){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=i,this.i18n=s}visit(e,t){return e.visitExpansion(this,t)}};var Hs=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}};var Xs=class{constructor(e,t,r,n=null,i=null,s=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=i,this.i18n=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}};class Ws{constructor(e,t,r,n,i=null,s=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=i,this.endSourceSpan=s,this.nameSpan=o,this.i18n=a,this.type="element"}visit(e,t){return e.visitElement(this,t)}}var zs=Ws;var Ys=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}};var Qs=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}};function Js(e,t,r=null){const n=[],i=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach((e=>{const t=i(e);t&&n.push(t)})),n}var Ks=Js;class Zs{constructor(){}visitElement(e,t){this.visitChildren(t,(t=>{t(e.attrs),t(e.children)}))}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,(t=>{t(e.cases)}))}visitExpansionCase(e,t){}visitChildren(e,t){let r=[],n=this;return t((function(t){t&&r.push(Js(n,t,e))})),Array.prototype.concat.apply([],r)}}var eo=Zs;function to(e){const t=e.sourceSpan.start.offset;let r=e.sourceSpan.end.offset;return e instanceof Ws&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=to(e.children[e.children.length-1]).end)),{start:t,end:r}}var ro=function(e,t){const r=[];return Js(new class extends Zs{visit(e,n){const i=to(e);if(!(i.start<=t&&t]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];var oo=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(null!=t){const e=t[0],r=t[1];so.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}},ao=Object.defineProperty({assertArrayOfStrings:io,assertInterpolationSymbols:oo},"__esModule",{value:!0}),uo=t((function(e,t){ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(ao.assertInterpolationSymbols("interpolation",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")})),co=t((function(e,t){ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0});const n=r;var i;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(i=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class o extends B.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=o;class a{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=a,t.tokenize=function(e,t,r,n={}){return new h(new B.ParseSourceFile(e,t),r,n).tokenize()};const u=/\r\n?/g;function c(e){return`Unexpected character "${e===n.$EOF?"EOF":String.fromCharCode(e)}"`}function l(e){return`Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`}class p{constructor(e){this.error=e}}class h{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||uo.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map((e=>e.codePointAt(0)||0)),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new C(e,n):new E(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(u,"\n")}tokenize(){for(;this._cursor.peek()!==n.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(n.$LT))if(this._attemptCharCode(n.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(n.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(n.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(i.EOF),this._endToken([]),new a(function(e){const t=[];let r;for(let n=0;nthis._attemptStr("--\x3e"))),this._beginToken(i.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeBogusComment(e){this._beginToken(i.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(i.CDATA_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._attemptStr("]]>"))),this._beginToken(i.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(i.DOC_TYPE_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;this._cursor.peek()!==n.$COLON&&!(((r=this._cursor.peek())n.$9));)this._cursor.advance();var r;let i;this._cursor.peek()===n.$COLON?(t=this._cursor.getChars(e),this._cursor.advance(),i=this._cursor.clone()):i=e,this._requireCharCodeUntilFn(f,""===t?0:1);return[t,this._cursor.getChars(i)]}_consumeTagOpen(e){let t,r,s,o=this.tokens.length;const a=this._cursor.clone(),u=[];try{if(!n.isAsciiLetter(this._cursor.peek()))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),r=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(D);this._cursor.peek()!==n.$SLASH&&this._cursor.peek()!==n.$GT;){const[e,t]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(D),this._attemptCharCode(n.$EQ)){this._attemptCharCodeUntilFn(D);const r=this._consumeAttributeValue();u.push({prefix:e,name:t,value:r})}else u.push({prefix:e,name:t});this._attemptCharCodeUntilFn(D)}this._consumeTagOpenEnd()}catch(t){if(t instanceof p)return this._cursor=a,s&&(this.tokens.length=o),this._beginToken(i.TEXT,e),void this._endToken(["<"]);throw t}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===i.TAG_OPEN_END_VOID)return;const l=this._getTagContentType(t,r,this._fullNameStack.length>0,u);this._handleFullNameStackForTagOpen(r,t),l===Is.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):l===Is.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,(()=>!!this._attemptCharCode(n.$LT)&&(!!this._attemptCharCode(n.$SLASH)&&(this._attemptCharCodeUntilFn(D),!!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t)&&(this._attemptCharCodeUntilFn(D),this._attemptCharCode(n.$GT)))))),this._beginToken(i.TAG_CLOSE),this._requireCharCodeUntilFn((e=>e===n.$GT),3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(i.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(e===n.$SQ||e===n.$DQ)throw this._createError(c(e),this._cursor.getSpan());this._beginToken(i.ATTR_NAME);const t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===n.$SQ||this._cursor.peek()===n.$DQ){this._beginToken(i.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(i.ATTR_VALUE);const r=[];for(;this._cursor.peek()!==t;)r.push(this._readChar(!0));e=this._processCarriageReturns(r.join("")),this._endToken([e]),this._beginToken(i.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(i.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(f,1),e=this._processCarriageReturns(this._cursor.getChars(t)),this._endToken([e])}return e}_consumeTagOpenEnd(){const e=this._attemptCharCode(n.$SLASH)?i.TAG_OPEN_END_VOID:i.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(n.$GT),this._endToken([])}_consumeTagClose(e){if(this._beginToken(i.TAG_CLOSE,e),this._attemptCharCodeUntilFn(D),this._allowHtmComponentClosingTags&&this._attemptCharCode(n.$SLASH))this._attemptCharCodeUntilFn(D),this._requireCharCode(n.$GT),this._endToken([]);else{const[e,t]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(D),this._requireCharCode(n.$GT),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}}_consumeExpansionFormStart(){this._beginToken(i.EXPANSION_FORM_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._expansionCaseStack.push(i.EXPANSION_FORM_START),this._beginToken(i.RAW_TEXT);const e=this._readUntil(n.$COMMA);this._endToken([e]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(D),this._beginToken(i.RAW_TEXT);const t=this._readUntil(n.$COMMA);this._endToken([t]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(D)}_consumeExpansionCaseStart(){this._beginToken(i.EXPANSION_CASE_VALUE);const e=this._readUntil(n.$LBRACE).trim();this._endToken([e]),this._attemptCharCodeUntilFn(D),this._beginToken(i.EXPANSION_CASE_EXP_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._attemptCharCodeUntilFn(D),this._expansionCaseStack.push(i.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(i.EXPANSION_CASE_EXP_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._attemptCharCodeUntilFn(D),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(i.EXPANSION_FORM_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(i.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(this._cursor.peek()===n.$LT||this._cursor.peek()===n.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(this._cursor.peek()===n.$RBRACE&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==n.$LBRACE)return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){const r=Is.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]!==r||this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){const r=Is.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}}function D(e){return!n.isWhitespace(e)||e===n.$EOF}function f(e){return n.isWhitespace(e)||e===n.$GT||e===n.$SLASH||e===n.$SQ||e===n.$DQ||e===n.$EQ}function d(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiHexDigit(e)}function g(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiLetter(e)}function m(e){return e>=n.$a&&e<=n.$z?e-n.$a+n.$A:e}class E{constructor(e,t){if(e instanceof E)this.file=e.file,this.input=e.input,this.end=e.end,this.state=Object.assign({},e.state);else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new E(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new B.ParseSourceSpan(new B.ParseLocation(e.file,e.state.offset,e.state.line,e.state.column),new B.ParseLocation(this.file,this.state.offset,this.state.line,this.state.column))}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new y('Unexpected character "EOF"',this);const t=this.charAt(e.offset);t===n.$LF?(e.line++,e.column=0):n.isNewLine(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?n.$EOF:this.charAt(e.offset)}}class C extends E{constructor(e,t){e instanceof C?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new C(this)}getChars(e){const t=e.clone();let r="";for(;t.internalState.offsetthis.internalState.peek;if(e()===n.$BACKSLASH)if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),e()===n.$n)this.state.peek=n.$LF;else if(e()===n.$r)this.state.peek=n.$CR;else if(e()===n.$v)this.state.peek=n.$VTAB;else if(e()===n.$t)this.state.peek=n.$TAB;else if(e()===n.$b)this.state.peek=n.$BSPACE;else if(e()===n.$f)this.state.peek=n.$FF;else if(e()===n.$u)if(this.advanceState(this.internalState),e()===n.$LBRACE){this.advanceState(this.internalState);const t=this.clone();let r=0;for(;e()!==n.$RBRACE;)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(t,r)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(e()===n.$x){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(n.isOctalDigit(e())){let t="",r=0,i=this.clone();for(;n.isOctalDigit(e())&&r<3;)i=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),r++;this.state.peek=parseInt(t,8),this.internalState=i.internalState}else n.isNewLine(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const r=this.input.substr(e.internalState.offset,t),n=parseInt(r,16);if(isNaN(n))throw e.state=e.internalState,new y("Invalid hexadecimal escape sequence",e);return n}}class y{constructor(e,t){this.msg=e,this.cursor=t}}t.CursorError=y})); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class lo extends B.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,r){return new lo(e,t,r)}}var po=lo;class ho{constructor(e,t){this.rootNodes=e,this.errors=t}}var Do=ho;var fo=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){const s=e=>(t,...r)=>e(t.toLowerCase(),...r),o=n?this.getTagDefinition:s(this.getTagDefinition),a=e=>o(e).contentType,u=n?i:s(i),c=i?(e,t,r,n)=>{const i=u(e,t,r,n);return void 0!==i?i:a(e)}:a,l=co.tokenize(e,t,c,r),p=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,D=new go(l.tokens,o,p,h,n).build();return new ho(D.rootNodes,l.errors.concat(D.errors))}};class go{constructor(e,t,r,n,i){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=i,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==co.TokenType.EOF;)this._peek.type===co.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===co.TokenType.TAG_CLOSE?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===co.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===co.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===co.TokenType.TEXT||this._peek.type===co.TokenType.RAW_TEXT||this._peek.type===co.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===co.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===co.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new ho(this._rootNodes,this._errors)}_advance(){const e=this._peek;return this._index0)return this._errors=this._errors.concat(i.errors),null;const s=new B.ParseSourceSpan(e.sourceSpan.start,n.sourceSpan.end),o=new B.ParseSourceSpan(t.sourceSpan.start,n.sourceSpan.end);return new no.ExpansionCase(e.parts[0],i.rootNodes,s,e.sourceSpan,o)}_collectExpansionExpTokens(e){const t=[],r=[co.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==co.TokenType.EXPANSION_FORM_START&&this._peek.type!==co.TokenType.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===co.TokenType.EXPANSION_CASE_EXP_END){if(!mo(r,co.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===co.TokenType.EXPANSION_FORM_END){if(!mo(r,co.TokenType.EXPANSION_FORM_START))return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===co.TokenType.EOF)return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_getText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}return t}_consumeText(e){const t=this._getText(e);t.length>0&&this._addToParent(new no.Text(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const t=e.parts[0],r=e.parts[1],n=[];for(;this._peek.type===co.TokenType.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));const i=this._getElementFullName(t,r,this._getParentElement());let s=!1;if(this._peek.type===co.TokenType.TAG_OPEN_END_VOID){this._advance(),s=!0;const t=this.getTagDefinition(i);this.canSelfClose||t.canSelfClose||null!==Is.getNsPrefix(i)||t.isVoid||this._errors.push(lo.create(i,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===co.TokenType.TAG_OPEN_END&&(this._advance(),s=!1);const o=this._peek.sourceSpan.start,a=new B.ParseSourceSpan(e.sourceSpan.start,o),u=new B.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),c=new no.Element(i,n,[],a,a,void 0,u);this._pushElement(c),s&&(this._popElement(i),c.endSourceSpan=a)}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(lo.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popElement(t)){const r=`Unexpected closing tag "${t}". 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(lo.create(t,e.sourceSpan,r))}}_popElement(e){for(let t=this._elementStack.length-1;t>=0;t--){const r=this._elementStack[t];if(!e||(Is.getNsPrefix(r.name)?r.name==e:r.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=Is.mergeNsAndName(e.parts[0],e.parts[1]);let r,n,i=e.sourceSpan.end,s="";if(this._peek.type===co.TokenType.ATTR_QUOTE){n=this._advance().sourceSpan.start}if(this._peek.type===co.TokenType.ATTR_VALUE){const e=this._advance();s=e.parts[0],i=e.sourceSpan.end,r=e.sourceSpan}if(this._peek.type===co.TokenType.ATTR_QUOTE){i=this._advance().sourceSpan.end,r=new B.ParseSourceSpan(n,i)}return new no.Attribute(t,s,new B.ParseSourceSpan(e.sourceSpan.start,i),r,e.sourceSpan)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_getParentElementSkippingContainers(){let e=null;for(let t=this._elementStack.length-1;t>=0;t--){if(!Is.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}_insertBeforeContainer(e,t,r){if(t){if(e){const n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)}_getElementFullName(e,t,r){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=r&&(e=Is.getNsPrefix(r.name)),Is.mergeNsAndName(e,t)}}function mo(e,t){return e.length>0&&e[e.length-1]===t}var Eo=Object.defineProperty({TreeError:po,ParseTreeResult:Do,Parser:fo},"__esModule",{value:!0}),Co=Eo,yo=Co.ParseTreeResult,bo=Co.TreeError; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */class To extends Eo.Parser{constructor(){super(qs.getHtmlTagDefinition)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}}var So=To,_o=Object.defineProperty({ParseTreeResult:yo,TreeError:bo,HtmlParser:So},"__esModule",{value:!0}),vo=Is.TagContentType;let Ao=null;var Fo=function(e,t={}){const{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s}=t;return(Ao||(Ao=new _o.HtmlParser),Ao).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n},i,s)},wo=Object.defineProperty({TagContentType:vo,parse:Fo},"__esModule",{value:!0});const{ParseSourceSpan:ko,ParseLocation:No,ParseSourceFile:Oo}=B,{inferParserByLanguage:xo}=Hn,{HTML_ELEMENT_ATTRIBUTES:Io,HTML_TAGS:Po,isUnknownNamespace:Ro}=bs,{hasPragma:Lo}=Ts,{Node:Bo}=ws,{parseIeConditionalComment:$o}=Os,{locStart:qo,locEnd:Mo}=xs;function jo(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o},a){const u=wo,{RecursiveVisitor:c,visitAll:l}=no,{ParseSourceSpan:p}=B,{getHtmlTagDefinition:h}=qs;let{rootNodes:D,errors:f}=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o});if("vue"===a.parser){if(D.some((e=>"docType"===e.type&&"html"===e.value||"element"===e.type&&"html"===e.name.toLowerCase()))){t=!0,r=!0,n=!0,i=!0,s=!1;const o=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s});D=o.rootNodes,f=o.errors}else{const r=e=>{if(!e)return!1;if("element"!==e.type||"template"!==e.name)return!1;const t=e.attrs.find((e=>"lang"===e.name)),r=t&&t.value;return!r||"html"===xo(r,a)};if(D.some(r)){let n;const o=()=>u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s}),a=()=>n||(n=o()),c=e=>a().rootNodes.find((({startSourceSpan:t})=>t&&t.start.offset===e.startSourceSpan.start.offset));for(let e=0;e0){const{msg:e,span:{start:t,end:r}}=f[0];throw j(e,{start:{line:t.line+1,column:t.col+1},end:{line:r.line+1,column:r.col+1}})}const d=e=>{const t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=null!==t&&r.startsWith(`${t}:`),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},g=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return l(new class extends c{visit(e){(e=>{if("element"===e.type){d(e);for(const t of e.attrs)d(t),t.valueSpan?(t.value=t.valueSpan.toString(),/["']/.test(t.value[0])&&(t.value=t.value.slice(1,-1))):t.value=null}else"comment"===e.type?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):"text"===e.type&&(e.value=e.sourceSpan.toString())})(e),(e=>{if("element"===e.type){const t=h(s?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||Ro(e)?e.tagDefinition=t:e.tagDefinition=h("")}})(e),(e=>{if("element"===e.type&&(!r||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix&&!Ro(e)||(e.name=g(e.name,(e=>e in Po))),n)){const t=Io[e.name]||Object.create(null);for(const r of e.attrs)r.namespace||(r.name=g(r.name,(r=>e.name in Io&&(r in Io["*"]||r in t))))}})(e),(e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new p(e.sourceSpan.start,e.endSourceSpan.end))})(e)}},D),D}function Uo(e,t,r,n=!0){const{frontMatter:i,content:s}=n?q(e):{frontMatter:null,content:e},o=new Oo(e,t.filepath),a=new No(o,0,0,0),u=a.moveBy(e.length),c={type:"root",sourceSpan:new ko(a,u),children:jo(s,r,t)};if(i){const e=new No(o,0,0,0),t=e.moveBy(i.raw.length);i.sourceSpan=new ko(e,t),c.children.unshift(i)}const l=new Bo(c),p=(n,i)=>{const{offset:s}=i,o=Uo(e.slice(0,s).replace(/[^\n\r]/g," ")+n,t,r,!1);o.sourceSpan=new ko(i,M(o.children).sourceSpan.end);const a=o.children[0];return a.length===s?o.children.shift():(a.sourceSpan=new ko(a.sourceSpan.start.moveBy(s),a.sourceSpan.end),a.value=a.value.slice(s)),o};return l.map((e=>{if("comment"===e.type){const t=$o(e,p);if(t)return t}return e}))}function Vo({recognizeSelfClosing:e=!1,normalizeTagName:t=!1,normalizeAttributeName:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s}={}){return{parse:(o,a,u)=>Uo(o,u,{recognizeSelfClosing:e,normalizeTagName:t,normalizeAttributeName:r,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:i,getTagContentType:s}),hasPragma:Lo,astFormat:"html",locStart:qo,locEnd:Mo}}return{parsers:{html:Vo({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Vo(),vue:Vo({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0,getTagContentType:(e,t,r,n)=>{if("html"!==e.toLowerCase()&&!r&&("template"!==e||n.some((({name:e,value:t})=>"lang"===e&&"html"!==t))))return wo.TagContentType.RAW_TEXT}}),lwc:Vo()}}})); diff --git a/website/static/js/prettier-2.4.1/standalone.js b/website/static/js/prettier-2.4.1/standalone.js new file mode 100644 index 0000000..e30e8e8 --- /dev/null +++ b/website/static/js/prettier-2.4.1/standalone.js @@ -0,0 +1,76 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).prettier=t()}(this,(function(){"use strict";var e={version:"2.4.1"},t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){var t={exports:{}};return e(t,t.exports),t.exports}var i=r((function(e,t){function n(){}function r(e,t,n,r,i){for(var u=0,o=t.length,s=0,a=0;ue.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var f=t[o-1];return o>1&&"string"==typeof f.value&&(f.added||f.removed)&&e.equals("",f.value)&&(t[o-2].value+=f.value,t.pop()),t}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=n.callback;"function"==typeof n&&(u=n,n={}),this.options=n;var o=this;function s(e){return u?(setTimeout((function(){u(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,l=1,p=a+c,f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],t,e,0);if(f[0].newPos+1>=a&&d+1>=c)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var u=void 0,p=f[n-1],d=f[n+1],h=(d?d.newPos:0)-n;p&&(f[n-1]=void 0);var g=p&&p.newPos+1=a&&h+1>=c)return s(r(o,u.components,t,e,o.useLongestToken));f[n]=u}else f[n]=void 0}l++}if(u)!function e(){setTimeout((function(){if(l>p)return u();h()||e()}),0)}();else for(;l<=p;){var g=h();if(g)return g}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,u=n.length,o=e.newPos,s=o-r,a=0;o+1=74)&&(s=k.match(/Chrome\/(\d+)/))&&(a=s[1]);var j=a&&+a,_=!!Object.getOwnPropertySymbols&&!m((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&j&&j<41})),M=_&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,R=M?function(e){return"symbol"==typeof e}:function(e){var t=N("Symbol");return"function"==typeof t&&Object(e)instanceof t},$=function(e,t){try{Object.defineProperty(g,e,{value:t,configurable:!0,writable:!0})}catch(n){g[e]=t}return t},V="__core-js_shared__",W=g[V]||$(V,{}),q=r((function(e){(e.exports=function(e,t){return W[e]||(W[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),U=function(e){return Object(S(e))},z={}.hasOwnProperty,G=Object.hasOwn||function(e,t){return z.call(U(e),t)},H=0,J=Math.random(),X=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++H+J).toString(36)},Y=q("wks"),K=g.Symbol,Q=M?K:K&&K.withoutSetter||X,Z=function(e){return G(Y,e)&&(_||"string"==typeof Y[e])||(_&&G(K,e)?Y[e]=K[e]:Y[e]=Q("Symbol."+e)),Y[e]},ee=Z("toPrimitive"),te=function(e,t){if(!T(e)||R(e))return e;var n,r=e[ee];if(void 0!==r){if(void 0===t&&(t="default"),n=r.call(e,t),!T(n)||R(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!T(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!T(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!T(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},ne=function(e){var t=te(e,"string");return R(t)?t:String(t)},re=g.document,ie=T(re)&&T(re.createElement),ue=!y&&!m((function(){return 7!=Object.defineProperty((e="div",ie?re.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),oe=Object.getOwnPropertyDescriptor,se={f:y?oe:function(e,t){if(e=w(e),t=ne(t),ue)try{return oe(e,t)}catch(e){}if(G(e,t))return b(!C.f.call(e,t),e[t])}},ae=function(e){if(!T(e))throw TypeError(String(e)+" is not an object");return e},ce=Object.defineProperty,le={f:y?ce:function(e,t,n){if(ae(e),t=ne(t),ae(n),ue)try{return ce(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},pe=y?function(e,t,n){return le.f(e,t,b(1,n))}:function(e,t,n){return e[t]=n,e},fe=Function.toString;"function"!=typeof W.inspectSource&&(W.inspectSource=function(e){return fe.call(e)});var de,he,ge,me,ye=W.inspectSource,De=g.WeakMap,Ee="function"==typeof De&&/native code/.test(ye(De)),Ce=q("keys"),be={},Ae="Object already initialized",ve=g.WeakMap;if(Ee||W.state){var Fe=W.state||(W.state=new ve),xe=Fe.get,Se=Fe.has,we=Fe.set;de=function(e,t){if(Se.call(Fe,e))throw new TypeError(Ae);return t.facade=e,we.call(Fe,e,t),t},he=function(e){return xe.call(Fe,e)||{}},ge=function(e){return Se.call(Fe,e)}}else{var Te=Ce[me="state"]||(Ce[me]=X(me));be[Te]=!0,de=function(e,t){if(G(e,Te))throw new TypeError(Ae);return t.facade=e,pe(e,Te,t),t},he=function(e){return G(e,Te)?e[Te]:{}},ge=function(e){return G(e,Te)}}var Be,Ne,ke={set:de,get:he,has:ge,enforce:function(e){return ge(e)?he(e):de(e,{})},getterFor:function(e){return function(t){var n;if(!T(t)||(n=he(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Pe=r((function(e){var t=ke.get,n=ke.enforce,r=String(String).split("String");(e.exports=function(e,t,i,u){var o,s=!!u&&!!u.unsafe,a=!!u&&!!u.enumerable,c=!!u&&!!u.noTargetGet;"function"==typeof i&&("string"!=typeof t||G(i,"name")||pe(i,"name",t),(o=n(i)).source||(o.source=r.join("string"==typeof t?t:""))),e!==g?(s?!c&&e[t]&&(a=!0):delete e[t],a?e[t]=i:pe(e,t,i)):a?e[t]=i:$(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||ye(this)}))})),Oe=Math.ceil,Ie=Math.floor,Le=function(e){return isNaN(e=+e)?0:(e>0?Ie:Oe)(e)},je=Math.min,_e=function(e){return e>0?je(Le(e),9007199254740991):0},Me=Math.max,Re=Math.min,$e=function(e){return function(t,n,r){var i,u=w(t),o=_e(u.length),s=function(e,t){var n=Le(e);return n<0?Me(n+t,0):Re(n,t)}(r,o);if(e&&n!=n){for(;o>s;)if((i=u[s++])!=i)return!0}else for(;o>s;s++)if((e||s in u)&&u[s]===n)return e||s||0;return!e&&-1}},Ve={includes:$e(!0),indexOf:$e(!1)}.indexOf,We=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),qe={f:Object.getOwnPropertyNames||function(e){return function(e,t){var n,r=w(e),i=0,u=[];for(n in r)!G(be,n)&&G(r,n)&&u.push(n);for(;t.length>i;)G(r,n=t[i++])&&(~Ve(u,n)||u.push(n));return u}(e,We)}},Ue={f:Object.getOwnPropertySymbols},ze=N("Reflect","ownKeys")||function(e){var t=qe.f(ae(e)),n=Ue.f;return n?t.concat(n(e)):t},Ge=function(e,t){for(var n=ze(t),r=le.f,i=se.f,u=0;u0;)e[r]=e[--r];r!==u++&&(e[r]=n)}return e},st=function(e,t,n){for(var r=e.length,i=t.length,u=0,o=0,s=[];u3)){if(pt)return!0;if(dt)return dt<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)ht.push({k:t+r,v:n})}for(ht.sort((function(e,t){return t.v-e.v})),r=0;rrt(n)?1:-1}}(e))).length,r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],u=0;function o(){var e={};for(i.push(e);u2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,Ft.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r,i,u=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=t.hunks,a=n.compareLine||function(e,t,n,r){return t===r},c=0,l=n.fuzzFactor||0,p=0,f=0;function d(e,t){for(var n=0;n0?r[0]:" ",o=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!a(t+1,u[t],i,o)&&++c>l)return!1;t++}}return!0}for(var h=0;h0?x[0]:" ",w=x.length>0?x.substr(1):x,T=A.linedelimiters[F];if(" "===S)v++;else if("-"===S)u.splice(v,1),o.splice(v,1);else if("+"===S)u.splice(v,0,w),o.splice(v,0,T),v++;else if("\\"===S){var B=A.lines[F-1]?A.lines[F-1][0]:null;"+"===B?r=!0:"-"===B&&(i=!0)}}}if(r)for(;!u[u.length-1];)u.pop(),o.pop();else i&&(u.push(""),o.push("\n"));for(var N=0;Ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a(p.lines.slice(-o.context)):[],l-=d.length,f-=d.length)}(u=d).push.apply(u,Lt(i.map((function(e){return(t.added?"+":"-")+e})))),t.added?g+=i.length:h+=i.length}else{if(l)if(i.length<=2*o.context&&e=s.length-2&&i.length<=o.context){var C=/\n$/.test(n),b=/\n$/.test(r),A=0==i.length&&d.length>E.oldLines;!C&&A&&n.length>0&&d.splice(E.oldLines,0,"\\ No newline at end of file"),(C||A)&&b||d.push("\\ No newline at end of file")}c.push(E),l=0,f=0,d=[]}h+=i.length,g+=i.length}},y=0;ye.length)return!1;for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n"):r.removed&&t.push(""),t.push(mn(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")};function mn(e){var t=e;return t=(t=(t=(t=t.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")}var yn=Object.defineProperty({convertChangesToXML:gn},"__esModule",{value:!0}),Dn=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Diff",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"diffChars",{enumerable:!0,get:function(){return u.diffChars}}),Object.defineProperty(t,"diffWords",{enumerable:!0,get:function(){return l.diffWords}}),Object.defineProperty(t,"diffWordsWithSpace",{enumerable:!0,get:function(){return l.diffWordsWithSpace}}),Object.defineProperty(t,"diffLines",{enumerable:!0,get:function(){return p.diffLines}}),Object.defineProperty(t,"diffTrimmedLines",{enumerable:!0,get:function(){return p.diffTrimmedLines}}),Object.defineProperty(t,"diffSentences",{enumerable:!0,get:function(){return f.diffSentences}}),Object.defineProperty(t,"diffCss",{enumerable:!0,get:function(){return d.diffCss}}),Object.defineProperty(t,"diffJson",{enumerable:!0,get:function(){return Ct.diffJson}}),Object.defineProperty(t,"canonicalize",{enumerable:!0,get:function(){return Ct.canonicalize}}),Object.defineProperty(t,"diffArrays",{enumerable:!0,get:function(){return bt.diffArrays}}),Object.defineProperty(t,"applyPatch",{enumerable:!0,get:function(){return Nt.applyPatch}}),Object.defineProperty(t,"applyPatches",{enumerable:!0,get:function(){return Nt.applyPatches}}),Object.defineProperty(t,"parsePatch",{enumerable:!0,get:function(){return Ft.parsePatch}}),Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return fn.merge}}),Object.defineProperty(t,"structuredPatch",{enumerable:!0,get:function(){return $t.structuredPatch}}),Object.defineProperty(t,"createTwoFilesPatch",{enumerable:!0,get:function(){return $t.createTwoFilesPatch}}),Object.defineProperty(t,"createPatch",{enumerable:!0,get:function(){return $t.createPatch}}),Object.defineProperty(t,"convertChangesToDMP",{enumerable:!0,get:function(){return hn.convertChangesToDMP}}),Object.defineProperty(t,"convertChangesToXML",{enumerable:!0,get:function(){return yn.convertChangesToXML}});var n=function(e){return e&&e.__esModule?e:{default:e}}(i)}));function En(e){return{type:"concat",parts:e}}function Cn(e){return{type:"indent",contents:e}}function bn(e,t){return{type:"align",contents:t,n:e}}function An(e,t={}){return{type:"group",id:t.id,contents:e,break:Boolean(t.shouldBreak),expandedStates:t.expandedStates}}const vn={type:"break-parent"},Fn={type:"line",hard:!0},xn={type:"line",hard:!0,literal:!0},Sn=En([Fn,vn]),wn=En([xn,vn]);var Tn={concat:En,join:function(e,t){const n=[];for(let r=0;r0){for(let e=0;e"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const Nn=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var kn=Nn,Pn=Nn;kn.default=Pn;const On=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=Bn(e)).length)return 0;e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let t=0;for(let n=0;n=127&&r<=159||(r>=768&&r<=879||(r>65535&&n++,t+=kn(r)?2:1))}return t};var In=On,Ln=On;In.default=Ln;var jn=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var _n=e=>e[e.length-1];function Mn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},u=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Rn=Array.isArray||function(e){return"Array"==v(e)},$n=function(e,t,n){if(nt(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},Vn=function(e,t,n,r,i,u,o,s){for(var a,c=i,l=0,p=!!o&&$n(o,s,3);l0&&Rn(a))c=Vn(e,t,a,_e(a.length),c,u-1)-1;else{if(c>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[c]=a}c++}l++}return c},Wn=Vn,qn=Z("species"),Un=function(e,t){return new(function(e){var t;return Rn(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!Rn(t.prototype)?T(t)&&null===(t=t[qn])&&(t=void 0):t=void 0),void 0===t?Array:t}(e))(0===t?0:t)};tt({target:"Array",proto:!0},{flatMap:function(e){var t,n=U(this),r=_e(n.length);return nt(e),(t=Un(n,0)).length=Wn(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var zn={},Gn=Z("iterator"),Hn=Array.prototype,Jn={};Jn[Z("toStringTag")]="z";var Xn="[object z]"===String(Jn),Yn=Z("toStringTag"),Kn="Arguments"==v(function(){return arguments}()),Qn=Xn?v:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Yn))?n:Kn?v(t):"Object"==(r=v(t))&&"function"==typeof t.callee?"Arguments":r},Zn=Z("iterator"),er=function(e){if(null!=e)return e[Zn]||e["@@iterator"]||zn[Qn(e)]},tr=function(e,t,n){var r,i;ae(e);try{if(void 0===(r=e.return)){if("throw"===t)throw n;return n}r=r.call(e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return ae(r),n},nr=function(e,t){this.stopped=e,this.result=t},rr=function(e,t,n){var r,i,u,o,s,a,c,l,p=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),g=$n(t,p,1+f+h),m=function(e){return r&&tr(r,"normal",e),new nr(!0,e)},y=function(e){return f?(ae(e),h?g(e[0],e[1],m):g(e[0],e[1])):h?g(e,m):g(e)};if(d)r=e;else{if("function"!=typeof(i=er(e)))throw TypeError("Target is not iterable");if(void 0!==(l=i)&&(zn.Array===l||Hn[Gn]===l)){for(u=0,o=_e(e.length);o>u;u++)if((s=y(e[u]))&&s instanceof nr)return s;return new nr(!1)}r=function(e,t){var n=arguments.length<2?er(e):t;if("function"!=typeof n)throw TypeError(String(e)+" is not iterable");return ae(n.call(e))}(e,i)}for(a=r.next;!(c=a.call(r)).done;){try{s=y(c.value)}catch(e){tr(r,"throw",e)}if("object"==typeof s&&s&&s instanceof nr)return s}return new nr(!1)};tt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return rr(e,(function(e,n){!function(e,t,n){var r=ne(t);r in e?le.f(e,r,b(0,n)):e[r]=n}(t,e,n)}),{AS_ENTRIES:!0}),t}});var ir=void 0!==ir?ir:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function ur(){throw new Error("setTimeout has not been defined")}function or(){throw new Error("clearTimeout has not been defined")}var sr=ur,ar=or;function cr(e){if(sr===setTimeout)return setTimeout(e,0);if((sr===ur||!sr)&&setTimeout)return sr=setTimeout,setTimeout(e,0);try{return sr(e,0)}catch(t){try{return sr.call(null,e,0)}catch(t){return sr.call(this,e,0)}}}"function"==typeof ir.setTimeout&&(sr=setTimeout),"function"==typeof ir.clearTimeout&&(ar=clearTimeout);var lr,pr=[],fr=!1,dr=-1;function hr(){fr&&lr&&(fr=!1,lr.length?pr=lr.concat(pr):dr=-1,pr.length&&gr())}function gr(){if(!fr){var e=cr(hr);fr=!0;for(var t=pr.length;t;){for(lr=pr,pr=[];++dr1)for(var n=1;nconsole.error("SEMVER",...e):()=>{};var Nr={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},kr=r((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=Nr,r=(t=e.exports={}).re=[],i=t.src=[],u=t.t={};let o=0;const s=(e,t,n)=>{const s=o++;Br(s,t),u[e]=s,i[s]=t,r[s]=new RegExp(t,n?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION",`(${i[u.NUMERICIDENTIFIER]})\\.(${i[u.NUMERICIDENTIFIER]})\\.(${i[u.NUMERICIDENTIFIER]})`),s("MAINVERSIONLOOSE",`(${i[u.NUMERICIDENTIFIERLOOSE]})\\.(${i[u.NUMERICIDENTIFIERLOOSE]})\\.(${i[u.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASEIDENTIFIER",`(?:${i[u.NUMERICIDENTIFIER]}|${i[u.NONNUMERICIDENTIFIER]})`),s("PRERELEASEIDENTIFIERLOOSE",`(?:${i[u.NUMERICIDENTIFIERLOOSE]}|${i[u.NONNUMERICIDENTIFIER]})`),s("PRERELEASE",`(?:-(${i[u.PRERELEASEIDENTIFIER]}(?:\\.${i[u.PRERELEASEIDENTIFIER]})*))`),s("PRERELEASELOOSE",`(?:-?(${i[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[u.PRERELEASEIDENTIFIERLOOSE]})*))`),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD",`(?:\\+(${i[u.BUILDIDENTIFIER]}(?:\\.${i[u.BUILDIDENTIFIER]})*))`),s("FULLPLAIN",`v?${i[u.MAINVERSION]}${i[u.PRERELEASE]}?${i[u.BUILD]}?`),s("FULL",`^${i[u.FULLPLAIN]}$`),s("LOOSEPLAIN",`[v=\\s]*${i[u.MAINVERSIONLOOSE]}${i[u.PRERELEASELOOSE]}?${i[u.BUILD]}?`),s("LOOSE",`^${i[u.LOOSEPLAIN]}$`),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE",`${i[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),s("XRANGEIDENTIFIER",`${i[u.NUMERICIDENTIFIER]}|x|X|\\*`),s("XRANGEPLAIN",`[v=\\s]*(${i[u.XRANGEIDENTIFIER]})(?:\\.(${i[u.XRANGEIDENTIFIER]})(?:\\.(${i[u.XRANGEIDENTIFIER]})(?:${i[u.PRERELEASE]})?${i[u.BUILD]}?)?)?`),s("XRANGEPLAINLOOSE",`[v=\\s]*(${i[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[u.XRANGEIDENTIFIERLOOSE]})(?:${i[u.PRERELEASELOOSE]})?${i[u.BUILD]}?)?)?`),s("XRANGE",`^${i[u.GTLT]}\\s*${i[u.XRANGEPLAIN]}$`),s("XRANGELOOSE",`^${i[u.GTLT]}\\s*${i[u.XRANGEPLAINLOOSE]}$`),s("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),s("COERCERTL",i[u.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM",`(\\s*)${i[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",s("TILDE",`^${i[u.LONETILDE]}${i[u.XRANGEPLAIN]}$`),s("TILDELOOSE",`^${i[u.LONETILDE]}${i[u.XRANGEPLAINLOOSE]}$`),s("LONECARET","(?:\\^)"),s("CARETTRIM",`(\\s*)${i[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",s("CARET",`^${i[u.LONECARET]}${i[u.XRANGEPLAIN]}$`),s("CARETLOOSE",`^${i[u.LONECARET]}${i[u.XRANGEPLAINLOOSE]}$`),s("COMPARATORLOOSE",`^${i[u.GTLT]}\\s*(${i[u.LOOSEPLAIN]})$|^$`),s("COMPARATOR",`^${i[u.GTLT]}\\s*(${i[u.FULLPLAIN]})$|^$`),s("COMPARATORTRIM",`(\\s*)${i[u.GTLT]}\\s*(${i[u.LOOSEPLAIN]}|${i[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE",`^\\s*(${i[u.XRANGEPLAIN]})\\s+-\\s+(${i[u.XRANGEPLAIN]})\\s*$`),s("HYPHENRANGELOOSE",`^\\s*(${i[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[u.XRANGEPLAINLOOSE]})\\s*$`),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const Pr=["includePrerelease","loose","rtl"];var Or=e=>e?"object"!=typeof e?{loose:!0}:Pr.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const Ir=/^[0-9]+$/,Lr=(e,t)=>{const n=Ir.test(e),r=Ir.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:eLr(t,e)};const{MAX_LENGTH:_r,MAX_SAFE_INTEGER:Mr}=Nr,{re:Rr,t:$r}=kr,{compareIdentifiers:Vr}=jr;class Wr{constructor(e,t){if(t=Or(t),e instanceof Wr){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>_r)throw new TypeError(`version is longer than ${_r} characters`);Br("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Rr[$r.LOOSE]:Rr[$r.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Mr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Mr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Mr||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var qr=Wr;var Ur=(e,t,n)=>new qr(e,n).compare(new qr(t,n));var zr=(e,t,n)=>Ur(e,t,n)<0;var Gr=(e,t,n)=>Ur(e,t,n)>=0,Hr=r((function(e,t){function n(){for(var e=[],t=0;t"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Qr,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:Xr},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Qr,description:Jr` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:Xr},printWidth:{since:"0.0.0",category:Qr,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:Zr,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Jr` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:Yr},rangeStart:{since:"1.4.0",category:Zr,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Jr` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `,cliCategory:Yr},requirePragma:{since:"1.7.0",category:Zr,type:"boolean",default:!1,description:Jr` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `,cliCategory:Kr},tabWidth:{type:"int",category:Qr,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Qr,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Qr,type:"choice",default:[{since:"2.1.0",value:"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."}]}};const ti=["cliName","cliCategory","cliDescription"],ni={compare:Ur,lt:zr,gte:Gr},ri=e.version,ii={CATEGORY_CONFIG:Xr,CATEGORY_EDITOR:Yr,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:Kr,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Qr,CATEGORY_SPECIAL:Zr,options:ei}.options;var ui={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:n=!1,showInternal:r=!1}={}){const i=ri.split("-",1)[0],u=e.flatMap((e=>e.languages||[])).filter(s),o=((e,t)=>Object.entries(e).map((([e,n])=>Object.assign({[t]:e},n))))(Object.assign({},...e.map((({options:e})=>e)),ii),"name").filter((e=>s(e)&&a(e))).sort(((e,t)=>e.name===t.name?0:e.name{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(s).sort(((e,t)=>ni.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>s(e)&&a(e))),"parser"===t.name&&function(e,t,n){const r=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!r.has(t)){r.add(t);const u=n.find((e=>e.parsers&&e.parsers[t]));let o=i.name;u&&u.name&&(o+=` (plugin: ${u.name})`),e.choices.push({value:t,description:o})}}(t,u,e));const n=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:n})}));return{languages:u,options:o};function s(e){return t||!("since"in e)||e.since&&ni.gte(i,e.since)}function a(e){return n||!("deprecated"in e)||e.deprecated&&ni.lt(i,e.deprecated)}}};const{getSupportInfo:oi}=ui,si=/[^\x20-\x7F]/;function ai(e){return(t,n,r)=>{const i=r&&r.backwards;if(!1===n)return!1;const{length:u}=t;let o=n;for(;o>=0&&o(n.match(o.regex)||[]).length?o.quote:u.quote}return s}function Ai(e,t,n){const r='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,u)=>i===r?i:u===t?"\\"+u:u||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function vi(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let n=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");n.length>20&&(n=n.slice(0,19)+"\u2026");return t+(n?" "+n:"")}(e)}var Fi={inferParserByLanguage:function(e,t){const{languages:n}=oi({plugins:t.plugins}),r=n.find((({name:t})=>t.toLowerCase()===e))||n.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||n.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return r&&r.parsers[0]},getStringWidth:function(e){return e?si.test(e)?In(e):e.length:0},getMaxContinuousCount:function(e,t){const n=e.match(new RegExp(`(${jn(t)})+`,"g"));return null===n?0:n.reduce(((e,n)=>Math.max(e,n.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const n=e.match(new RegExp(`(${jn(t)})+`,"g"));if(null===n)return 0;const r=new Map;let i=0;for(const e of n){const n=e.length/t.length;r.set(n,!0),n>i&&(i=n)}for(let e=1;ee[e.length-2],getLast:_n,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Di,getNextNonSpaceNonCommentCharacterIndex:Ei,getNextNonSpaceNonCommentCharacter:function(e,t,n){return e.charAt(Ei(e,t,n))},skip:ai,skipWhitespace:ci,skipSpaces:li,skipToLineEnd:pi,skipEverythingButNewLine:fi,skipInlineComment:di,skipTrailingComment:hi,skipNewline:gi,isNextLineEmptyAfterIndex:yi,isNextLineEmpty:function(e,t,n){return yi(e,n(t))},isPreviousLineEmpty:function(e,t,n){let r=n(t)-1;return r=li(e,r,{backwards:!0}),r=gi(e,r,{backwards:!0}),r=li(e,r,{backwards:!0}),r!==gi(e,r,{backwards:!0})},hasNewline:mi,hasNewlineInRange:function(e,t,n){for(let r=t;r0},createGroupIdMapper:function(e){const t=new WeakMap;return function(n){return t.has(n)||t.set(n,Symbol(e)),t.get(n)}}};var xi={guessEndOfLine:function(e){const t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){let n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);n=/\r\n/g}const r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}};const{literalline:Si,join:wi}=Tn,Ti=e=>Array.isArray(e)||e&&"concat"===e.type,Bi=e=>{if(Array.isArray(e))return e;if("concat"!==e.type&&"fill"!==e.type)throw new Error("Expect doc type to be `concat` or `fill`.");return e.parts},Ni={};function ki(e,t,n,r){const i=[e];for(;i.length>0;){const e=i.pop();if(e!==Ni){if(n&&i.push(e,Ni),!t||!1!==t(e))if(Ti(e)||"fill"===e.type){const t=Bi(e);for(let e=t.length-1;e>=0;--e)i.push(t[e])}else if("if-break"===e.type)e.flatContents&&i.push(e.flatContents),e.breakContents&&i.push(e.breakContents);else if("group"===e.type&&e.expandedStates)if(r)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);else e.contents&&i.push(e.contents)}else n(i.pop())}}function Pi(e,t){const n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);const i=function(e){if(Array.isArray(e))return t(e.map(r));if("concat"===e.type||"fill"===e.type){const n=e.parts.map(r);return t(Object.assign(Object.assign({},e),{},{parts:n}))}if("if-break"===e.type){const n=e.breakContents&&r(e.breakContents),i=e.flatContents&&r(e.flatContents);return t(Object.assign(Object.assign({},e),{},{breakContents:n,flatContents:i}))}if("group"===e.type&&e.expandedStates){const n=e.expandedStates.map(r),i=n[0];return t(Object.assign(Object.assign({},e),{},{contents:i,expandedStates:n}))}if(e.contents){const n=r(e.contents);return t(Object.assign(Object.assign({},e),{},{contents:n}))}return t(e)}(e);return n.set(e,i),i}}function Oi(e,t,n){let r=n,i=!1;return ki(e,(function(e){const n=t(e);if(void 0!==n&&(i=!0,r=n),i)return!1})),r}function Ii(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function Li(e){if(e.length>0){const t=_n(e);t.expandedStates||t.break||(t.break="propagated")}return null}function ji(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}const _i=(e,t)=>e&&"line"===e.type&&e.hard&&t&&"break-parent"===t.type;function Mi(e){if(!e)return e;if(Ti(e)||"fill"===e.type){const t=Bi(e);for(;t.length>1&&_i(...t.slice(-2));)t.length-=2;if(t.length>0){const e=Mi(_n(t));t[t.length-1]=e}return Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}switch(e.type){case"align":case"indent":case"indent-if-break":case"group":case"line-suffix":case"label":{const t=Mi(e.contents);return Object.assign(Object.assign({},e),{},{contents:t})}case"if-break":{const t=Mi(e.breakContents),n=Mi(e.flatContents);return Object.assign(Object.assign({},e),{},{breakContents:t,flatContents:n})}}return e}function Ri(e){return Pi(e,(e=>function(e){switch(e.type){case"fill":if(0===e.parts.length||e.parts.every((e=>""===e)))return"";break;case"group":if(!(e.contents||e.id||e.break||e.expandedStates))return"";if("group"===e.contents.type&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case"align":case"indent":case"indent-if-break":case"line-suffix":if(!e.contents)return"";break;case"if-break":if(!e.flatContents&&!e.breakContents)return""}if(!Ti(e))return e;const t=[];for(const n of Bi(e)){if(!n)continue;const[e,...r]=Ti(n)?Bi(n):[n];"string"==typeof e&&"string"==typeof _n(t)?t[t.length-1]+=e:t.push(e),t.push(...r)}return 0===t.length?"":1===t.length?t[0]:Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}(e)))}function $i(e){const t=[],n=e.filter(Boolean);for(;n.length>0;){const e=n.shift();e&&(Ti(e)?n.unshift(...Bi(e)):t.length>0&&"string"==typeof _n(t)&&"string"==typeof e?t[t.length-1]+=e:t.push(e))}return t}function Vi(e,t=Si){return wi(t,e.split("\n")).parts}var Wi={isConcat:Ti,getDocParts:Bi,willBreak:function(e){return Oi(e,Ii,!1)},traverseDoc:ki,findInDoc:Oi,mapDoc:Pi,propagateBreaks:function(e){const t=new Set,n=[];ki(e,(function(e){if("break-parent"===e.type&&Li(n),"group"===e.type){if(n.push(e),t.has(e))return!1;t.add(e)}}),(function(e){if("group"===e.type){n.pop().break&&Li(n)}}),!0)},removeLines:function(e){return Pi(e,ji)},stripTrailingHardline:function(e){return Mi(Ri(e))},normalizeParts:$i,normalizeDoc:function(e){return Pi(e,(e=>Array.isArray(e)?$i(e):e.parts?Object.assign(Object.assign({},e),{},{parts:$i(e.parts)}):e))},cleanDoc:Ri,replaceTextEndOfLine:Vi,replaceEndOfLine:function(e){return Pi(e,(e=>"string"==typeof e&&e.includes("\n")?Vi(e):e))}};const{getStringWidth:qi,getLast:Ui}=Fi,{convertEndOfLineToChars:zi}=xi,{fill:Gi,cursor:Hi,indent:Ji}=Tn,{isConcat:Xi,getDocParts:Yi}=Wi;let Ki;function Qi(e,t){return eu(e,{type:"indent"},t)}function Zi(e,t,n){if(t===Number.NEGATIVE_INFINITY)return e.root||{value:"",length:0,queue:[]};if(t<0)return eu(e,{type:"dedent"},n);if(!t)return e;if("root"===t.type)return Object.assign(Object.assign({},e),{},{root:e});return eu(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},n)}function eu(e,t,n){const r="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t];let i="",u=0,o=0,s=0;for(const e of r)switch(e.type){case"indent":l(),n.useTabs?a(1):c(n.tabWidth);break;case"stringAlign":l(),i+=e.n,u+=e.n.length;break;case"numberAlign":o+=1,s+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),Object.assign(Object.assign({},e),{},{value:i,length:u,queue:r});function a(e){i+="\t".repeat(e),u+=n.tabWidth*e}function c(e){i+=" ".repeat(e),u+=e}function l(){n.useTabs?function(){o>0&&a(o);f()}():p()}function p(){s>0&&c(s),f()}function f(){o=0,s=0}}function tu(e){if(0===e.length)return 0;let t=0;for(;e.length>0&&"string"==typeof Ui(e)&&/^[\t ]*$/.test(Ui(e));)t+=e.pop().length;if(e.length>0&&"string"==typeof Ui(e)){const n=Ui(e).replace(/[\t ]*$/,"");t+=Ui(e).length-n.length,e[e.length-1]=n}return t}function nu(e,t,n,r,i,u){let o=t.length;const s=[e],a=[];for(;n>=0;){if(0===s.length){if(0===o)return!0;s.push(t[o-1]),o--;continue}const[e,c,l]=s.pop();if("string"==typeof l)a.push(l),n-=qi(l);else if(Xi(l)){const t=Yi(l);for(let n=t.length-1;n>=0;n--)s.push([e,c,t[n]])}else switch(l.type){case"indent":s.push([Qi(e,r),c,l.contents]);break;case"align":s.push([Zi(e,l.n,r),c,l.contents]);break;case"trim":n+=tu(a);break;case"group":{if(u&&l.break)return!1;const t=l.break?1:c;s.push([e,t,l.expandedStates&&1===t?Ui(l.expandedStates):l.contents]),l.id&&(Ki[l.id]=t);break}case"fill":for(let t=l.parts.length-1;t>=0;t--)s.push([e,c,l.parts[t]]);break;case"if-break":case"indent-if-break":{const t=l.groupId?Ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ji(l.contents);t&&s.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ji(l.contents):l.contents;t&&s.push([e,c,t])}break}case"line":switch(c){case 2:if(!l.hard){l.soft||(a.push(" "),n-=1);break}return!0;case 1:return!0}break;case"line-suffix":i=!0;break;case"line-suffix-boundary":if(i)return!1;break;case"label":s.push([e,c,l.contents])}}return!1}var ru={printDocToString:function(e,t){Ki={};const n=t.printWidth,r=zi(t.endOfLine);let i=0;const u=[[{value:"",length:0,queue:[]},1,e]],o=[];let s=!1,a=[];for(;u.length>0;){const[e,c,l]=u.pop();if("string"==typeof l){const e="\n"!==r?l.replace(/\n/g,r):l;o.push(e),i+=qi(e)}else if(Xi(l)){const t=Yi(l);for(let n=t.length-1;n>=0;n--)u.push([e,c,t[n]])}else switch(l.type){case"cursor":o.push(Hi.placeholder);break;case"indent":u.push([Qi(e,t),c,l.contents]);break;case"align":u.push([Zi(e,l.n,t),c,l.contents]);break;case"trim":i-=tu(o);break;case"group":switch(c){case 2:if(!s){u.push([e,l.break?1:2,l.contents]);break}case 1:{s=!1;const r=[e,2,l.contents],o=n-i,c=a.length>0;if(!l.break&&nu(r,u,o,t,c))u.push(r);else if(l.expandedStates){const n=Ui(l.expandedStates);if(l.break){u.push([e,1,n]);break}for(let r=1;r=l.expandedStates.length){u.push([e,1,n]);break}{const n=[e,2,l.expandedStates[r]];if(nu(n,u,o,t,c)){u.push(n);break}}}}else u.push([e,1,l.contents]);break}}l.id&&(Ki[l.id]=Ui(u)[1]);break;case"fill":{const r=n-i,{parts:o}=l;if(0===o.length)break;const[s,p]=o,f=[e,2,s],d=[e,1,s],h=nu(f,[],r,t,a.length>0,!0);if(1===o.length){h?u.push(f):u.push(d);break}const g=[e,2,p],m=[e,1,p];if(2===o.length){h?u.push(g,f):u.push(m,d);break}o.splice(0,2);const y=[e,c,Gi(o)];nu([e,2,[s,p,o[0]]],[],r,t,a.length>0,!0)?u.push(y,g,f):h?u.push(y,m,f):u.push(y,m,d);break}case"if-break":case"indent-if-break":{const t=l.groupId?Ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ji(l.contents);t&&u.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ji(l.contents):l.contents;t&&u.push([e,c,t])}break}case"line-suffix":a.push([e,c,l.contents]);break;case"line-suffix-boundary":a.length>0&&u.push([e,c,{type:"line",hard:!0}]);break;case"line":switch(c){case 2:if(!l.hard){l.soft||(o.push(" "),i+=1);break}s=!0;case 1:if(a.length>0){u.push([e,c,l],...a.reverse()),a=[];break}l.literal?e.root?(o.push(r,e.root.value),i=e.root.length):(o.push(r),i=0):(i-=tu(o),o.push(r+e.value),i=e.length)}break;case"label":u.push([e,c,l.contents])}0===u.length&&a.length>0&&(u.push(...a.reverse()),a=[])}const c=o.indexOf(Hi.placeholder);if(-1!==c){const e=o.indexOf(Hi.placeholder,c+1),t=o.slice(0,c).join(""),n=o.slice(c+1,e).join("");return{formatted:t+n+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:n}}return{formatted:o.join("")}}};const{isConcat:iu,getDocParts:uu}=Wi;function ou(e){if(!e)return"";if(iu(e)){const t=[];for(const n of uu(e))if(iu(n))t.push(...ou(n).parts);else{const e=ou(n);""!==e&&t.push(e)}return{type:"concat",parts:t}}return"if-break"===e.type?Object.assign(Object.assign({},e),{},{breakContents:ou(e.breakContents),flatContents:ou(e.flatContents)}):"group"===e.type?Object.assign(Object.assign({},e),{},{contents:ou(e.contents),expandedStates:e.expandedStates&&e.expandedStates.map(ou)}):"fill"===e.type?{type:"fill",parts:e.parts.map(ou)}:e.contents?Object.assign(Object.assign({},e),{},{contents:ou(e.contents)}):e}var su={builders:Tn,printer:ru,utils:Wi,debug:{printDocToDebug:function(e){const t=Object.create(null),n=new Set;return function e(t,n,i){if("string"==typeof t)return JSON.stringify(t);if(iu(t)){const n=uu(t).map(e).filter(Boolean);return 1===n.length?n[0]:`[${n.join(", ")}]`}if("line"===t.type){const e=Array.isArray(i)&&i[n+1]&&"break-parent"===i[n+1].type;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if("break-parent"===t.type){return Array.isArray(i)&&i[n-1]&&"line"===i[n-1].type&&i[n-1].hard?void 0:"breakParent"}if("trim"===t.type)return"trim";if("indent"===t.type)return"indent("+e(t.contents)+")";if("align"===t.type)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if("if-break"===t.type)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${r(t.groupId)} }`:"")+")";if("indent-if-break"===t.type){const n=[];t.negate&&n.push("negate: true"),t.groupId&&n.push(`groupId: ${r(t.groupId)}`);const i=n.length>0?`, { ${n.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if("group"===t.type){const n=[];t.break&&"propagated"!==t.break&&n.push("shouldBreak: true"),t.id&&n.push(`id: ${r(t.id)}`);const i=n.length>0?`, { ${n.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if("fill"===t.type)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if("line-suffix"===t.type)return"lineSuffix("+e(t.contents)+")";if("line-suffix-boundary"===t.type)return"lineSuffixBoundary";if("label"===t.type)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(ou(e));function r(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];const r=String(e).slice(7,-1)||"symbol";for(let i=0;;i++){const u=r+(i>0?` #${i}`:"");if(!n.has(u))return n.add(u),t[e]=`Symbol.for(${JSON.stringify(u)})`}}}}},au=Object.freeze({__proto__:null,default:{}});function cu(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var lu=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,pu=function(e){return lu.exec(e).slice(1)};function fu(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=cu(bu(e.split("/"),(function(e){return!!e})),!t).join("/"))||"."}function du(e){var t=hu(e),n="/"===Au(e,-1);return(e=cu(bu(e.split("/"),(function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function hu(e){return"/"===e.charAt(0)}function gu(){var e=Array.prototype.slice.call(arguments,0);return du(bu(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))}function mu(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=fu(e).substr(1),t=fu(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),u=Math.min(r.length,i.length),o=u,s=0;s>18&63]+Fu[i>>12&63]+Fu[i>>6&63]+Fu[63&i]);return u.join("")}function Nu(e){var t;wu||Tu();for(var n=e.length,r=n%3,i="",u=[],o=16383,s=0,a=n-r;sa?a:s+o));return 1===r?(t=e[n-1],i+=Fu[t>>2],i+=Fu[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=Fu[t>>10],i+=Fu[t>>4&63],i+=Fu[t<<2&63],i+="="),u.push(i),u.join("")}function ku(e,t,n,r,i){var u,o,s=8*i-r-1,a=(1<>1,l=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,u=d&(1<<-l)-1,d>>=-l,l+=s;l>0;u=256*u+e[t+p],p+=f,l-=8);for(o=u&(1<<-l)-1,u>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=f,l-=8);if(0===u)u=1-c;else{if(u===a)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),u-=c}return(d?-1:1)*o*Math.pow(2,u-r)}function Pu(e,t,n,r,i,u){var o,s,a,c=8*u-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:u-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),(t+=o+p>=1?f/a:f*Math.pow(2,1-p))*a>=2&&(o++,a/=2),o+p>=l?(s=0,o=l):o+p>=1?(s=(t*a-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(o=o<0;e[n+d]=255&o,d+=h,o/=256,c-=8);e[n+d-h]|=128*g}var Ou={}.toString,Iu=Array.isArray||function(e){return"[object Array]"==Ou.call(e)};function Lu(){return _u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ju(e,t){if(Lu()=Lu())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Lu().toString(16)+" bytes");return 0|e}function qu(e){return!(null==e||!e._isBuffer)}function Uu(e,t){if(qu(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Do(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Eo(e).length;default:if(r)return Do(e).length;t=(""+t).toLowerCase(),r=!0}}function zu(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return oo(this,t,n);case"utf8":case"utf-8":return no(this,t,n);case"ascii":return io(this,t,n);case"latin1":case"binary":return uo(this,t,n);case"base64":return to(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return so(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Gu(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Hu(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=_u.from(t,r)),qu(t))return 0===t.length?-1:Ju(e,t,n,r,i);if("number"==typeof t)return t&=255,_u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Ju(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Ju(e,t,n,r,i){var u,o=1,s=e.length,a=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(u=n;us&&(n=s-a),u=n;u>=0;u--){for(var p=!0,f=0;fi&&(r=i):r=i;var u=t.length;if(u%2!=0)throw new TypeError("Invalid hex string");r>u/2&&(r=u/2);for(var o=0;o>8,i=n%256,u.push(i),u.push(r);return u}(t,e.length-n),e,n,r)}function to(e,t,n){return 0===t&&n===e.length?Nu(e):Nu(e.slice(t,n))}function no(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(u=e[i+1]))&&(a=(31&c)<<6|63&u)>127&&(l=a);break;case 3:u=e[i+1],o=e[i+2],128==(192&u)&&128==(192&o)&&(a=(15&c)<<12|(63&u)<<6|63&o)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:u=e[i+1],o=e[i+2],s=e[i+3],128==(192&u)&&128==(192&o)&&128==(192&s)&&(a=(15&c)<<18|(63&u)<<12|(63&o)<<6|63&s)>65535&&a<1114112&&(l=a)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=p}return function(e){var t=e.length;if(t<=ro)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},_u.prototype.compare=function(e,t,n,r,i){if(!qu(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var u=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(u,o),a=this.slice(r,i),c=e.slice(t,n),l=0;li)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var u=!1;;)switch(r){case"hex":return Xu(this,e,t,n);case"utf8":case"utf-8":return Yu(this,e,t,n);case"ascii":return Ku(this,e,t,n);case"latin1":case"binary":return Qu(this,e,t,n);case"base64":return Zu(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return eo(this,e,t,n);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},_u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ro=4096;function io(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",u=t;un)throw new RangeError("Trying to access beyond buffer length")}function co(e,t,n,r,i,u){if(!qu(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function lo(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,u=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function po(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,u=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function fo(e,t,n,r,i,u){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ho(e,t,n,r,i){return i||fo(e,0,n,4),Pu(e,t,n,r,23,4),n+4}function go(e,t,n,r,i){return i||fo(e,0,n,8),Pu(e,t,n,r,52,8),n+8}_u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},_u.prototype.readUInt8=function(e,t){return t||ao(e,1,this.length),this[e]},_u.prototype.readUInt16LE=function(e,t){return t||ao(e,2,this.length),this[e]|this[e+1]<<8},_u.prototype.readUInt16BE=function(e,t){return t||ao(e,2,this.length),this[e]<<8|this[e+1]},_u.prototype.readUInt32LE=function(e,t){return t||ao(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},_u.prototype.readUInt32BE=function(e,t){return t||ao(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},_u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||ao(e,t,this.length);for(var r=this[e],i=1,u=0;++u=(i*=128)&&(r-=Math.pow(2,8*t)),r},_u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||ao(e,t,this.length);for(var r=t,i=1,u=this[e+--r];r>0&&(i*=256);)u+=this[e+--r]*i;return u>=(i*=128)&&(u-=Math.pow(2,8*t)),u},_u.prototype.readInt8=function(e,t){return t||ao(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},_u.prototype.readInt16LE=function(e,t){t||ao(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},_u.prototype.readInt16BE=function(e,t){t||ao(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},_u.prototype.readInt32LE=function(e,t){return t||ao(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},_u.prototype.readInt32BE=function(e,t){return t||ao(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},_u.prototype.readFloatLE=function(e,t){return t||ao(e,4,this.length),ku(this,e,!0,23,4)},_u.prototype.readFloatBE=function(e,t){return t||ao(e,4,this.length),ku(this,e,!1,23,4)},_u.prototype.readDoubleLE=function(e,t){return t||ao(e,8,this.length),ku(this,e,!0,52,8)},_u.prototype.readDoubleBE=function(e,t){return t||ao(e,8,this.length),ku(this,e,!1,52,8)},_u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||co(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,u=0;for(this[t]=255&e;++u=0&&(u*=256);)this[t+i]=e/u&255;return t+n},_u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,1,255,0),_u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},_u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,2,65535,0),_u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):lo(this,e,t,!0),t+2},_u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,2,65535,0),_u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):lo(this,e,t,!1),t+2},_u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,4,4294967295,0),_u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):po(this,e,t,!0),t+4},_u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,4,4294967295,0),_u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},_u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);co(this,e,t,n,i-1,-i)}var u=0,o=1,s=0;for(this[t]=255&e;++u>0)-s&255;return t+n},_u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);co(this,e,t,n,i-1,-i)}var u=n-1,o=1,s=0;for(this[t+u]=255&e;--u>=0&&(o*=256);)e<0&&0===s&&0!==this[t+u+1]&&(s=1),this[t+u]=(e/o>>0)-s&255;return t+n},_u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,1,127,-128),_u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},_u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,2,32767,-32768),_u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):lo(this,e,t,!0),t+2},_u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,2,32767,-32768),_u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):lo(this,e,t,!1),t+2},_u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,4,2147483647,-2147483648),_u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):po(this,e,t,!0),t+4},_u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||co(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),_u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):po(this,e,t,!1),t+4},_u.prototype.writeFloatLE=function(e,t,n){return ho(this,e,t,!0,n)},_u.prototype.writeFloatBE=function(e,t,n){return ho(this,e,t,!1,n)},_u.prototype.writeDoubleLE=function(e,t,n){return go(this,e,t,!0,n)},_u.prototype.writeDoubleBE=function(e,t,n){return go(this,e,t,!1,n)},_u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(u<1e3||!_u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(u=t;u55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&u.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&u.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&u.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;u.push(n)}else if(n<2048){if((t-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function Eo(e){return function(e){var t,n,r,i,u,o;wu||Tu();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");u="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Su(3*s/4-u),r=u>0?s-4:s;var a=0;for(t=0,n=0;t>16&255,o[a++]=i>>8&255,o[a++]=255&i;return 2===u?(i=xu[e.charCodeAt(t)]<<2|xu[e.charCodeAt(t+1)]>>4,o[a++]=255&i):1===u&&(i=xu[e.charCodeAt(t)]<<10|xu[e.charCodeAt(t+1)]<<4|xu[e.charCodeAt(t+2)]>>2,o[a++]=i>>8&255,o[a++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(mo,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Co(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function bo(e){return null!=e&&(!!e._isBuffer||Ao(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Ao(e.slice(0,0))}(e))}function Ao(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var vo=n(au);var Fo=class{constructor(e,t){(t=t||{}).readChunk||(t.readChunk=1024),t.newLineCharacter?t.newLineCharacter=t.newLineCharacter.charCodeAt(0):t.newLineCharacter=10,this.fd="number"==typeof e?e:vo.openSync(e,"r"),this.options=t,this.newLineCharacter=t.newLineCharacter,this.reset()}_searchInBuffer(e,t){let n=-1;for(let r=0;r<=e.length;r++){if(e[r]===t){n=r;break}}return n}reset(){this.eofReached=!1,this.linesCache=[],this.fdPosition=0}close(){vo.closeSync(this.fd),this.fd=null}_extractLines(e){let t;const n=[];let r=0,i=0;for(;;){let u=e[r++];if(u===this.newLineCharacter)t=e.slice(i,r),n.push(t),i=r;else if(void 0===u)break}let u=e.slice(i,r);return u.length&&n.push(u),n}_readChunk(e){let t,n=0;const r=[];do{const e=new _u(this.options.readChunk);t=vo.readSync(this.fd,e,0,this.options.readChunk,this.fdPosition),n+=t,this.fdPosition=this.fdPosition+t,r.push(e)}while(t&&-1===this._searchInBuffer(r[r.length-1],this.options.newLineCharacter));let i=_u.concat(r);return t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oo(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,u=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=u.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}return o}function Io(e){return this instanceof Io?(this.v=e,this):new Io(e)}var Lo=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}No(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ko},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=0;s--)(i=e[s])&&(o=(u<3?i(o):u>3?i(t,n,o):i(t,n))||o);return u>3&&o&&Object.defineProperty(t,n,o),o},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,u){function o(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}a((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof Io?Promise.resolve(n.value.v).then(a,c):l(u[0][2],n)}catch(e){l(u[0][3],e)}var n}function a(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),u.shift(),u.length&&s(u[0][0],u[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Io(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Po(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),jo=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.apiDescriptor={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map((e=>t.apiDescriptor.value(e))).join(", ")}]`;const n=Object.keys(e);return 0===n.length?"{}":`{ ${n.map((n=>`${t.apiDescriptor.key(n)}: ${t.apiDescriptor.value(e[n])}`)).join(", ")} }`},pair:({key:e,value:n})=>t.apiDescriptor.value({[e]:n})}})),_o=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(jo,t)})),Mo=/[|\\{}()[\]^$+*?.]/g,Ro=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Mo,"\\$&")},$o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Vo=r((function(e){var t={};for(var n in $o)$o.hasOwnProperty(n)&&(t[$o[n]]=n);var r=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in r)if(r.hasOwnProperty(i)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);var u=r[i].channels,o=r[i].labels;delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:u}),Object.defineProperty(r[i],"labels",{value:o})}r.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,u=e[2]/255,o=Math.min(r,i,u),s=Math.max(r,i,u),a=s-o;return s===o?t=0:r===s?t=(i-u)/a:i===s?t=2+(u-r)/a:u===s&&(t=4+(r-i)/a),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?a/(s+o):a/(2-s-o)),100*n]},r.rgb.hsv=function(e){var t,n,r,i,u,o=e[0]/255,s=e[1]/255,a=e[2]/255,c=Math.max(o,s,a),l=c-Math.min(o,s,a),p=function(e){return(c-e)/6/l+.5};return 0===l?i=u=0:(u=l/c,t=p(o),n=p(s),r=p(a),o===c?i=r-n:s===c?i=1/3+t-r:a===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*u,100*c]},r.rgb.hwb=function(e){var t=e[0],n=e[1],i=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,i))),100*(i=1-1/255*Math.max(t,Math.max(n,i)))]},r.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},r.rgb.keyword=function(e){var n=t[e];if(n)return n;var r,i,u,o=1/0;for(var s in $o)if($o.hasOwnProperty(s)){var a=$o[s],c=(i=e,u=a,Math.pow(i[0]-u[0],2)+Math.pow(i[1]-u[1],2)+Math.pow(i[2]-u[2],2));c.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],i=t[1],u=t[2];return i/=100,u/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(u=u>.008856?Math.pow(u,1/3):7.787*u+16/116))]},r.hsl.rgb=function(e){var t,n,r,i,u,o=e[0]/360,s=e[1]/100,a=e[2]/100;if(0===s)return[u=255*a,u,u];t=2*a-(n=a<.5?a*(1+s):a+s-a*s),i=[0,0,0];for(var c=0;c<3;c++)(r=o+1/3*-(c-1))<0&&r++,r>1&&r--,u=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*u;return i},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,u=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=u<=1?u:2-u,[t,100*(0===r?2*i/(u+i):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,u=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*u),a=255*r*(1-n*(1-u));switch(r*=255,i){case 0:return[r,a,o];case 1:return[s,r,o];case 2:return[o,r,a];case 3:return[o,s,r];case 4:return[a,o,r];case 5:return[r,o,s]}},r.hsv.hsl=function(e){var t,n,r,i=e[0],u=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-u)*o,n=u*s,[i,100*(n=(n/=(t=(2-u)*s)<=1?t:2-t)||0),100*(r/=2)]},r.hwb.rgb=function(e){var t,n,r,i,u,o,s,a=e[0]/360,c=e[1]/100,l=e[2]/100,p=c+l;switch(p>1&&(c/=p,l/=p),r=6*a-(t=Math.floor(6*a)),0!=(1&t)&&(r=1-r),i=c+r*((n=1-l)-c),t){default:case 6:case 0:u=n,o=i,s=c;break;case 1:u=i,o=n,s=c;break;case 2:u=c,o=n,s=i;break;case 3:u=c,o=i,s=n;break;case 4:u=i,o=c,s=n;break;case 5:u=n,o=c,s=i}return[255*u,255*o,255*s]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},r.xyz.rgb=function(e){var t,n,r,i=e[0]/100,u=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*u+.0415*o,r=.0557*i+-.204*u+1.057*o,t=(t=3.2406*i+-1.5372*u+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var u=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=u>.008856?u:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},r.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],i=e[2],u=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(u=Math.round(u/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===u&&(o+=60),o},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,u=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=u-o;return t=s<=0?0:u===n?(r-i)/s%6:u===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,u=[0,0,0],o=t%1*6,s=o%1,a=1-s;switch(Math.floor(o)){case 0:u[0]=1,u[1]=s,u[2]=0;break;case 1:u[0]=a,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=s;break;case 3:u[0]=0,u[1]=a,u[2]=1;break;case 4:u[0]=s,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=a}return i=(1-n)*r,[255*(n*u[0]+i),255*(n*u[1]+i),255*(n*u[2]+i)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function Wo(e){var t=function(){for(var e={},t=Object.keys(Vo),n=t.length,r=0;r1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var Go,Ho=zo,Jo=r((function(e){const t=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${n+t}m`},n=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${38+t};5;${n}m`},r=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${38+t};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const n=i[t];for(const t of Object.keys(n)){const r=n[t];i[t]={open:`\x1b[${r[0]}m`,close:`\x1b[${r[1]}m`},n[t]=i[t],e.set(r[0],r[1])}Object.defineProperty(i,t,{value:n,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const u=e=>e,o=(e,t,n)=>[e,t,n];i.color.close="\x1b[39m",i.bgColor.close="\x1b[49m",i.color.ansi={ansi:t(u,0)},i.color.ansi256={ansi256:n(u,0)},i.color.ansi16m={rgb:r(o,0)},i.bgColor.ansi={ansi:t(u,10)},i.bgColor.ansi256={ansi256:n(u,10)},i.bgColor.ansi16m={rgb:r(o,10)};for(let e of Object.keys(Ho)){if("object"!=typeof Ho[e])continue;const u=Ho[e];"ansi16"===e&&(e="ansi"),"ansi16"in u&&(i.color.ansi[e]=t(u.ansi16,0),i.bgColor.ansi[e]=t(u.ansi16,10)),"ansi256"in u&&(i.color.ansi256[e]=n(u.ansi256,0),i.bgColor.ansi256[e]=n(u.ansi256,10)),"rgb"in u&&(i.color.ansi16m[e]=r(u.rgb,0),i.bgColor.ansi16m[e]=r(u.rgb,10))}return i}})}));function Xo(){if(void 0===Go){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[1]=2,258===n[0])Go="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");Go="LE"}}return Go}function Yo(){return void 0!==ir.location?ir.location.hostname:""}function Ko(){return[]}function Qo(){return 0}function Zo(){return Number.MAX_VALUE}function es(){return Number.MAX_VALUE}function ts(){return[]}function ns(){return"Browser"}function rs(){return void 0!==ir.navigator?ir.navigator.appVersion:""}function is(){}function us(){}function os(){return"javascript"}function ss(){return"browser"}function as(){return"/tmp"}var cs=as,ls={EOL:"\n",arch:os,platform:ss,tmpdir:cs,tmpDir:as,networkInterfaces:is,getNetworkInterfaces:us,release:rs,type:ns,cpus:ts,totalmem:es,freemem:Zo,uptime:Qo,loadavg:Ko,hostname:Yo,endianness:Xo},ps=(e,t)=>{t=t||Tr.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r=2,has16m:e>=3}}(function(e){if(!1===hs)return 0;if(ps("color=16m")||ps("color=full")||ps("color=truecolor"))return 3;if(ps("color=256"))return 2;if(e&&!e.isTTY&&!0!==hs)return 0;const t=hs?1:0;if("win32"===Tr.platform){const e=fs.release().split(".");return Number(Tr.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in ds)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in ds))||"codeship"===ds.CI_NAME?1:t;if("TEAMCITY_VERSION"in ds)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ds.TEAMCITY_VERSION)?1:0;if("truecolor"===ds.COLORTERM)return 3;if("TERM_PROGRAM"in ds){const e=parseInt((ds.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ds.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ds.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ds.TERM)||"COLORTERM"in ds?1:(ds.TERM,t)}(e))}ps("no-color")||ps("no-colors")||ps("color=false")?hs=!1:(ps("color")||ps("colors")||ps("color=true")||ps("color=always"))&&(hs=!0),"FORCE_COLOR"in ds&&(hs=0===ds.FORCE_COLOR.length||0!==parseInt(ds.FORCE_COLOR,10));var ms={supportsColor:gs,stdout:gs(Tr.stdout),stderr:gs(Tr.stderr)};const ys=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ds=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Es=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Cs=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,bs=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function As(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):bs.get(e)||e}function vs(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r)if(isNaN(t)){if(!(i=t.match(Es)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace(Cs,((e,t,n)=>t?As(t):n)))}else n.push(Number(t));return n}function Fs(e){Ds.lastIndex=0;const t=[];let n;for(;null!==(n=Ds.exec(e));){const e=n[1];if(n[2]){const r=vs(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function xs(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}var Ss=(e,t)=>{const n=[],r=[];let i=[];if(t.replace(ys,((t,u,o,s,a,c)=>{if(u)i.push(As(u));else if(s){const t=i.join("");i=[],r.push(0===n.length?t:xs(e,n)(t)),n.push({inverse:o,styles:Fs(s)})}else if(a){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");r.push(xs(e,n)(i.join(""))),i=[],n.pop()}else i.push(c)})),r.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return r.join("")},ws=r((function(e){const t=ms.stdout,n="win32"===Tr.platform&&!(Tr.env.TERM||"").toLowerCase().startsWith("xterm"),r=["ansi","ansi","ansi256","ansi16m"],i=new Set(["gray"]),u=Object.create(null);function o(e,n){n=n||{};const r=t?t.level:0;e.level=void 0===n.level?r:n.level,e.enabled="enabled"in n?n.enabled:e.level>0}function s(e){if(!this||!(this instanceof s)||this.template){const t={};return o(t,e),t.template=function(){const e=[].slice.call(arguments);return p.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,s.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=s,t.template}o(this,e)}n&&(Jo.blue.open="\x1b[94m");for(const e of Object.keys(Jo))Jo[e].closeRe=new RegExp(Ro(Jo[e].close),"g"),u[e]={get(){const t=Jo[e];return c.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};u.visible={get(){return c.call(this,this._styles||[],!0,"visible")}},Jo.color.closeRe=new RegExp(Ro(Jo.color.close),"g");for(const e of Object.keys(Jo.color.ansi))i.has(e)||(u[e]={get(){const t=this.level;return function(){const n=Jo.color[r[t]][e].apply(null,arguments),i={open:n,close:Jo.color.close,closeRe:Jo.color.closeRe};return c.call(this,this._styles?this._styles.concat(i):[i],this._empty,e)}}});Jo.bgColor.closeRe=new RegExp(Ro(Jo.bgColor.close),"g");for(const e of Object.keys(Jo.bgColor.ansi)){if(i.has(e))continue;u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=Jo.bgColor[r[t]][e].apply(null,arguments),i={open:n,close:Jo.bgColor.close,closeRe:Jo.bgColor.closeRe};return c.call(this,this._styles?this._styles.concat(i):[i],this._empty,e)}}}}const a=Object.defineProperties((()=>{}),u);function c(e,t,n){const r=function(){return l.apply(r,arguments)};r._styles=e,r._empty=t;const i=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=a,r}function l(){const e=arguments,t=e.length;let r=String(arguments[0]);if(0===t)return"";if(t>1)for(let n=1;n{const r=[`${ws.default.yellow("string"==typeof e?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${ws.default.blue("string"==typeof t?n.key(t):n.pair(t))}`),r.join("; ")+"."}},"__esModule",{value:!0}),Bs=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(Ts,t)})),Ns=Object.defineProperty({commonInvalidHandler:(e,t,n)=>[`Invalid ${ws.default.red(n.descriptor.key(e))} value.`,`Expected ${ws.default.blue(n.schemas[e].expected(n))},`,`but received ${ws.default.red(n.descriptor.value(t))}.`].join(" ")},"__esModule",{value:!0}),ks=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(Ns,t)})),Ps=[],Os=[],Is=Object.defineProperty({levenUnknownHandler:(e,t,{descriptor:n,logger:r,schemas:i})=>{const u=[`Ignored unknown option ${ws.default.yellow(n.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find((t=>function(e,t){if(e===t)return 0;var n=e;e.length>t.length&&(e=t,t=n);var r=e.length,i=t.length;if(0===r)return i;if(0===i)return r;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;if(0===r)return i;for(var u,o,s,a,c=0;co?a>o?o+1:a:a>s?s+1:a;return o}(e,t)<3));o&&u.push(`Did you mean ${ws.default.blue(n.key(o))}?`),r.warn(u.join(" "))}},"__esModule",{value:!0}),Ls=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(Is,t)})),js=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(Bs,t),Lo.__exportStar(ks,t),Lo.__exportStar(Ls,t)}));const _s=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Ms(e,t){const n=new e(t),r=Object.create(n);for(const e of _s)e in t&&(r[e]=Ws(t[e],n,$s.prototype[e].length));return r}var Rs=Ms;class $s{constructor(e){this.name=e.name}static create(e){return Ms(this,e)}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return e}}var Vs=$s;function Ws(e,t,n){return"function"==typeof e?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var qs=Object.defineProperty({createSchema:Rs,Schema:Vs},"__esModule",{value:!0});class Us extends qs.Schema{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}}var zs=Us,Gs=Object.defineProperty({AliasSchema:zs},"__esModule",{value:!0});class Hs extends qs.Schema{expected(){return"anything"}validate(){return!0}}var Js=Hs,Xs=Object.defineProperty({AnySchema:Js},"__esModule",{value:!0});class Ys extends qs.Schema{constructor(e){var{valueSchema:t,name:n=t.name}=e,r=Lo.__rest(e,["valueSchema","name"]);super(Object.assign({},r,{name:n})),this._valueSchema=t}expected(e){return`an array of ${this._valueSchema.expected(e)}`}validate(e,t){if(!Array.isArray(e))return!1;const n=[];for(const r of e){const e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);!0!==e&&n.push(e.value)}return 0===n.length||{value:n}}deprecated(e,t){const n=[];for(const r of e){const e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);!1!==e&&n.push(...e.map((({value:e})=>({value:[e]}))))}return n}forward(e,t){const n=[];for(const r of e){const e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(Qs))}return n}redirect(e,t){const n=[],r=[];for(const i of e){const e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in e&&n.push(e.remain),r.push(...e.redirect.map(Qs))}return 0===n.length?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}}var Ks=Ys;function Qs({from:e,to:t}){return{from:[e],to:t}}var Zs=Object.defineProperty({ArraySchema:Ks},"__esModule",{value:!0});class ea extends qs.Schema{expected(){return"true or false"}validate(e){return"boolean"==typeof e}}var ta=ea,na=Object.defineProperty({BooleanSchema:ta},"__esModule",{value:!0});var ra=function(e,t){const n=Object.create(null);for(const r of e){const e=r[t];if(n[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n};var ia=function(e,t){const n=new Map;for(const r of e){const e=r[t];if(n.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n};var ua=function(){const e=Object.create(null);return t=>{const n=JSON.stringify(t);return!!e[n]||(e[n]=!0,!1)}};var oa=function(e,t){const n=[],r=[];for(const i of e)t(i)?n.push(i):r.push(i);return[n,r]};var sa=function(e){return e===Math.floor(e)};var aa=function(e,t){if(e===t)return 0;const n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):"string"!==n?Number(e)-Number(t):e.localeCompare(t)};var ca=function(e){return void 0===e?{}:e};var la=function(e,t){return!0===e||(!1===e?{value:t}:e)};var pa=function(e,t,n=!1){return!1!==e&&(!0===e?!!n||[{value:t}]:"value"in e?[e]:0!==e.length&&e)};function fa(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}var da=fa;function ha(e,t){return void 0===e?[]:Array.isArray(e)?e.map((e=>fa(e,t))):[fa(e,t)]}var ga=ha;var ma=function(e,t){const n=ha("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===n.length?{remain:t,redirect:n}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}},ya=Object.defineProperty({recordFromArray:ra,mapFromArray:ia,createAutoChecklist:ua,partition:oa,isInt:sa,comparePrimitive:aa,normalizeDefaultResult:ca,normalizeValidateResult:la,normalizeDeprecatedResult:pa,normalizeTransferResult:da,normalizeForwardResult:ga,normalizeRedirectResult:ma},"__esModule",{value:!0});class Da extends qs.Schema{constructor(e){super(e),this._choices=ya.mapFromArray(e.choices.map((e=>e&&"object"==typeof e?e:{value:e})),"value")}expected({descriptor:e}){const t=Array.from(this._choices.keys()).map((e=>this._choices.get(e))).filter((e=>!e.deprecated)).map((e=>e.value)).sort(ya.comparePrimitive).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return n.concat(r.join(" or ")).join(", ")}validate(e){return this._choices.has(e)}deprecated(e){const t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){const t=this._choices.get(e);return t?t.forward:void 0}redirect(e){const t=this._choices.get(e);return t?t.redirect:void 0}}var Ea=Da,Ca=Object.defineProperty({ChoiceSchema:Ea},"__esModule",{value:!0});class ba extends qs.Schema{expected(){return"a number"}validate(e,t){return"number"==typeof e}}var Aa=ba,va=Object.defineProperty({NumberSchema:Aa},"__esModule",{value:!0});class Fa extends va.NumberSchema{expected(){return"an integer"}validate(e,t){return!0===t.normalizeValidateResult(super.validate(e,t),e)&&ya.isInt(e)}}var xa=Fa,Sa=Object.defineProperty({IntegerSchema:xa},"__esModule",{value:!0});class wa extends qs.Schema{expected(){return"a string"}validate(e){return"string"==typeof e}}var Ta=wa,Ba=Object.defineProperty({StringSchema:Ta},"__esModule",{value:!0}),Na=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(Gs,t),Lo.__exportStar(Xs,t),Lo.__exportStar(Zs,t),Lo.__exportStar(na,t),Lo.__exportStar(Ca,t),Lo.__exportStar(Sa,t),Lo.__exportStar(va,t),Lo.__exportStar(Ba,t)})),ka=jo.apiDescriptor,Pa=Is.levenUnknownHandler,Oa=ks.commonInvalidHandler,Ia=Ts.commonDeprecatedHandler,La=Object.defineProperty({defaultDescriptor:ka,defaultUnknownHandler:Pa,defaultInvalidHandler:Oa,defaultDeprecatedHandler:Ia},"__esModule",{value:!0});class ja{constructor(e,t){const{logger:n=console,descriptor:r=La.defaultDescriptor,unknown:i=La.defaultUnknownHandler,invalid:u=La.defaultInvalidHandler,deprecated:o=La.defaultDeprecatedHandler}=t||{};this._utils={descriptor:r,logger:n||{warn:()=>{}},schemas:ya.recordFromArray(e,"name"),normalizeDefaultResult:ya.normalizeDefaultResult,normalizeDeprecatedResult:ya.normalizeDeprecatedResult,normalizeForwardResult:ya.normalizeForwardResult,normalizeRedirectResult:ya.normalizeRedirectResult,normalizeValidateResult:ya.normalizeValidateResult},this._unknownHandler=i,this._invalidHandler=u,this._deprecatedHandler=o,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=ya.createAutoChecklist()}normalize(e){const t={},n=[e],r=()=>{for(;0!==n.length;){const e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(const e of Object.keys(this._utils.schemas)){const r=this._utils.schemas[e];if(!(e in t)){const t=ya.normalizeDefaultResult(r.default(this._utils));"value"in t&&n.push({[e]:t.value})}}r();for(const e of Object.keys(this._utils.schemas)){const n=this._utils.schemas[e];e in t&&(t[e]=n.postprocess(t[e],this._utils))}return t}_applyNormalization(e,t){const n=[],[r,i]=ya.partition(Object.keys(e),(e=>e in this._utils.schemas));for(const i of r){const r=this._utils.schemas[i],u=r.preprocess(e[i],this._utils),o=ya.normalizeValidateResult(r.validate(u,this._utils),u);if(!0!==o){const{value:e}=o,t=this._invalidHandler(i,e,this._utils);throw"string"==typeof t?new Error(t):t}const s=({from:e,to:t})=>{n.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},a=({value:e,redirectTo:t})=>{const n=ya.normalizeDeprecatedResult(r.deprecated(e,this._utils),u,!0);if(!1!==n)if(!0===n)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(const{value:e}of n){const n={key:i,value:e};if(!this._hasDeprecationWarned(n)){const r="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}};ya.normalizeForwardResult(r.forward(u,this._utils),u).forEach(s);const c=ya.normalizeRedirectResult(r.redirect(u,this._utils),u);if(c.redirect.forEach(s),"remain"in c){const e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,a({value:e})}for(const{from:e,to:t}of c.redirect)a({value:e,redirectTo:t})}for(const r of i){const i=e[r],u=this._unknownHandler(r,i,this._utils);if(u)for(const e of Object.keys(u)){const r={[e]:u[e]};e in this._utils.schemas?n.push(r):Object.assign(t,r)}}return n}}var _a=ja,Ma=Object.defineProperty({normalize:(e,t,n)=>new ja(t,n).normalize(e),Normalizer:_a},"__esModule",{value:!0}),Ra=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Lo.__exportStar(_o,t),Lo.__exportStar(js,t),Lo.__exportStar(Na,t),Lo.__exportStar(Ma,t),Lo.__exportStar(qs,t)}));const $a=[],Va=[],Wa=(e,t)=>{if(e===t)return 0;const n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let u,o,s,a,c=0;for(;co?a>o?o+1:a:a>s?s+1:a;return o};var qa=Wa,Ua=Wa;qa.default=Ua;var za={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Ga={};for(const e of Object.keys(za))Ga[za[e]]=e;const Ha={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ja=Ha;for(const e of Object.keys(Ha)){if(!("channels"in Ha[e]))throw new Error("missing channels property: "+e);if(!("labels"in Ha[e]))throw new Error("missing channel labels property: "+e);if(Ha[e].labels.length!==Ha[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=Ha[e];delete Ha[e].channels,delete Ha[e].labels,Object.defineProperty(Ha[e],"channels",{value:t}),Object.defineProperty(Ha[e],"labels",{value:n})}function Xa(e){const t=function(){const e={},t=Object.keys(Ja);for(let n=t.length,r=0;r1&&(i-=1)),[360*i,100*u,100*c]},Ha.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=Ha.rgb.hsl(e)[0],u=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*u,100*r]},Ha.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},Ha.rgb.keyword=function(e){const t=Ga[e];if(t)return t;let n,r=1/0;for(const t of Object.keys(za)){const o=(u=za[t],((i=e)[0]-u[0])**2+(i[1]-u[1])**2+(i[2]-u[2])**2);o.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},Ha.rgb.lab=function(e){const t=Ha.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*r-16,500*(n-r),200*(r-i)]},Ha.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,u,o;if(0===n)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;const s=2*r-i,a=[0,0,0];for(let e=0;e<3;e++)u=t+1/3*-(e-1),u<0&&u++,u>1&&u--,o=6*u<1?s+6*(i-s)*u:2*u<1?i:3*u<2?s+(i-s)*(2/3-u)*6:s,a[e]=255*o;return a},Ha.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const u=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=u<=1?u:2-u;return[t,100*(0===r?2*i/(u+i):2*n/(r+n)),100*((r+n)/2)]},Ha.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,u=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*u),a=255*r*(1-n*(1-u));switch(r*=255,i){case 0:return[r,a,o];case 1:return[s,r,o];case 2:return[o,r,a];case 3:return[o,s,r];case 4:return[a,o,r];case 5:return[r,o,s]}},Ha.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let u,o;o=(2-n)*r;const s=(2-n)*i;return u=n*i,u/=s<=1?s:2-s,u=u||0,o/=2,[t,100*u,100*o]},Ha.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let u;i>1&&(n/=i,r/=i);const o=Math.floor(6*t),s=1-r;u=6*t-o,0!=(1&o)&&(u=1-u);const a=n+u*(s-n);let c,l,p;switch(o){default:case 6:case 0:c=s,l=a,p=n;break;case 1:c=a,l=s,p=n;break;case 2:c=n,l=s,p=a;break;case 3:c=n,l=a,p=s;break;case 4:c=a,l=n,p=s;break;case 5:c=s,l=n,p=a}return[255*c,255*l,255*p]},Ha.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},Ha.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,u,o;return i=3.2406*t+-1.5372*n+-.4986*r,u=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,u=u>.0031308?1.055*u**(1/2.4)-.055:12.92*u,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),u=Math.min(Math.max(0,u),1),o=Math.min(Math.max(0,o),1),[255*i,255*u,255*o]},Ha.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},Ha.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const i=n**3,u=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=u>.008856?u:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},Ha.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(n*n+r*r),i]},Ha.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},Ha.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let u=null===t?Ha.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),0===u)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===u&&(o+=60),o},Ha.hsv.ansi16=function(e){return Ha.rgb.ansi16(Ha.hsv.rgb(e),e[2])},Ha.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},Ha.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},Ha.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},Ha.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},Ha.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},Ha.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),u=Math.min(Math.min(t,n),r),o=i-u;let s,a;return s=o<1?u/(1-o):0,a=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,a/=6,a%=1,[360*a,100*o,100*s]},Ha.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},Ha.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},Ha.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],u=t%1*6,o=u%1,s=1-o;let a=0;switch(Math.floor(u)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return a=(1-n)*r,[255*(n*i[0]+a),255*(n*i[1]+a),255*(n*i[2]+a)]},Ha.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},Ha.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},Ha.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},Ha.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},Ha.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Ha.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Ha.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Ha.gray.hsl=function(e){return[0,0,e[0]]},Ha.gray.hsv=Ha.gray.hsl,Ha.gray.hwb=function(e){return[0,100,e[0]]},Ha.gray.cmyk=function(e){return[0,0,0,e[0]]},Ha.gray.lab=function(e){return[e[0],0,0]},Ha.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},Ha.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Qa={};Object.keys(Ja).forEach((e=>{Qa[e]={},Object.defineProperty(Qa[e],"channels",{value:Ja[e].channels}),Object.defineProperty(Qa[e],"labels",{value:Ja[e].labels});const t=function(e){const t=Xa(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i{const r=t[n];Qa[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var Za=Qa,ec=r((function(e){const t=(e,t)=>(...n)=>`\x1b[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`\x1b[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`\x1b[${38+t};2;${r[0]};${r[1]};${r[2]}m`},i=e=>e,u=(e,t,n)=>[e,t,n],o=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let s;const a=(e,t,n,r)=>{void 0===s&&(s=Za);const i=r?10:0,u={};for(const[r,o]of Object.entries(s)){const s="ansi16"===r?"ansi":r;r===t?u[s]=e(n,i):"object"==typeof o&&(u[s]=e(o[t],i))}return u};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.gray=s.color.blackBright,s.bgColor.bgGray=s.bgColor.bgBlackBright,s.color.grey=s.color.blackBright,s.bgColor.bgGrey=s.bgColor.bgBlackBright;for(const[t,n]of Object.entries(s)){for(const[t,r]of Object.entries(n))s[t]={open:`\x1b[${r[0]}m`,close:`\x1b[${r[1]}m`},n[t]=s[t],e.set(r[0],r[1]);Object.defineProperty(s,t,{value:n,enumerable:!1})}return Object.defineProperty(s,"codes",{value:e,enumerable:!1}),s.color.close="\x1b[39m",s.bgColor.close="\x1b[49m",o(s.color,"ansi",(()=>a(t,"ansi16",i,!1))),o(s.color,"ansi256",(()=>a(n,"ansi256",i,!1))),o(s.color,"ansi16m",(()=>a(r,"rgb",u,!1))),o(s.bgColor,"ansi",(()=>a(t,"ansi16",i,!0))),o(s.bgColor,"ansi256",(()=>a(n,"ansi256",i,!0))),o(s.bgColor,"ansi16m",(()=>a(r,"rgb",u,!0))),s}})}));function tc(){return!1}function nc(){throw new Error("tty.ReadStream is not implemented")}function rc(){throw new Error("tty.ReadStream is not implemented")}var ic={isatty:tc,ReadStream:nc,WriteStream:rc},uc=(e,t=Tr.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r=2,has16m:e>=3}}function lc(e,t){if(0===ac)return 0;if(uc("color=16m")||uc("color=full")||uc("color=truecolor"))return 3;if(uc("color=256"))return 2;if(e&&!t&&void 0===ac)return 0;const n=ac||0;if("dumb"===sc.TERM)return n;if("win32"===Tr.platform){const e=fs.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in sc)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in sc))||"codeship"===sc.CI_NAME?1:n;if("TEAMCITY_VERSION"in sc)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(sc.TEAMCITY_VERSION)?1:0;if("truecolor"===sc.COLORTERM)return 3;if("TERM_PROGRAM"in sc){const e=parseInt((sc.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(sc.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(sc.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(sc.TERM)||"COLORTERM"in sc?1:n}uc("no-color")||uc("no-colors")||uc("color=false")||uc("color=never")?ac=0:(uc("color")||uc("colors")||uc("color=true")||uc("color=always"))&&(ac=1),"FORCE_COLOR"in sc&&(ac="true"===sc.FORCE_COLOR?1:"false"===sc.FORCE_COLOR?0:0===sc.FORCE_COLOR.length?1:Math.min(parseInt(sc.FORCE_COLOR,10),3));var pc={supportsColor:function(e){return cc(lc(e,e&&e.isTTY))},stdout:cc(lc(!0,oc.isatty(1))),stderr:cc(lc(!0,oc.isatty(2)))};var fc={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const i=t.length;let u=0,o="";do{o+=e.substr(u,r-u)+t+n,u=r+i,r=e.indexOf(t,u)}while(-1!==r);return o+=e.substr(u),o},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let i=0,u="";do{const o="\r"===e[r-1];u+=e.substr(i,(o?r-1:r)-i)+t+(o?"\r\n":"\n")+n,i=r+1,r=e.indexOf("\n",i)}while(-1!==r);return u+=e.substr(i),u}};const dc=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,hc=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,gc=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,mc=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,yc=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function Dc(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):yc.get(e)||e}function Ec(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r){const r=Number(t);if(Number.isNaN(r)){if(!(i=t.match(gc)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace(mc,((e,t,n)=>t?Dc(t):n)))}else n.push(r)}return n}function Cc(e){hc.lastIndex=0;const t=[];let n;for(;null!==(n=hc.exec(e));){const e=n[1];if(n[2]){const r=Ec(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function bc(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}var Ac=(e,t)=>{const n=[],r=[];let i=[];if(t.replace(dc,((t,u,o,s,a,c)=>{if(u)i.push(Dc(u));else if(s){const t=i.join("");i=[],r.push(0===n.length?t:bc(e,n)(t)),n.push({inverse:o,styles:Cc(s)})}else if(a){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");r.push(bc(e,n)(i.join(""))),i=[],n.pop()}else i.push(c)})),r.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return r.join("")};const{stdout:vc,stderr:Fc}=pc,{stringReplaceAll:xc,stringEncaseCRLFWithFirstIndex:Sc}=fc,{isArray:wc}=Array,Tc=["ansi","ansi","ansi256","ansi16m"],Bc=Object.create(null);class Nc{constructor(e){return kc(e)}}const kc=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=vc?vc.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>Rc(t.template,...e),Object.setPrototypeOf(t,Pc.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Nc,t.template};function Pc(e){return kc(e)}for(const[e,t]of Object.entries(ec))Bc[e]={get(){const n=jc(this,Lc(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};Bc.visible={get(){const e=jc(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Oc=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of Oc)Bc[e]={get(){const{level:t}=this;return function(...n){const r=Lc(ec.color[Tc[t]][e](...n),ec.color.close,this._styler);return jc(this,r,this._isEmpty)}}};for(const e of Oc){Bc["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=Lc(ec.bgColor[Tc[t]][e](...n),ec.bgColor.close,this._styler);return jc(this,r,this._isEmpty)}}}}const Ic=Object.defineProperties((()=>{}),Object.assign(Object.assign({},Bc),{},{level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}})),Lc=(e,t,n)=>{let r,i;return void 0===n?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},jc=(e,t,n)=>{const r=(...e)=>wc(e[0])&&wc(e[0].raw)?_c(r,Rc(r,...e)):_c(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,Ic),r._generator=e,r._styler=t,r._isEmpty=n,r},_c=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:i}=n;if(-1!==t.indexOf("\x1b"))for(;void 0!==n;)t=xc(t,n.close,n.open),n=n.parent;const u=t.indexOf("\n");return-1!==u&&(t=Sc(t,i,r,u)),r+t+i};let Mc;const Rc=(e,...t)=>{const[n]=t;if(!wc(n)||!wc(n.raw))return t.join(" ");const r=t.slice(1),i=[n.raw[0]];for(let e=1;e1===e.length?`-${e}`:`--${e}`,value:e=>Ra.apiDescriptor.value(e),pair:({key:e,value:t})=>!1===t?`--no-${e}`:!0===t?qc.key(e):""===t?`${qc.key(e)} without an argument`:`${qc.key(e)}=${t}`};class Uc extends Ra.ChoiceSchema{constructor({name:e,flags:t}){super({name:e,choices:t}),this._flags=[...t].sort()}preprocess(e,t){if("string"==typeof e&&e.length>0&&!this._flags.includes(e)){const n=this._flags.find((t=>qa(t,e)<3));if(n)return t.logger.warn([`Unknown flag ${Vc.yellow(t.descriptor.value(e))},`,`did you mean ${Vc.blue(t.descriptor.value(n))}?`].join(" ")),n}return e}expected(){return"a flag"}}let zc;function Gc(e,t,{logger:n,isCLI:r=!1,passThrough:i=!1}={}){const u=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{const r=Mn(n.schemas,Wc);return Ra.levenUnknownHandler(e,t,Object.assign(Object.assign({},n),{},{schemas:r}))},o=r?qc:Ra.apiDescriptor,s=function(e,{isCLI:t}){const n=[];t&&n.push(Ra.AnySchema.create({name:"_"}));for(const r of e)n.push(Hc(r,{isCLI:t,optionInfos:e})),r.alias&&t&&n.push(Ra.AliasSchema.create({name:r.alias,sourceName:r.name}));return n}(t,{isCLI:r}),a=new Ra.Normalizer(s,{logger:n,unknown:u,descriptor:o}),c=!1!==n;c&&zc&&(a._hasDeprecationWarned=zc);const l=a.normalize(e);return c&&(zc=a._hasDeprecationWarned),l}function Hc(e,{isCLI:t,optionInfos:n}){let r;const i={name:e.name},u={};switch(e.type){case"int":r=Ra.IntegerSchema,t&&(i.preprocess=e=>Number(e));break;case"string":r=Ra.StringSchema;break;case"choice":r=Ra.ChoiceSchema,i.choices=e.choices.map((t=>"object"==typeof t&&t.redirect?Object.assign(Object.assign({},t),{},{redirect:{to:{key:e.name,value:t.redirect}}}):t));break;case"boolean":r=Ra.BooleanSchema;break;case"flag":r=Uc,i.flags=n.flatMap((e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean)));break;case"path":r=Ra.StringSchema;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(t,n,r)=>e.exception(t)||n.validate(t,r):i.validate=(e,t,n)=>void 0===e||t.validate(e,n),e.redirect&&(u.redirect=t=>t?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(u.deprecated=!0),t&&!e.array){const e=i.preprocess||(e=>e);i.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?_n(t):t),r)}return e.array?Ra.ArraySchema.create(Object.assign(Object.assign(Object.assign({},t?{preprocess:e=>Array.isArray(e)?e:[e]}:{}),u),{},{valueSchema:r.create(i)})):r.create(Object.assign(Object.assign({},i),u))}var Jc={normalizeApiOptions:function(e,t,n){return Gc(e,t,n)},normalizeCliOptions:function(e,t,n){return Gc(e,t,Object.assign({isCLI:!0},n))}};const{isNonEmptyArray:Xc}=Fi;function Yc(e,t){const{ignoreDecorators:n}=t||{};if(!n){const t=e.declaration&&e.declaration.decorators||e.decorators;if(Xc(t))return Yc(t[0])}return e.range?e.range[0]:e.start}function Kc(e){return e.range?e.range[1]:e.end}function Qc(e,t){return Yc(e)===Yc(t)}var Zc={locStart:Yc,locEnd:Kc,hasSameLocStart:Qc,hasSameLoc:function(e,t){return Qc(e,t)&&function(e,t){return Kc(e)===Kc(t)}(e,t)}},el=Object.defineProperty({default:/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,matchToToken:function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},"__esModule",{value:!0}),tl=pl,nl=fl,rl=function(e){let t=!0;for(let n=0;ne)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function pl(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ol.test(String.fromCharCode(e)):ll(e,al)))}function fl(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&sl.test(String.fromCharCode(e)):ll(e,al)||ll(e,cl))))}var dl=Object.defineProperty({isIdentifierStart:tl,isIdentifierChar:nl,isIdentifierName:rl},"__esModule",{value:!0}),hl=Fl,gl=xl,ml=Sl,yl=function(e,t){return xl(e,t)||Sl(e)},Dl=function(e){return bl.has(e)};const El=["implements","interface","let","package","private","protected","public","static","yield"],Cl=["eval","arguments"],bl=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),Al=new Set(El),vl=new Set(Cl);function Fl(e,t){return t&&"await"===e||"enum"===e}function xl(e,t){return Fl(e,t)||Al.has(e)}function Sl(e){return vl.has(e)}var wl=Object.defineProperty({isReservedWord:hl,isStrictReservedWord:gl,isStrictBindOnlyReservedWord:ml,isStrictBindReservedWord:yl,isKeyword:Dl},"__esModule",{value:!0}),Tl=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return dl.isIdentifierName}}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return dl.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return dl.isIdentifierStart}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return wl.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return wl.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return wl.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return wl.isStrictReservedWord}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return wl.isKeyword}})})),Bl=/[|\\{}()[\]^$+*?.]/g,Nl=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Bl,"\\$&")},kl=r((function(e){const t=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${n+t}m`},n=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${38+t};5;${n}m`},r=(e,t)=>function(){const n=e.apply(Ho,arguments);return`\x1b[${38+t};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const n=i[t];for(const t of Object.keys(n)){const r=n[t];i[t]={open:`\x1b[${r[0]}m`,close:`\x1b[${r[1]}m`},n[t]=i[t],e.set(r[0],r[1])}Object.defineProperty(i,t,{value:n,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const u=e=>e,o=(e,t,n)=>[e,t,n];i.color.close="\x1b[39m",i.bgColor.close="\x1b[49m",i.color.ansi={ansi:t(u,0)},i.color.ansi256={ansi256:n(u,0)},i.color.ansi16m={rgb:r(o,0)},i.bgColor.ansi={ansi:t(u,10)},i.bgColor.ansi256={ansi256:n(u,10)},i.bgColor.ansi16m={rgb:r(o,10)};for(let e of Object.keys(Ho)){if("object"!=typeof Ho[e])continue;const u=Ho[e];"ansi16"===e&&(e="ansi"),"ansi16"in u&&(i.color.ansi[e]=t(u.ansi16,0),i.bgColor.ansi[e]=t(u.ansi16,10)),"ansi256"in u&&(i.color.ansi256[e]=n(u.ansi256,0),i.bgColor.ansi256[e]=n(u.ansi256,10)),"rgb"in u&&(i.color.ansi16m[e]=r(u.rgb,0),i.bgColor.ansi16m[e]=r(u.rgb,10))}return i}})})),Pl=(e,t)=>{t=t||Tr.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r=2,has16m:e>=3}}(function(e){if(!1===Il)return 0;if(Pl("color=16m")||Pl("color=full")||Pl("color=truecolor"))return 3;if(Pl("color=256"))return 2;if(e&&!e.isTTY&&!0!==Il)return 0;const t=Il?1:0;if("win32"===Tr.platform){const e=fs.release().split(".");return Number(Tr.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Ol)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in Ol))||"codeship"===Ol.CI_NAME?1:t;if("TEAMCITY_VERSION"in Ol)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ol.TEAMCITY_VERSION)?1:0;if("truecolor"===Ol.COLORTERM)return 3;if("TERM_PROGRAM"in Ol){const e=parseInt((Ol.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ol.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ol.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ol.TERM)||"COLORTERM"in Ol?1:(Ol.TERM,t)}(e))}Pl("no-color")||Pl("no-colors")||Pl("color=false")?Il=!1:(Pl("color")||Pl("colors")||Pl("color=true")||Pl("color=always"))&&(Il=!0),"FORCE_COLOR"in Ol&&(Il=0===Ol.FORCE_COLOR.length||0!==parseInt(Ol.FORCE_COLOR,10));var jl={supportsColor:Ll,stdout:Ll(Tr.stdout),stderr:Ll(Tr.stderr)};const _l=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ml=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Rl=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,$l=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Vl=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function Wl(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):Vl.get(e)||e}function ql(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r)if(isNaN(t)){if(!(i=t.match(Rl)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace($l,((e,t,n)=>t?Wl(t):n)))}else n.push(Number(t));return n}function Ul(e){Ml.lastIndex=0;const t=[];let n;for(;null!==(n=Ml.exec(e));){const e=n[1];if(n[2]){const r=ql(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function zl(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}var Gl=(e,t)=>{const n=[],r=[];let i=[];if(t.replace(_l,((t,u,o,s,a,c)=>{if(u)i.push(Wl(u));else if(s){const t=i.join("");i=[],r.push(0===n.length?t:zl(e,n)(t)),n.push({inverse:o,styles:Ul(s)})}else if(a){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");r.push(zl(e,n)(i.join(""))),i=[],n.pop()}else i.push(c)})),r.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return r.join("")},Hl=r((function(e){const t=jl.stdout,n="win32"===Tr.platform&&!(Tr.env.TERM||"").toLowerCase().startsWith("xterm"),r=["ansi","ansi","ansi256","ansi16m"],i=new Set(["gray"]),u=Object.create(null);function o(e,n){n=n||{};const r=t?t.level:0;e.level=void 0===n.level?r:n.level,e.enabled="enabled"in n?n.enabled:e.level>0}function s(e){if(!this||!(this instanceof s)||this.template){const t={};return o(t,e),t.template=function(){const e=[].slice.call(arguments);return p.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,s.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=s,t.template}o(this,e)}n&&(kl.blue.open="\x1b[94m");for(const e of Object.keys(kl))kl[e].closeRe=new RegExp(Nl(kl[e].close),"g"),u[e]={get(){const t=kl[e];return c.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};u.visible={get(){return c.call(this,this._styles||[],!0,"visible")}},kl.color.closeRe=new RegExp(Nl(kl.color.close),"g");for(const e of Object.keys(kl.color.ansi))i.has(e)||(u[e]={get(){const t=this.level;return function(){const n=kl.color[r[t]][e].apply(null,arguments),i={open:n,close:kl.color.close,closeRe:kl.color.closeRe};return c.call(this,this._styles?this._styles.concat(i):[i],this._empty,e)}}});kl.bgColor.closeRe=new RegExp(Nl(kl.bgColor.close),"g");for(const e of Object.keys(kl.bgColor.ansi)){if(i.has(e))continue;u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=kl.bgColor[r[t]][e].apply(null,arguments),i={open:n,close:kl.bgColor.close,closeRe:kl.bgColor.closeRe};return c.call(this,this._styles?this._styles.concat(i):[i],this._empty,e)}}}}const a=Object.defineProperties((()=>{}),u);function c(e,t,n){const r=function(){return l.apply(r,arguments)};r._styles=e,r._empty=t;const i=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=a,r}function l(){const e=arguments,t=e.length;let r=String(arguments[0]);if(0===t)return"";if(t>1)for(let n=1;nt(e))).join("\n"):i}return n}(function(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}(n),e)}return e};const Kl=new Set(["as","async","from","get","of","set"]);const Ql=/\r\n|[\n\r\u2028\u2029]/,Zl=/^[()[\]{}]$/;let ep;{const e=/^[a-z][\w-]*$/i,t=function(t,n,r){if("name"===t.type){if((0,Tl.isKeyword)(t.value)||(0,Tl.isStrictReservedWord)(t.value,!0)||Kl.has(t.value))return"keyword";if(e.test(t.value)&&("<"===r[n-1]||"r?e(t):t,s=e.split(sp),{start:a,end:c,markerLines:l}=function(e,t,n){const r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:u=2,linesBelow:o=3}=n||{},s=r.line,a=r.column,c=i.line,l=i.column;let p=Math.max(s-(u+1),0),f=Math.min(t.length,c+o);-1===s&&(p=0),-1===c&&(f=t.length);const d=c-s,h={};if(d)for(let e=0;e<=d;e++){const n=e+s;if(a)if(0===e){const e=t[n-1].length;h[n]=[a,e-a+1]}else if(e===d)h[n]=[0,l];else{const r=t[n-e].length;h[n]=[0,r]}else h[n]=!0}else h[s]=a===l?!a||[a,0]:[a,l-a];return{start:p,end:f,markerLines:h}}(t,s,n),p=t.start&&"number"==typeof t.start.column,f=String(c).length;let d=(r?(0,rp.default)(e,n):e).split(sp).slice(a,c).map(((e,t)=>{const r=a+1+t,i=` ${` ${r}`.slice(-f)} |`,s=l[r],c=!l[r+1];if(s){let t="";if(Array.isArray(s)){const r=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g," "),a=s[1]||1;t=["\n ",o(u.gutter,i.replace(/\d/g," "))," ",r,o(u.marker,"^").repeat(a)].join(""),c&&n.message&&(t+=" "+o(u.message,n.message))}return[o(u.marker,">"),o(u.gutter,i),e.length>0?` ${e}`:"",t].join("")}return` ${o(u.gutter,i)}${e.length>0?` ${e}`:""}`})).join("\n");return n.message&&!p&&(d=`${" ".repeat(f+1)}${n.message}\n${d}`),r?i.reset(d):d}var cp=Object.defineProperty({codeFrameColumns:ip,default:up},"__esModule",{value:!0}),lp=n(vu);const{ConfigError:pp}=Bo,{locStart:fp,locEnd:dp}=Zc,hp=Object.getOwnPropertyNames,gp=Object.getOwnPropertyDescriptor;function mp(e){const t={};for(const n of e.plugins)if(n.parsers)for(const e of hp(n.parsers))Object.defineProperty(t,e,gp(n.parsers,e));return t}function yp(e,t=mp(e)){if("function"==typeof e.parser)return{parse:e.parser,astFormat:"estree",locStart:fp,locEnd:dp};if("string"==typeof e.parser){if(Object.prototype.hasOwnProperty.call(t,e.parser))return t[e.parser];throw new pp(`Couldn't resolve parser "${e.parser}". Parsers must be explicitly added to the standalone bundle.`)}}var Dp={parse:function(e,t){const n=mp(t),r=Object.defineProperties({},Object.fromEntries(Object.keys(n).map((e=>[e,{enumerable:!0,get:()=>n[e].parse}])))),i=yp(t,n);try{return i.preprocess&&(e=i.preprocess(e,t)),{text:e,ast:i.parse(e,r,t)}}catch(t){const{loc:n}=t;if(n){const{codeFrameColumns:r}=cp;throw t.codeFrame=r(e,n,{highlightCode:!0}),t.message+="\n"+t.codeFrame,t}throw t.stack}},resolveParser:yp};const{UndefinedParserError:Ep}=Bo,{getSupportInfo:Cp}=ui,{resolveParser:bp}=Dp,Ap={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};function vp(e,t){const n=lp.basename(e).toLowerCase(),r=Cp({plugins:t}).languages.filter((e=>null!==e.since));let i=r.find((e=>e.extensions&&e.extensions.some((e=>n.endsWith(e)))||e.filenames&&e.filenames.some((e=>e.toLowerCase()===n))));if(!i&&!n.includes(".")){const t=function(e){if("string"!=typeof e)return"";let t;try{t=vo.openSync(e,"r")}catch{return""}try{const e=new Fo(t).next().toString("utf8"),n=e.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/);if(n)return n[1];const r=e.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/);return r?r[1]:""}catch{return""}finally{try{vo.closeSync(t)}catch{}}}(e);i=r.find((e=>e.interpreters&&e.interpreters.includes(t)))}return i&&i.parsers[0]}var Fp={normalize:function(e,t={}){const n=Object.assign({},e),r=Cp({plugins:e.plugins,showUnreleased:!0,showDeprecated:!0}).options,i=Object.assign(Object.assign({},Ap),Object.fromEntries(r.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default]))));if(!n.parser)if(n.filepath){if(n.parser=vp(n.filepath,n.plugins),!n.parser)throw new Ep(`No parser could be inferred for file: ${n.filepath}`)}else{(t.logger||console).warn("No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred."),n.parser="babel"}const u=bp(Jc.normalizeApiOptions(n,[r.find((e=>"parser"===e.name))],{passThrough:!0,logger:!1}));n.astFormat=u.astFormat,n.locEnd=u.locEnd,n.locStart=u.locStart;const o=function(e){const{astFormat:t}=e;if(!t)throw new Error("getPlugin() requires astFormat to be set");const n=e.plugins.find((e=>e.printers&&e.printers[t]));if(!n)throw new Error(`Couldn't find plugin for AST format "${t}"`);return n}(n);n.printer=o.printers[n.astFormat];const s=Object.fromEntries(r.filter((e=>e.pluginDefaults&&void 0!==e.pluginDefaults[o.name])).map((e=>[e.name,e.pluginDefaults[o.name]]))),a=Object.assign(Object.assign({},i),s);for(const[e,t]of Object.entries(a))null!==n[e]&&void 0!==n[e]||(n[e]=t);return"json"===n.parser&&(n.trailingComma="none"),Jc.normalizeApiOptions(n,r,Object.assign({passThrough:Object.keys(Ap)},t))},hiddenDefaults:Ap,inferParser:vp};var xp=function e(t,n,r){if(Array.isArray(t))return t.map((t=>e(t,n,r))).filter(Boolean);if(!t||"object"!=typeof t)return t;const i=n.printer.massageAstNode;let u;u=i&&i.ignoredProperties?i.ignoredProperties:new Set;const o={};for(const[r,i]of Object.entries(t))u.has(r)||"function"==typeof i||(o[r]=e(i,n,t));if(i){const e=i(t,o,r);if(null===e)return;if(e)return e}return o},Sp="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};function wp(e,t){var n={seen:[],stylize:Bp};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Op(t)?n.showHidden=t:t&&Up(n,t),jp(n.showHidden)&&(n.showHidden=!1),jp(n.depth)&&(n.depth=2),jp(n.colors)&&(n.colors=!1),jp(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Tp),Np(n,e,n.depth)}function Tp(e,t){var n=wp.styles[t];return n?"\x1b["+wp.colors[n][0]+"m"+e+"\x1b["+wp.colors[n][1]+"m":e}function Bp(e,t){return e}function Np(e,t,n){if(e.customInspect&&t&&Vp(t.inspect)&&t.inspect!==wp&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Lp(r)||(r=Np(e,r,n)),r}var i=function(e,t){if(jp(t))return e.stylize("undefined","undefined");if(Lp(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(Op(t))return e.stylize(""+t,"boolean");if(Ip(t))return e.stylize("null","null")}(e,t);if(i)return i;var u=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(t)),$p(t)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return kp(t);if(0===u.length){if(Vp(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(_p(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Rp(t))return e.stylize(Date.prototype.toString.call(t),"date");if($p(t))return kp(t)}var a,c,l="",p=!1,f=["{","}"];(a=t,Array.isArray(a)&&(p=!0,f=["[","]"]),Vp(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return _p(t)&&(l=" "+RegExp.prototype.toString.call(t)),Rp(t)&&(l=" "+Date.prototype.toUTCString.call(t)),$p(t)&&(l=" "+kp(t)),0!==u.length||p&&0!=t.length?n<0?_p(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=p?function(e,t,n,r,i){for(var u=[],o=0,s=t.length;o60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,l,f)):f[0]+l+f[1]}function kp(e){return"["+Error.prototype.toString.call(e)+"]"}function Pp(e,t,n,r,i,u){var o,s,a;if((a=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=a.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):a.set&&(s=e.stylize("[Setter]","special")),zp(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(a.value)<0?(s=Ip(n)?Np(e,a.value,null):Np(e,a.value,n-1)).indexOf("\n")>-1&&(s=u?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),jp(o)){if(u&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function Op(e){return"boolean"==typeof e}function Ip(e){return null===e}function Lp(e){return"string"==typeof e}function jp(e){return void 0===e}function _p(e){return Mp(e)&&"[object RegExp]"===qp(e)}function Mp(e){return"object"==typeof e&&null!==e}function Rp(e){return Mp(e)&&"[object Date]"===qp(e)}function $p(e){return Mp(e)&&("[object Error]"===qp(e)||e instanceof Error)}function Vp(e){return"function"==typeof e}function Wp(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function qp(e){return Object.prototype.toString.call(e)}function Up(e,t){if(!t||!Mp(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function zp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Gp(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,u=Math.min(n,r);i=0){var o=r.indexOf("\n",u+1);r=r.substring(o+1)}this.stack=r}}}function uf(e,t){return"string"==typeof e?e.length=0;s--)if(a[s]!==c[s])return!1;for(s=a.length-1;s>=0;s--)if(!df(e[o=a[s]],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function hf(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function gf(e,t,n){df(e,t,!1)&&sf(e,t,n,"notDeepEqual",gf)}function mf(e,t,n){df(e,t,!0)&&sf(e,t,n,"notDeepStrictEqual",mf)}function yf(e,t,n){e!==t&&sf(e,t,n,"===",yf)}function Df(e,t,n){e===t&&sf(e,t,n,"!==",Df)}function Ef(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function Cf(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&sf(i,n,"Missing expected exception"+r);var u="string"==typeof r,o=!e&&i&&!n;if((!e&&$p(i)&&u&&Ef(i,n)||o)&&sf(i,n,"Got unwanted exception"+r),e&&i&&n&&!Ef(i,n)||!e&&i)throw i}function bf(e,t,n){Cf(!0,e,t,n)}function Af(e,t,n){Cf(!1,e,t,n)}function vf(e){if(e)throw e}ef.AssertionError=rf,Sp(rf,Error),ef.fail=sf,ef.ok=af,ef.equal=cf,ef.notEqual=lf,ef.deepEqual=pf,ef.deepStrictEqual=ff,ef.notDeepEqual=gf,ef.notDeepStrictEqual=mf,ef.strictEqual=yf,ef.notStrictEqual=Df,ef.throws=bf,ef.doesNotThrow=Af,ef.ifError=vf;var Ff=n(Object.freeze({__proto__:null,default:ef,AssertionError:rf,fail:sf,ok:af,assert:af,equal:cf,notEqual:lf,deepEqual:pf,deepStrictEqual:ff,notDeepEqual:gf,notDeepStrictEqual:mf,strictEqual:yf,notStrictEqual:Df,throws:bf,doesNotThrow:Af,ifError:vf}));const{builders:{line:xf,hardline:Sf,breakParent:wf,indent:Tf,lineSuffix:Bf,join:Nf,cursor:kf}}=su,{hasNewline:Pf,skipNewline:Of,skipSpaces:If,isPreviousLineEmpty:Lf,addLeadingComment:jf,addDanglingComment:_f,addTrailingComment:Mf}=Fi,Rf=new WeakMap;function $f(e,t,n){if(!e)return;const{printer:r,locStart:i,locEnd:u}=t;if(n){if(r.canAttachComment&&r.canAttachComment(e)){let t;for(t=n.length-1;t>=0&&!(i(n[t])<=i(e)&&u(n[t])<=u(e));--t);return void n.splice(t+1,0,e)}}else if(Rf.has(e))return Rf.get(e);const o=r.getCommentChildNodes&&r.getCommentChildNodes(e,t)||"object"==typeof e&&Object.entries(e).filter((([e])=>"enclosingNode"!==e&&"precedingNode"!==e&&"followingNode"!==e&&"tokens"!==e&&"comments"!==e)).map((([,e])=>e));if(o){n||(n=[],Rf.set(e,n));for(const e of o)$f(e,t,n);return n}}function Vf(e,t,n,r){const{locStart:i,locEnd:u}=n,o=i(t),s=u(t),a=$f(e,n);let c,l,p=0,f=a.length;for(;p>1,r=a[e],d=i(r),h=u(r);if(d<=o&&s<=h)return Vf(r,t,n,r);if(h<=o)c=r,p=e+1;else{if(!(s<=d))throw new Error("Comment location overlaps with node location");l=r,f=e}}if(r&&"TemplateLiteral"===r.type){const{quasis:e}=r,i=Jf(e,t,n);c&&Jf(e,c,n)!==i&&(c=null),l&&Jf(e,l,n)!==i&&(l=null)}return{enclosingNode:r,precedingNode:c,followingNode:l}}const Wf=()=>!1;const qf=e=>!/[\S\n\u2028\u2029]/.test(e);function Uf(e,t,n,r){const{comment:i,precedingNode:u}=n[r],{locStart:o,locEnd:s}=t;let a=o(i);if(u)for(let t=r-1;t>=0;t--){const{comment:r,precedingNode:i}=n[t];if(i!==u||!qf(e.slice(s(r),a)))break;a=o(r)}return Pf(e,a,{backwards:!0})}function zf(e,t,n,r){const{comment:i,followingNode:u}=n[r],{locStart:o,locEnd:s}=t;let a=s(i);if(u)for(let t=r+1;t0;--a){const{comment:r,precedingNode:o,followingNode:l}=e[a-1];Ff.strictEqual(o,i),Ff.strictEqual(l,u);const p=t.slice(n.locEnd(r),c);if(!s.test(p))break;c=n.locStart(r)}for(const[t,{comment:n}]of e.entries())t1&&e.comments.sort(((e,t)=>n.locStart(e)-n.locStart(t)));e.length=0}function Hf(e,t){return e.getValue().printed=!0,t.printer.printComment(e,t)}function Jf(e,t,n){const r=n.locStart(t)-1;for(let t=1;t!n.has(e))));const u=r===t.cursorNode;if(0===i.length){const e=u?kf:"";return{leading:e,trailing:e}}const o=[],s=[];return e.each((()=>{const r=e.getValue();if(n&&n.has(r))return;const{leading:i,trailing:u}=r;i?o.push(function(e,t){const n=e.getValue(),r=[Hf(e,t)],{printer:i,originalText:u,locStart:o,locEnd:s}=t;if(i.isBlockComment&&i.isBlockComment(n)){const e=Pf(u,s(n))?Pf(u,o(n),{backwards:!0})?Sf:xf:" ";r.push(e)}else r.push(Sf);const a=Of(u,If(u,s(n)));return!1!==a&&Pf(u,a)&&r.push(Sf),r}(e,t)):u&&s.push(function(e,t){const n=e.getValue(),r=Hf(e,t),{printer:i,originalText:u,locStart:o}=t,s=i.isBlockComment&&i.isBlockComment(n);if(Pf(u,o(n),{backwards:!0})){const e=Lf(u,n,o);return Bf([Sf,e?Sf:"",r])}let a=[" ",r];return s||(a=[Bf(a),wf]),a}(e,t))}),"comments"),u&&(o.unshift(kf),s.push(kf)),{leading:o,trailing:s}}var Yf={attach:function(e,t,n,r){if(!Array.isArray(e))return;const i=[],{locStart:u,locEnd:o,printer:{handleComments:s={}}}=r,{avoidAstMutation:a,ownLine:c=Wf,endOfLine:l=Wf,remaining:p=Wf}=s,f=e.map(((i,u)=>Object.assign(Object.assign({},Vf(t,i,r)),{},{comment:i,text:n,options:r,ast:t,isLastComment:e.length-1===u})));for(const[e,t]of f.entries()){const{comment:n,precedingNode:r,enclosingNode:s,followingNode:d,text:h,options:g,ast:m,isLastComment:y}=t;if("json"===g.parser||"json5"===g.parser||"__js_expression"===g.parser||"__vue_expression"===g.parser){if(u(n)-u(m)<=0){jf(m,n);continue}if(o(n)-o(m)>=0){Mf(m,n);continue}}let D;if(a?D=[t]:(n.enclosingNode=s,n.precedingNode=r,n.followingNode=d,D=[n,h,g,m,y]),Uf(h,g,f,e))n.placement="ownLine",c(...D)||(d?jf(d,n):r?Mf(r,n):_f(s||m,n));else if(zf(h,g,f,e))n.placement="endOfLine",l(...D)||(r?Mf(r,n):d?jf(d,n):_f(s||m,n));else if(n.placement="remaining",p(...D));else if(r&&d){const e=i.length;if(e>0){i[e-1].followingNode!==d&&Gf(i,h,g)}i.push(t)}else r?Mf(r,n):d?jf(d,n):_f(s||m,n)}if(Gf(i,n,r),!a)for(const t of e)delete t.precedingNode,delete t.enclosingNode,delete t.followingNode},printComments:function(e,t,n,r){const{leading:i,trailing:u}=Xf(e,n,r);return i||u?[i,t,u]:t},printCommentsSeparately:Xf,printDanglingComments:function(e,t,n,r){const i=[],u=e.getValue();return u&&u.comments?(e.each((()=>{const n=e.getValue();n.leading||n.trailing||r&&!r(n)||i.push(Hf(e,t))}),"comments"),0===i.length?"":n?Nf(Sf,i):Tf([Sf,Nf(Sf,i)])):""},getSortedChildNodes:$f,ensureAllCommentsPrinted:function(e){if(e)for(const t of e){if(!t.printed)throw new Error('Comment "'+t.value.trim()+'" was not printed. Please report this error!');delete t.printed}}};function Kf(e,t){const n=Qf(e.stack,t);return-1===n?null:e.stack[n]}function Qf(e,t){for(let n=e.length-1;n>=0;n-=2){const r=e[n];if(r&&!Array.isArray(r)&&--t<0)return n}return-1}var Zf=class{constructor(e){this.stack=[e]}getName(){const{stack:e}=this,{length:t}=e;return t>1?e[t-2]:null}getValue(){return _n(this.stack)}getNode(e=0){return Kf(this,e)}getParentNode(e=0){return Kf(this,e+1)}call(e,...t){const{stack:n}=this,{length:r}=n;let i=_n(n);for(const e of t)i=i[e],n.push(e,i);const u=e(this);return n.length=r,u}callParent(e,t=0){const n=Qf(this.stack,t+1),r=this.stack.splice(n+1),i=e(this);return this.stack.push(...r),i}each(e,...t){const{stack:n}=this,{length:r}=n;let i=_n(n);for(const e of t)i=i[e],n.push(e,i);for(let t=0;t{n[r]=e(t,r,i)}),...t),n}try(e){const{stack:t}=this,n=[...t];try{return e()}finally{t.length=0,t.push(...n)}}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(const i of e){if(void 0===r)return!1;let e=null;if("number"==typeof n&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(;r;){let i=null;if("number"==typeof n&&(i=n,n=this.stack[t--],r=this.stack[t--]),null!==n&&e(r,n,i))return r;n=this.stack[t--],r=this.stack[t--]}}};const{utils:{stripTrailingHardline:ed}}=su,{normalize:td}=Fp;var nd={printSubtree:function(e,t,n,r){if(n.printer.embed&&"auto"===n.embeddedLanguageFormatting)return n.printer.embed(e,t,((e,t,i)=>function(e,t,n,r,{stripTrailingHardline:i=!1}={}){const u=td(Object.assign(Object.assign(Object.assign({},n),t),{},{parentParser:n.parser,originalText:e}),{passThrough:!0}),o=Dp.parse(e,u),{ast:s}=o;e=o.text;const a=s.comments;delete s.comments,Yf.attach(a,s,e,u),u[Symbol.for("comments")]=a||[],u[Symbol.for("tokens")]=s.tokens||[];const c=r(s,u);if(Yf.ensureAllCommentsPrinted(a),i)return"string"==typeof c?c.replace(/(?:\r?\n)*$/,""):ed(c);return c}(e,t,n,r,i)),n)}};const{builders:{hardline:rd,addAlignmentToDoc:id},utils:{propagateBreaks:ud}}=su,{printComments:od}=Yf;function sd(e,n,r=0){const{printer:i}=n;i.preprocess&&(e=i.preprocess(e,n));const u=new Map,o=new Zf(e);let s=a();return r>0&&(s=id([rd,s],r,n.tabWidth)),ud(s),s;function a(e,t){return void 0===e||e===o?c(t):Array.isArray(e)?o.call((()=>c(t)),...e):o.call((()=>c(t)),e)}function c(e){const r=o.getValue(),i=r&&"object"==typeof r&&void 0===e;if(i&&u.has(r))return u.get(r);const s=function(e,n,r,i){const u=e.getValue(),{printer:o}=n;let s,a;if(o.hasPrettierIgnore&&o.hasPrettierIgnore(e))({doc:s,printedComments:a}=function(e,t){const{originalText:n,[Symbol.for("comments")]:r,locStart:i,locEnd:u}=t,o=i(e),s=u(e),a=new Set;for(const e of r)i(e)>=o&&u(e)<=s&&(e.printed=!0,a.add(e));return{doc:n.slice(o,s),printedComments:a}}(u,n));else{if(u)try{s=nd.printSubtree(e,r,n,sd)}catch(e){if(t.PRETTIER_DEBUG)throw e}s||(s=o.print(e,n,r,i))}o.willPrintOwnComments&&o.willPrintOwnComments(e,n)||(s=od(e,s,n,a));return s}(o,n,a,e);return i&&u.set(r,s),s}}var ad=sd;function cd(e){let t=e.length-1;for(;;){const n=e[t];if(!n||"Program"!==n.type&&"File"!==n.type)break;t--}return e.slice(0,t+1)}function ld(e,t,n,r,i=[],u){const{locStart:o,locEnd:s}=n,a=o(e),c=s(e);if(!(t>c||tr);const s=e.slice(r,i).search(/\S/),a=-1===s;if(!a)for(r+=s;i>r&&!/\S/.test(e[i-1]);--i);const c=ld(n,r,t,((e,n)=>dd(t,e,n)),[],"rangeStart"),l=a?c:ld(n,i,t,(e=>dd(t,e)),[],"rangeEnd");if(!c||!l)return{rangeStart:0,rangeEnd:0};let p,f;if((({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e)(t)){const e=function(e,t){const n=[e.node,...e.parentNodes],r=new Set([t.node,...t.parentNodes]);return n.find((e=>pd.has(e.type)&&r.has(e)))}(c,l);p=e,f=e}else({startNode:p,endNode:f}=function(e,t,{locStart:n,locEnd:r}){let i=e.node,u=t.node;if(i===u)return{startNode:i,endNode:u};const o=n(e.node);for(const e of cd(t.parentNodes)){if(!(n(e)>=o))break;u=e}const s=r(t.node);for(const t of cd(e.parentNodes)){if(!(r(t)<=s))break;i=t}return{startNode:i,endNode:u}}(c,l,t));return{rangeStart:Math.min(u(p),u(f)),rangeEnd:Math.max(o(p),o(f))}},findNodeAtOffset:ld};const{printer:{printDocToString:gd},debug:{printDocToDebug:md}}=su,{getAlignmentSize:yd}=Fi,{guessEndOfLine:Dd,convertEndOfLineToChars:Ed,countEndOfLineChars:Cd,normalizeEndOfLine:bd}=xi,Ad=Fp.normalize,vd=Symbol("cursor");function Fd(e,t,n){const r=t.comments;return r&&(delete t.comments,Yf.attach(r,t,e,n)),n[Symbol.for("comments")]=r||[],n[Symbol.for("tokens")]=t.tokens||[],n.originalText=e,r}function xd(e,t,n=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};const{ast:r,text:i}=Dp.parse(e,t);if(t.cursorOffset>=0){const e=hd.findNodeAtOffset(r,t.cursorOffset,t);e&&e.node&&(t.cursorNode=e.node)}const u=Fd(i,r,t),o=ad(r,t,n),s=gd(o,t);if(Yf.ensureAllCommentsPrinted(u),n>0){const e=s.formatted.trim();void 0!==s.cursorNodeStart&&(s.cursorNodeStart-=s.formatted.indexOf(e)),s.formatted=e+Ed(t.endOfLine)}if(t.cursorOffset>=0){let e,n,r,o,a;if(t.cursorNode&&s.cursorNodeText?(e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode)),r=t.cursorOffset-e,o=s.cursorNodeStart,a=s.cursorNodeText):(e=0,n=i,r=t.cursorOffset,o=0,a=s.formatted),n===a)return{formatted:s.formatted,cursorOffset:o+r,comments:u};const c=[...n];c.splice(r,0,vd);const l=[...a],p=Dn.diffArrays(c,l);let f=o;for(const e of p)if(e.removed){if(e.value.includes(vd))break}else f+=e.count;return{formatted:s.formatted,cursorOffset:f,comments:u}}return{formatted:s.formatted,cursorOffset:-1,comments:u}}function Sd(e,t,n){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?n:t}function wd(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=Sd(e,n,-1),r=Sd(e,r,0),i=Sd(e,i,e.length),Object.assign(Object.assign({},t),{},{cursorOffset:n,rangeStart:r,rangeEnd:i})}function Td(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:u}=wd(e,t);const o="\ufeff"===e.charAt(0);if(o&&(e=e.slice(1),n--,r--,i--),"auto"===u&&(u=Dd(e)),e.includes("\r")){const t=t=>Cd(e.slice(0,Math.max(t,0)),"\r\n");n-=t(n),r-=t(r),i-=t(i),e=bd(e)}return{hasBOM:o,text:e,options:wd(e,Object.assign(Object.assign({},t),{},{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:u}))}}function Bd(e,t){const n=Dp.resolveParser(t);return!n.hasPragma||n.hasPragma(e)}function Nd(e,t){let n,{hasBOM:r,text:i,options:u}=Td(e,Ad(t));return u.rangeStart>=u.rangeEnd&&""!==i||u.requirePragma&&!Bd(i,u)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(u.rangeStart>0||u.rangeEndi&&t.cursorOffset<=u?t.cursorOffset-i:-1,endOfLine:"lf"}),c),p=l.formatted.trimEnd();let{cursorOffset:f}=t;f>u?f+=p.length-o.length:l.cursorOffset>=0&&(f=l.cursorOffset+i);let d=r.slice(0,i)+p+r.slice(u);if("lf"!==t.endOfLine){const e=Ed(t.endOfLine);f>=0&&"\r\n"===e&&(f+=Cd(d.slice(0,f),"\n")),d=d.replace(/\n/g,e)}return{formatted:d,cursorOffset:f,comments:l.comments}}(i,u):(!u.requirePragma&&u.insertPragma&&u.printer.insertPragma&&!Bd(i,u)&&(i=u.printer.insertPragma(i)),n=xd(i,u)),r&&(n.formatted="\ufeff"+n.formatted,n.cursorOffset>=0&&n.cursorOffset++),n)}var kd={formatWithCursor:Nd,parse(e,t,n){const{text:r,options:i}=Td(e,Ad(t)),u=Dp.parse(r,i);return n&&(u.ast=xp(u.ast,i)),u},formatAST(e,t){t=Ad(t);const n=ad(e,t);return gd(n,t)},formatDoc:(e,t)=>Nd(md(e),Object.assign(Object.assign({},t),{},{parser:"__js_expression"})).formatted,printToDoc(e,t){t=Ad(t);const{ast:n,text:r}=Dp.parse(e,t);return Fd(r,n,t),ad(n,t)},printDocToString:(e,t)=>gd(e,Ad(t))};const{getMaxContinuousCount:Pd,getStringWidth:Od,getAlignmentSize:Id,getIndentSize:Ld,skip:jd,skipWhitespace:_d,skipSpaces:Md,skipNewline:Rd,skipToLineEnd:$d,skipEverythingButNewLine:Vd,skipInlineComment:Wd,skipTrailingComment:qd,hasNewline:Ud,hasNewlineInRange:zd,hasSpaces:Gd,isNextLineEmpty:Hd,isNextLineEmptyAfterIndex:Jd,isPreviousLineEmpty:Xd,getNextNonSpaceNonCommentCharacterIndex:Yd,makeString:Kd,addLeadingComment:Qd,addDanglingComment:Zd,addTrailingComment:eh}=Fi;var th={getMaxContinuousCount:Pd,getStringWidth:Od,getAlignmentSize:Id,getIndentSize:Ld,skip:jd,skipWhitespace:_d,skipSpaces:Md,skipNewline:Rd,skipToLineEnd:$d,skipEverythingButNewLine:Vd,skipInlineComment:Wd,skipTrailingComment:qd,hasNewline:Ud,hasNewlineInRange:zd,hasSpaces:Gd,isNextLineEmpty:Hd,isNextLineEmptyAfterIndex:Jd,isPreviousLineEmpty:Xd,getNextNonSpaceNonCommentCharacterIndex:Yd,makeString:Kd,addLeadingComment:Qd,addDanglingComment:Zd,addTrailingComment:eh};const nh=["languageId"];var rh=function(e,t){const{languageId:n}=e,r=Mn(e,nh);return Object.assign(Object.assign({linguistLanguageId:n},r),t(e))},ih=r((function(e){!function(){function t(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}e.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:t,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=n(t)}while(t);return!1},trailingStatement:n}}()})),uh=r((function(e){!function(){var t,n,r,i,u,o;function s(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),o=0;o<128;++o)i[o]=o>=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(u=new Array(128),o=0;o<128;++o)u[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?u[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?u[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()})),oh=r((function(e){!function(){var t=uh;function n(e,t){return!(!t&&"yield"===e)&&r(e,t)}function r(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function u(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function o(e){var n,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!t.isIdentifierStartES5(i))return!1;for(n=1,r=e.length;n=r)return!1;if(!(56320<=(u=e.charCodeAt(n))&&u<=57343))return!1;i=1024*(i-55296)+(u-56320)+65536}if(!o(i))return!1;o=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:n,isKeywordES6:r,isReservedWordES5:i,isReservedWordES6:u,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:o,isIdentifierNameES6:s,isIdentifierES5:function(e,t){return o(e)&&!i(e,t)},isIdentifierES6:function(e,t){return s(e)&&!u(e,t)}}}()}));const sh=r((function(e,t){t.ast=ih,t.code=uh,t.keyword=oh})).keyword.isIdentifierNameES5,{getLast:ah,hasNewline:ch,skipWhitespace:lh,isNonEmptyArray:ph,isNextLineEmptyAfterIndex:fh,getStringWidth:dh}=Fi,{locStart:hh,locEnd:gh,hasSameLocStart:mh}=Zc,yh=new RegExp("^(?:(?=.)\\s)*:"),Dh=new RegExp("^(?:(?=.)\\s)*::");function Eh(e){return"Block"===e.type||"CommentBlock"===e.type||"MultiLine"===e.type}function Ch(e){return"Line"===e.type||"CommentLine"===e.type||"SingleLine"===e.type||"HashbangComment"===e.type||"HTMLOpen"===e.type||"HTMLClose"===e.type}const bh=new Set(["ExportDefaultDeclaration","ExportDefaultSpecifier","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration"]);function Ah(e){return e&&bh.has(e.type)}function vh(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Fh(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function xh(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}function Sh(e){return Oh(e)&&"Identifier"===e.callee.type&&("async"===e.callee.name||"inject"===e.callee.name||"fakeAsync"===e.callee.name)}function wh(e){return"JSXElement"===e.type||"JSXFragment"===e.type}function Th(e){return"get"===e.kind||"set"===e.kind}function Bh(e){return Th(e)||mh(e,e.value)}const Nh=new Set(["BinaryExpression","LogicalExpression","NGPipeExpression"]);const kh=new Set(["AnyTypeAnnotation","TSAnyKeyword","NullLiteralTypeAnnotation","TSNullKeyword","ThisTypeAnnotation","TSThisType","NumberTypeAnnotation","TSNumberKeyword","VoidTypeAnnotation","TSVoidKeyword","BooleanTypeAnnotation","TSBooleanKeyword","BigIntTypeAnnotation","TSBigIntKeyword","SymbolTypeAnnotation","TSSymbolKeyword","StringTypeAnnotation","TSStringKeyword","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType","EmptyTypeAnnotation","MixedTypeAnnotation","TSNeverKeyword","TSObjectKeyword","TSUndefinedKeyword","TSUnknownKeyword"]);const Ph=/^(?:skip|[fx]?(?:it|describe|test))$/;function Oh(e){return e&&("CallExpression"===e.type||"OptionalCallExpression"===e.type)}function Ih(e){return e&&("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)}function Lh(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function jh(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function _h(e){return e.extra?e.extra.raw:e.raw}const Mh={"==":!0,"!=":!0,"===":!0,"!==":!0},Rh={"*":!0,"/":!0,"%":!0},$h={">>":!0,">>>":!0,"<<":!0};const Vh={};for(const[e,t]of[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].entries())for(const n of t)Vh[n]=e;function Wh(e){return Vh[e]}const qh=new WeakMap;function Uh(e){if(qh.has(e))return qh.get(e);const 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),qh.set(e,t),t}const zh=new WeakMap;function Gh(e){if(zh.has(e))return zh.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),zh.set(e,t),t}function Hh(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function Jh(e){return e&&(e.prettierIgnore||Kh(e,Xh.PrettierIgnore))}const Xh={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Yh=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(n,r,i)=>!(e&Xh.Leading&&!n.leading||e&Xh.Trailing&&!n.trailing||e&Xh.Dangling&&(n.leading||n.trailing)||e&Xh.Block&&!Eh(n)||e&Xh.Line&&!Ch(n)||e&Xh.First&&0!==r||e&Xh.Last&&r!==i.length-1||e&Xh.PrettierIgnore&&!Hh(n)||t&&!t(n))};function Kh(e,t,n){if(!e||!ph(e.comments))return!1;const r=Yh(t,n);return!r||e.comments.some(r)}function Qh(e,t,n){if(!e||!Array.isArray(e.comments))return[];const r=Yh(t,n);return r?e.comments.filter(r):e.comments}function Zh(e){return Oh(e)||"NewExpression"===e.type||"ImportExpression"===e.type}var eg={getFunctionParameters:Uh,iterateFunctionParametersPath:function(e,t){const n=e.getValue();let r=0;const i=e=>t(e,r++);n.this&&e.call(i,"this"),Array.isArray(n.parameters)?e.each(i,"parameters"):Array.isArray(n.params)&&e.each(i,"params"),n.rest&&e.call(i,"rest")},getCallArguments:Gh,iterateCallArgumentsPath:function(e,t){const n=e.getValue();"ImportExpression"===n.type?(e.call((e=>t(e,0)),"source"),n.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")},hasRestParameter:function(e){if(e.rest)return!0;const t=Uh(e);return t.length>0&&"RestElement"===ah(t).type},getLeftSide:function(e){return e.expressions?e.expressions[0]:e.left||e.test||e.callee||e.object||e.tag||e.argument||e.expression},getLeftSidePathName:function(e,t){if(t.expressions)return["expressions",0];if(t.left)return["left"];if(t.test)return["test"];if(t.object)return["object"];if(t.callee)return["callee"];if(t.tag)return["tag"];if(t.argument)return["argument"];if(t.expression)return["expression"];throw new Error("Unexpected node has no left side.")},getParentExportDeclaration:function(e){const t=e.getParentNode();return"declaration"===e.getName()&&Ah(t)?t:null},getTypeScriptMappedTypeModifier:function(e,t){return"+"===e?"+"+t:"-"===e?"-"+t:t},hasFlowAnnotationComment:function(e){return ph(e)&&Eh(e[0])&&Dh.test(e[0].value)},hasFlowShorthandAnnotationComment:function(e){return e.extra&&e.extra.parenthesized&&ph(e.trailingComments)&&Eh(e.trailingComments[0])&&yh.test(e.trailingComments[0].value)},hasLeadingOwnLineComment:function(e,t){return wh(t)?Jh(t):Kh(t,Xh.Leading,(t=>ch(e,gh(t))))},hasNakedLeftSide:function(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||Oh(e)||Ih(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||"TSAsExpression"===e.type||"TSNonNullExpression"===e.type},hasNode:function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t))return t.some((t=>e(t,n)));const r=n(t);return"boolean"==typeof r?r:Object.values(t).some((t=>e(t,n)))},hasIgnoreComment:function(e){return Jh(e.getValue())},hasNodeIgnoreComment:Jh,identity:function(e){return e},isBinaryish:function(e){return Nh.has(e.type)},isBlockComment:Eh,isCallLikeExpression:Zh,isLineComment:Ch,isPrettierIgnoreComment:Hh,isCallExpression:Oh,isMemberExpression:Ih,isExportDeclaration:Ah,isFlowAnnotationComment:function(e,t){const n=hh(t),r=lh(e,gh(t));return!1!==r&&"/*"===e.slice(n,n+2)&&"*/"===e.slice(r,r+2)},isFunctionCompositionArgs:function(e){if(e.length<=1)return!1;let t=0;for(const n of e)if(xh(n)){if(t+=1,t>1)return!0}else if(Oh(n))for(const e of n.arguments)if(xh(e))return!0;return!1},isFunctionNotation:Bh,isFunctionOrArrowExpression:xh,isGetterOrSetter:Th,isJestEachTemplateLiteral:function(e,t){const n=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&n.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&n.test(t.tag.object.object.name))},isJsxNode:wh,isLiteral:function(e){return"BooleanLiteral"===e.type||"DirectiveLiteral"===e.type||"Literal"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"RegExpLiteral"===e.type||"StringLiteral"===e.type||"TemplateLiteral"===e.type||"TSTypeLiteral"===e.type||"JSXText"===e.type},isLongCurriedCallExpression:function(e){const t=e.getValue(),n=e.getParentNode();return Oh(t)&&Oh(n)&&n.callee===t&&t.arguments.length>n.arguments.length&&n.arguments.length>0},isSimpleCallArgument:function e(t,n){if(n>=2)return!1;const r=t=>e(t,n+1),i="Literal"===t.type&&"regex"in t&&t.regex.pattern||"RegExpLiteral"===t.type&&t.pattern;return!(i&&dh(i)>5)&&("Literal"===t.type||"BigIntLiteral"===t.type||"DecimalLiteral"===t.type||"BooleanLiteral"===t.type||"NullLiteral"===t.type||"NumericLiteral"===t.type||"RegExpLiteral"===t.type||"StringLiteral"===t.type||"Identifier"===t.type||"ThisExpression"===t.type||"Super"===t.type||"PrivateName"===t.type||"PrivateIdentifier"===t.type||"ArgumentPlaceholder"===t.type||"Import"===t.type||("TemplateLiteral"===t.type?t.quasis.every((e=>!e.value.raw.includes("\n")))&&t.expressions.every(r):"ObjectExpression"===t.type?t.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value)))):"ArrayExpression"===t.type?t.elements.every((e=>null===e||r(e))):Zh(t)?("ImportExpression"===t.type||e(t.callee,n))&&Gh(t).every(r):Ih(t)?e(t.object,n)&&e(t.property,n):"UnaryExpression"!==t.type||"!"!==t.operator&&"-"!==t.operator?"TSNonNullExpression"===t.type&&e(t.expression,n):e(t.argument,n)))},isMemberish:function(e){return Ih(e)||"BindExpression"===e.type&&Boolean(e.object)},isNumericLiteral:vh,isSignedNumericLiteral:function(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&vh(e.argument)},isObjectProperty:function(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)},isObjectType:function(e){return"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"TSMappedType"===e.type},isObjectTypePropertyAFunction:function(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||Bh(e))},isSimpleType:function(e){return!!e&&(!("GenericTypeAnnotation"!==e.type&&"TSTypeReference"!==e.type||e.typeParameters)||!!kh.has(e.type))},isSimpleNumber:Lh,isSimpleTemplateLiteral:function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");const n=e[t];return 0!==n.length&&n.every((e=>{if(Kh(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if(Ih(e)){let t=e;for(;Ih(t);){if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type)return!1;if(t=t.object,Kh(t))return!1}return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))},isStringLiteral:Fh,isStringPropSafeToUnquote:function(e,t){return"json"!==t.parser&&Fh(e.key)&&_h(e.key).slice(1,-1)===e.key.value&&(sh(e.key.value)&&!(("typescript"===t.parser||"babel-ts"===t.parser)&&"ClassProperty"===e.type)||Lh(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))},isTemplateOnItsOwnLine:function(e,t){return("TemplateLiteral"===e.type&&jh(e)||"TaggedTemplateExpression"===e.type&&jh(e.quasi))&&!ch(t,hh(e),{backwards:!0})},isTestCall:function e(t,n){if("CallExpression"!==t.type)return!1;if(1===t.arguments.length){if(Sh(t)&&n&&e(n))return xh(t.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)&&1===e.arguments.length}(t))return Sh(t.arguments[0])}else if((2===t.arguments.length||3===t.arguments.length)&&("Identifier"===t.callee.type&&Ph.test(t.callee.name)||function(e){return Ih(e.callee)&&"Identifier"===e.callee.object.type&&"Identifier"===e.callee.property.type&&Ph.test(e.callee.object.name)&&("only"===e.callee.property.name||"skip"===e.callee.property.name)}(t))&&(function(e){return"TemplateLiteral"===e.type}(t.arguments[0])||Fh(t.arguments[0])))return!(t.arguments[2]&&!vh(t.arguments[2]))&&((2===t.arguments.length?xh(t.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(t.arguments[1])&&Uh(t.arguments[1]).length<=1)||Sh(t.arguments[1]));return!1},isTheOnlyJsxElementInMarkdown:function(e,t){if("markdown"!==e.parentParser&&"mdx"!==e.parentParser)return!1;const n=t.getNode();if(!n.expression||!wh(n.expression))return!1;const r=t.getParentNode();return"Program"===r.type&&1===r.body.length},isTSXFile:function(e){return e.filepath&&/\.tsx$/i.test(e.filepath)},isTypeAnnotationAFunction:function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||mh(e,e.typeAnnotation))},isNextLineEmpty:(e,{originalText:t})=>fh(t,gh(e)),needsHardlineAfterDanglingComment:function(e){if(!Kh(e))return!1;const t=ah(Qh(e,Xh.Dangling));return t&&!Eh(t)},rawText:_h,shouldPrintComma:function(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)},isBitwiseOperator:function(e){return Boolean($h[e])||"|"===e||"^"===e||"&"===e},shouldFlatten:function(e,t){return Wh(t)===Wh(e)&&("**"!==e&&((!Mh[e]||!Mh[t])&&(!("%"===t&&Rh[e]||"%"===e&&Rh[t])&&((t===e||!Rh[t]||!Rh[e])&&(!$h[e]||!$h[t])))))},startsWithNoLookaheadToken:function e(t,n){switch((t=function(e){for(;e.left;)e=e.left;return e}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return n;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return e(t.object,n);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,n);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,n);case"ConditionalExpression":return e(t.test,n);case"UpdateExpression":return!t.prefix&&e(t.argument,n);case"BindExpression":return t.object&&e(t.object,n);case"SequenceExpression":return e(t.expressions[0],n);case"TSAsExpression":case"TSNonNullExpression":return e(t.expression,n);default:return!1}},getPrecedence:Wh,hasComment:Kh,getComments:Qh,CommentCheckFlags:Xh};const{getStringWidth:tg,getIndentSize:ng}=Fi,{builders:{join:rg,hardline:ig,softline:ug,group:og,indent:sg,align:ag,lineSuffixBoundary:cg,addAlignmentToDoc:lg},printer:{printDocToString:pg},utils:{mapDoc:fg}}=su,{isBinaryish:dg,isJestEachTemplateLiteral:hg,isSimpleTemplateLiteral:gg,hasComment:mg,isMemberExpression:yg}=eg;function Dg(e){return e.replace(/([\\`]|\${)/g,"\\$1")}var Eg={printTemplateLiteral:function(e,t,n){const r=e.getValue();if("TemplateLiteral"===r.type&&hg(r,e.getParentNode())){const r=function(e,t,n){const r=e.getNode(),i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some((e=>e.length>0))){t.__inJestEach=!0;const u=e.map(n,"expressions");t.__inJestEach=!1;const o=[],s=u.map((e=>"${"+pg(e,Object.assign(Object.assign({},t),{},{printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"})).formatted+"}")),a=[{hasLineBreak:!1,cells:[]}];for(let e=1;ee.cells.length))),l=Array.from({length:c}).fill(0),p=[{cells:i},...a.filter((e=>e.cells.length>0))];for(const{cells:e}of p.filter((e=>!e.hasLineBreak)))for(const[t,n]of e.entries())l[t]=Math.max(l[t],tg(n));return o.push(cg,"`",sg([ig,rg(ig,p.map((e=>rg(" | ",e.cells.map(((t,n)=>e.hasLineBreak?t:t+" ".repeat(l[n]-tg(t))))))))]),ig,"`"),o}}(e,n,t);if(r)return r}let i="expressions";"TSTemplateLiteralType"===r.type&&(i="types");const u=[];let o=e.map(t,i);const s=gg(r);return s&&(o=o.map((e=>pg(e,Object.assign(Object.assign({},n),{},{printWidth:Number.POSITIVE_INFINITY})).formatted))),u.push(cg,"`"),e.each((e=>{const a=e.getName();if(u.push(t()),afunction(e,t){const n=e.getValue();let r=t();return mg(n)&&(r=og([sg([ug,r]),ug])),["${",r,cg,"}"]}(e,t)),"expressions")},escapeTemplateCharacters:function(e,t){return fg(e,(e=>"string"==typeof e?t?e.replace(/(\\*)`/g,"$1$1\\`"):Dg(e):e))},uncookTemplateElementValue:Dg};const{builders:{indent:Cg,softline:bg,literalline:Ag,dedentToRoot:vg}}=su,{escapeTemplateCharacters:Fg}=Eg;var xg=function(e,t,n){let r=e.getValue().quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g,((e,t)=>"\\".repeat(t.length/2)+"`"));const i=function(e){const t=e.match(/^([^\S\n]*)\S/m);return null===t?"":t[1]}(r),u=""!==i;u&&(r=r.replace(new RegExp(`^${i}`,"gm"),""));const o=Fg(n(r,{parser:"markdown",__inJsTemplate:!0},{stripTrailingHardline:!0}),!0);return["`",u?Cg([bg,o]):[Ag,vg(o)],bg,"`"]};const{isNonEmptyArray:Sg}=Fi,{builders:{indent:wg,hardline:Tg,softline:Bg},utils:{mapDoc:Ng,replaceEndOfLine:kg,cleanDoc:Pg}}=su,{printTemplateExpressions:Og}=Eg;var Ig=function(e,t,n){const r=e.getValue(),i=r.quasis.map((e=>e.value.raw));let u=0;return function(e,t,n){if(1===t.quasis.length&&!t.quasis[0].value.raw.trim())return"``";const r=function(e,t){if(!Sg(t))return e;let n=0;const r=Ng(Pg(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,r)=>r%2==0?kg(e):(n++,t[e]))):e));return t.length===n?r:null}(e,n);if(!r)throw new Error("Couldn't insert all the expressions");return["`",wg([Tg,r]),Bg,"`"]}(n(i.reduce(((e,t,n)=>0===n?t:e+"@prettier-placeholder-"+u+++"-id"+t),""),{parser:"scss"},{stripTrailingHardline:!0}),r,Og(e,t))};const{builders:{indent:Lg,join:jg,hardline:_g}}=su,{escapeTemplateCharacters:Mg,printTemplateExpressions:Rg}=Eg;function $g(e){const t=[];let n=!1;const r=e.map((e=>e.trim()));for(const[e,i]of r.entries())""!==i&&(""===r[e-1]&&n?t.push([_g,i]):t.push(i),n=!0);return 0===t.length?null:jg(_g,t)}var Vg=function(e,t,n){const r=e.getValue(),i=r.quasis.length;if(1===i&&""===r.quasis[0].value.raw.trim())return"``";const u=Rg(e,t),o=[];for(let e=0;e2&&""===c[0].trim()&&""===c[1].trim(),d=l>2&&""===c[l-1].trim()&&""===c[l-2].trim(),h=c.every((e=>/^\s*(?:#[^\n\r]*)?$/.test(e)));if(!s&&/#[^\n\r]*$/.test(c[l-1]))return null;let g=null;g=h?$g(c):n(a,{parser:"graphql"},{stripTrailingHardline:!0}),g?(g=Mg(g,!1),!t&&f&&o.push(""),o.push(g),!s&&d&&o.push("")):t||s||!f||o.push(""),p&&o.push(p)}return["`",Lg([_g,jg(_g,o)]),_g,"`"]};const{builders:{indent:Wg,line:qg,hardline:Ug,group:zg},utils:{mapDoc:Gg}}=su,{printTemplateExpressions:Hg,uncookTemplateElementValue:Jg}=Eg;let Xg=0;var Yg=function(e,t,n,r,{parser:i}){const u=e.getValue(),o=Xg;Xg=Xg+1>>>0;const s=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${o}_IN_JS`,a=u.quasis.map(((e,t,n)=>t===n.length-1?e.value.cooked:e.value.cooked+s(t))).join(""),c=Hg(e,t);if(0===c.length&&0===a.trim().length)return"``";const l=new RegExp(s("(\\d+)"),"g");let p=0;const f=n(a,{parser:i,__onHtmlRoot(e){p=e.children.length}},{stripTrailingHardline:!0}),d=Gg(f,(e=>{if("string"!=typeof e)return e;const t=[],n=e.split(l);for(let e=0;e1?Wg(zg(d)):zg(d),g,"`"])};const{hasComment:Kg,CommentCheckFlags:Qg,isObjectProperty:Zg}=eg;function em(e){return function(e){const t=e.getValue(),n=e.getParentNode(),r=e.getParentNode(1);return r&&t.quasis&&"JSXExpressionContainer"===n.type&&"JSXElement"===r.type&&"style"===r.openingElement.name.name&&r.openingElement.attributes.some((e=>"jsx"===e.name.name))||n&&"TaggedTemplateExpression"===n.type&&"Identifier"===n.tag.type&&"css"===n.tag.name||n&&"TaggedTemplateExpression"===n.type&&"MemberExpression"===n.tag.type&&"css"===n.tag.object.name&&("global"===n.tag.property.name||"resolve"===n.tag.property.name)}(e)||function(e){const t=e.getParentNode();if(!t||"TaggedTemplateExpression"!==t.type)return!1;const n="ParenthesizedExpression"===t.tag.type?t.tag.expression:t.tag;switch(n.type){case"MemberExpression":return nm(n.object)||rm(n);case"CallExpression":return nm(n.callee)||"MemberExpression"===n.callee.type&&("MemberExpression"===n.callee.object.type&&(nm(n.callee.object.object)||rm(n.callee.object))||"CallExpression"===n.callee.object.type&&nm(n.callee.object.callee));case"Identifier":return"css"===n.name;default:return!1}}(e)||function(e){const t=e.getParentNode(),n=e.getParentNode(1);return n&&"JSXExpressionContainer"===t.type&&"JSXAttribute"===n.type&&"JSXIdentifier"===n.name.type&&"css"===n.name.name}(e)||function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"ArrayExpression"===e.type&&"elements"===t),((e,t)=>Zg(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...tm)}(e)?"css":function(e){const t=e.getValue(),n=e.getParentNode();return im(t,"GraphQL")||n&&("TaggedTemplateExpression"===n.type&&("MemberExpression"===n.tag.type&&"graphql"===n.tag.object.name&&"experimental"===n.tag.property.name||"Identifier"===n.tag.type&&("gql"===n.tag.name||"graphql"===n.tag.name))||"CallExpression"===n.type&&"Identifier"===n.callee.type&&"graphql"===n.callee.name)}(e)?"graphql":function(e){return im(e.getValue(),"HTML")||e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"TaggedTemplateExpression"===e.type&&"Identifier"===e.tag.type&&"html"===e.tag.name&&"quasi"===t))}(e)?"html":function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>Zg(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...tm)}(e)?"angular":function(e){const t=e.getValue(),n=e.getParentNode();return n&&"TaggedTemplateExpression"===n.type&&1===t.quasis.length&&"Identifier"===n.tag.type&&("md"===n.tag.name||"markdown"===n.tag.name)}(e)?"markdown":void 0}const tm=[(e,t)=>"ObjectExpression"===e.type&&"properties"===t,(e,t)=>"CallExpression"===e.type&&"Identifier"===e.callee.type&&"Component"===e.callee.name&&"arguments"===t,(e,t)=>"Decorator"===e.type&&"expression"===t];function nm(e){return"Identifier"===e.type&&"styled"===e.name}function rm(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}function im(e,t){return Kg(e,Qg.Block|Qg.Leading,(({value:e})=>e===` ${t} `))}var um=function(e,t,n,r){const i=e.getValue();if("TemplateLiteral"!==i.type||function({quasis:e}){return e.some((({value:{cooked:e}})=>null===e))}(i))return;const u=em(e);return u?"markdown"===u?xg(e,t,n):"css"===u?Ig(e,t,n):"graphql"===u?Vg(e,t,n):"html"===u||"angular"===u?Yg(e,t,n,r,{parser:u}):void 0:void 0};const{isBlockComment:om}=eg,sm=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),am=e=>{for(const t of e.quasis)delete t.value};function cm(e,t,n){if("Program"===e.type&&delete t.sourceType,"BigIntLiteral"!==e.type&&"BigIntLiteralTypeAnnotation"!==e.type||t.value&&(t.value=t.value.toLowerCase()),"BigIntLiteral"!==e.type&&"Literal"!==e.type||t.bigint&&(t.bigint=t.bigint.toLowerCase()),"DecimalLiteral"===e.type&&(t.value=Number(t.value)),"Literal"===e.type&&t.decimal&&(t.decimal=Number(t.decimal)),"EmptyStatement"===e.type)return null;if("JSXText"===e.type)return null;if("JSXExpressionContainer"===e.type&&("Literal"===e.expression.type||"StringLiteral"===e.expression.type)&&" "===e.expression.value)return null;if("Property"!==e.type&&"ObjectProperty"!==e.type&&"MethodDefinition"!==e.type&&"ClassProperty"!==e.type&&"ClassMethod"!==e.type&&"PropertyDefinition"!==e.type&&"TSDeclareMethod"!==e.type&&"TSPropertySignature"!==e.type&&"ObjectTypeProperty"!==e.type||"object"!=typeof e.key||!e.key||"Literal"!==e.key.type&&"NumericLiteral"!==e.key.type&&"StringLiteral"!==e.key.type&&"Identifier"!==e.key.type||delete t.key,"JSXElement"===e.type&&"style"===e.openingElement.name.name&&e.openingElement.attributes.some((e=>"jsx"===e.name.name)))for(const{type:e,expression:n}of t.children)"JSXExpressionContainer"===e&&"TemplateLiteral"===n.type&&am(n);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&am(t.value.expression),"JSXAttribute"===e.type&&e.value&&"Literal"===e.value.type&&/["']|"|'/.test(e.value.value)&&(t.value.value=t.value.value.replace(/["']|"|'/g,'"'));const r=e.expression||e.callee;if("Decorator"===e.type&&"CallExpression"===r.type&&"Component"===r.callee.name&&1===r.arguments.length){const n=e.expression.arguments[0].properties;for(const[e,r]of t.expression.arguments[0].properties.entries())switch(n[e].key.name){case"styles":"ArrayExpression"===r.value.type&&am(r.value.elements[0]);break;case"template":"TemplateLiteral"===r.value.type&&am(r.value)}}if("TaggedTemplateExpression"!==e.type||"MemberExpression"!==e.tag.type&&("Identifier"!==e.tag.type||"gql"!==e.tag.name&&"graphql"!==e.tag.name&&"css"!==e.tag.name&&"md"!==e.tag.name&&"markdown"!==e.tag.name&&"html"!==e.tag.name)&&"CallExpression"!==e.tag.type||am(t.quasi),"TemplateLiteral"===e.type){(e.leadingComments&&e.leadingComments.some((e=>om(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===n.type&&"graphql"===n.callee.name||!e.leadingComments)&&am(t)}return"InterpreterDirective"===e.type&&(t.value=t.value.trimEnd()),"TSIntersectionType"!==e.type&&"TSUnionType"!==e.type||1!==e.types.length?void 0:t.types[0]}cm.ignoredProperties=sm;var lm=cm;const pm=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");const t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const n=t.filter((e=>"\r\n"===e)).length;return n>t.length-n?"\r\n":"\n"};var fm=pm;fm.graceful=e=>"string"==typeof e&&pm(e)||"\n";var dm=function(e){const t=e.match(Am);return t?t[0].trimLeft():""},hm=function(e){const t=e.match(Am);return t&&t[0]?e.substring(t[0].length):e},gm=function(e){return Bm(e).pragmas},mm=Bm,ym=function({comments:e="",pragmas:t={}}){const n=(0,Em().default)(e)||Dm().EOL,r=" *",i=Object.keys(t),u=i.map((e=>Nm(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>" * "+e+n)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){const e=t[i[0]];return`/** ${Nm(i[0],e)[0]} */`}}const o=e.split(n).map((e=>` * ${e}`)).join(n)+n;return"/**"+n+(e?o:"")+(e&&i.length?r+n:"")+u+" */"};function Dm(){const e=fs;return Dm=function(){return e},e}function Em(){const e=function(e){return e&&e.__esModule?e:{default:e}}(fm);return Em=function(){return e},e}const Cm=/\*\/$/,bm=/^\/\*\*/,Am=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,vm=/(^|\s+)\/\/([^\r\n]*)/g,Fm=/^(\r?\n)+/,xm=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Sm=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,wm=/(\r?\n|^) *\* ?/g,Tm=[];function Bm(e){const t=(0,Em().default)(e)||Dm().EOL;e=e.replace(bm,"").replace(Cm,"").replace(wm,"$1");let n="";for(;n!==e;)n=e,e=e.replace(xm,`${t}$1 $2${t}`);e=e.replace(Fm,"").trimRight();const r=Object.create(null),i=e.replace(Sm,"").replace(Fm,"").trimRight();let u;for(;u=Sm.exec(e);){const e=u[2].replace(vm,"");"string"==typeof r[u[1]]||Array.isArray(r[u[1]])?r[u[1]]=Tm.concat(r[u[1]],e):r[u[1]]=e}return{comments:i,pragmas:r}}function Nm(e,t){return Tm.concat(t).map((t=>`@${e} ${t}`.trim()))}var km=Object.defineProperty({extract:dm,strip:hm,parse:gm,parseWithComments:mm,print:ym},"__esModule",{value:!0});const{parseWithComments:Pm,strip:Om,extract:Im,print:Lm}=km,{getShebang:jm}=Fi,{normalizeEndOfLine:_m}=xi;function Mm(e){const t=jm(e);t&&(e=e.slice(t.length+1));const n=Im(e),{pragmas:r,comments:i}=Pm(n);return{shebang:t,text:e,pragmas:r,comments:i}}var Rm={hasPragma:function(e){const t=Object.keys(Mm(e).pragmas);return t.includes("prettier")||t.includes("format")},insertPragma:function(e){const{shebang:t,text:n,pragmas:r,comments:i}=Mm(e),u=Om(n),o=Lm({pragmas:Object.assign({format:""},r),comments:i.trimStart()});return(t?`${t}\n`:"")+_m(o)+(u.startsWith("\n")?"\n":"\n\n")+u}};const{getLast:$m,hasNewline:Vm,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Wm,getNextNonSpaceNonCommentCharacter:qm,hasNewlineInRange:Um,addLeadingComment:zm,addTrailingComment:Gm,addDanglingComment:Hm,getNextNonSpaceNonCommentCharacterIndex:Jm,isNonEmptyArray:Xm}=Fi,{isBlockComment:Ym,getFunctionParameters:Km,isPrettierIgnoreComment:Qm,isJsxNode:Zm,hasFlowShorthandAnnotationComment:ey,hasFlowAnnotationComment:ty,hasIgnoreComment:ny,isCallLikeExpression:ry,getCallArguments:iy,isCallExpression:uy,isMemberExpression:oy,isObjectProperty:sy,getComments:ay,CommentCheckFlags:cy}=eg,{locStart:ly,locEnd:py}=Zc;function fy(e,t){const n=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));n?zm(n,t):Hm(e,t)}function dy(e,t){"BlockStatement"===e.type?fy(e,t):zm(e,t)}function hy({comment:e,followingNode:t}){return!(!t||!qy(e))&&(zm(t,e),!0)}function gy({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(!n||"IfStatement"!==n.type||!r)return!1;return")"===qm(i,e,py)?(Gm(t,e),!0):t===n.consequent&&r===n.alternate?("BlockStatement"===t.type?Gm(t,e):Hm(n,e),!0):"BlockStatement"===r.type?(fy(r,e),!0):"IfStatement"===r.type?(dy(r.consequent,e),!0):n.consequent===r&&(zm(r,e),!0)}function my({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(!n||"WhileStatement"!==n.type||!r)return!1;return")"===qm(i,e,py)?(Gm(t,e),!0):"BlockStatement"===r.type?(fy(r,e),!0):n.body===r&&(zm(r,e),!0)}function yy({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return!(!n||"TryStatement"!==n.type&&"CatchClause"!==n.type||!r)&&("CatchClause"===n.type&&t?(Gm(t,e),!0):"BlockStatement"===r.type?(fy(r,e),!0):"TryStatement"===r.type?(dy(r.finalizer,e),!0):"CatchClause"===r.type&&(dy(r.body,e),!0))}function Dy({comment:e,enclosingNode:t,followingNode:n}){return!(!oy(t)||!n||"Identifier"!==n.type)&&(zm(t,e),!0)}function Ey({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){const u=t&&!Um(i,py(t),ly(e));return!(t&&u||!n||"ConditionalExpression"!==n.type&&"TSConditionalType"!==n.type||!r)&&(zm(r,e),!0)}function Cy({comment:e,precedingNode:t,enclosingNode:n}){return!(!sy(n)||!n.shorthand||n.key!==t||"AssignmentPattern"!==n.value.type)&&(Gm(n.value.left,e),!0)}function by({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(n&&("ClassDeclaration"===n.type||"ClassExpression"===n.type||"DeclareClass"===n.type||"DeclareInterface"===n.type||"InterfaceDeclaration"===n.type||"TSInterfaceDeclaration"===n.type)){if(Xm(n.decorators)&&(!r||"Decorator"!==r.type))return Gm($m(n.decorators),e),!0;if(n.body&&r===n.body)return fy(n.body,e),!0;if(r)for(const i of["implements","extends","mixins"])if(n[i]&&r===n[i][0])return!t||t!==n.id&&t!==n.typeParameters&&t!==n.superClass?Hm(n,e,i):Gm(t,e),!0}return!1}function Ay({comment:e,precedingNode:t,enclosingNode:n,text:r}){return(n&&t&&("Property"===n.type||"TSDeclareMethod"===n.type||"TSAbstractMethodDefinition"===n.type)&&"Identifier"===t.type&&n.key===t&&":"!==qm(r,t,py)||!(!t||!n||"Decorator"!==t.type||"ClassMethod"!==n.type&&"ClassProperty"!==n.type&&"PropertyDefinition"!==n.type&&"TSAbstractClassProperty"!==n.type&&"TSAbstractMethodDefinition"!==n.type&&"TSDeclareMethod"!==n.type&&"MethodDefinition"!==n.type))&&(Gm(t,e),!0)}function vy({comment:e,precedingNode:t,enclosingNode:n,text:r}){return"("===qm(r,e,py)&&(!(!t||!n||"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type&&"ClassMethod"!==n.type&&"MethodDefinition"!==n.type&&"ObjectMethod"!==n.type)&&(Gm(t,e),!0))}function Fy({comment:e,enclosingNode:t,text:n}){if(!t||"ArrowFunctionExpression"!==t.type)return!1;const r=Jm(n,e,py);return!1!==r&&"=>"===n.slice(r,r+2)&&(Hm(t,e),!0)}function xy({comment:e,enclosingNode:t,text:n}){return")"===qm(n,e,py)&&(t&&(Wy(t)&&0===Km(t).length||ry(t)&&0===iy(t).length)?(Hm(t,e),!0):!(!t||"MethodDefinition"!==t.type&&"TSAbstractMethodDefinition"!==t.type||0!==Km(t.value).length)&&(Hm(t.value,e),!0))}function Sy({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(t&&"FunctionTypeParam"===t.type&&n&&"FunctionTypeAnnotation"===n.type&&r&&"FunctionTypeParam"!==r.type)return Gm(t,e),!0;if(t&&("Identifier"===t.type||"AssignmentPattern"===t.type)&&n&&Wy(n)&&")"===qm(i,e,py))return Gm(t,e),!0;if(n&&"FunctionDeclaration"===n.type&&r&&"BlockStatement"===r.type){const t=(()=>{const e=Km(n);if(e.length>0)return Wm(i,py($m(e)));const t=Wm(i,py(n.id));return!1!==t&&Wm(i,t+1)})();if(ly(e)>t)return fy(r,e),!0}return!1}function wy({comment:e,enclosingNode:t}){return!(!t||"ImportSpecifier"!==t.type)&&(zm(t,e),!0)}function Ty({comment:e,enclosingNode:t}){return!(!t||"LabeledStatement"!==t.type)&&(zm(t,e),!0)}function By({comment:e,enclosingNode:t}){return!(!t||"ContinueStatement"!==t.type&&"BreakStatement"!==t.type||t.label)&&(Gm(t,e),!0)}function Ny({comment:e,precedingNode:t,enclosingNode:n}){return!!(uy(n)&&t&&n.callee===t&&n.arguments.length>0)&&(zm(n.arguments[0],e),!0)}function ky({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return!n||"UnionTypeAnnotation"!==n.type&&"TSUnionType"!==n.type?(r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&Qm(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1):(Qm(e)&&(r.prettierIgnore=!0,e.unignore=!0),!!t&&(Gm(t,e),!0))}function Py({comment:e,enclosingNode:t}){return!!sy(t)&&(zm(t,e),!0)}function Oy({comment:e,enclosingNode:t,followingNode:n,ast:r,isLastComment:i}){return r&&r.body&&0===r.body.length?(i?Hm(r,e):zm(r,e),!0):t&&"Program"===t.type&&0===t.body.length&&!Xm(t.directives)?(i?Hm(t,e):zm(t,e),!0):!(!n||"Program"!==n.type||0!==n.body.length||!t||"ModuleExpression"!==t.type)&&(Hm(n,e),!0)}function Iy({comment:e,enclosingNode:t}){return!(!t||"ForInStatement"!==t.type&&"ForOfStatement"!==t.type)&&(zm(t,e),!0)}function Ly({comment:e,precedingNode:t,enclosingNode:n,text:r}){return!!(t&&"ImportSpecifier"===t.type&&n&&"ImportDeclaration"===n.type&&Vm(r,py(e)))&&(Gm(t,e),!0)}function jy({comment:e,enclosingNode:t}){return!(!t||"AssignmentPattern"!==t.type)&&(zm(t,e),!0)}function _y({comment:e,enclosingNode:t}){return!(!t||"TypeAlias"!==t.type)&&(zm(t,e),!0)}function My({comment:e,enclosingNode:t,followingNode:n}){return!(!t||"VariableDeclarator"!==t.type&&"AssignmentExpression"!==t.type||!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&"TemplateLiteral"!==n.type&&"TaggedTemplateExpression"!==n.type&&!Ym(e))&&(zm(n,e),!0)}function Ry({comment:e,enclosingNode:t,followingNode:n,text:r}){return!(n||!t||"TSMethodSignature"!==t.type&&"TSDeclareFunction"!==t.type&&"TSAbstractMethodDefinition"!==t.type||";"!==qm(r,e,py))&&(Gm(t,e),!0)}function $y({comment:e,enclosingNode:t,followingNode:n}){if(Qm(e)&&t&&"TSMappedType"===t.type&&n&&"TSTypeParameter"===n.type&&n.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Vy({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return!(!n||"TSMappedType"!==n.type)&&(r&&"TSTypeParameter"===r.type&&r.name?(zm(r.name,e),!0):!(!t||"TSTypeParameter"!==t.type||!t.constraint)&&(Gm(t.constraint,e),!0))}function Wy(e){return"ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type||"ObjectMethod"===e.type||"ClassMethod"===e.type||"TSDeclareFunction"===e.type||"TSCallSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSMethodSignature"===e.type||"TSConstructorType"===e.type||"TSFunctionType"===e.type||"TSDeclareMethod"===e.type}function qy(e){return Ym(e)&&"*"===e.value[0]&&/@type\b/.test(e.value)}var Uy={handleOwnLineComment:function(e){return[$y,Sy,Dy,gy,my,yy,by,wy,Iy,ky,Oy,Ly,jy,Ay,Ty].some((t=>t(e)))},handleEndOfLineComment:function(e){return[hy,Sy,Ey,wy,gy,my,yy,by,Ty,Ny,Py,Oy,_y,My].some((t=>t(e)))},handleRemainingComment:function(e){return[$y,gy,my,Cy,xy,Ay,Oy,Fy,vy,Vy,By,Ry].some((t=>t(e)))},isTypeCastComment:qy,getCommentChildNodes:function(e,t){if(("typescript"===t.parser||"flow"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&e.value&&"FunctionExpression"===e.value.type&&0===Km(e.value).length&&!e.value.returnType&&!Xm(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]},willPrintOwnComments:function(e){const t=e.getValue(),n=e.getParentNode();return(t&&(Zm(t)||ey(t)||uy(n)&&(e=>ty(ay(e,cy.Leading))||ty(ay(e,cy.Trailing)))(t))||n&&("JSXSpreadAttribute"===n.type||"JSXSpreadChild"===n.type||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type||("ClassDeclaration"===n.type||"ClassExpression"===n.type)&&n.superClass===t))&&(!ny(e)||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type)}};const{getFunctionParameters:zy,getLeftSidePathName:Gy,hasFlowShorthandAnnotationComment:Hy,hasNakedLeftSide:Jy,hasNode:Xy,isBitwiseOperator:Yy,startsWithNoLookaheadToken:Ky,shouldFlatten:Qy,getPrecedence:Zy,isCallExpression:eD,isMemberExpression:tD,isObjectProperty:nD}=eg;function rD(e,t){const n=e.getParentNode();if(!n)return!1;const r=e.getName(),i=e.getNode();if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&function(e){switch(e.type){case"ObjectExpression":return!0;default:return!1}}(i)&&iD(e))return!0;if(function(e){return"BlockStatement"===e.type||"BreakStatement"===e.type||"ClassBody"===e.type||"ClassDeclaration"===e.type||"ClassMethod"===e.type||"ClassProperty"===e.type||"PropertyDefinition"===e.type||"ClassPrivateProperty"===e.type||"ContinueStatement"===e.type||"DebuggerStatement"===e.type||"DeclareClass"===e.type||"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type||"DeclareFunction"===e.type||"DeclareInterface"===e.type||"DeclareModule"===e.type||"DeclareModuleExports"===e.type||"DeclareVariable"===e.type||"DoWhileStatement"===e.type||"EnumDeclaration"===e.type||"ExportAllDeclaration"===e.type||"ExportDefaultDeclaration"===e.type||"ExportNamedDeclaration"===e.type||"ExpressionStatement"===e.type||"ForInStatement"===e.type||"ForOfStatement"===e.type||"ForStatement"===e.type||"FunctionDeclaration"===e.type||"IfStatement"===e.type||"ImportDeclaration"===e.type||"InterfaceDeclaration"===e.type||"LabeledStatement"===e.type||"MethodDefinition"===e.type||"ReturnStatement"===e.type||"SwitchStatement"===e.type||"ThrowStatement"===e.type||"TryStatement"===e.type||"TSDeclareFunction"===e.type||"TSEnumDeclaration"===e.type||"TSImportEqualsDeclaration"===e.type||"TSInterfaceDeclaration"===e.type||"TSModuleDeclaration"===e.type||"TSNamespaceExportDeclaration"===e.type||"TypeAlias"===e.type||"VariableDeclaration"===e.type||"WhileStatement"===e.type||"WithStatement"===e.type}(i))return!1;if("flow"!==t.parser&&Hy(e.getValue()))return!0;if("Identifier"===i.type)return!!(i.extra&&i.extra.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(i.name))||"left"===r&&"async"===i.name&&"ForOfStatement"===n.type&&!n.await;switch(n.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if("superClass"===r&&("ArrowFunctionExpression"===i.type||"AssignmentExpression"===i.type||"AwaitExpression"===i.type||"BinaryExpression"===i.type||"ConditionalExpression"===i.type||"LogicalExpression"===i.type||"NewExpression"===i.type||"ObjectExpression"===i.type||"ParenthesizedExpression"===i.type||"SequenceExpression"===i.type||"TaggedTemplateExpression"===i.type||"UnaryExpression"===i.type||"UpdateExpression"===i.type||"YieldExpression"===i.type||"TSNonNullExpression"===i.type))return!0;break;case"ExportDefaultDeclaration":return uD(e,t)||"SequenceExpression"===i.type;case"Decorator":if("expression"===r){let e=!1,t=!1,n=i;for(;n;)switch(n.type){case"MemberExpression":t=!0,n=n.object;break;case"CallExpression":if(t||e)return!0;e=!0,n=n.callee;break;case"Identifier":return!1;default:return!0}return!0}break;case"ExpressionStatement":if(Ky(i,!0))return!0;break;case"ArrowFunctionExpression":if("body"===r&&"SequenceExpression"!==i.type&&Ky(i,!1))return!0}switch(i.type){case"UpdateExpression":if("UnaryExpression"===n.type)return i.prefix&&("++"===i.operator&&"+"===n.operator||"--"===i.operator&&"-"===n.operator);case"UnaryExpression":switch(n.type){case"UnaryExpression":return i.operator===n.operator&&("+"===i.operator||"-"===i.operator);case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===r;case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===r;case"BinaryExpression":return"left"===r&&"**"===n.operator;case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if("UpdateExpression"===n.type||"PipelineTopicExpression"===n.type&&"|>"===i.operator)return!0;if("in"===i.operator&&function(e){let t=0,n=e.getValue();for(;n;){const r=e.getParentNode(t++);if(r&&"ForStatement"===r.type&&r.init===n)return!0;n=r}return!1}(e))return!0;if("|>"===i.operator&&i.extra&&i.extra.parenthesized){const t=e.getParentNode(1);if("BinaryExpression"===t.type&&"|>"===t.operator)return!0}case"TSTypeAssertion":case"TSAsExpression":case"LogicalExpression":switch(n.type){case"TSAsExpression":return"TSAsExpression"!==i.type;case"ConditionalExpression":return"TSAsExpression"===i.type;case"CallExpression":case"NewExpression":case"OptionalCallExpression":return"callee"===r;case"ClassExpression":case"ClassDeclaration":return"superClass"===r;case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"SpreadProperty":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===r;case"AssignmentExpression":case"AssignmentPattern":return"left"===r&&("TSTypeAssertion"===i.type||"TSAsExpression"===i.type);case"LogicalExpression":if("LogicalExpression"===i.type)return n.operator!==i.operator;case"BinaryExpression":{const{operator:e,type:t}=i;if(!e&&"TSTypeAssertion"!==t)return!0;const u=Zy(e),o=n.operator,s=Zy(o);return s>u||("right"===r&&s===u||(s===u&&!Qy(o,e)||(s"===n.operator);default:return!1}case"TSConditionalType":if("extendsType"===r&&"TSConditionalType"===n.type)return!0;case"TSFunctionType":case"TSConstructorType":if("checkType"===r&&"TSConditionalType"===n.type)return!0;case"TSUnionType":case"TSIntersectionType":if(("TSUnionType"===n.type||"TSIntersectionType"===n.type)&&n.types.length>1&&(!i.types||i.types.length>1))return!0;case"TSInferType":if("TSInferType"===i.type&&"TSRestType"===n.type)return!1;case"TSTypeOperator":return"TSArrayType"===n.type||"TSOptionalType"===n.type||"TSRestType"===n.type||"objectType"===r&&"TSIndexedAccessType"===n.type||"TSTypeOperator"===n.type||"TSTypeAnnotation"===n.type&&/^TSJSDoc/.test(e.getParentNode(1).type);case"ArrayTypeAnnotation":return"NullableTypeAnnotation"===n.type;case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"ArrayTypeAnnotation"===n.type||"NullableTypeAnnotation"===n.type||"IntersectionTypeAnnotation"===n.type||"UnionTypeAnnotation"===n.type||"objectType"===r&&("IndexedAccessType"===n.type||"OptionalIndexedAccessType"===n.type);case"NullableTypeAnnotation":return"ArrayTypeAnnotation"===n.type||"objectType"===r&&("IndexedAccessType"===n.type||"OptionalIndexedAccessType"===n.type);case"FunctionTypeAnnotation":{const t="NullableTypeAnnotation"===n.type?e.getParentNode(1):n;return"UnionTypeAnnotation"===t.type||"IntersectionTypeAnnotation"===t.type||"ArrayTypeAnnotation"===t.type||"objectType"===r&&("IndexedAccessType"===t.type||"OptionalIndexedAccessType"===t.type)||"NullableTypeAnnotation"===t.type||"FunctionTypeParam"===n.type&&null===n.name&&zy(i).some((e=>e.typeAnnotation&&"NullableTypeAnnotation"===e.typeAnnotation.type))}case"OptionalIndexedAccessType":return"objectType"===r&&"IndexedAccessType"===n.type;case"TypeofTypeAnnotation":return"objectType"===r&&("IndexedAccessType"===n.type||"OptionalIndexedAccessType"===n.type);case"StringLiteral":case"NumericLiteral":case"Literal":if("string"==typeof i.value&&"ExpressionStatement"===n.type&&!n.directive){const t=e.getParentNode(1);return"Program"===t.type||"BlockStatement"===t.type}return"object"===r&&"MemberExpression"===n.type&&"number"==typeof i.value;case"AssignmentExpression":{const t=e.getParentNode(1);return"body"===r&&"ArrowFunctionExpression"===n.type||("key"!==r||"ClassProperty"!==n.type&&"PropertyDefinition"!==n.type||!n.computed)&&(("init"!==r&&"update"!==r||"ForStatement"!==n.type)&&("ExpressionStatement"===n.type?"ObjectPattern"===i.left.type:("key"!==r||"TSPropertySignature"!==n.type)&&("AssignmentExpression"!==n.type&&(("SequenceExpression"!==n.type||!t||"ForStatement"!==t.type||t.init!==n&&t.update!==n)&&(("value"!==r||"Property"!==n.type||!t||"ObjectPattern"!==t.type||!t.properties.includes(n))&&"NGChainedExpression"!==n.type)))))}case"ConditionalExpression":switch(n.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===r;case"ConditionalExpression":return"test"===r;case"MemberExpression":case"OptionalMemberExpression":return"object"===r;default:return!1}case"FunctionExpression":switch(n.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===r;case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(n.type){case"PipelineTopicExpression":return Boolean(i.extra&&i.extra.parenthesized);case"BinaryExpression":return"|>"!==n.operator||i.extra&&i.extra.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===r;case"MemberExpression":case"OptionalMemberExpression":return"object"===r;case"TSAsExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return"test"===r;default:return!1}case"ClassExpression":switch(n.type){case"NewExpression":return"callee"===r;default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":{const t=e.getParentNode(1);if("object"===r&&"MemberExpression"===n.type||"callee"===r&&("CallExpression"===n.type||"NewExpression"===n.type)||"TSNonNullExpression"===n.type&&"MemberExpression"===t.type&&t.object===n)return!0}case"CallExpression":case"MemberExpression":case"TaggedTemplateExpression":case"TSNonNullExpression":if("callee"===r&&("BindExpression"===n.type||"NewExpression"===n.type)){let e=i;for(;e;)switch(e.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSNonNullExpression":e=e.expression;break;default:return!1}}return!1;case"BindExpression":return"callee"===r&&("BindExpression"===n.type||"NewExpression"===n.type)||"object"===r&&tD(n);case"NGPipeExpression":return!("NGRoot"===n.type||"NGMicrosyntaxExpression"===n.type||"ObjectProperty"===n.type&&(!i.extra||!i.extra.parenthesized)||"ArrayExpression"===n.type||eD(n)&&n.arguments[r]===i||"right"===r&&"NGPipeExpression"===n.type||"property"===r&&"MemberExpression"===n.type||"AssignmentExpression"===n.type);case"JSXFragment":case"JSXElement":return"callee"===r||"left"===r&&"BinaryExpression"===n.type&&"<"===n.operator||"ArrayExpression"!==n.type&&"ArrowFunctionExpression"!==n.type&&"AssignmentExpression"!==n.type&&"AssignmentPattern"!==n.type&&"BinaryExpression"!==n.type&&"NewExpression"!==n.type&&"ConditionalExpression"!==n.type&&"ExpressionStatement"!==n.type&&"JsExpressionRoot"!==n.type&&"JSXAttribute"!==n.type&&"JSXElement"!==n.type&&"JSXExpressionContainer"!==n.type&&"JSXFragment"!==n.type&&"LogicalExpression"!==n.type&&!eD(n)&&!nD(n)&&"ReturnStatement"!==n.type&&"ThrowStatement"!==n.type&&"TypeCastExpression"!==n.type&&"VariableDeclarator"!==n.type&&"YieldExpression"!==n.type;case"TypeAnnotation":return"returnType"===r&&"ArrowFunctionExpression"===n.type&&function(e){return Xy(e,(e=>"ObjectTypeAnnotation"===e.type&&Xy(e,(e=>"FunctionTypeAnnotation"===e.type||void 0))||void 0))}(i)}return!1}function iD(e){const t=e.getValue(),n=e.getParentNode(),r=e.getName();switch(n.type){case"NGPipeExpression":if("number"==typeof r&&n.arguments[r]===t&&n.arguments.length-1===r)return e.callParent(iD);break;case"ObjectProperty":if("value"===r){const t=e.getParentNode(1);return _n(t.properties)===n}break;case"BinaryExpression":case"LogicalExpression":if("right"===r)return e.callParent(iD);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(iD);break;case"UnaryExpression":if(n.prefix)return e.callParent(iD)}return!1}function uD(e,t){const n=e.getValue(),r=e.getParentNode();return"FunctionExpression"===n.type||"ClassExpression"===n.type?"ExportDefaultDeclaration"===r.type||!rD(e,t):!(!Jy(n)||"ExportDefaultDeclaration"!==r.type&&rD(e,t))&&e.call((e=>uD(e,t)),...Gy(e,n))}var oD=rD;var sD=function(e,t){switch(t.parser){case"json":case"json5":case"json-stringify":case"__js_expression":case"__vue_expression":return Object.assign(Object.assign({},e),{},{type:t.parser.startsWith("__")?"JsExpressionRoot":"JsonRoot",node:e,comments:[],rootMarker:t.rootMarker});default:return e}};const{builders:{join:aD,line:cD,group:lD,softline:pD,indent:fD}}=su;var dD={isVueEventBindingExpression:function e(t){switch(t.type){case"MemberExpression":switch(t.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return e(t.object)}return!1;case"Identifier":return!0;default:return!1}},printHtmlBinding:function(e,t,n){const r=e.getValue();if(t.__onHtmlBindingRoot&&null===e.getName()&&t.__onHtmlBindingRoot(r,t),"File"===r.type)return t.__isVueForBindingLeft?e.call((e=>{const t=aD([",",cD],e.map(n,"params")),{params:r}=e.getValue();return 1===r.length?t:["(",fD([pD,lD(t)]),pD,")"]}),"program","body",0):t.__isVueBindings?e.call((e=>aD([",",cD],e.map(n,"params"))),"program","body",0):void 0}};const{printComments:hD}=Yf,{getLast:gD}=Fi,{builders:{join:mD,line:yD,softline:DD,group:ED,indent:CD,align:bD,ifBreak:AD,indentIfBreak:vD},utils:{cleanDoc:FD,getDocParts:xD,isConcat:SD}}=su,{hasLeadingOwnLineComment:wD,isBinaryish:TD,isJsxNode:BD,shouldFlatten:ND,hasComment:kD,CommentCheckFlags:PD,isCallExpression:OD,isMemberExpression:ID,isObjectProperty:LD}=eg;let jD=0;function _D(e,t,n,r,i){let u=[];const o=e.getValue();if(TD(o)){ND(o.operator,o.left.operator)?u=[...u,...e.call((e=>_D(e,t,n,!0,i)),"left")]:u.push(ED(t("left")));const s=MD(o),a=("|>"===o.operator||"NGPipeExpression"===o.type||"|"===o.operator&&"__vue_expression"===n.parser)&&!wD(n.originalText,o.right),c="NGPipeExpression"===o.type?"|":o.operator,l="NGPipeExpression"===o.type&&o.arguments.length>0?ED(CD([DD,": ",mD([DD,":",AD(" ")],e.map(t,"arguments").map((e=>bD(2,ED(e)))))])):"",p=s?[c," ",t("right"),l]:[a?yD:"",c,a?" ":yD,t("right"),l],f=e.getParentNode(),d=kD(o.left,PD.Trailing|PD.Line),h=d||!(i&&"LogicalExpression"===o.type)&&f.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type;if(u.push(a?"":" ",h?ED(p,{shouldBreak:d}):p),r&&kD(o)){const t=FD(hD(e,u,n));u=SD(t)||"fill"===t.type?xD(t):[t]}}else u.push(ED(t()));return u}function MD(e){return"LogicalExpression"===e.type&&("ObjectExpression"===e.right.type&&e.right.properties.length>0||("ArrayExpression"===e.right.type&&e.right.elements.length>0||!!BD(e.right)))}var RD={printBinaryishExpression:function(e,t,n){const r=e.getValue(),i=e.getParentNode(),u=e.getParentNode(1),o=r!==i.body&&("IfStatement"===i.type||"WhileStatement"===i.type||"SwitchStatement"===i.type||"DoWhileStatement"===i.type),s=_D(e,n,t,!1,o);if(o)return s;if(OD(i)&&i.callee===r||"UnaryExpression"===i.type||ID(i)&&!i.computed)return ED([CD([DD,...s]),DD]);const a="ReturnStatement"===i.type||"ThrowStatement"===i.type||"JSXExpressionContainer"===i.type&&"JSXAttribute"===u.type||"|"!==r.operator&&"JsExpressionRoot"===i.type||"NGPipeExpression"!==r.type&&("NGRoot"===i.type&&"__ng_binding"===t.parser||"NGMicrosyntaxExpression"===i.type&&"NGMicrosyntax"===u.type&&1===u.body.length)||r===i.body&&"ArrowFunctionExpression"===i.type||r!==i.body&&"ForStatement"===i.type||"ConditionalExpression"===i.type&&"ReturnStatement"!==u.type&&"ThrowStatement"!==u.type&&!OD(u)||"TemplateLiteral"===i.type,c="AssignmentExpression"===i.type||"VariableDeclarator"===i.type||"ClassProperty"===i.type||"PropertyDefinition"===i.type||"TSAbstractClassProperty"===i.type||"ClassPrivateProperty"===i.type||LD(i),l=TD(r.left)&&ND(r.operator,r.left.operator);if(a||MD(r)&&!l||!MD(r)&&c)return ED(s);if(0===s.length)return"";const p=BD(r.right),f=s.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&"group"===e.type)),d=s.slice(0,-1===f?1:f+1),h=s.slice(d.length,p?-1:void 0),g=Symbol("logicalChain-"+ ++jD),m=ED([...d,CD(h)],{id:g});if(!p)return m;const y=gD(s);return ED([m,vD(y,{groupId:g})])},shouldInlineLogicalExpression:MD};const{builders:{join:$D,line:VD,group:WD}}=su,{hasNode:qD,hasComment:UD,getComments:zD}=eg,{printBinaryishExpression:GD}=RD;function HD(e,t,n){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===n.body[0].type&&null===n.body[0].value}var JD={printAngular:function(e,t,n){const r=e.getValue();if(r.type.startsWith("NG"))switch(r.type){case"NGRoot":return[n("node"),UD(r.node)?" //"+zD(r.node)[0].value.trimEnd():""];case"NGPipeExpression":return GD(e,t,n);case"NGChainedExpression":return WD($D([";",VD],e.map((e=>function(e){return qD(e.getValue(),(e=>{switch(e.type){case void 0:return!1;case"CallExpression":case"OptionalCallExpression":case"AssignmentExpression":return!0}}))}(e)?n():["(",n(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGQuotedExpression":return[r.prefix,": ",r.value.trim()];case"NGMicrosyntax":return e.map(((e,t)=>[0===t?"":HD(e.getValue(),t,r)?" ":[";",VD],n()]),"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(r.name)?r.name:JSON.stringify(r.name);case"NGMicrosyntaxExpression":return[n("expression"),null===r.alias?"":[" as ",n("alias")]];case"NGMicrosyntaxKeyedExpression":{const t=e.getName(),i=e.getParentNode(),u=HD(r,t,i)||(1===t&&("then"===r.key.name||"else"===r.key.name)||2===t&&"else"===r.key.name&&"NGMicrosyntaxKeyedExpression"===i.body[t-1].type&&"then"===i.body[t-1].key.name)&&"NGMicrosyntaxExpression"===i.body[0].type;return[n("key"),u?" ":": ",n("expression")]}case"NGMicrosyntaxLet":return["let ",n("key"),null===r.value?"":[" = ",n("value")]];case"NGMicrosyntaxAs":return[n("key")," as ",n("alias")];default:throw new Error(`Unknown Angular node type: ${JSON.stringify(r.type)}.`)}}};const{printComments:XD,printDanglingComments:YD}=Yf,{builders:{line:KD,hardline:QD,softline:ZD,group:eE,indent:tE,conditionalGroup:nE,fill:rE,ifBreak:iE,lineSuffixBoundary:uE,join:oE},utils:{willBreak:sE}}=su,{getLast:aE,getPreferredQuote:cE}=Fi,{isJsxNode:lE,rawText:pE,isLiteral:fE,isCallExpression:dE,isStringLiteral:hE,isBinaryish:gE,hasComment:mE,CommentCheckFlags:yE,hasNodeIgnoreComment:DE}=eg,{willPrintOwnComments:EE}=Uy,CE=e=>""===e||e===KD||e===QD||e===ZD;function bE(e,t,n){const r=e.getValue();if("JSXElement"===r.type&&function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;const t=e.children[0];return fE(t)&&!BE(t)}(r))return[n("openingElement"),n("closingElement")];const i="JSXElement"===r.type?n("openingElement"):n("openingFragment"),u="JSXElement"===r.type?n("closingElement"):n("closingFragment");if(1===r.children.length&&"JSXExpressionContainer"===r.children[0].type&&("TemplateLiteral"===r.children[0].expression.type||"TaggedTemplateExpression"===r.children[0].expression.type))return[i,...e.map(n,"children"),u];r.children=r.children.map((e=>function(e){return"JSXExpressionContainer"===e.type&&fE(e.expression)&&" "===e.expression.value&&!mE(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));const o=r.children.filter(lE).length>0,s=r.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,a="JSXElement"===r.type&&r.openingElement.attributes.length>1;let c=sE(i)||o||a||s;const l="mdx"===e.getParentNode().rootMarker,p=t.singleQuote?"{' '}":'{" "}',f=l?" ":iE([p,ZD]," "),d=function(e,t,n,r,i){const u=[];return e.each(((e,t,o)=>{const s=e.getValue();if(fE(s)){const e=pE(s);if(BE(s)){const n=e.split(SE);if(""===n[0]){if(u.push(""),n.shift(),/\n/.test(n[0])){const e=o[t+1];u.push(vE(i,n[1],s,e))}else u.push(r);n.shift()}let a;if(""===aE(n)&&(n.pop(),a=n.pop()),0===n.length)return;for(const[e,t]of n.entries())e%2==1?u.push(KD):u.push(t);if(void 0!==a)if(/\n/.test(a)){const e=o[t+1];u.push(vE(i,aE(u),s,e))}else u.push(r);else{const e=o[t+1];u.push(AE(i,aE(u),s,e))}}else/\n/.test(e)?e.match(/\n/g).length>1&&u.push("",QD):u.push("",r)}else{const e=n();u.push(e);const r=o[t+1];if(r&&BE(r)){const e=TE(pE(r)).split(SE)[0];u.push(AE(i,e,s,r))}else u.push(QD)}}),"children"),u}(e,0,n,f,r.openingElement&&r.openingElement.name&&"fbt"===r.openingElement.name.name),h=r.children.some((e=>BE(e)));for(let e=d.length-2;e>=0;e--){const t=""===d[e]&&""===d[e+1],n=d[e]===QD&&""===d[e+1]&&d[e+2]===QD,r=(d[e]===ZD||d[e]===QD)&&""===d[e+1]&&d[e+2]===f,i=d[e]===f&&""===d[e+1]&&(d[e+2]===ZD||d[e+2]===QD),u=d[e]===f&&""===d[e+1]&&d[e+2]===f,o=d[e]===ZD&&""===d[e+1]&&d[e+2]===QD||d[e]===QD&&""===d[e+1]&&d[e+2]===ZD;n&&h||t||r||u||o?d.splice(e,2):i&&d.splice(e+1,2)}for(;d.length>0&&CE(aE(d));)d.pop();for(;d.length>1&&CE(d[0])&&CE(d[1]);)d.shift(),d.shift();const g=[];for(const[e,t]of d.entries()){if(t===f){if(1===e&&""===d[e-1]){if(2===d.length){g.push(p);continue}g.push([p,QD]);continue}if(e===d.length-1){g.push(p);continue}if(""===d[e-1]&&d[e-2]===QD){g.push(p);continue}}g.push(t),sE(t)&&(c=!0)}const m=h?rE(g):eE(g,{shouldBreak:!0});if(l)return m;const y=eE([i,tE([QD,m]),QD,u]);return c?y:nE([eE([i,...d,u]),y])}function AE(e,t,n,r){return e?"":"JSXElement"===n.type&&!n.closingElement||r&&"JSXElement"===r.type&&!r.closingElement?1===t.length?ZD:QD:ZD}function vE(e,t,n,r){return e?QD:1===t.length?"JSXElement"===n.type&&!n.closingElement||r&&"JSXElement"===r.type&&!r.closingElement?QD:ZD:QD}function FE(e,t,n){return function(e,t,n){const r=e.getParentNode();if(!r)return t;if({ArrayExpression:!0,JSXAttribute:!0,JSXElement:!0,JSXExpressionContainer:!0,JSXFragment:!0,ExpressionStatement:!0,CallExpression:!0,OptionalCallExpression:!0,ConditionalExpression:!0,JsExpressionRoot:!0}[r.type])return t;const i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),dE,(e=>"JSXExpressionContainer"===e.type)),u=oD(e,n);return eE([u?"":iE("("),tE([ZD,t]),ZD,u?"":iE(")")],{shouldBreak:i})}(e,XD(e,bE(e,t,n),t),t)}function xE(e,t,n){const r=e.getValue();return["{",e.call((e=>{const r=["...",n()],i=e.getValue();return mE(i)&&EE(e)?[tE([ZD,XD(e,r,t)]),ZD]:r}),"JSXSpreadAttribute"===r.type?"argument":"expression"),"}"]}const SE=new RegExp("([ \n\r\t]+)"),wE=new RegExp("[^ \n\r\t]"),TE=e=>e.replace(new RegExp("(?:^"+SE.source+"|"+SE.source+"$)"),"");function BE(e){return fE(e)&&(wE.test(pE(e))||!/\n/.test(pE(e)))}var NE={hasJsxIgnoreComment:function(e){const t=e.getValue(),n=e.getParentNode();if(!(n&&t&&lE(t)&&lE(n)))return!1;let r=null;for(let e=n.children.indexOf(t);e>0;e--){const t=n.children[e-1];if("JSXText"!==t.type||BE(t)){r=t;break}}return r&&"JSXExpressionContainer"===r.type&&"JSXEmptyExpression"===r.expression.type&&DE(r.expression)},printJsx:function(e,t,n){const r=e.getValue();if(r.type.startsWith("JSX"))switch(r.type){case"JSXAttribute":return function(e,t,n){const r=e.getValue(),i=[];if(i.push(n("name")),r.value){let e;if(hE(r.value)){let n=pE(r.value).replace(/'/g,"'").replace(/"/g,'"');const i=cE(n,t.jsxSingleQuote?"'":'"'),u="'"===i?"'":""";n=n.slice(1,-1).replace(new RegExp(i,"g"),u),e=[i,n,i]}else e=n("value");i.push("=",e)}return i}(e,t,n);case"JSXIdentifier":return String(r.name);case"JSXNamespacedName":return oE(":",[n("namespace"),n("name")]);case"JSXMemberExpression":return oE(".",[n("object"),n("property")]);case"JSXSpreadAttribute":return xE(e,t,n);case"JSXSpreadChild":return xE(e,t,n);case"JSXExpressionContainer":return function(e,t,n){const r=e.getValue(),i=e.getParentNode(0),u="JSXEmptyExpression"===r.expression.type||!mE(r.expression)&&("ArrayExpression"===r.expression.type||"ObjectExpression"===r.expression.type||"ArrowFunctionExpression"===r.expression.type||dE(r.expression)||"FunctionExpression"===r.expression.type||"TemplateLiteral"===r.expression.type||"TaggedTemplateExpression"===r.expression.type||"DoExpression"===r.expression.type||lE(i)&&("ConditionalExpression"===r.expression.type||gE(r.expression)));return eE(u?["{",n("expression"),uE,"}"]:["{",tE([ZD,n("expression")]),ZD,uE,"}"])}(e,0,n);case"JSXFragment":case"JSXElement":return FE(e,t,n);case"JSXOpeningElement":return function(e,t,n){const r=e.getValue(),i=r.name&&mE(r.name)||r.typeParameters&&mE(r.typeParameters);if(r.selfClosing&&0===r.attributes.length&&!i)return["<",n("name"),n("typeParameters")," />"];if(r.attributes&&1===r.attributes.length&&r.attributes[0].value&&hE(r.attributes[0].value)&&!r.attributes[0].value.value.includes("\n")&&!i&&!mE(r.attributes[0]))return eE(["<",n("name"),n("typeParameters")," ",...e.map(n,"attributes"),r.selfClosing?" />":">"]);const u=r.attributes.length>0&&mE(aE(r.attributes),yE.Trailing),o=0===r.attributes.length&&!i||(t.bracketSameLine||t.jsxBracketSameLine)&&(!i||r.attributes.length>0)&&!u,s=r.attributes&&r.attributes.some((e=>e.value&&hE(e.value)&&e.value.value.includes("\n")));return eE(["<",n("name"),n("typeParameters"),tE(e.map((()=>[KD,n()]),"attributes")),r.selfClosing?KD:o?">":ZD,r.selfClosing?"/>":o?"":">"],{shouldBreak:s})}(e,t,n);case"JSXClosingElement":return function(e,t,n){const r=e.getValue(),i=[];i.push(""),i}(e,0,n);case"JSXOpeningFragment":case"JSXClosingFragment":return function(e,t){const n=e.getValue(),r=mE(n),i=mE(n,yE.Line),u="JSXOpeningFragment"===n.type;return[u?"<":""]}(e,t);case"JSXEmptyExpression":return function(e,t){const n=e.getValue(),r=mE(n,yE.Line);return[YD(e,t,!r),r?QD:""]}(e,t);case"JSXText":throw new Error("JSXTest should be handled by JSXElement");default:throw new Error(`Unknown JSX node type: ${JSON.stringify(r.type)}.`)}}};tt({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=U(this),n=_e(t.length),r=Un(t,0);return r.length=Wn(r,t,t,n,0,void 0===e?1:Le(e)),r}});const{isNonEmptyArray:kE}=Fi,{builders:{indent:PE,join:OE,line:IE}}=su,{isFlowAnnotationComment:LE}=eg;function jE(e,t,n){const r=e.getValue();if(!r.typeAnnotation)return"";const i=e.getParentNode(),u=r.definite||i&&"VariableDeclarator"===i.type&&i.definite,o="DeclareFunction"===i.type&&i.id===r;return LE(t.originalText,r.typeAnnotation)?[" /*: ",n("typeAnnotation")," */"]:[o?"":u?"!: ":": ",n("typeAnnotation")]}var _E={printOptionalToken:function(e){const t=e.getValue();return!t.optional||"Identifier"===t.type&&t===e.getParentNode().key?"":"OptionalCallExpression"===t.type||"OptionalMemberExpression"===t.type&&t.computed?"?.":"?"},printFunctionTypeParameters:function(e,t,n){const r=e.getValue();return r.typeArguments?n("typeArguments"):r.typeParameters?n("typeParameters"):""},printBindExpressionCallee:function(e,t,n){return["::",n("callee")]},printTypeScriptModifiers:function(e,t,n){const r=e.getValue();return kE(r.modifiers)?[OE(" ",e.map(n,"modifiers"))," "]:""},printTypeAnnotation:jE,printRestSpread:function(e,t,n){return["...",n("argument"),jE(e,t,n)]},adjustClause:function(e,t,n){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||n?[" ",t]:PE([IE,t])}};const{printDanglingComments:ME}=Yf,{builders:{line:RE,softline:$E,hardline:VE,group:WE,indent:qE,ifBreak:UE,fill:zE}}=su,{getLast:GE,hasNewline:HE}=Fi,{shouldPrintComma:JE,hasComment:XE,CommentCheckFlags:YE,isNextLineEmpty:KE,isNumericLiteral:QE,isSignedNumericLiteral:ZE}=eg,{locStart:eC}=Zc,{printOptionalToken:tC,printTypeAnnotation:nC}=_E;function rC(e,t){return e.elements.length>1&&e.elements.every((e=>e&&(QE(e)||ZE(e)&&!XE(e.argument))&&!XE(e,YE.Trailing|YE.Line,(e=>!HE(t.originalText,eC(e),{backwards:!0})))))}function iC(e,t,n,r){const i=[];let u=[];return e.each((e=>{i.push(u,WE(r())),u=[",",RE],e.getValue()&&KE(e.getValue(),t)&&u.push($E)}),n),i}function uC(e,t,n,r){const i=[];return e.each(((e,u,o)=>{const s=u===o.length-1;i.push([n(),s?r:","]),s||i.push(KE(e.getValue(),t)?[VE,VE]:XE(o[u+1],YE.Leading|YE.Line)?VE:RE)}),"elements"),zE(i)}var oC={printArray:function(e,t,n){const r=e.getValue(),i=[],u="TupleExpression"===r.type?"#[":"[";if(0===r.elements.length)XE(r,YE.Dangling)?i.push(WE([u,ME(e,t),$E,"]"])):i.push(u,"]");else{const o=GE(r.elements),s=!(o&&"RestElement"===o.type),a=null===o,c=Symbol("array"),l=!t.__inJestEach&&r.elements.length>1&&r.elements.every(((e,t,n)=>{const r=e&&e.type;if("ArrayExpression"!==r&&"ObjectExpression"!==r)return!1;const i=n[t+1];if(i&&r!==i.type)return!1;const u="ArrayExpression"===r?"elements":"properties";return e[u]&&e[u].length>1})),p=rC(r,t),f=s?a?",":JE(t)?p?UE(",","",{groupId:c}):UE(","):"":"";i.push(WE([u,qE([$E,p?uC(e,t,n,f):[iC(e,t,"elements",n),f],ME(e,t,!0)]),$E,"]"],{shouldBreak:l,id:c}))}return i.push(tC(e),nC(e,t,n)),i},printArrayItems:iC,isConciselyPrintedArray:rC};const{printDanglingComments:sC}=Yf,{getLast:aC,getPenultimate:cC}=Fi,{getFunctionParameters:lC,hasComment:pC,CommentCheckFlags:fC,isFunctionCompositionArgs:dC,isJsxNode:hC,isLongCurriedCallExpression:gC,shouldPrintComma:mC,getCallArguments:yC,iterateCallArgumentsPath:DC,isNextLineEmpty:EC,isCallExpression:CC,isStringLiteral:bC,isObjectProperty:AC}=eg,{builders:{line:vC,hardline:FC,softline:xC,group:SC,indent:wC,conditionalGroup:TC,ifBreak:BC,breakParent:NC},utils:{willBreak:kC}}=su,{ArgExpansionBailout:PC}=Bo,{isConciselyPrintedArray:OC}=oC;function IC(e,t=!1){return"ObjectExpression"===e.type&&(e.properties.length>0||pC(e))||"ArrayExpression"===e.type&&(e.elements.length>0||pC(e))||"TSTypeAssertion"===e.type&&IC(e.expression)||"TSAsExpression"===e.type&&IC(e.expression)||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&(!e.returnType||!e.returnType.typeAnnotation||"TSTypeReference"!==e.returnType.typeAnnotation.type||"BlockStatement"===(n=e.body).type&&(n.body.some((e=>"EmptyStatement"!==e.type))||pC(n,fC.Dangling)))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&IC(e.body,!0)||"ObjectExpression"===e.body.type||"ArrayExpression"===e.body.type||!t&&(CC(e.body)||"ConditionalExpression"===e.body.type)||hC(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type;var n}var LC=function(e,t,n){const r=e.getValue(),i="ImportExpression"===r.type,u=yC(r);if(0===u.length)return["(",sC(e,t,!0),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===lC(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>pC(e)))}(u))return["(",n(["arguments",0]),", ",n(["arguments",1]),")"];let o=!1,s=!1;const a=u.length-1,c=[];DC(e,((e,r)=>{const i=e.getNode(),u=[n()];r===a||(EC(i,t)?(0===r&&(s=!0),o=!0,u.push(",",FC,FC)):u.push(",",vC)),c.push(u)}));const l=i||r.callee&&"Import"===r.callee.type||!mC(t,"all")?"":",";function p(){return SC(["(",wC([vC,...c]),l,vC,")"],{shouldBreak:!0})}if(o||"Decorator"!==e.getParentNode().type&&dC(u))return p();const f=function(e){if(2!==e.length)return!1;const[t,n]=e;if("ModuleExpression"===t.type&&function(e){return"ObjectExpression"===e.type&&1===e.properties.length&&AC(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&bC(e.properties[0].value)&&"module"===e.properties[0].value.value}(n))return!0;return!pC(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==n.type&&"ArrowFunctionExpression"!==n.type&&"ConditionalExpression"!==n.type&&!IC(n)}(u),d=function(e,t){const n=aC(e),r=cC(e);return!pC(n,fC.Leading)&&!pC(n,fC.Trailing)&&IC(n)&&(!r||r.type!==n.type)&&(2!==e.length||"ArrowFunctionExpression"!==r.type||"ArrayExpression"!==n.type)&&!(e.length>1&&"ArrayExpression"===n.type&&OC(n,t))}(u,t);if(f||d){if(f?c.slice(1).some(kC):c.slice(0,-1).some(kC))return p();let t=[];try{e.try((()=>{DC(e,((e,r)=>{f&&0===r&&(t=[[n([],{expandFirstArg:!0}),c.length>1?",":"",s?FC:vC,s?FC:""],...c.slice(1)]),d&&r===a&&(t=[...c.slice(0,-1),n([],{expandLastArg:!0})])}))}))}catch(e){if(e instanceof PC)return p();throw e}return[c.some(kC)?NC:"",TC([["(",...t,")"],f?["(",SC(t[0],{shouldBreak:!0}),...t.slice(1),")"]:["(",...c.slice(0,-1),SC(aC(t),{shouldBreak:!0}),")"],p()])]}const h=["(",wC([xC,...c]),BC(l),xC,")"];return gC(e)?h:SC(h,{shouldBreak:c.some(kC)||o})};const{builders:{softline:jC,group:_C,indent:MC,label:RC}}=su,{isNumericLiteral:$C,isMemberExpression:VC,isCallExpression:WC}=eg,{printOptionalToken:qC}=_E;function UC(e,t,n){const r=n("property"),i=e.getValue(),u=qC(e);return i.computed?!i.property||$C(i.property)?[u,"[",r,"]"]:_C([u,"[",MC([jC,r]),jC,"]"]):[u,".",r]}var zC={printMemberExpression:function(e,t,n){const r=e.getValue(),i=e.getParentNode();let u,o=0;do{u=e.getParentNode(o),o++}while(u&&(VC(u)||"TSNonNullExpression"===u.type));const s=n("object"),a=UC(e,t,n),c=u&&("NewExpression"===u.type||"BindExpression"===u.type||"AssignmentExpression"===u.type&&"Identifier"!==u.left.type)||r.computed||"Identifier"===r.object.type&&"Identifier"===r.property.type&&!VC(i)||("AssignmentExpression"===i.type||"VariableDeclarator"===i.type)&&(WC(r.object)&&r.object.arguments.length>0||"TSNonNullExpression"===r.object.type&&WC(r.object.expression)&&r.object.expression.arguments.length>0||"member-chain"===s.label);return RC("member-chain"===s.label?"member-chain":"member",[s,c?a:_C(MC([jC,a]))])},printMemberLookup:UC};const{printComments:GC}=Yf,{getLast:HC,isNextLineEmptyAfterIndex:JC,getNextNonSpaceNonCommentCharacterIndex:XC}=Fi,{isCallExpression:YC,isMemberExpression:KC,isFunctionOrArrowExpression:QC,isLongCurriedCallExpression:ZC,isMemberish:eb,isNumericLiteral:tb,isSimpleCallArgument:nb,hasComment:rb,CommentCheckFlags:ib,isNextLineEmpty:ub}=eg,{locEnd:ob}=Zc,{builders:{join:sb,hardline:ab,group:cb,indent:lb,conditionalGroup:pb,breakParent:fb,label:db},utils:{willBreak:hb}}=su,{printMemberLookup:gb}=zC,{printOptionalToken:mb,printFunctionTypeParameters:yb,printBindExpressionCallee:Db}=_E;var Eb=function(e,t,n){const r=e.getParentNode(),i=!r||"ExpressionStatement"===r.type,u=[];function o(e){const{originalText:n}=t,r=XC(n,e,ob);return")"===n.charAt(r)?!1!==r&&JC(n,r+1):ub(e,t)}function s(e){const r=e.getValue();YC(r)&&(eb(r.callee)||YC(r.callee))?(u.unshift({node:r,printed:[GC(e,[mb(e),yb(e,t,n),LC(e,t,n)],t),o(r)?ab:""]}),e.call((e=>s(e)),"callee")):eb(r)?(u.unshift({node:r,needsParens:oD(e,t),printed:GC(e,KC(r)?gb(e,t,n):Db(e,t,n),t)}),e.call((e=>s(e)),"object")):"TSNonNullExpression"===r.type?(u.unshift({node:r,printed:GC(e,"!",t)}),e.call((e=>s(e)),"expression")):u.unshift({node:r,printed:n()})}const a=e.getValue();u.unshift({node:a,printed:[mb(e),yb(e,t,n),LC(e,t,n)]}),a.callee&&e.call((e=>s(e)),"callee");const c=[];let l=[u[0]],p=1;for(;p0&&c.push(l);const h=c.length>=2&&!rb(c[1][0].node)&&function(e){const n=e[1].length>0&&e[1][0].node.computed;if(1===e[0].length){const r=e[0][0].node;return"ThisExpression"===r.type||"Identifier"===r.type&&(d(r.name)||i&&function(e){return e.length<=t.tabWidth}(r.name)||n)}const r=HC(e[0]).node;return KC(r)&&"Identifier"===r.property.type&&(d(r.property.name)||n)}(c);function g(e){const t=e.map((e=>e.printed));return e.length>0&&HC(e).needsParens?["(",...t,")"]:t}const m=c.map(g),y=m,D=h?3:2,E=c.flat(),C=E.slice(1,-1).some((e=>rb(e.node,ib.Leading)))||E.slice(0,-1).some((e=>rb(e.node,ib.Trailing)))||c[D]&&rb(c[D][0].node,ib.Leading);if(c.length<=D&&!C)return ZC(e)?y:cb(y);const b=HC(c[h?1:0]).node,A=!YC(b)&&o(b),v=[g(c[0]),h?c.slice(1,2).map(g):"",A?ab:"",function(e){return 0===e.length?"":lb(cb([ab,sb(ab,e.map(g))]))}(c.slice(h?2:1))],F=u.map((({node:e})=>e)).filter(YC);let x;return x=C||F.length>2&&F.some((e=>!e.arguments.every((e=>nb(e,0)))))||m.slice(0,-1).some(hb)||function(){const e=HC(HC(c)).node,t=HC(m);return YC(e)&&hb(t)&&F.slice(0,-1).some((e=>e.arguments.some(QC)))}()?cb(v):[hb(y)||A?fb:"",pb([y,v])],db("member-chain",x)};const{builders:{join:Cb,group:bb}}=su,{getCallArguments:Ab,hasFlowAnnotationComment:vb,isCallExpression:Fb,isMemberish:xb,isStringLiteral:Sb,isTemplateOnItsOwnLine:wb,isTestCall:Tb,iterateCallArgumentsPath:Bb}=eg,{printOptionalToken:Nb,printFunctionTypeParameters:kb}=_E;var Pb={printCallExpression:function(e,t,n){const r=e.getValue(),i=e.getParentNode(),u="NewExpression"===r.type,o="ImportExpression"===r.type,s=Nb(e),a=Ab(r);if(a.length>0&&(!o&&!u&&function(e,t){if("Identifier"!==e.callee.type)return!1;if("require"===e.callee.name)return!0;if("define"===e.callee.name){const n=Ab(e);return"ExpressionStatement"===t.type&&(1===n.length||2===n.length&&"ArrayExpression"===n[0].type||3===n.length&&Sb(n[0])&&"ArrayExpression"===n[1].type)}return!1}(r,i)||1===a.length&&wb(a[0],t.originalText)||!u&&Tb(r,i))){const r=[];return Bb(e,(()=>{r.push(n())})),[u?"new ":"",n("callee"),s,kb(e,t,n),"(",Cb(", ",r),")"]}const c=("babel"===t.parser||"babel-flow"===t.parser)&&r.callee&&"Identifier"===r.callee.type&&vb(r.callee.trailingComments);if(c&&(r.callee.trailingComments[0].printed=!0),!o&&!u&&xb(r.callee)&&!e.call((e=>oD(e,t)),"callee"))return Eb(e,t,n);const l=[u?"new ":"",o?"import":n("callee"),s,c?`/*:: ${r.callee.trailingComments[0].value.slice(2).trim()} */`:"",kb(e,t,n),LC(e,t,n)];return o||Fb(r.callee)?bb(l):l}};const{isNonEmptyArray:Ob,getStringWidth:Ib}=Fi,{builders:{line:Lb,group:jb,indent:_b,indentIfBreak:Mb},utils:{cleanDoc:Rb,willBreak:$b}}=su,{hasLeadingOwnLineComment:Vb,isBinaryish:Wb,isStringLiteral:qb,isLiteral:Ub,isNumericLiteral:zb,isCallExpression:Gb,isMemberExpression:Hb,getCallArguments:Jb,rawText:Xb,hasComment:Yb,isSignedNumericLiteral:Kb,isObjectProperty:Qb}=eg,{shouldInlineLogicalExpression:Zb}=RD,{printCallExpression:eA}=Pb;function tA(e,t,n,r,i,u){const o=function(e,t,n,r,i){const u=e.getValue(),o=u[i];if(!o)return"only-left";const s=!nA(o);if(e.match(nA,rA,(e=>!s||"ExpressionStatement"!==e.type&&"VariableDeclaration"!==e.type)))return s?"ArrowFunctionExpression"===o.type&&"ArrowFunctionExpression"===o.body.type?"chain-tail-arrow-chain":"chain-tail":"chain";if(!s&&nA(o.right)||Vb(t.originalText,o))return"break-after-operator";if("CallExpression"===o.type&&"require"===o.callee.name||"json5"===t.parser||"json"===t.parser)return"never-break-after-operator";if(function(e){if(rA(e)){const t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>Qb(e)&&(!e.shorthand||e.value&&"AssignmentPattern"===e.value.type)))}return!1}(u)||function(e){const t=function(e){if(function(e){return"TSTypeAliasDeclaration"===e.type||"TypeAlias"===e.type}(e)&&e.typeParameters&&e.typeParameters.params)return e.typeParameters.params;return null}(e);if(Ob(t)){const n="TSTypeAliasDeclaration"===e.type?"constraint":"bound";if(t.length>1&&t.some((e=>e[n]||e.default)))return!0}return!1}(u)||function(e){if("VariableDeclarator"!==e.type)return!1;const{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;const n=iA(t.typeAnnotation);return Ob(n)&&n.length>1&&n.some((e=>Ob(iA(e))||"TSConditionalType"===e.type))}(u))return"break-lhs";const a=function(e,t,n){if(!Qb(e))return!1;t=Rb(t);const r=3;return"string"==typeof t&&Ib(t)function(e,t,n,r){const i=e.getValue();if(Wb(i)&&!Zb(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{const{test:e}=i;return Wb(e)&&!Zb(e)}case"ClassExpression":return Ob(i.decorators)}if(r)return!1;let u=i;const o=[];for(;;)if("UnaryExpression"===u.type)u=u.argument,o.push("argument");else{if("TSNonNullExpression"!==u.type)break;u=u.expression,o.push("expression")}if(qb(u)||e.call((()=>uA(e,t,n)),...o))return!0;return!1}(e,t,n,a)),i))return"break-after-operator";if(a||"TemplateLiteral"===o.type||"TaggedTemplateExpression"===o.type||"BooleanLiteral"===o.type||zb(o)||"ClassExpression"===o.type)return"never-break-after-operator";return"fluid"}(e,t,n,r,u),s=n(u,{assignmentLayout:o});switch(o){case"break-after-operator":return jb([jb(r),i,jb(_b([Lb,s]))]);case"never-break-after-operator":return jb([jb(r),i," ",s]);case"fluid":{const e=Symbol("assignment");return jb([jb(r),i,jb(_b(Lb),{id:e}),Mb(s,{groupId:e})])}case"break-lhs":return jb([r,i," ",jb(s)]);case"chain":return[jb(r),i,Lb,s];case"chain-tail":return[jb(r),i,_b([Lb,s])];case"chain-tail-arrow-chain":return[jb(r),i,s];case"only-left":return r}}function nA(e){return"AssignmentExpression"===e.type}function rA(e){return nA(e)||"VariableDeclarator"===e.type}function iA(e){return function(e){return"TSTypeReference"===e.type||"GenericTypeAnnotation"===e.type}(e)&&e.typeParameters&&e.typeParameters.params?e.typeParameters.params:null}function uA(e,t,n,r=!1){const i=e.getValue(),u=()=>uA(e,t,n,!0);if("TSNonNullExpression"===i.type)return e.call(u,"expression");if(Gb(i)){if("member-chain"===eA(e,t,n).label)return!1;const r=Jb(i);return!!(0===r.length||1===r.length&&function(e,{printWidth:t}){if(Yb(e))return!1;const n=.25*t;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=n||Kb(e)&&!Yb(e.argument))return!0;const r="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;if(r)return r.length<=n;if(qb(e))return Xb(e).length<=n;if("TemplateLiteral"===e.type)return 0===e.expressions.length&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes("\n");return Ub(e)}(r[0],t))&&(!function(e,t){const n=function(e){return e.typeParameters&&e.typeParameters.params||e.typeArguments&&e.typeArguments.params}(e);if(Ob(n)){if(n.length>1)return!0;if(1===n.length){const e=n[0];if("TSUnionType"===e.type||"UnionTypeAnnotation"===e.type||"TSIntersectionType"===e.type||"IntersectionTypeAnnotation"===e.type)return!0}const r=e.typeParameters?"typeParameters":"typeArguments";if($b(t(r)))return!0}return!1}(i,n)&&e.call(u,"callee"))}return Hb(i)?e.call(u,"object"):r&&("Identifier"===i.type||"ThisExpression"===i.type)}var oA={printVariableDeclarator:function(e,t,n){return tA(e,t,n,n("id")," =","init")},printAssignmentExpression:function(e,t,n){const r=e.getValue();return tA(e,t,n,n("left"),[" ",r.operator],"right")},printAssignment:tA};const{getNextNonSpaceNonCommentCharacter:sA}=Fi,{printDanglingComments:aA}=Yf,{builders:{line:cA,hardline:lA,softline:pA,group:fA,indent:dA,ifBreak:hA},utils:{removeLines:gA,willBreak:mA}}=su,{getFunctionParameters:yA,iterateFunctionParametersPath:DA,isSimpleType:EA,isTestCall:CA,isTypeAnnotationAFunction:bA,isObjectType:AA,isObjectTypePropertyAFunction:vA,hasRestParameter:FA,shouldPrintComma:xA,hasComment:SA,isNextLineEmpty:wA}=eg,{locEnd:TA}=Zc,{ArgExpansionBailout:BA}=Bo,{printFunctionTypeParameters:NA}=_E;function kA(e){if(!e)return!1;const t=yA(e);if(1!==t.length)return!1;const[n]=t;return!SA(n)&&("ObjectPattern"===n.type||"ArrayPattern"===n.type||"Identifier"===n.type&&n.typeAnnotation&&("TypeAnnotation"===n.typeAnnotation.type||"TSTypeAnnotation"===n.typeAnnotation.type)&&AA(n.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===n.type&&AA(n.typeAnnotation)||"AssignmentPattern"===n.type&&("ObjectPattern"===n.left.type||"ArrayPattern"===n.left.type)&&("Identifier"===n.right.type||"ObjectExpression"===n.right.type&&0===n.right.properties.length||"ArrayExpression"===n.right.type&&0===n.right.elements.length))}var PA={printFunctionParameters:function(e,t,n,r,i){const u=e.getValue(),o=yA(u),s=i?NA(e,n,t):"";if(0===o.length)return[s,"(",aA(e,n,!0,(e=>")"===sA(n.originalText,e,TA))),")"];const a=e.getParentNode(),c=CA(a),l=kA(u),p=[];if(DA(e,((e,r)=>{const i=r===o.length-1;i&&u.rest&&p.push("..."),p.push(t()),i||(p.push(","),c||l?p.push(" "):wA(o[r],n)?p.push(lA,lA):p.push(cA))})),r){if(mA(s)||mA(p))throw new BA;return fA([gA(s),"(",gA(p),")"])}const f=o.every((e=>!e.decorators));return l&&f||c?[s,"(",...p,")"]:(vA(a)||bA(a)||"TypeAlias"===a.type||"UnionTypeAnnotation"===a.type||"TSUnionType"===a.type||"IntersectionTypeAnnotation"===a.type||"FunctionTypeAnnotation"===a.type&&a.returnType===u)&&1===o.length&&null===o[0].name&&u.this!==o[0]&&o[0].typeAnnotation&&null===u.typeParameters&&EA(o[0].typeAnnotation)&&!u.rest?"always"===n.arrowParens?["(",...p,")"]:p:[s,"(",dA([pA,...p]),hA(!FA(u)&&xA(n,"all")?",":""),pA,")"]},shouldHugFunctionParameters:kA,shouldGroupFunctionParameters:function(e,t){const n=function(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}(e);if(!n)return!1;const r=e.typeParameters&&e.typeParameters.params;if(r){if(r.length>1)return!1;if(1===r.length){const e=r[0];if(e.constraint||e.default)return!1}}return 1===yA(e).length&&(AA(n)||mA(t))}};const{printComments:OA,printDanglingComments:IA}=Yf,{getLast:LA}=Fi,{builders:{group:jA,join:_A,line:MA,softline:RA,indent:$A,align:VA,ifBreak:WA}}=su,{locStart:qA}=Zc,{isSimpleType:UA,isObjectType:zA,hasLeadingOwnLineComment:GA,isObjectTypePropertyAFunction:HA,shouldPrintComma:JA}=eg,{printAssignment:XA}=oA,{printFunctionParameters:YA,shouldGroupFunctionParameters:KA}=PA,{printArrayItems:QA}=oC;function ZA(e){if(UA(e)||zA(e))return!0;if("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type){const t=e.types.filter((e=>"VoidTypeAnnotation"===e.type||"TSVoidKeyword"===e.type||"NullLiteralTypeAnnotation"===e.type||"TSNullKeyword"===e.type)).length,n=e.types.some((e=>"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type));if(e.types.length-1===t&&n)return!0}return!1}var ev={printOpaqueType:function(e,t,n){const r=t.semi?";":"",i=e.getValue(),u=[];return u.push("opaque type ",n("id"),n("typeParameters")),i.supertype&&u.push(": ",n("supertype")),i.impltype&&u.push(" = ",n("impltype")),u.push(r),u},printTypeAlias:function(e,t,n){const r=t.semi?";":"",i=e.getValue(),u=[];i.declare&&u.push("declare "),u.push("type ",n("id"),n("typeParameters"));const o="TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right";return[XA(e,t,n,u," =",o),r]},printIntersectionType:function(e,t,n){const r=e.getValue(),i=e.map(n,"types"),u=[];let o=!1;for(let e=0;e1&&(o=!0),u.push(" & ",e>1?$A(i[e]):i[e])):u.push($A([" &",MA,i[e]]));return jA(u)},printUnionType:function(e,t,n){const r=e.getValue(),i=e.getParentNode(),u=!("TypeParameterInstantiation"===i.type||"TSTypeParameterInstantiation"===i.type||"GenericTypeAnnotation"===i.type||"TSTypeReference"===i.type||"TSTypeAssertion"===i.type||"TupleTypeAnnotation"===i.type||"TSTupleType"===i.type||"FunctionTypeParam"===i.type&&!i.name&&e.getParentNode(1).this!==i||("TypeAlias"===i.type||"VariableDeclarator"===i.type||"TSTypeAliasDeclaration"===i.type)&&GA(t.originalText,r)),o=ZA(r),s=e.map((e=>{let r=n();return o||(r=VA(2,r)),OA(e,r,t)}),"types");if(o)return _A(" | ",s);const a=u&&!GA(t.originalText,r),c=[WA([a?MA:"","| "]),_A([MA,"| "],s)];return oD(e,t)?jA([$A(c),RA]):"TupleTypeAnnotation"===i.type&&i.types.length>1||"TSTupleType"===i.type&&i.elementTypes.length>1?jA([$A([WA(["(",RA]),c]),RA,WA(")")]):jA(u?$A(c):c)},printFunctionType:function(e,t,n){const r=e.getValue(),i=[],u=e.getParentNode(0),o=e.getParentNode(1),s=e.getParentNode(2);let a="TSFunctionType"===r.type||!(("ObjectTypeProperty"===u.type||"ObjectTypeInternalSlot"===u.type)&&!u.variance&&!u.optional&&qA(u)===qA(r)||"ObjectTypeCallProperty"===u.type||s&&"DeclareFunction"===s.type),c=a&&("TypeAnnotation"===u.type||"TSTypeAnnotation"===u.type);const l=c&&a&&("TypeAnnotation"===u.type||"TSTypeAnnotation"===u.type)&&"ArrowFunctionExpression"===o.type;HA(u)&&(a=!0,c=!0),l&&i.push("(");const p=YA(e,n,t,!1,!0),f=r.returnType||r.predicate||r.typeAnnotation?[a?" => ":": ",n("returnType"),n("predicate"),n("typeAnnotation")]:"",d=KA(r,f);return i.push(d?jA(p):p),f&&i.push(f),l&&i.push(")"),jA(i)},printTupleType:function(e,t,n){const r=e.getValue(),i="TSTupleType"===r.type?"elementTypes":"types",u=r[i].length>0&&"TSRestType"===LA(r[i]).type;return jA(["[",$A([RA,QA(e,t,i,n)]),WA(JA(t,"all")&&!u?",":""),IA(e,t,!0),RA,"]"])},printIndexedAccessType:function(e,t,n){const r=e.getValue(),i="OptionalIndexedAccessType"===r.type&&r.optional?"?.[":"[";return[n("objectType"),i,n("indexType"),"]"]},shouldHugType:ZA};const{printDanglingComments:tv}=Yf,{builders:{join:nv,line:rv,hardline:iv,softline:uv,group:ov,indent:sv,ifBreak:av}}=su,{isTestCall:cv,hasComment:lv,CommentCheckFlags:pv,isTSXFile:fv,shouldPrintComma:dv,getFunctionParameters:hv}=eg,{createGroupIdMapper:gv}=Fi,{shouldHugType:mv}=ev,yv=gv("typeParameters");function Dv(e,t){const n=e.getValue();if(!lv(n,pv.Dangling))return"";const r=!lv(n,pv.Line),i=tv(e,t,r);return r?i:[i,iv]}var Ev={printTypeParameter:function(e,t,n){const r=e.getValue(),i=[],u=e.getParentNode();return"TSMappedType"===u.type?(i.push("[",n("name")),r.constraint&&i.push(" in ",n("constraint")),u.nameType&&i.push(" as ",e.callParent((()=>n("nameType")))),i.push("]"),i):(r.variance&&i.push(n("variance")),i.push(n("name")),r.bound&&i.push(": ",n("bound")),r.constraint&&i.push(" extends ",n("constraint")),r.default&&i.push(" = ",n("default")),i)},printTypeParameters:function(e,t,n,r){const i=e.getValue();if(!i[r])return"";if(!Array.isArray(i[r]))return n(r);const u=e.getNode(2);if(u&&cv(u)||0===i[r].length||1===i[r].length&&(mv(i[r][0])||"NullableTypeAnnotation"===i[r][0].type))return["<",nv(", ",e.map(n,r)),Dv(e,t),">"];const o="TSTypeParameterInstantiation"===i.type?"":1===hv(i).length&&fv(t)&&!i[r][0].constraint&&"ArrowFunctionExpression"===e.getParentNode().type?",":dv(t,"all")?av(","):"";return ov(["<",sv([uv,nv([",",rv],e.map(n,r))]),o,uv,">"],{id:yv(i)})},getTypeParametersGroupId:yv};const{printComments:Cv}=Yf,{printString:bv,printNumber:Av}=Fi,{isNumericLiteral:vv,isSimpleNumber:Fv,isStringLiteral:xv,isStringPropSafeToUnquote:Sv,rawText:wv}=eg,{printAssignment:Tv}=oA,Bv=new WeakMap;function Nv(e,t,n){const r=e.getNode();if(r.computed)return["[",n("key"),"]"];const i=e.getParentNode(),{key:u}=r;if("ClassPrivateProperty"===r.type&&"Identifier"===u.type)return["#",n("key")];if("consistent"===t.quoteProps&&!Bv.has(i)){const e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&xv(e.key)&&!Sv(e,t)));Bv.set(i,e)}if(("Identifier"===u.type||vv(u)&&Fv(Av(wv(u)))&&String(u.value)===Av(wv(u))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&Bv.get(i))){const n=bv(JSON.stringify("Identifier"===u.type?u.name:u.value.toString()),t);return e.call((e=>Cv(e,n,t)),"key")}return Sv(r,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!Bv.get(i))?e.call((e=>Cv(e,/^\d/.test(u.value)?Av(u.value):u.value,t)),"key"):n("key")}var kv={printProperty:function(e,t,n){return e.getValue().shorthand?n("value"):Tv(e,t,n,Nv(e,t,n),":","value")},printPropertyKey:Nv};const{printDanglingComments:Pv,printCommentsSeparately:Ov}=Yf,{getNextNonSpaceNonCommentCharacterIndex:Iv}=Fi,{builders:{line:Lv,softline:jv,group:_v,indent:Mv,ifBreak:Rv,hardline:$v,join:Vv,indentIfBreak:Wv},utils:{removeLines:qv,willBreak:Uv}}=su,{ArgExpansionBailout:zv}=Bo,{getFunctionParameters:Gv,hasLeadingOwnLineComment:Hv,isFlowAnnotationComment:Jv,isJsxNode:Xv,isTemplateOnItsOwnLine:Yv,shouldPrintComma:Kv,startsWithNoLookaheadToken:Qv,isBinaryish:Zv,isLineComment:eF,hasComment:tF,getComments:nF,CommentCheckFlags:rF,isCallLikeExpression:iF,isCallExpression:uF,getCallArguments:oF,hasNakedLeftSide:sF,getLeftSide:aF}=eg,{locEnd:cF}=Zc,{printFunctionParameters:lF,shouldGroupFunctionParameters:pF}=PA,{printPropertyKey:fF}=kv,{printFunctionTypeParameters:dF}=_E;function hF(e,t,n){const r=e.getNode(),i=lF(e,n,t),u=mF(e,n,t),o=pF(r,u),s=[dF(e,t,n),_v([o?_v(i):i,u])];return r.body?s.push(" ",n("body")):s.push(t.semi?";":""),s}function gF(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){return function(e){const t=Gv(e);return!(1!==t.length||e.typeParameters||tF(e,rF.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||tF(t[0])||t[0].optional||e.predicate||e.returnType)}(e.getValue())}return!1}function mF(e,t,n){const r=e.getValue(),i=t("returnType");if(r.returnType&&Jv(n.originalText,r.returnType))return[" /*: ",i," */"];const u=[i];return r.returnType&&r.returnType.typeAnnotation&&u.unshift(": "),r.predicate&&u.push(r.returnType?" ":": ",t("predicate")),u}function yF(e,t,n){const r=e.getValue(),i=t.semi?";":"",u=[];r.argument&&(!function(e,t){if(Hv(e.originalText,t))return!0;if(sF(t)){let n,r=t;for(;n=aF(r);)if(r=n,Hv(e.originalText,r))return!0}return!1}(t,r.argument)?Zv(r.argument)||"SequenceExpression"===r.argument.type?u.push(_v([Rv(" ("," "),Mv([jv,n("argument")]),jv,Rv(")")])):u.push(" ",n("argument")):u.push([" (",Mv([$v,n("argument")]),$v,")"]));const o=nF(r),s=_n(o),a=s&&eF(s);return a&&u.push(i),tF(r,rF.Dangling)&&u.push(" ",Pv(e,t,!0)),a||u.push(i),u}var DF={printFunction:function(e,t,n,r){const i=e.getValue();let u=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&r&&r.expandLastArg){const t=e.getParentNode();uF(t)&&oF(t).length>1&&(u=!0)}const o=[];"TSDeclareFunction"===i.type&&i.declare&&o.push("declare "),i.async&&o.push("async "),i.generator?o.push("function* "):o.push("function "),i.id&&o.push(t("id"));const s=lF(e,t,n,u),a=mF(e,t,n),c=pF(i,a);return o.push(dF(e,n,t),_v([c?_v(s):s,a]),i.body?" ":"",t("body")),!n.semi||!i.declare&&i.body||o.push(";"),o},printArrowFunction:function(e,t,n,r){let i=e.getValue();const u=[],o=[];let s=!1;if(function a(){const c=function(e,t,n,r){const i=[];if(e.getValue().async&&i.push("async "),gF(e,t))i.push(n(["params",0]));else{const u=r&&(r.expandLastArg||r.expandFirstArg);let o=mF(e,n,t);if(u){if(Uv(o))throw new zv;o=_v(qv(o))}i.push(_v([lF(e,n,t,u,!0),o]))}const u=Pv(e,t,!0,(e=>{const n=Iv(t.originalText,e,cF);return!1!==n&&"=>"===t.originalText.slice(n,n+2)}));return u&&i.push(" ",u),i}(e,t,n,r);if(0===u.length)u.push(c);else{const{leading:n,trailing:r}=Ov(e,t);u.push([n,c]),o.unshift(r)}s=s||i.returnType&&Gv(i).length>0||i.typeParameters||Gv(i).some((e=>"Identifier"!==e.type)),"ArrowFunctionExpression"!==i.body.type||r&&r.expandLastArg?o.unshift(n("body",r)):(i=i.body,e.call(a,"body"))}(),u.length>1)return function(e,t,n,r,i,u){const o=e.getName(),s=e.getParentNode(),a=iF(s)&&"callee"===o,c=Boolean(t&&t.assignmentLayout),l="BlockStatement"!==u.body.type&&"ObjectExpression"!==u.body.type,p=a&&l||t&&"chain-tail-arrow-chain"===t.assignmentLayout,f=Symbol("arrow-chain");return _v([_v(Mv([a||c?jv:"",_v(Vv([" =>",Lv],n),{shouldBreak:r})]),{id:f,shouldBreak:p})," =>",Wv(l?Mv([Lv,i]):[" ",i],{groupId:f}),a?Rv(jv,"",{groupId:f}):""])}(e,r,u,s,o,i);const a=u;if(a.push(" =>"),!Hv(t.originalText,i.body)&&("ArrayExpression"===i.body.type||"ObjectExpression"===i.body.type||"BlockStatement"===i.body.type||Xv(i.body)||Yv(i.body,t.originalText)||"ArrowFunctionExpression"===i.body.type||"DoExpression"===i.body.type))return _v([...a," ",o]);if("SequenceExpression"===i.body.type)return _v([...a,_v([" (",Mv([jv,o]),jv,")"])]);const c=(r&&r.expandLastArg||"JSXExpressionContainer"===e.getParentNode().type)&&!tF(i),l=r&&r.expandLastArg&&Kv(t,"all"),p="ConditionalExpression"===i.body.type&&!Qv(i.body,!1);return _v([...a,_v([Mv([Lv,p?Rv("","("):"",o,p?Rv("",")"):""]),c?[Rv(l?",":""),jv]:""])])},printMethod:function(e,t,n){const r=e.getNode(),{kind:i}=r,u=r.value||r,o=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(Ff.ok("get"===i||"set"===i),o.push(i," ")):u.async&&o.push("async "),u.generator&&o.push("*"),o.push(fF(e,t,n),r.optional||r.key.optional?"?":""),r===u?o.push(hF(e,t,n)):"FunctionExpression"===u.type?o.push(e.call((e=>hF(e,t,n)),"value")):o.push(n("value")),o},printReturnStatement:function(e,t,n){return["return",yF(e,t,n)]},printThrowStatement:function(e,t,n){return["throw",yF(e,t,n)]},printMethodInternal:hF,shouldPrintParamsWithoutParens:gF};const{isNonEmptyArray:EF,hasNewline:CF}=Fi,{builders:{line:bF,hardline:AF,join:vF,breakParent:FF,group:xF}}=su,{locStart:SF,locEnd:wF}=Zc,{getParentExportDeclaration:TF}=eg;function BF(e,t){return e.decorators.some((e=>CF(t.originalText,wF(e))))}function NF(e){if("ExportDefaultDeclaration"!==e.type&&"ExportNamedDeclaration"!==e.type&&"DeclareExportDeclaration"!==e.type)return!1;const t=e.declaration&&e.declaration.decorators;return EF(t)&&SF(e,{ignoreDecorators:!0})>SF(t[0])}var kF={printDecorators:function(e,t,n){const r=e.getValue(),{decorators:i}=r;if(!EF(i)||NF(e.getParentNode()))return;const u="ClassExpression"===r.type||"ClassDeclaration"===r.type||BF(r,t);return[TF(e)?AF:u?FF:"",vF(bF,e.map(n,"decorators")),bF]},printClassMemberDecorators:function(e,t,n){const r=e.getValue();return xF([vF(bF,e.map(n,"decorators")),BF(r,t)?AF:bF])},printDecoratorsBeforeExport:function(e,t,n){return[vF(AF,e.map(n,"declaration","decorators")),AF]},hasDecoratorsBeforeExport:NF};const{isNonEmptyArray:PF,createGroupIdMapper:OF}=Fi,{printComments:IF,printDanglingComments:LF}=Yf,{builders:{join:jF,line:_F,hardline:MF,softline:RF,group:$F,indent:VF,ifBreak:WF}}=su,{hasComment:qF,CommentCheckFlags:UF}=eg,{getTypeParametersGroupId:zF}=Ev,{printMethod:GF}=DF,{printOptionalToken:HF,printTypeAnnotation:JF}=_E,{printPropertyKey:XF}=kv,{printAssignment:YF}=oA,{printClassMemberDecorators:KF}=kF;const QF=OF("heritageGroup");function ZF(e){return e.typeParameters&&!qF(e.typeParameters,UF.Trailing|UF.Line)&&!function(e){return["superClass","extends","mixins","implements"].filter((t=>Boolean(e[t]))).length>1}(e)}function ex(e,t,n,r){const i=e.getValue();if(!PF(i[r]))return"";const u=LF(e,t,!0,(({marker:e})=>e===r));return[ZF(i)?WF(" ",_F,{groupId:zF(i.typeParameters)}):_F,u,u&&MF,r,$F(VF([_F,jF([",",_F],e.map(n,r))]))]}function tx(e,t,n){const r=n("superClass");return"AssignmentExpression"===e.getParentNode().type?$F(WF(["(",VF([RF,r]),RF,")"],r)):r}var nx={printClass:function(e,t,n){const r=e.getValue(),i=[];r.declare&&i.push("declare "),r.abstract&&i.push("abstract "),i.push("class");const u=r.id&&qF(r.id,UF.Trailing)||r.superClass&&qF(r.superClass)||PF(r.extends)||PF(r.mixins)||PF(r.implements),o=[],s=[];if(r.id&&o.push(" ",n("id")),o.push(n("typeParameters")),r.superClass){const r=["extends ",tx(e,t,n),n("superTypeParameters")],i=e.call((e=>IF(e,r,t)),"superClass");u?s.push(_F,$F(i)):s.push(" ",i)}else s.push(ex(e,t,n,"extends"));if(s.push(ex(e,t,n,"mixins"),ex(e,t,n,"implements")),u){let e;e=ZF(r)?[...o,VF(s)]:VF([...o,s]),i.push($F(e,{id:QF(r)}))}else i.push(...o,...s);return i.push(" ",n("body")),i},printClassMethod:function(e,t,n){const r=e.getValue(),i=[];return PF(r.decorators)&&i.push(KF(e,t,n)),r.accessibility&&i.push(r.accessibility+" "),r.readonly&&i.push("readonly "),r.declare&&i.push("declare "),r.static&&i.push("static "),("TSAbstractMethodDefinition"===r.type||r.abstract)&&i.push("abstract "),r.override&&i.push("override "),i.push(GF(e,t,n)),i},printClassProperty:function(e,t,n){const r=e.getValue(),i=[],u=t.semi?";":"";return PF(r.decorators)&&i.push(KF(e,t,n)),r.accessibility&&i.push(r.accessibility+" "),r.declare&&i.push("declare "),r.static&&i.push("static "),("TSAbstractClassProperty"===r.type||r.abstract)&&i.push("abstract "),r.override&&i.push("override "),r.readonly&&i.push("readonly "),r.variance&&i.push(n("variance")),i.push(XF(e,t,n),HF(e),JF(e,t,n)),[YF(e,t,n,i," =","value"),u]},printHardlineAfterHeritage:function(e){return WF(MF,"",{groupId:QF(e)})}};const{isNonEmptyArray:rx}=Fi,{builders:{join:ix,line:ux,group:ox,indent:sx,ifBreak:ax}}=su,{hasComment:cx,identity:lx,CommentCheckFlags:px}=eg,{getTypeParametersGroupId:fx}=Ev,{printTypeScriptModifiers:dx}=_E;var hx={printInterface:function(e,t,n){const r=e.getValue(),i=[];r.declare&&i.push("declare "),"TSInterfaceDeclaration"===r.type&&i.push(r.abstract?"abstract ":"",dx(e,t,n)),i.push("interface");const u=[],o=[];"InterfaceTypeAnnotation"!==r.type&&u.push(" ",n("id"),n("typeParameters"));const s=r.typeParameters&&!cx(r.typeParameters,px.Trailing|px.Line);return rx(r.extends)&&o.push(s?ax(" ",ux,{groupId:fx(r.typeParameters)}):ux,"extends ",(1===r.extends.length?lx:sx)(ix([",",ux],e.map(n,"extends")))),r.id&&cx(r.id,px.Trailing)||rx(r.extends)?s?i.push(ox([...u,sx(o)])):i.push(ox(sx([...u,...o]))):i.push(...u,...o),i.push(" ",n("body")),ox(i)}};const{isNonEmptyArray:gx}=Fi,{builders:{softline:mx,group:yx,indent:Dx,join:Ex,line:Cx,ifBreak:bx,hardline:Ax}}=su,{printDanglingComments:vx}=Yf,{hasComment:Fx,CommentCheckFlags:xx,shouldPrintComma:Sx,needsHardlineAfterDanglingComment:wx}=eg,{locStart:Tx,hasSameLoc:Bx}=Zc,{hasDecoratorsBeforeExport:Nx,printDecoratorsBeforeExport:kx}=kF;function Px(e,t,n){const r=e.getValue();if(!r.source)return"";const i=[];return Ix(r,t)||i.push(" from"),i.push(" ",n("source")),i}function Ox(e,t,n){const r=e.getValue();if(Ix(r,t))return"";const i=[" "];if(gx(r.specifiers)){const u=[],o=[];if(e.each((()=>{const t=e.getValue().type;if("ExportNamespaceSpecifier"===t||"ExportDefaultSpecifier"===t||"ImportNamespaceSpecifier"===t||"ImportDefaultSpecifier"===t)u.push(n());else{if("ExportSpecifier"!==t&&"ImportSpecifier"!==t)throw new Error(`Unknown specifier type ${JSON.stringify(t)}`);o.push(n())}}),"specifiers"),i.push(Ex(", ",u)),o.length>0){u.length>0&&i.push(", ");o.length>1||u.length>0||r.specifiers.some((e=>Fx(e)))?i.push(yx(["{",Dx([t.bracketSpacing?Cx:mx,Ex([",",Cx],o)]),bx(Sx(t)?",":""),t.bracketSpacing?Cx:mx,"}"])):i.push(["{",t.bracketSpacing?" ":"",...o,t.bracketSpacing?" ":"","}"])}}else i.push("{}");return i}function Ix(e,t){const{type:n,importKind:r,source:i,specifiers:u}=e;return"ImportDeclaration"===n&&!gx(u)&&"type"!==r&&!/{\s*}/.test(t.originalText.slice(Tx(e),Tx(i)))}function Lx(e,t,n){const r=e.getNode();return gx(r.assertions)?[" assert {",t.bracketSpacing?" ":"",Ex(", ",e.map(n,"assertions")),t.bracketSpacing?" ":"","}"]:""}var jx={printImportDeclaration:function(e,t,n){const r=e.getValue(),i=t.semi?";":"",u=[],{importKind:o}=r;return u.push("import"),o&&"value"!==o&&u.push(" ",o),u.push(Ox(e,t,n),Px(e,t,n),Lx(e,t,n),i),u},printExportDeclaration:function(e,t,n){const r=e.getValue(),i=[];Nx(r)&&i.push(kx(e,t,n));const{type:u,exportKind:o,declaration:s}=r;return i.push("export"),(r.default||"ExportDefaultDeclaration"===u)&&i.push(" default"),Fx(r,xx.Dangling)&&(i.push(" ",vx(e,t,!0)),wx(r)&&i.push(Ax)),s?i.push(" ",n("declaration")):i.push("type"===o?" type":"",Ox(e,t,n),Px(e,t,n),Lx(e,t,n)),function(e,t){if(!t.semi)return!1;const{type:n,declaration:r}=e,i=e.default||"ExportDefaultDeclaration"===n;if(!r)return!0;const{type:u}=r;if(i&&"ClassDeclaration"!==u&&"FunctionDeclaration"!==u&&"TSInterfaceDeclaration"!==u&&"DeclareClass"!==u&&"DeclareFunction"!==u&&"TSDeclareFunction"!==u&&"EnumDeclaration"!==u)return!0;return!1}(r,t)&&i.push(";"),i},printExportAllDeclaration:function(e,t,n){const r=e.getValue(),i=t.semi?";":"",u=[],{exportKind:o,exported:s}=r;return u.push("export"),"type"===o&&u.push(" type"),u.push(" *"),s&&u.push(" as ",n("exported")),u.push(Px(e,t,n),Lx(e,t,n),i),u},printModuleSpecifier:function(e,t,n){const r=e.getNode(),{type:i,importKind:u}=r,o=[];"ImportSpecifier"===i&&u&&o.push(u," ");const s=i.startsWith("Import"),a=s?"imported":"local",c=s?"local":"exported";let l="",p="";return"ExportNamespaceSpecifier"===i||"ImportNamespaceSpecifier"===i?l="*":r[a]&&(l=n(a)),!r[c]||r[a]&&Bx(r[a],r[c])||(p=n(c)),o.push(l,l&&p?" as ":"",p),o}};const{printDanglingComments:_x}=Yf,{builders:{line:Mx,softline:Rx,group:$x,indent:Vx,ifBreak:Wx,hardline:qx}}=su,{getLast:Ux,hasNewlineInRange:zx,hasNewline:Gx,isNonEmptyArray:Hx}=Fi,{shouldPrintComma:Jx,hasComment:Xx,getComments:Yx,CommentCheckFlags:Kx,isNextLineEmpty:Qx}=eg,{locStart:Zx,locEnd:eS}=Zc,{printOptionalToken:tS,printTypeAnnotation:nS}=_E,{shouldHugFunctionParameters:rS}=PA,{shouldHugType:iS}=ev,{printHardlineAfterHeritage:uS}=nx;var oS={printObject:function(e,t,n){const r=t.semi?";":"",i=e.getValue();let u;u="TSTypeLiteral"===i.type?"members":"TSInterfaceBody"===i.type?"body":"properties";const o="ObjectTypeAnnotation"===i.type,s=[u];o&&s.push("indexers","callProperties","internalSlots");const a=s.map((e=>i[e][0])).sort(((e,t)=>Zx(e)-Zx(t)))[0],c=e.getParentNode(0),l=o&&c&&("InterfaceDeclaration"===c.type||"DeclareInterface"===c.type||"DeclareClass"===c.type)&&"body"===e.getName(),p="TSInterfaceBody"===i.type||l||"ObjectPattern"===i.type&&"FunctionDeclaration"!==c.type&&"FunctionExpression"!==c.type&&"ArrowFunctionExpression"!==c.type&&"ObjectMethod"!==c.type&&"ClassMethod"!==c.type&&"ClassPrivateMethod"!==c.type&&"AssignmentPattern"!==c.type&&"CatchClause"!==c.type&&i.properties.some((e=>e.value&&("ObjectPattern"===e.value.type||"ArrayPattern"===e.value.type)))||"ObjectPattern"!==i.type&&a&&zx(t.originalText,Zx(i),Zx(a)),f=l?";":"TSInterfaceBody"===i.type||"TSTypeLiteral"===i.type?Wx(r,";"):",",d="RecordExpression"===i.type?"#{":i.exact?"{|":"{",h=i.exact?"|}":"}",g=[];for(const t of s)e.each((e=>{const t=e.getValue();g.push({node:t,printed:n(),loc:Zx(t)})}),t);s.length>1&&g.sort(((e,t)=>e.loc-t.loc));let m=[];const y=g.map((e=>{const n=[...m,$x(e.printed)];return m=[f,Mx],"TSPropertySignature"!==e.node.type&&"TSMethodSignature"!==e.node.type&&"TSConstructSignatureDeclaration"!==e.node.type||!Xx(e.node,Kx.PrettierIgnore)||m.shift(),Qx(e.node,t)&&m.push(qx),n}));if(i.inexact){let n;if(Xx(i,Kx.Dangling)){const r=Xx(i,Kx.Line);n=[_x(e,t,!0),r||Gx(t.originalText,eS(Ux(Yx(i))))?qx:Mx,"..."]}else n=["..."];y.push([...m,...n])}const D=Ux(i[u]),E=!(i.inexact||D&&"RestElement"===D.type||D&&("TSPropertySignature"===D.type||"TSCallSignatureDeclaration"===D.type||"TSMethodSignature"===D.type||"TSConstructSignatureDeclaration"===D.type)&&Xx(D,Kx.PrettierIgnore));let C;if(0===y.length){if(!Xx(i,Kx.Dangling))return[d,h,nS(e,t,n)];C=$x([d,_x(e,t),Rx,h,tS(e),nS(e,t,n)])}else C=[l&&Hx(i.properties)?uS(c):"",d,Vx([t.bracketSpacing?Mx:Rx,...y]),Wx(E&&(","!==f||Jx(t))?f:""),t.bracketSpacing?Mx:Rx,h,tS(e),nS(e,t,n)];return e.match((e=>"ObjectPattern"===e.type&&!e.decorators),((e,t,n)=>rS(e)&&("params"===t||"parameters"===t||"this"===t||"rest"===t)&&0===n))||e.match(iS,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),((e,t,n)=>rS(e)&&("params"===t||"parameters"===t||"this"===t||"rest"===t)&&0===n))||!p&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?C:$x(C,{shouldBreak:p})}};const{printDanglingComments:sS}=Yf,{printString:aS,printNumber:cS}=Fi,{builders:{hardline:lS,softline:pS,group:fS,indent:dS}}=su,{getParentExportDeclaration:hS,isFunctionNotation:gS,isGetterOrSetter:mS,rawText:yS,shouldPrintComma:DS}=eg,{locStart:ES,locEnd:CS}=Zc,{printClass:bS}=nx,{printOpaqueType:AS,printTypeAlias:vS,printIntersectionType:FS,printUnionType:xS,printFunctionType:SS,printTupleType:wS,printIndexedAccessType:TS}=ev,{printInterface:BS}=hx,{printTypeParameter:NS,printTypeParameters:kS}=Ev,{printExportDeclaration:PS,printExportAllDeclaration:OS}=jx,{printArrayItems:IS}=oC,{printObject:LS}=oS,{printPropertyKey:jS}=kv,{printOptionalToken:_S,printTypeAnnotation:MS,printRestSpread:RS}=_E;function $S(e,t){const n=hS(e);return n?(Ff.strictEqual(n.type,"DeclareExportDeclaration"),t):["declare ",t]}var VS={printFlow:function(e,t,n){const r=e.getValue(),i=t.semi?";":"",u=[];switch(r.type){case"DeclareClass":return $S(e,bS(e,t,n));case"DeclareFunction":return $S(e,["function ",n("id"),r.predicate?" ":"",n("predicate"),i]);case"DeclareModule":return $S(e,["module ",n("id")," ",n("body")]);case"DeclareModuleExports":return $S(e,["module.exports",": ",n("typeAnnotation"),i]);case"DeclareVariable":return $S(e,["var ",n("id"),i]);case"DeclareOpaqueType":return $S(e,AS(e,t,n));case"DeclareInterface":return $S(e,BS(e,t,n));case"DeclareTypeAlias":return $S(e,vS(e,t,n));case"DeclareExportDeclaration":return $S(e,PS(e,t,n));case"DeclareExportAllDeclaration":return $S(e,OS(e,t,n));case"OpaqueType":return AS(e,t,n);case"TypeAlias":return vS(e,t,n);case"IntersectionTypeAnnotation":return FS(e,t,n);case"UnionTypeAnnotation":return xS(e,t,n);case"FunctionTypeAnnotation":return SS(e,t,n);case"TupleTypeAnnotation":return wS(e,t,n);case"GenericTypeAnnotation":return[n("id"),kS(e,t,n,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return TS(e,t,n);case"TypeAnnotation":return n("typeAnnotation");case"TypeParameter":return NS(e,t,n);case"TypeofTypeAnnotation":return["typeof ",n("argument")];case"ExistsTypeAnnotation":return"*";case"EmptyTypeAnnotation":return"empty";case"MixedTypeAnnotation":return"mixed";case"ArrayTypeAnnotation":return[n("elementType"),"[]"];case"BooleanLiteralTypeAnnotation":return String(r.value);case"EnumDeclaration":return["enum ",n("id")," ",n("body")];case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":if("EnumSymbolBody"===r.type||r.explicitType){let e=null;switch(r.type){case"EnumBooleanBody":e="boolean";break;case"EnumNumberBody":e="number";break;case"EnumStringBody":e="string";break;case"EnumSymbolBody":e="symbol"}u.push("of ",e," ")}if(0!==r.members.length||r.hasUnknownMembers){const i=r.members.length>0?[lS,IS(e,t,"members",n),r.hasUnknownMembers||DS(t)?",":""]:[];u.push(fS(["{",dS([...i,...r.hasUnknownMembers?[lS,"..."]:[]]),sS(e,t,!0),lS,"}"]))}else u.push(fS(["{",sS(e,t),pS,"}"]));return u;case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return[n("id")," = ","object"==typeof r.init?n("init"):String(r.init)];case"EnumDefaultedMember":return n("id");case"FunctionTypeParam":{const t=r.name?n("name"):e.getParentNode().this===r?"this":"";return[t,_S(e),t?": ":"",n("typeAnnotation")]}case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return BS(e,t,n);case"ClassImplements":case"InterfaceExtends":return[n("id"),n("typeParameters")];case"NullableTypeAnnotation":return["?",n("typeAnnotation")];case"Variance":{const{kind:e}=r;return Ff.ok("plus"===e||"minus"===e),"plus"===e?"+":"-"}case"ObjectTypeCallProperty":return r.static&&u.push("static "),u.push(n("value")),u;case"ObjectTypeIndexer":return[r.variance?n("variance"):"","[",n("id"),r.id?": ":"",n("key"),"]: ",n("value")];case"ObjectTypeProperty":{let i="";return r.proto?i="proto ":r.static&&(i="static "),[i,mS(r)?r.kind+" ":"",r.variance?n("variance"):"",jS(e,t,n),_S(e),gS(r)?"":": ",n("value")]}case"ObjectTypeAnnotation":return LS(e,t,n);case"ObjectTypeInternalSlot":return[r.static?"static ":"","[[",n("id"),"]]",_S(e),r.method?"":": ",n("value")];case"ObjectTypeSpreadProperty":return RS(e,t,n);case"QualifiedTypeIdentifier":return[n("qualification"),".",n("id")];case"StringLiteralTypeAnnotation":return aS(yS(r),t);case"NumberLiteralTypeAnnotation":Ff.strictEqual(typeof r.value,"number");case"BigIntLiteralTypeAnnotation":return r.extra?cS(r.extra.raw):cS(r.raw);case"TypeCastExpression":return["(",n("expression"),MS(e,t,n),")"];case"TypeParameterDeclaration":case"TypeParameterInstantiation":{const i=kS(e,t,n,"params");if("flow"===t.parser){const e=ES(r),n=CS(r),u=t.originalText.lastIndexOf("/*",e),o=t.originalText.indexOf("*/",n);if(-1!==u&&-1!==o){const e=t.originalText.slice(u+2,o).trim();if(e.startsWith("::")&&!e.includes("/*")&&!e.includes("*/"))return["/*:: ",i," */"]}}return i}case"InferredPredicate":return"%checks";case"DeclaredPredicate":return["%checks(",n("value"),")"];case"AnyTypeAnnotation":return"any";case"BooleanTypeAnnotation":return"boolean";case"BigIntTypeAnnotation":return"bigint";case"NullLiteralTypeAnnotation":return"null";case"NumberTypeAnnotation":return"number";case"SymbolTypeAnnotation":return"symbol";case"StringTypeAnnotation":return"string";case"VoidTypeAnnotation":return"void";case"ThisTypeAnnotation":return"this";case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(r.type))}}};const{hasNewlineInRange:WS}=Fi,{isJsxNode:qS,isBlockComment:US,getComments:zS,isCallExpression:GS,isMemberExpression:HS}=eg,{locStart:JS,locEnd:XS}=Zc,{builders:{line:YS,softline:KS,group:QS,indent:ZS,align:ew,ifBreak:tw,dedent:nw,breakParent:rw}}=su;function iw(e,t,n){const r=e.getValue(),i="ConditionalExpression"===r.type,u=i?"alternate":"falseType",o=e.getParentNode(),s=i?n("test"):[n("checkType")," ","extends"," ",n("extendsType")];return o.type===r.type&&o[u]===r?ew(2,s):s}const uw=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);var ow={printTernary:function(e,t,n){const r=e.getValue(),i="ConditionalExpression"===r.type,u=i?"consequent":"trueType",o=i?"alternate":"falseType",s=i?["test"]:["checkType","extendsType"],a=r[u],c=r[o],l=[];let p=!1;const f=e.getParentNode(),d=f.type===r.type&&s.some((e=>f[e]===r));let h,g,m=f.type===r.type&&!d,y=0;do{g=h||r,h=e.getParentNode(y),y++}while(h&&h.type===r.type&&s.every((e=>h[e]!==g)));const D=h||f,E=g;if(i&&(qS(r[s[0]])||qS(a)||qS(c)||function(e){const t=[e];for(let e=0;e[tw("("),ZS([KS,e]),KS,tw(")")],t=e=>"NullLiteral"===e.type||"Literal"===e.type&&null===e.value||"Identifier"===e.type&&"undefined"===e.name;l.push(" ? ",t(a)?n(u):e(n(u))," : ",c.type===r.type||t(c)?n(o):e(n(o)))}else{const e=[YS,"? ",a.type===r.type?tw("","("):"",ew(2,n(u)),a.type===r.type?tw("",")"):"",YS,": ",c.type===r.type?n(o):ew(2,n(o))];l.push(f.type!==r.type||f[o]===r||d?e:t.useTabs?nw(ZS(e)):ew(Math.max(0,t.tabWidth-2),e))}const C=[...s.map((e=>zS(r[e]))),zS(a),zS(c)].flat().some((e=>US(e)&&WS(t.originalText,JS(e),XS(e)))),b=!p&&(HS(f)||"NGPipeExpression"===f.type&&f.left===r)&&!f.computed,A=function(e){const t=e.getValue();if("ConditionalExpression"!==t.type)return!1;let n,r=t;for(let t=0;!n;t++){const i=e.getParentNode(t);GS(i)&&i.callee===r||HS(i)&&i.object===r||"TSNonNullExpression"===i.type&&i.expression===r?r=i:"NewExpression"===i.type&&i.callee===r||"TSAsExpression"===i.type&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[uw.get(n.type)]===r}(e),v=(F=[iw(e,0,n),m?l:ZS(l),i&&b&&!A?KS:""],f===D?QS(F,{shouldBreak:C}):C?[F,rw]:F);var F;return d||A?QS([ZS([KS,v]),KS]):v}};const{builders:{hardline:sw}}=su,{getLeftSidePathName:aw,hasNakedLeftSide:cw,isJsxNode:lw,isTheOnlyJsxElementInMarkdown:pw,hasComment:fw,CommentCheckFlags:dw,isNextLineEmpty:hw}=eg,{shouldPrintParamsWithoutParens:gw}=DF;function mw(e,t,n,r){const i=e.getValue(),u=[],o="ClassBody"===i.type,s=function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if("EmptyStatement"!==n.type)return n}}(i[r]);return e.each(((e,r,i)=>{const a=e.getValue();if("EmptyStatement"===a.type)return;const c=n();t.semi||o||pw(t,e)||!function(e,t){if("ExpressionStatement"!==e.getNode().type)return!1;return e.call((e=>yw(e,t)),"expression")}(e,t)?u.push(c):fw(a,dw.Leading)?u.push(n([],{needsSemi:!0})):u.push(";",c),!t.semi&&o&&Dw(a)&&function(e,t){const n=e.key&&e.key.name;if(!("static"!==n&&"get"!==n&&"set"!==n||e.value||e.typeAnnotation))return!0;if(!t)return!1;if(t.static||t.accessibility)return!1;if(!t.computed){const e=t.key&&t.key.name;if("in"===e||"instanceof"===e)return!0}if(Dw(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractClassProperty":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||"get"===t.kind||"set"===t.kind)return!1;const e=t.value?t.value.generator:t.generator;return!(!t.computed&&!e)}case"TSIndexSignature":return!0}return!1}(a,i[r+1])&&u.push(";"),a!==s&&(u.push(sw),hw(a,t)&&u.push(sw))}),r),u}function yw(e,t){const n=e.getValue();switch(n.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!gw(e,t))return!0;break;case"UnaryExpression":{const{prefix:e,operator:t}=n;if(e&&("+"===t||"-"===t))return!0;break}case"BindExpression":if(!n.object)return!0;break;case"Literal":if(n.regex)return!0;break;default:if(lw(n))return!0}return!!oD(e,t)||!!cw(n)&&e.call((e=>yw(e,t)),...aw(e,n))}const Dw=({type:e})=>"ClassProperty"===e||"PropertyDefinition"===e||"ClassPrivateProperty"===e;var Ew={printBody:function(e,t,n){return mw(e,t,n,"body")},printSwitchCaseConsequent:function(e,t,n){return mw(e,t,n,"consequent")}};const{printDanglingComments:Cw}=Yf,{isNonEmptyArray:bw}=Fi,{builders:{hardline:Aw,indent:vw}}=su,{hasComment:Fw,CommentCheckFlags:xw,isNextLineEmpty:Sw}=eg,{printHardlineAfterHeritage:ww}=nx,{printBody:Tw}=Ew;function Bw(e,t,n){const r=e.getValue(),i=bw(r.directives),u=r.body.some((e=>"EmptyStatement"!==e.type)),o=Fw(r,xw.Dangling);if(!i&&!u&&!o)return"";const s=[];if(i&&e.each(((e,r,i)=>{s.push(n()),(r"]),i=[$w("("),Mw([jw,n("expression")]),jw,$w(")")];return e?Rw([[t,n("expression")],[t,_w(i,{shouldBreak:!0})],[t,n("expression")]]):_w([t,n("expression")])}case"TSDeclareFunction":return sT(e,n,t);case"TSExportAssignment":return["export = ",n("expression"),i];case"TSModuleBlock":return lT(e,t,n);case"TSInterfaceBody":case"TSTypeLiteral":return tT(e,t,n);case"TSTypeAliasDeclaration":return pT(e,t,n);case"TSQualifiedName":return Ow(".",[n("left"),n("right")]);case"TSAbstractMethodDefinition":case"TSDeclareMethod":return rT(e,t,n);case"TSAbstractClassProperty":return nT(e,t,n);case"TSInterfaceHeritage":case"TSExpressionWithTypeArguments":return u.push(n("expression")),r.typeParameters&&u.push(n("typeParameters")),u;case"TSTemplateLiteralType":return Zw(e,n,t);case"TSNamedTupleMember":return[n("label"),r.optional?"?":"",": ",n("elementType")];case"TSRestType":return["...",n("typeAnnotation")];case"TSOptionalType":return[n("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return cT(e,t,n);case"TSClassImplements":return[n("expression"),n("typeParameters")];case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return uT(e,t,n,"params");case"TSTypeParameter":return iT(e,t,n);case"TSAsExpression":{u.push(n("expression")," as ",n("typeAnnotation"));const t=e.getParentNode();return Uw(t)&&t.callee===r||zw(t)&&t.object===r?_w([Mw([jw,...u]),jw]):u}case"TSArrayType":return[n("elementType"),"[]"];case"TSPropertySignature":return r.readonly&&u.push("readonly "),u.push(oT(e,t,n),Jw(e)),r.typeAnnotation&&u.push(": ",n("typeAnnotation")),r.initializer&&u.push(" = ",n("initializer")),u;case"TSParameterProperty":return r.accessibility&&u.push(r.accessibility+" "),r.export&&u.push("export "),r.static&&u.push("static "),r.override&&u.push("override "),r.readonly&&u.push("readonly "),u.push(n("parameter")),u;case"TSTypeQuery":return["typeof ",n("exprName")];case"TSIndexSignature":{const u=e.getParentNode(),o=r.parameters.length>1?$w(qw(t)?",":""):"",s=_w([Mw([jw,Ow([", ",jw],e.map(n,"parameters"))]),o,jw]);return[r.export?"export ":"",r.accessibility?[r.accessibility," "]:"",r.static?"static ":"",r.readonly?"readonly ":"",r.declare?"declare ":"","[",r.parameters?s:"",r.typeAnnotation?"]: ":"]",r.typeAnnotation?n("typeAnnotation"):"","ClassBody"===u.type?i:""]}case"TSTypePredicate":return[r.asserts?"asserts ":"",n("parameterName"),r.typeAnnotation?[" is ",n("typeAnnotation")]:""];case"TSNonNullExpression":return[n("expression"),"!"];case"TSImportType":return[r.isTypeOf?"typeof ":"","import(",n(r.parameter?"parameter":"argument"),")",r.qualifier?[".",n("qualifier")]:"",uT(e,t,n,"typeParameters")];case"TSLiteralType":return n("literal");case"TSIndexedAccessType":return mT(e,t,n);case"TSConstructSignatureDeclaration":case"TSCallSignatureDeclaration":case"TSConstructorType":if("TSConstructorType"===r.type&&r.abstract&&u.push("abstract "),"TSCallSignatureDeclaration"!==r.type&&u.push("new "),u.push(_w(Kw(e,n,t,!1,!0))),r.returnType||r.typeAnnotation){const e="TSConstructorType"===r.type;u.push(e?" => ":": ",n("returnType"),n("typeAnnotation"))}return u;case"TSTypeOperator":return[r.operator," ",n("typeAnnotation")];case"TSMappedType":{const u=Pw(t.originalText,Gw(r),Hw(r));return _w(["{",Mw([t.bracketSpacing?Iw:jw,r.readonly?[Ww(r.readonly,"readonly")," "]:"",Xw(e,t,n),n("typeParameter"),r.optional?Ww(r.optional,"?"):"",r.typeAnnotation?": ":"",n("typeAnnotation"),$w(i)]),kw(e,t,!0),t.bracketSpacing?Iw:jw,"}"],{shouldBreak:u})}case"TSMethodSignature":{const i=r.kind&&"method"!==r.kind?`${r.kind} `:"";u.push(r.accessibility?[r.accessibility," "]:"",i,r.export?"export ":"",r.static?"static ":"",r.readonly?"readonly ":"",r.abstract?"abstract ":"",r.declare?"declare ":"",r.computed?"[":"",n("key"),r.computed?"]":"",Jw(e));const o=Kw(e,n,t,!1,!0),s=r.returnType?"returnType":"typeAnnotation",a=r[s],c=a?n(s):"",l=Qw(r,c);return u.push(l?_w(o):o),a&&u.push(": ",_w(c)),_w(u)}case"TSNamespaceExportDeclaration":return u.push("export as namespace ",n("id")),t.semi&&u.push(";"),_w(u);case"TSEnumDeclaration":return r.declare&&u.push("declare "),r.modifiers&&u.push(Xw(e,t,n)),r.const&&u.push("const "),u.push("enum ",n("id")," "),0===r.members.length?u.push(_w(["{",kw(e,t),jw,"}"])):u.push(_w(["{",Mw([Lw,eT(e,t,"members",n),qw(t,"es5")?",":""]),kw(e,t,!0),Lw,"}"])),u;case"TSEnumMember":return u.push(n("id")),r.initializer&&u.push(" = ",n("initializer")),u;case"TSImportEqualsDeclaration":return r.isExport&&u.push("export "),u.push("import "),r.importKind&&"value"!==r.importKind&&u.push(r.importKind," "),u.push(n("id")," = ",n("moduleReference")),t.semi&&u.push(";"),_w(u);case"TSExternalModuleReference":return["require(",n("expression"),")"];case"TSModuleDeclaration":{const o=e.getParentNode(),s=Vw(r.id),a="TSModuleDeclaration"===o.type,c=r.body&&"TSModuleDeclaration"===r.body.type;if(a)u.push(".");else{r.declare&&u.push("declare "),u.push(Xw(e,t,n));const i=t.originalText.slice(Gw(r),Gw(r.id));"Identifier"===r.id.type&&"global"===r.id.name&&!/namespace|module/.test(i)||u.push(s||/(?:^|\s)module(?:\s|$)/.test(i)?"module ":"namespace ")}return u.push(n("id")),c?u.push(n("body")):r.body?u.push(" ",_w(n("body"))):u.push(i),u}case"TSPrivateIdentifier":return r.escapedText;case"TSConditionalType":return Yw(e,t,n);case"TSInferType":return["infer"," ",n("typeParameter")];case"TSIntersectionType":return fT(e,t,n);case"TSUnionType":return dT(e,t,n);case"TSFunctionType":return hT(e,t,n);case"TSTupleType":return gT(e,t,n);case"TSTypeReference":return[n("typeName"),uT(e,t,n,"typeParameters")];case"TSTypeAnnotation":return n("typeAnnotation");case"TSEmptyBodyFunctionExpression":return aT(e,t,n);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return["?",n("typeAnnotation")];case"TSJSDocNonNullableType":return["!",n("typeAnnotation")];default:throw new Error(`Unknown TypeScript node type: ${JSON.stringify(r.type)}.`)}}};const{hasNewline:DT}=Fi,{builders:{join:ET,hardline:CT},utils:{replaceTextEndOfLine:bT}}=su,{isLineComment:AT,isBlockComment:vT}=eg,{locStart:FT,locEnd:xT}=Zc;var ST={printComment:function(e,t){const n=e.getValue();if(AT(n))return t.originalText.slice(FT(n),xT(n)).trimEnd();if(vT(n)){if(function(e){const t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trim()[0]))}(n)){const e=function(e){const t=e.value.split("\n");return["/*",ET(CT,t.map(((e,n)=>0===n?e.trimEnd():" "+(n"AwaitExpression"===e.type||"BlockStatement"===e.type));if(!t||"AwaitExpression"!==t.type)return MT(o)}}return o;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return gB(e,t,n);case"ExportAllDeclaration":return mB(e,t,n);case"ImportDeclaration":return hB(e,t,n);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return yB(e,t,n);case"ImportAttribute":return[n("key"),": ",n("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":case"ClassBody":return _B(e,t,n);case"ThrowStatement":return NB(e,t,n);case"ReturnStatement":return BB(e,t,n);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return kB(e,t,n);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return bB(e,t,n);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?TB(e,t,n):xB(e,t,n);case"ObjectMethod":return TB(e,t,n);case"Decorator":return["@",n("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return CB(e,t,n);case"SequenceExpression":{const t=e.getParentNode(0);if("ExpressionStatement"===t.type||"ForStatement"===t.type){const t=[];return e.each(((e,r)=>{0===r?t.push(n()):t.push(",",RT([LT,n()]))}),"expressions"),MT(t)}return MT(IT([",",LT],e.map(n,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[n("value"),u];case"DirectiveLiteral":return WB(i,t);case"UnaryExpression":return o.push(i.operator),/[a-z]$/.test(i.operator)&&o.push(" "),qT(i.argument)?o.push(MT(["(",RT([_T,n("argument")]),_T,")"])):o.push(n("argument")),o;case"UpdateExpression":return o.push(n("argument"),i.operator),i.prefix&&o.reverse(),o;case"ConditionalExpression":return DB(e,t,n);case"VariableDeclaration":{const t=e.map(n,"declarations"),r=e.getParentNode(),s="ForStatement"===r.type||"ForInStatement"===r.type||"ForOfStatement"===r.type,a=i.declarations.some((e=>e.init));let c;return 1!==t.length||qT(i.declarations[0])?t.length>0&&(c=RT(t[0])):c=t[0],o=[i.declare?"declare ":"",i.kind,c?[" ",c]:"",RT(t.slice(1).map((e=>[",",a&&!s?jT:LT,e])))],s&&r.body!==i||o.push(u),MT(o)}case"WithStatement":return MT(["with (",n("object"),")",fB(i.body,n("body"))]);case"IfStatement":{const r=fB(i.consequent,n("consequent")),u=MT(["if (",MT([RT([_T,n("test")]),_T]),")",r]);if(o.push(u),i.alternate){const r=qT(i.consequent,UT.Trailing|UT.Line)||XT(i),u="BlockStatement"===i.consequent.type&&!r;o.push(u?" ":jT),qT(i,UT.Dangling)&&o.push(PT(e,t,!0),r?jT:" "),o.push("else",MT(fB(i.alternate,n("alternate"),"IfStatement"===i.alternate.type)))}return o}case"ForStatement":{const r=fB(i.body,n("body")),u=PT(e,t,!0),o=u?[u,_T]:"";return i.init||i.test||i.update?[o,MT(["for (",MT([RT([_T,n("init"),";",LT,n("test"),";",LT,n("update")]),_T]),")",r])]:[o,MT(["for (;;)",r])]}case"WhileStatement":return MT(["while (",MT([RT([_T,n("test")]),_T]),")",fB(i.body,n("body"))]);case"ForInStatement":return MT(["for (",n("left")," in ",n("right"),")",fB(i.body,n("body"))]);case"ForOfStatement":return MT(["for",i.await?" await":""," (",n("left")," of ",n("right"),")",fB(i.body,n("body"))]);case"DoWhileStatement":{const e=fB(i.body,n("body"));return o=[MT(["do",e])],"BlockStatement"===i.body.type?o.push(" "):o.push(jT),o.push("while (",MT([RT([_T,n("test")]),_T]),")",u),o}case"DoExpression":return[i.async?"async ":"","do ",n("body")];case"BreakStatement":return o.push("break"),i.label&&o.push(" ",n("label")),o.push(u),o;case"ContinueStatement":return o.push("continue"),i.label&&o.push(" ",n("label")),o.push(u),o;case"LabeledStatement":return"EmptyStatement"===i.body.type?[n("label"),":;"]:[n("label"),": ",n("body")];case"TryStatement":return["try ",n("block"),i.handler?[" ",n("handler")]:"",i.finalizer?[" finally ",n("finalizer")]:""];case"CatchClause":if(i.param){const e=qT(i.param,(e=>!GT(e)||e.leading&&OT(t.originalText,tB(e))||e.trailing&&OT(t.originalText,eB(e),{backwards:!0}))),r=n("param");return["catch ",e?["(",RT([_T,r]),_T,") "]:["(",r,") "],n("body")]}return["catch ",n("body")];case"SwitchStatement":return[MT(["switch (",RT([_T,n("discriminant")]),_T,")"])," {",i.cases.length>0?RT([jT,IT(jT,e.map(((e,r,i)=>{const u=e.getValue();return[n(),r!==i.length-1&&JT(u,t)?jT:""]}),"cases"))]):"",jT,"}"];case"SwitchCase":{i.test?o.push("case ",n("test"),":"):o.push("default:");const r=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(r.length>0){const i=LB(e,t,n);o.push(1===r.length&&"BlockStatement"===r[0].type?[" ",i]:RT([jT,i]))}return o}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return AB(e,t,n);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return vB(e,t,n);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":return FB(e,t,n);case"TemplateElement":return $T(i.value.raw);case"TemplateLiteral":return EB(e,n,t);case"TaggedTemplateExpression":return[n("tag"),n("typeParameters"),n("quasi")];case"PrivateIdentifier":return["#",n("name")];case"PrivateName":return["#",n("id")];case"InterpreterDirective":return o.push("#!",i.value,jT),JT(i,t)&&o.push(jT),o;case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{o.push("module {");const e=n("body");return e&&o.push(RT([jT,e]),jT),o.push("}"),o}default:throw new Error("unknown type: "+JSON.stringify(i.type))}}(e,t,n,r);if(!i)return"";const u=e.getValue(),{type:o}=u;if("ClassMethod"===o||"ClassPrivateMethod"===o||"ClassProperty"===o||"PropertyDefinition"===o||"TSAbstractClassProperty"===o||"ClassPrivateProperty"===o||"MethodDefinition"===o||"TSAbstractMethodDefinition"===o||"TSDeclareMethod"===o)return i;const s=VB(e,t,n);if(s)return MT([...s,i]);if(!oD(e,t))return r&&r.needsSemi?[";",i]:i;const a=[r&&r.needsSemi?";(":"(",i];if(WT(u)){const[e]=u.trailingComments;a.push(" /*",e.value.trimStart(),"*/"),e.printed=!0}return a.push(")"),a},embed:um,insertPragma:VT,massageAstNode:lm,hasPrettierIgnore:e=>KT(e)||oB(e),willPrintOwnComments:Uy.willPrintOwnComments,canAttachComment:function(e){return e.type&&!GT(e)&&!HT(e)&&"EmptyStatement"!==e.type&&"TemplateElement"!==e.type&&"Import"!==e.type&&"TSEmptyBodyFunctionExpression"!==e.type},printComment:RB,isBlockComment:GT,handleComments:{avoidAstMutation:!0,ownLine:Uy.handleOwnLineComment,endOfLine:Uy.handleEndOfLineComment,remaining:Uy.handleRemainingComment},getCommentChildNodes:Uy.getCommentChildNodes};const{builders:{hardline:UB,indent:zB,join:GB}}=su;const HB=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function JB(e,t){const{type:n}=e;if("ObjectProperty"!==n||"Identifier"!==e.key.type){if("UnaryExpression"===n&&"+"===e.operator)return t.argument;if("ArrayExpression"!==n)return"TemplateLiteral"===n?{type:"StringLiteral",value:e.quasis[0].value.cooked}:void 0;for(const[n,r]of e.elements.entries())null===r&&t.elements.splice(n,0,{type:"NullLiteral"})}else t.key={type:"StringLiteral",value:e.key.name}}JB.ignoredProperties=HB;var XB={preprocess:sD,print:function(e,t,n){const r=e.getValue();switch(r.type){case"JsonRoot":return[n("node"),UB];case"ArrayExpression":{if(0===r.elements.length)return"[]";const t=e.map((()=>null===e.getValue()?"null":n()),"elements");return["[",zB([UB,GB([",",UB],t)]),UB,"]"]}case"ObjectExpression":return 0===r.properties.length?"{}":["{",zB([UB,GB([",",UB],e.map(n,"properties"))]),UB,"}"];case"ObjectProperty":return[n("key"),": ",n("value")];case"UnaryExpression":return["+"===r.operator?"":r.operator,n("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return r.value?"true":"false";case"StringLiteral":case"NumericLiteral":return JSON.stringify(r.value);case"Identifier":{const t=e.getParentNode();return t&&"ObjectProperty"===t.type&&t.key===r?JSON.stringify(r.name):r.name}case"TemplateLiteral":return n(["quasis",0]);case"TemplateElement":return JSON.stringify(r.value.cooked);default:throw new Error("unknown type: "+JSON.stringify(r.type))}},massageAstNode:JB};const YB="Common";var KB={bracketSpacing:{since:"0.0.0",category:YB,type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{since:"0.0.0",category:YB,type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{since:"1.8.2",category:YB,type:"choice",default:[{since:"1.8.2",value:!0},{since:"1.9.0",value:"preserve"}],description:"How to wrap prose.",choices:[{since:"1.9.0",value:"always",description:"Wrap prose if it exceeds the print width."},{since:"1.9.0",value:"never",description:"Do not wrap prose."},{since:"1.9.0",value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{since:"2.4.0",category:YB,type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."}};const QB="JavaScript";var ZB={arrowParens:{since:"1.9.0",category:QB,type:"choice",default:[{since:"1.9.0",value:"avoid"},{since:"2.0.0",value:"always"}],description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:KB.bracketSameLine,bracketSpacing:KB.bracketSpacing,jsxBracketSameLine:{since:"0.17.0",category:QB,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{since:"1.0.0",category:QB,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:KB.singleQuote,jsxSingleQuote:{since:"1.15.0",category:QB,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{since:"1.17.0",category:QB,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{since:"0.0.0",category:QB,type:"choice",default:[{since:"0.0.0",value:!1},{since:"0.19.0",value:"none"},{since:"2.0.0",value:"es5"}],description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."},{value:"all",description:"Trailing commas wherever possible (including function arguments)."}]}},eN={name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".jsx",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],languageId:183},tN={name:"TypeScript",type:"programming",color:"#2b7489",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",languageId:378},nN={name:"TSX",type:"programming",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",languageId:94901924},rN={name:"JSON",type:"data",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",extensions:[".json",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".jsonl",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".arcconfig",".htmlhintrc",".imgbotconfig",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","mcmod.info"],languageId:174},iN={name:"JSON with Comments",type:"data",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json"],languageId:423},uN={name:"JSON5",type:"data",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",languageId:175};var oN={languages:[rh(eN,(e=>({since:"0.0.0",parsers:["babel","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],interpreters:[...e.interpreters,"zx"],extensions:[...e.extensions.filter((e=>".jsx"!==e)),".wxs"]}))),rh(eN,(()=>({name:"Flow",since:"0.0.0",parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],aliases:[],filenames:[],extensions:[".js.flow"]}))),rh(eN,(()=>({name:"JSX",since:"0.0.0",parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],aliases:void 0,filenames:void 0,extensions:[".jsx"],group:"JavaScript",interpreters:void 0,tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0}))),rh(tN,(()=>({since:"1.4.0",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]}))),rh(nN,(()=>({since:"1.4.0",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}))),rh(rN,(()=>({name:"JSON.stringify",since:"1.13.0",parsers:["json-stringify"],vscodeLanguageIds:["json"],extensions:[],filenames:["package.json","package-lock.json","composer.json"]}))),rh(rN,(e=>({since:"1.5.0",parsers:["json"],vscodeLanguageIds:["json"],extensions:e.extensions.filter((e=>".jsonl"!==e))}))),rh(iN,(e=>({since:"1.5.0",parsers:["json"],vscodeLanguageIds:["jsonc"],filenames:[...e.filenames,".eslintrc"]}))),rh(uN,(()=>({since:"1.13.0",parsers:["json5"],vscodeLanguageIds:["json5"]})))],options:ZB,printers:{estree:qB,"estree-json":XB},parsers:undefined};const{isFrontMatterNode:sN}=Fi,aN=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma"]);function cN(e,t,n){if(sN(e)&&"yaml"===e.lang&&delete t.value,"css-comment"===e.type&&"css-root"===n.type&&n.nodes.length>0){if((n.nodes[0]===e||sN(n.nodes[0])&&n.nodes[1]===e)&&(delete t.text,/^\*\s*@(?:format|prettier)\s*$/.test(e.text)))return null;if("css-root"===n.type&&_n(n.nodes)===e)return null}if("value-root"===e.type&&delete t.text,"media-query"!==e.type&&"media-query-list"!==e.type&&"media-feature-expression"!==e.type||delete t.value,"css-rule"===e.type&&delete t.params,"selector-combinator"===e.type&&(t.value=t.value.replace(/\s+/g," ")),"media-feature"===e.type&&(t.value=t.value.replace(/ /g,"")),("value-word"===e.type&&(e.isColor&&e.isHex||["initial","inherit","unset","revert"].includes(t.value.replace().toLowerCase()))||"media-feature"===e.type||"selector-root-invalid"===e.type||"selector-pseudo"===e.type)&&(t.value=t.value.toLowerCase()),"css-decl"===e.type&&(t.prop=t.prop.toLowerCase()),"css-atrule"!==e.type&&"css-import"!==e.type||(t.name=t.name.toLowerCase()),"value-number"===e.type&&(t.unit=t.unit.toLowerCase()),"media-feature"!==e.type&&"media-keyword"!==e.type&&"media-type"!==e.type&&"media-unknown"!==e.type&&"media-url"!==e.type&&"media-value"!==e.type&&"selector-attribute"!==e.type&&"selector-string"!==e.type&&"selector-class"!==e.type&&"selector-combinator"!==e.type&&"value-string"!==e.type||!t.value||(t.value=t.value.replace(/'/g,'"').replace(/\\([^\dA-Fa-f])/g,"$1")),"selector-attribute"===e.type&&(t.attribute=t.attribute.trim(),t.namespace&&"string"==typeof t.namespace&&(t.namespace=t.namespace.trim(),0===t.namespace.length&&(t.namespace=!0)),t.value&&(t.value=t.value.trim().replace(/^["']|["']$/g,""),delete t.quoted)),"media-value"!==e.type&&"media-type"!==e.type&&"value-number"!==e.type&&"selector-root-invalid"!==e.type&&"selector-class"!==e.type&&"selector-combinator"!==e.type&&"selector-tag"!==e.type||!t.value||(t.value=t.value.replace(/([\d+.Ee-]+)([A-Za-z]*)/g,((e,t,n)=>{const r=Number(t);return Number.isNaN(r)?e:r+n.toLowerCase()}))),"selector-tag"===e.type){const n=e.value.toLowerCase();["from","to"].includes(n)&&(t.value=n)}"css-atrule"===e.type&&"supports"===e.name.toLowerCase()&&delete t.value,"selector-unknown"===e.type&&delete t.value}cN.ignoredProperties=aN;var lN=cN;const{builders:{hardline:pN,markAsRoot:fN}}=su;var dN=function(e,t){if("yaml"===e.lang){const n=e.value.trim(),r=n?t(n,{parser:"yaml"},{stripTrailingHardline:!0}):"";return fN([e.startDelimiter,pN,r,r?pN:"",e.endDelimiter])}};const{builders:{hardline:hN}}=su;var gN=function(e,t,n){const r=e.getValue();if("front-matter"===r.type){const e=dN(r,n);return e?[e,hN]:""}};const mN=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");var yN=function(e){const t=e.match(mN);if(!t)return{content:e};const{startDelimiter:n,language:r,value:i="",endDelimiter:u}=t.groups;let o=r.trim()||"yaml";if("+++"===n&&(o="toml"),"yaml"!==o&&n!==u)return{content:e};const[s]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:n,endDelimiter:u,raw:s.replace(/\n$/,"")},content:s.replace(/[^\n]/g," ")+e.slice(s.length)}};var DN={hasPragma:function(e){return Rm.hasPragma(yN(e).content)},insertPragma:function(e){const{frontMatter:t,content:n}=yN(e);return(t?t.raw+"\n\n":"")+Rm.insertPragma(n)}};const{isNonEmptyArray:EN}=Fi,CN=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"]),bN=new Set(["import","use","forward"]);function AN(e,t){const n=Array.isArray(t)?t:[t];let r,i=-1;for(;r=e.getParentNode(++i);)if(n.includes(r.type))return i;return-1}function vN(e,t){const n=AN(e,t);return-1===n?null:e.getParentNode(n)}function FN(e){return"value-operator"===e.type&&"*"===e.value}function xN(e){return"value-operator"===e.type&&"/"===e.value}function SN(e){return"value-operator"===e.type&&"+"===e.value}function wN(e){return"value-operator"===e.type&&"-"===e.value}function TN(e){return"value-operator"===e.type&&"%"===e.value}function BN(e){return"value-comma_group"===e.type&&e.groups&&e.groups[1]&&"value-colon"===e.groups[1].type}function NN(e){return"value-paren_group"===e.type&&e.groups&&e.groups[0]&&BN(e.groups[0])}function kN(e){return e&&"value-colon"===e.type}var PN={getAncestorCounter:AN,getAncestorNode:vN,getPropOfDeclNode:function(e){const t=vN(e,"css-decl");return t&&t.prop&&t.prop.toLowerCase()},hasSCSSInterpolation:function(e){if(EN(e))for(let t=e.length-1;t>0;t--)if("word"===e[t].type&&"{"===e[t].value&&"word"===e[t-1].type&&e[t-1].value.endsWith("#"))return!0;return!1},hasStringOrFunction:function(e){if(EN(e))for(let t=0;t","<=",">="].includes(e.value)},isEqualityOperatorNode:function(e){return"value-word"===e.type&&["==","!="].includes(e.value)},isMultiplicationNode:FN,isDivisionNode:xN,isAdditionNode:SN,isSubtractionNode:wN,isModuloNode:TN,isMathOperatorNode:function(e){return FN(e)||xN(e)||SN(e)||wN(e)||TN(e)},isEachKeywordNode:function(e){return"value-word"===e.type&&"in"===e.value},isForKeywordNode:function(e){return"value-word"===e.type&&["from","through","end"].includes(e.value)},isURLFunctionNode:function(e){return"value-func"===e.type&&"url"===e.value.toLowerCase()},isIfElseKeywordNode:function(e){return"value-word"===e.type&&["and","or","not"].includes(e.value)},hasComposesNode:function(e){return e.value&&"value-root"===e.value.type&&e.value.group&&"value-value"===e.value.group.type&&"composes"===e.prop.toLowerCase()},hasParensAroundNode:function(e){return e.value&&e.value.group&&e.value.group.group&&"value-paren_group"===e.value.group.group.type&&null!==e.value.group.group.open&&null!==e.value.group.group.close},hasEmptyRawBefore:function(e){return e.raws&&""===e.raws.before},isSCSSNestedPropertyNode:function(e){return!!e.selector&&e.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*?\n/,"").trim().endsWith(":")},isDetachedRulesetCallNode:function(e){return e.raws&&e.raws.params&&/^\(\s*\)$/.test(e.raws.params)},isTemplatePlaceholderNode:function(e){return e.name.startsWith("prettier-placeholder")},isTemplatePropNode:function(e){return e.prop.startsWith("@prettier-placeholder")},isPostcssSimpleVarNode:function(e,t){return"$$"===e.value&&"value-func"===e.type&&t&&"value-word"===t.type&&!t.raws.before},isKeyValuePairNode:BN,isKeyValuePairInParenGroupNode:NN,isKeyInValuePairNode:function(e,t){if(!BN(t))return!1;const{groups:n}=t,r=n.indexOf(e);return-1!==r&&kN(n[r+1])},isSCSSMapItemNode:function(e){const t=e.getValue();if(0===t.groups.length)return!1;const n=e.getParentNode(1);if(!(NN(t)||n&&NN(n)))return!1;const r=vN(e,"css-decl");return!!(r&&r.prop&&r.prop.startsWith("$"))||(!!NN(n)||"value-func"===n.type)},isInlineValueCommentNode:function(e){return"value-comment"===e.type&&e.inline},isHashNode:function(e){return"value-word"===e.type&&"#"===e.value},isLeftCurlyBraceNode:function(e){return"value-word"===e.type&&"{"===e.value},isRightCurlyBraceNode:function(e){return"value-word"===e.type&&"}"===e.value},isWordNode:function(e){return["value-word","value-atword"].includes(e.type)},isColonNode:kN,isMediaAndSupportsKeywords:function(e){return e.value&&["not","and","or"].includes(e.value.toLowerCase())},isColorAdjusterFuncNode:function(e){return"value-func"===e.type&&CN.has(e.value.toLowerCase())},lastLineHasInlineComment:function(e){return/\/\//.test(e.split(/[\n\r]/).pop())},stringifyNode:function e(t){if(t.groups){return(t.open&&t.open.value?t.open.value:"")+t.groups.reduce(((n,r,i)=>n+e(r)+("comma_group"===t.groups[0].type&&i!==t.groups.length-1?",":"")),"")+(t.close&&t.close.value?t.close.value:"")}const n=t.raws&&t.raws.before?t.raws.before:"",r=t.raws&&t.raws.quote?t.raws.quote:"";return n+r+("atword"===t.type?"@":"")+(t.value?t.value:"")+r+(t.unit?t.unit:"")+(t.group?e(t.group):"")+(t.raws&&t.raws.after?t.raws.after:"")},isAtWordPlaceholderNode:function(e){return e&&"value-atword"===e.type&&e.value.startsWith("prettier-placeholder-")},isModuleRuleName:function(e){return bN.has(e)}},ON=function(e,t){let n=0;for(let r=0;r{const o=u[i-1];if(o&&"css-comment"===o.type&&"prettier-ignore"===o.text.trim()){const n=e.getValue();r.push(t.originalText.slice(Kk(n),Qk(n)))}else r.push(n());i!==u.length-1&&("css-comment"===u[i+1].type&&!qN(t.originalText,Kk(u[i+1]),{backwards:!0})&&!UN(u[i])||"css-atrule"===u[i+1].type&&"else"===u[i+1].name&&"css-comment"!==u[i].type?r.push(" "):(r.push(t.__isHTMLStyleAttribute?JN:XN),zN(t.originalText,e.getValue(),Qk)&&!UN(u[i])&&r.push(XN)))}),"nodes"),r}const tP=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gs,nP=new RegExp(tP.source+"|"+`(${/[$@]?[A-Z_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/g.source})?`+`(${/(?:\d*\.\d+|\d+\.?)(?:[Ee][+-]?\d+)?/g.source})`+`(${/[A-Za-z]+/g.source})?`,"g");function rP(e,t){return e.replace(tP,(e=>WN(e,t)))}function iP(e,t){const n=t.singleQuote?"'":'"';return e.includes('"')||e.includes("'")?e:n+e+n}function uP(e){return e.replace(nP,((e,t,n,r,i)=>!n&&r?oP(r)+ak(i||""):e))}function oP(e){return VN(e).replace(/\.0(?=$|e)/,"")}var sP={print:function(e,t,n){const r=e.getValue();if(!r)return"";if("string"==typeof r)return r;switch(r.type){case"front-matter":return[r.raw,XN];case"css-root":{const i=eP(e,t,n),u=r.raws.after.trim();return[i,u?` ${u}`:"",ik(i).length>0?XN:""]}case"css-comment":{const e=r.inline||r.raws.inline,n=t.originalText.slice(Kk(r),Qk(r));return e?n.trimEnd():n}case"css-rule":return[n("selector"),r.important?" !important":"",r.nodes?[r.selector&&"selector-unknown"===r.selector.type&&Xk(r.selector.value)?JN:" ","{",r.nodes.length>0?ZN([XN,eP(e,t,n)]):"",XN,"}",Ek(r)?";":""]:";"];case"css-decl":{const i=e.getParentNode(),{between:u}=r.raws,o=u.trim(),s=":"===o;let a=kk(r)?rk(n("value")):n("value");return!s&&Xk(o)&&(a=ZN([XN,ek(a)])),[r.raws.before.replace(/[\s;]/g,""),lk(e)?r.prop:ak(r.prop),o.startsWith("//")?" ":"",o,r.extend?"":" ",yk(t)&&r.extend&&r.selector?["extend(",n("selector"),")"]:"",a,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",ZN([YN,eP(e,t,n)]),YN,"}"]:Mk(r)&&!i.raws.semicolon&&";"!==t.originalText[Qk(r)-1]?"":t.__isHTMLStyleAttribute&&mk(e,r)?tk(";"):";"]}case"css-atrule":{const i=e.getParentNode(),u=_k(r)&&!i.raws.semicolon&&";"!==t.originalText[Qk(r)-1];if(yk(t)){if(r.mixin)return[n("selector"),r.important?" !important":"",u?"":";"];if(r.function)return[r.name,n("params"),u?"":";"];if(r.variable)return["@",r.name,": ",r.value?n("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",ZN([r.nodes.length>0?YN:"",eP(e,t,n)]),YN,"}"]:"",u?"":";"]}return["@",jk(r)||r.name.endsWith(":")?r.name:ak(r.name),r.params?[jk(r)?"":_k(r)?""===r.raws.afterName?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/.test(r.raws.afterName)?[XN,XN]:/^\s*\n/.test(r.raws.afterName)?XN:" ":" ",n("params")]:"",r.selector?ZN([" ",n("selector")]):"",r.value?KN([" ",n("value"),Dk(r)?Pk(r)?" ":JN:""]):"else"===r.name?" ":"",r.nodes?[Dk(r)?"":r.selector&&!r.selector.nodes&&"string"==typeof r.selector.value&&Xk(r.selector.value)||!r.selector&&"string"==typeof r.params&&Xk(r.params)?JN:" ","{",ZN([r.nodes.length>0?YN:"",eP(e,t,n)]),YN,"}"]:u?"":";"]}case"media-query-list":{const t=[];return e.each((e=>{const r=e.getValue();"media-query"===r.type&&""===r.value||t.push(n())}),"nodes"),KN(ZN(HN(JN,t)))}case"media-query":return[HN(" ",e.map(n,"nodes")),mk(e,r)?"":","];case"media-type":return uP(rP(r.value,t));case"media-feature-expression":return r.nodes?["(",...e.map(n,"nodes"),")"]:r.value;case"media-feature":return ak(rP(r.value.replace(/ +/g," "),t));case"media-colon":return[r.value," "];case"media-value":return uP(rP(r.value,t));case"media-keyword":return rP(r.value,t);case"media-url":return rP(r.value.replace(/^url\(\s+/gi,"url(").replace(/\s+\)$/g,")"),t);case"media-unknown":return r.value;case"selector-root":return KN([pk(e,"custom-selector")?[ok(e,"css-atrule").customSelector,JN]:"",HN([",",pk(e,["extend","custom-selector","nest"])?JN:XN],e.map(n,"nodes"))]);case"selector-selector":return KN(ZN(e.map(n,"nodes")));case"selector-comment":return r.value;case"selector-string":return rP(r.value,t);case"selector-tag":{const t=e.getParentNode(),n=t&&t.nodes.indexOf(r),i=n&&t.nodes[n-1];return[r.namespace?[!0===r.namespace?"":r.namespace.trim(),"|"]:"","selector-nesting"===i.type?r.value:uP(dk(e,r.value)?r.value.toLowerCase():r.value)]}case"selector-id":return["#",r.value];case"selector-class":return[".",uP(rP(r.value,t))];case"selector-attribute":return["[",r.namespace?[!0===r.namespace?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator?r.operator:"",r.value?iP(rP(r.value.trim(),t),t):"",r.insensitive?" i":"","]"];case"selector-combinator":if("+"===r.value||">"===r.value||"~"===r.value||">>>"===r.value){const t=e.getParentNode();return["selector-selector"===t.type&&t.nodes[0]===r?"":JN,r.value,mk(e,r)?"":" "]}return[r.value.trim().startsWith("(")?JN:"",uP(rP(r.value.trim(),t))||JN];case"selector-universal":return[r.namespace?[!0===r.namespace?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[ak(r.value),GN(r.nodes)?["(",HN(", ",e.map(n,"nodes")),")"]:""];case"selector-nesting":return r.value;case"selector-unknown":{const n=ok(e,"css-rule");if(n&&n.isSCSSNesterProperty)return uP(rP(ak(r.value),t));const i=e.getParentNode();if(i.raws&&i.raws.selector){const e=Kk(i),n=e+i.raws.selector.length;return t.originalText.slice(e,n).trim()}const u=e.getParentNode(1);if("value-paren_group"===i.type&&u&&"value-func"===u.type&&"selector"===u.value){const e=Kk(i.open)+1,n=Qk(i.close)-1,r=t.originalText.slice(e,n).trim();return Xk(r)?[nk,r]:r}return r.value}case"value-value":case"value-root":return n("group");case"value-comment":return t.originalText.slice(Kk(r),Qk(r));case"value-comma_group":{const t=e.getParentNode(),i=e.getParentNode(1),u=sk(e),o=u&&"value-value"===t.type&&("grid"===u||u.startsWith("grid-template")),s=ok(e,"css-atrule"),a=s&&Dk(s),c=r.groups.some((e=>Vk(e))),l=e.map(n,"groups"),p=[],f=ck(e,"url");let d=!1,h=!1;for(let n=0;n0&&"value-comma_group"===r.groups[0].type&&r.groups[0].groups.length>0&&"value-word"===r.groups[0].groups[0].type&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?n("open"):"",HN(",",e.map(n,"groups")),r.close?n("close"):""];if(!r.open){const t=e.map(n,"groups"),r=[];for(let e=0;e{const t=e.getValue(),r=n();if(Ik(t)&&"value-comma_group"===t.type&&t.groups&&"value-paren_group"!==t.groups[0].type&&t.groups[2]&&"value-paren_group"===t.groups[2].type){const e=ik(r.contents.contents);return e[1]=KN(e[1]),KN(ek(r))}return r}),"groups"))]),tk(!s&&gk(t.parser,t.originalText)&&u&&Zk(t)?",":""),YN,r.close?n("close"):""],{shouldBreak:u&&!a});return a?ek(c):c}case"value-func":return[r.value,pk(e,"supports")&&Hk(r)?" ":"",n("group")];case"value-paren":return r.value;case"value-number":return[oP(r.value),ak(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||hk(r.value)?r.value.toLowerCase():r.value;case"value-colon":{const t=e.getParentNode(),n=t&&t.groups.indexOf(r),i=n&&t.groups[n-1];return[r.value,i&&"string"==typeof i.value&&"\\"===_n(i.value)||ck(e,"url")?"":JN]}case"value-comma":return[r.value," "];case"value-string":return WN(r.raws.quote+r.value+r.raws.quote,t);case"value-atword":return["@",r.value];case"value-unicode-range":case"value-unknown":return r.value;default:throw new Error(`Unknown postcss type ${JSON.stringify(r.type)}`)}},embed:gN,insertPragma:uk,massageAstNode:lN},aP={singleQuote:KB.singleQuote},cP={name:"PostCSS",type:"markup",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",languageId:262764437},lP={name:"Less",type:"markup",color:"#1d365d",extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",languageId:198},pP={name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],languageId:329};var fP={languages:[rh({name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css"],languageId:50},(e=>({since:"1.4.0",parsers:["css"],vscodeLanguageIds:["css"],extensions:[...e.extensions,".wxss"]}))),rh(cP,(()=>({since:"1.4.0",parsers:["css"],vscodeLanguageIds:["postcss"]}))),rh(lP,(()=>({since:"1.4.0",parsers:["less"],vscodeLanguageIds:["less"]}))),rh(pP,(()=>({since:"1.4.0",parsers:["scss"],vscodeLanguageIds:["scss"]})))],options:aP,printers:{postcss:sP},parsers:undefined};var dP={locStart:function(e){return e.loc.start.offset},locEnd:function(e){return e.loc.end.offset}};function hP(e,t){if("TextNode"===e.type){const n=e.chars.trim();if(!n)return null;t.chars=n.replace(/[\t\n\f\r ]+/g," ")}"AttrNode"===e.type&&"class"===e.name.toLowerCase()&&delete t.value}hP.ignoredProperties=new Set(["loc","selfClosing"]);var gP=hP;const mP=new Set(["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"]);function yP(e){return DP(e,["TextNode"])&&!/\S/.test(e.chars)}function DP(e,t){return e&&t.includes(e.type)}function EP(e,t){return DP(e.getParentNode(0),t)}function CP(e,t){const n=e.getValue(),r=e.getParentNode(0)||{},i=r.children||r.body||r.parts||[],u=i.indexOf(n);return-1!==u&&i[u+t]}function bP(e,t=1){return CP(e,-t)}function AP(e){return CP(e,1)}function vP(e){return DP(e,["MustacheCommentStatement"])&&"string"==typeof e.value&&"prettier-ignore"===e.value.trim()}var FP={getNextNode:AP,getPreviousNode:bP,hasPrettierIgnore:function(e){const t=e.getValue(),n=bP(e,2);return vP(t)||vP(n)},isLastNodeOfSiblings:function(e){const t=e.getValue(),n=e.getParentNode(0);return!(!EP(e,["ElementNode"])||_n(n.children)!==t)||!(!EP(e,["Block"])||_n(n.body)!==t)},isNextNodeOfSomeType:function(e,t){return DP(AP(e),t)},isNodeOfSomeType:DP,isParentOfSomeType:EP,isPreviousNodeOfSomeType:function(e,t){return DP(bP(e),t)},isVoid:function(e){return function(e){return DP(e,["ElementNode"])&&"string"==typeof e.tag&&(function(e){return e.toUpperCase()===e}(e.tag[0])||e.tag.includes("."))}(e)&&e.children.every((e=>yP(e)))||mP.has(e.tag)},isWhitespaceNode:yP};const{builders:{dedent:xP,fill:SP,group:wP,hardline:TP,ifBreak:BP,indent:NP,join:kP,line:PP,softline:OP},utils:{getDocParts:IP,replaceTextEndOfLine:LP}}=su,{isNonEmptyArray:jP}=Fi,{locStart:_P,locEnd:MP}=dP,{getNextNode:RP,getPreviousNode:$P,hasPrettierIgnore:VP,isLastNodeOfSiblings:WP,isNextNodeOfSomeType:qP,isNodeOfSomeType:UP,isParentOfSomeType:zP,isPreviousNodeOfSomeType:GP,isVoid:HP,isWhitespaceNode:JP}=FP;function XP(e,t){return _P(e)-_P(t)}function YP(e,t,n){const r=e.getValue().children.every((e=>JP(e)));return"ignore"===t.htmlWhitespaceSensitivity&&r?"":e.map(((e,r)=>{const i=n();return 0===r&&"ignore"===t.htmlWhitespaceSensitivity?[OP,i]:i}),"children")}function KP(e){return HP(e)?BP([OP,"/>"],[" />",OP]):BP([OP,">"],">")}function QP(e){return[!1===e.escaped?"{{{":"{{",e.strip&&e.strip.open?"~":""]}function ZP(e){const t=!1===e.escaped?"}}}":"}}";return[e.strip&&e.strip.close?"~":"",t]}function eO(e){return[QP(e),e.closeStrip.open?"~":"","/"]}function tO(e){const t=ZP(e);return[e.closeStrip.close?"~":"",t]}function nO(e){return[QP(e),e.inverseStrip.open?"~":""]}function rO(e){const t=ZP(e);return[e.inverseStrip.close?"~":"",t]}function iO(e,t){const n=e.getValue(),r=function(e){return[QP(e),e.openStrip.open?"~":"","#"]}(n),i=function(e){const t=ZP(e);return[e.openStrip.close?"~":"",t]}(n),u=[DO(e,t)],o=EO(e,t);if(o&&u.push(PP,o),jP(n.program.blockParams)){const e=CO(n.program);u.push(PP,e)}return wP([r,NP(u),OP,i])}function uO(e,t){return["ignore"===t.htmlWhitespaceSensitivity?TP:"",nO(e),"else",rO(e)]}function oO(e,t){const n=e.getParentNode(1);return[nO(n),"else if ",EO(e,t),rO(n)]}function sO(e,t,n){const r=e.getValue();if("ignore"===n.htmlWhitespaceSensitivity){return[aO(r)?OP:TP,eO(r),t("path"),tO(r)]}return[eO(r),t("path"),tO(r)]}function aO(e){return UP(e,["BlockStatement"])&&e.program.body.every((e=>JP(e)))}function cO(e){return UP(e,["BlockStatement"])&&e.inverse}function lO(e,t,n){if(aO(e.getValue()))return"";const r=t("program");return"ignore"===n.htmlWhitespaceSensitivity?NP([TP,r]):NP(r)}function pO(e,t,n){const r=e.getValue(),i=t("inverse"),u="ignore"===n.htmlWhitespaceSensitivity?[TP,i]:i;return function(e){return cO(e)&&1===e.inverse.body.length&&UP(e.inverse.body[0],["BlockStatement"])&&"if"===e.inverse.body[0].path.parts[0]}(r)?u:cO(r)?[uO(r,n),NP(u)]:""}function fO(e){return IP(kP(PP,function(e){return e.split(/[\t\n\f\r ]+/)}(e)))}function dO(e){return(e="string"==typeof e?e:"").split("\n").length-1}function hO(e=0){return new Array(Math.min(e,2)).fill(TP)}function gO(e,t){const n={quote:'"',regex:/"/g},r={quote:"'",regex:/'/g},i=e.singleQuote?r:n,u=i===r?n:r;let o=!1;if(t.includes(i.quote)||t.includes(u.quote)){o=(t.match(i.regex)||[]).length>(t.match(u.regex)||[]).length}return o?u:i}function mO(e,t){const n=DO(e,t),r=EO(e,t);return r?NP([n,PP,wP(r)]):n}function yO(e,t){const n=DO(e,t),r=EO(e,t);return r?[NP([n,PP,r]),OP]:n}function DO(e,t){return t("path")}function EO(e,t){const n=e.getValue(),r=[];if(n.params.length>0){const n=e.map(t,"params");r.push(...n)}if(n.hash&&n.hash.pairs.length>0){const e=t("hash");r.push(e)}return 0===r.length?"":kP(PP,r)}function CO(e){return["as |",e.blockParams.join(" "),"|"]}var bO={print:function(e,t,n){const r=e.getValue();if(!r)return"";if(VP(e))return t.originalText.slice(_P(r),MP(r));switch(r.type){case"Block":case"Program":case"Template":return wP(e.map(n,"body"));case"ElementNode":{const i=wP(function(e,t){const n=e.getValue(),r=["attributes","modifiers","comments"].filter((e=>jP(n[e]))),i=r.flatMap((e=>n[e])).sort(XP);for(const n of r)e.each((e=>{const n=i.indexOf(e.getValue());i.splice(n,1,[PP,t()])}),n);jP(n.blockParams)&&i.push(PP,CO(n));return["<",n.tag,NP(i),KP(n)]}(e,n)),u="ignore"===t.htmlWhitespaceSensitivity&&qP(e,["ElementNode"])?OP:"";if(HP(r))return[i,u];const o=[""];return 0===r.children.length?[i,NP(o),u]:"ignore"===t.htmlWhitespaceSensitivity?[i,NP(YP(e,t,n)),TP,NP(o),u]:[i,NP(wP(YP(e,t,n))),NP(o),u]}case"BlockStatement":{const i=e.getParentNode(1);return i&&i.inverse&&1===i.inverse.body.length&&i.inverse.body[0]===r&&"if"===i.inverse.body[0].path.parts[0]?[oO(e,n),lO(e,n,t),pO(e,n,t)]:[iO(e,n),wP([lO(e,n,t),pO(e,n,t),sO(e,n,t)])]}case"ElementModifierStatement":return wP(["{{",yO(e,n),"}}"]);case"MustacheStatement":return wP([QP(r),yO(e,n),ZP(r)]);case"SubExpression":return wP(["(",mO(e,n),OP,")"]);case"AttrNode":{const e="TextNode"===r.value.type;if(e&&""===r.value.chars&&_P(r.value)===MP(r.value))return r.name;const i=e?gO(t,r.value.chars).quote:"ConcatStatement"===r.value.type?gO(t,r.value.parts.filter((e=>"TextNode"===e.type)).map((e=>e.chars)).join("")).quote:"",u=n("value");return[r.name,"=",i,"class"===r.name&&i?wP(NP(u)):u,i]}case"ConcatStatement":return e.map(n,"parts");case"Hash":return kP(PP,e.map(n,"pairs"));case"HashPair":return[r.key,"=",n("value")];case"TextNode":{let n=r.chars.replace(/{{/g,"\\{{");const i=function(e){for(let t=0;t<2;t++){const n=e.getParentNode(t);if(n&&"AttrNode"===n.type)return n.name.toLowerCase()}}(e);if(i){if("class"===i){const t=n.trim().split(/\s+/).join(" ");let r=!1,i=!1;return zP(e,["ConcatStatement"])&&(GP(e,["MustacheStatement"])&&/^\s/.test(n)&&(r=!0),qP(e,["MustacheStatement"])&&/\s$/.test(n)&&""!==t&&(i=!0)),[r?PP:"",t,i?PP:""]}return LP(n)}const u=/^[\t\n\f\r ]*$/.test(n),o=!$P(e),s=!RP(e);if("ignore"!==t.htmlWhitespaceSensitivity){const t=/^[\t\n\f\r ]*/,r=/[\t\n\f\r ]*$/,i=s&&zP(e,["Template"]),a=o&&zP(e,["Template"]);if(u){if(a||i)return"";let t=[PP];const r=dO(n);return r&&(t=hO(r)),WP(e)&&(t=t.map((e=>xP(e)))),t}const[c]=n.match(t),[l]=n.match(r);let p=[];if(c){p=[PP];const e=dO(c);e&&(p=hO(e)),n=n.replace(t,"")}let f=[];if(l){if(!i){f=[PP];const t=dO(l);t&&(f=hO(t)),WP(e)&&(f=f.map((e=>xP(e))))}n=n.replace(r,"")}return[...p,SP(fO(n)),...f]}const a=dO(n);let c=function(e){return dO(((e="string"==typeof e?e:"").match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"")}(n),l=function(e){return dO(((e="string"==typeof e?e:"").match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"")}(n);if((o||s)&&u&&zP(e,["Block","ElementNode","Template"]))return"";u&&a?(c=Math.min(a,2),l=0):(qP(e,["BlockStatement","ElementNode"])&&(l=Math.max(l,1)),GP(e,["BlockStatement","ElementNode"])&&(c=Math.max(c,1)));let p="",f="";return 0===l&&qP(e,["MustacheStatement"])&&(f=" "),0===c&&GP(e,["MustacheStatement"])&&(p=" "),o&&(c=0,p=""),s&&(l=0,f=""),n=n.replace(/^[\t\n\f\r ]+/g,p).replace(/[\t\n\f\r ]+$/,f),[...hO(c),SP(fO(n)),...hO(l)]}case"MustacheCommentStatement":{const e=_P(r),n=MP(r),i="~"===t.originalText.charAt(e+2),u="~"===t.originalText.charAt(n-3),o=r.value.includes("}}")?"--":"";return["{{",i?"~":"","!",o,r.value,o,u?"~":"","}}"]}case"PathExpression":return r.original;case"BooleanLiteral":return String(r.value);case"CommentStatement":return["\x3c!--",r.value,"--\x3e"];case"StringLiteral":return function(e,t){const{quote:n,regex:r}=gO(t,e);return[n,e.replace(r,`\\${n}`),n]}(r.value,t);case"NumberLiteral":return String(r.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new Error("unknown glimmer type: "+JSON.stringify(r.type))}},massageAstNode:gP};var AO={languages:[rh({name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",languageId:155},(()=>({since:"2.3.0",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]})))],printers:{glimmer:bO},parsers:undefined};var vO={hasPragma:function(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}};var FO={locStart:function(e){return"number"==typeof e.start?e.start:e.loc&&e.loc.start},locEnd:function(e){return"number"==typeof e.end?e.end:e.loc&&e.loc.end}};const{builders:{join:xO,hardline:SO,line:wO,softline:TO,group:BO,indent:NO,ifBreak:kO}}=su,{isNextLineEmpty:PO,isNonEmptyArray:OO}=Fi,{insertPragma:IO}=vO,{locStart:LO,locEnd:jO}=FO;function _O(e,t,n){if(0===n.directives.length)return"";const r=xO(wO,e.map(t,"directives"));return"FragmentDefinition"===n.kind||"OperationDefinition"===n.kind?BO([wO,r]):[" ",BO(NO([TO,r]))]}function MO(e,t,n){const r=e.getValue().length;return e.map(((e,i)=>{const u=n();return PO(t.originalText,e.getValue(),jO)&&in(e)),"interfaces");for(let e=0;e{r.push(n()),i!==u.length-1&&(r.push(SO),PO(t.originalText,e.getValue(),jO)&&r.push(SO))}),"definitions"),[...r,SO]}case"OperationDefinition":{const i="{"!==t.originalText[LO(r)],u=Boolean(r.name);return[i?r.operation:"",i&&u?[" ",n("name")]:"",i&&!u&&OO(r.variableDefinitions)?" ":"",OO(r.variableDefinitions)?BO(["(",NO([TO,xO([kO("",", "),TO],e.map(n,"variableDefinitions"))]),TO,")"]):"",_O(e,n,r),r.selectionSet&&(i||u)?" ":"",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),OO(r.variableDefinitions)?BO(["(",NO([TO,xO([kO("",", "),TO],e.map(n,"variableDefinitions"))]),TO,")"]):""," on ",n("typeCondition"),_O(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"selections"))]),SO,"}"];case"Field":return BO([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?BO(["(",NO([TO,xO([kO("",", "),TO],e.call((e=>MO(e,t,n)),"arguments"))]),TO,")"]):"",_O(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":return r.block?['"""',SO,xO(SO,r.value.replace(/"""/g,"\\$&").split("\n")),SO,'"""']:['"',r.value.replace(/["\\]/g,"\\$&").replace(/\n/g,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return BO(["[",NO([TO,xO([kO("",", "),TO],e.map(n,"values"))]),TO,"]"]);case"ObjectValue":return BO(["{",t.bracketSpacing&&r.fields.length>0?" ":"",NO([TO,xO([kO("",", "),TO],e.map(n,"fields"))]),TO,kO("",t.bracketSpacing&&r.fields.length>0?" ":""),"}"]);case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?BO(["(",NO([TO,xO([kO("",", "),TO],e.call((e=>MO(e,t,n)),"arguments"))]),TO,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_O(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":return[n("description"),r.description?SO:"","ObjectTypeExtension"===r.kind?"extend ":"","type ",n("name"),r.interfaces.length>0?[" implements ",...RO(e,t,n)]:"",_O(e,n,r),r.fields.length>0?[" {",NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"fields"))]),SO,"}"]:""];case"FieldDefinition":return[n("description"),r.description?SO:"",n("name"),r.arguments.length>0?BO(["(",NO([TO,xO([kO("",", "),TO],e.call((e=>MO(e,t,n)),"arguments"))]),TO,")"]):"",": ",n("type"),_O(e,n,r)];case"DirectiveDefinition":return[n("description"),r.description?SO:"","directive ","@",n("name"),r.arguments.length>0?BO(["(",NO([TO,xO([kO("",", "),TO],e.call((e=>MO(e,t,n)),"arguments"))]),TO,")"]):"",r.repeatable?" repeatable":""," on ",xO(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[n("description"),r.description?SO:"","EnumTypeExtension"===r.kind?"extend ":"","enum ",n("name"),_O(e,n,r),r.values.length>0?[" {",NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"values"))]),SO,"}"]:""];case"EnumValueDefinition":return[n("description"),r.description?SO:"",n("name"),_O(e,n,r)];case"InputValueDefinition":return[n("description"),r.description?r.description.block?SO:wO:"",n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_O(e,n,r)];case"InputObjectTypeExtension":case"InputObjectTypeDefinition":return[n("description"),r.description?SO:"","InputObjectTypeExtension"===r.kind?"extend ":"","input ",n("name"),_O(e,n,r),r.fields.length>0?[" {",NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"fields"))]),SO,"}"]:""];case"SchemaDefinition":return["schema",_O(e,n,r)," {",r.operationTypes.length>0?NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"operationTypes"))]):"",SO,"}"];case"OperationTypeDefinition":return[n("operation"),": ",n("type")];case"InterfaceTypeExtension":case"InterfaceTypeDefinition":return[n("description"),r.description?SO:"","InterfaceTypeExtension"===r.kind?"extend ":"","interface ",n("name"),r.interfaces.length>0?[" implements ",...RO(e,t,n)]:"",_O(e,n,r),r.fields.length>0?[" {",NO([SO,xO(SO,e.call((e=>MO(e,t,n)),"fields"))]),SO,"}"]:""];case"FragmentSpread":return["...",n("name"),_O(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_O(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return BO([n("description"),r.description?SO:"",BO(["UnionTypeExtension"===r.kind?"extend ":"","union ",n("name"),_O(e,n,r),r.types.length>0?[" =",kO(""," "),NO([kO([wO," "]),xO([wO,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[n("description"),r.description?SO:"","ScalarTypeExtension"===r.kind?"extend ":"","scalar ",n("name"),_O(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Error("unknown graphql type: "+JSON.stringify(r.kind))}},massageAstNode:$O,hasPrettierIgnore:function(e){const t=e.getValue();return t&&Array.isArray(t.comments)&&t.comments.some((e=>"prettier-ignore"===e.value.trim()))},insertPragma:IO,printComment:function(e){const t=e.getValue();if("Comment"===t.kind)return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))},canAttachComment:function(e){return e.kind&&"Comment"!==e.kind}},WO={bracketSpacing:KB.bracketSpacing};var qO={languages:[rh({name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",languageId:139},(()=>({since:"1.5.0",parsers:["graphql"],vscodeLanguageIds:["graphql"]})))],options:WO,printers:{graphql:VO},parsers:undefined};var UO={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}};const{getLast:zO}=Fi,{locStart:GO,locEnd:HO}=UO,{cjkPattern:JO,kPattern:XO,punctuationPattern:YO}={cjkPattern:"(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u2ff0-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?",kPattern:"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]",punctuationPattern:"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"},KO=["liquidNode","inlineCode","emphasis","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"],QO=[...KO,"tableCell","paragraph","heading"],ZO=new RegExp(XO),eI=new RegExp(YO);function tI(e,t){const[,n,r,i]=t.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);return{numberText:n,marker:r,leadingSpaces:i}}var nI={mapAst:function(e,t){return function e(n,r,i){const u=Object.assign({},t(n,r,i));return u.children&&(u.children=u.children.map(((t,n)=>e(t,n,[u,...i])))),u}(e,null,[])},splitText:function(e,t){const n="non-cjk",r="cj-letter",i="cjk-punctuation",u=[],o=("preserve"===t.proseWrap?e:e.replace(new RegExp(`(${JO})\n(${JO})`,"g"),"$1$2")).split(/([\t\n ]+)/);for(const[e,t]of o.entries()){if(e%2==1){u.push({type:"whitespace",value:/\n/.test(t)?"\n":" "});continue}if((0===e||e===o.length-1)&&""===t)continue;const a=t.split(new RegExp(`(${JO})`));for(const[e,t]of a.entries())(0!==e&&e!==a.length-1||""!==t)&&(e%2!=0?s(eI.test(t)?{type:"word",value:t,kind:i,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:t,kind:ZO.test(t)?"k-letter":r,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==t&&s({type:"word",value:t,kind:n,hasLeadingPunctuation:eI.test(t[0]),hasTrailingPunctuation:eI.test(zO(t))}))}return u;function s(e){const t=zO(u);var o,s;t&&"word"===t.type&&(t.kind===n&&e.kind===r&&!t.hasTrailingPunctuation||t.kind===r&&e.kind===n&&!e.hasLeadingPunctuation?u.push({type:"whitespace",value:" "}):(o=n,s=i,t.kind===o&&e.kind===s||t.kind===s&&e.kind===o||[t.value,e.value].some((e=>/\u3000/.test(e)))||u.push({type:"whitespace",value:""}))),u.push(e)}},punctuationPattern:YO,getFencedCodeBlockValue:function(e,t){const{value:n}=e;return e.position.end.offset===t.length&&n.endsWith("\n")&&t.endsWith("\n")?n.slice(0,-1):n},getOrderedListItemInfo:tI,hasGitDiffFriendlyOrderedList:function(e,t){if(!e.ordered)return!1;if(e.children.length<2)return!1;const n=Number(tI(e.children[0],t.originalText).numberText),r=Number(tI(e.children[1],t.originalText).numberText);if(0===n&&e.children.length>2){const n=Number(tI(e.children[2],t.originalText).numberText);return 1===r&&1===n}return 1===r},INLINE_NODE_TYPES:KO,INLINE_NODE_WRAPPER_TYPES:QO,isAutolink:function(e){if(!e||"link"!==e.type||1!==e.children.length)return!1;const t=e.children[0];return t&&GO(e)===GO(t)&&HO(e)===HO(t)}};const{inferParserByLanguage:rI,getMaxContinuousCount:iI}=Fi,{builders:{hardline:uI,markAsRoot:oI},utils:{replaceEndOfLine:sI}}=su,{getFencedCodeBlockValue:aI}=nI;var cI=function(e,t,n,r){const i=e.getValue();if("code"===i.type&&null!==i.lang){const e=rI(i.lang,r);if(e){const t=r.__inJsTemplate?"~":"`",u=t.repeat(Math.max(3,iI(i.value,t)+1)),o=n(aI(i,r.originalText),{parser:e},{stripTrailingHardline:!0});return oI([u,i.lang,i.meta?" "+i.meta:"",uI,sI(o),uI,u])}}switch(i.type){case"front-matter":return dN(i,n);case"importExport":return[n(i.value,{parser:"babel"},{stripTrailingHardline:!0}),uI];case"jsx":return n(`<$>${i.value}`,{parser:"__js_expression",rootMarker:"mdx"},{stripTrailingHardline:!0})}return null};const lI=["format","prettier"];function pI(e){const t=`@(${lI.join("|")})`,n=new RegExp([`\x3c!--\\s*${t}\\s*--\x3e`,`\x3c!--.*\r?\n[\\s\\S]*(^|\n)[^\\S\n]*${t}[^\\S\n]*($|\n)[\\s\\S]*\n.*--\x3e`].join("|"),"m"),r=e.match(n);return r&&0===r.index}var fI={startWithPragma:pI,hasPragma:e=>pI(yN(e).content.trimStart()),insertPragma:e=>{const t=yN(e),n=`\x3c!-- @${lI[0]} --\x3e`;return t.frontMatter?`${t.frontMatter.raw}\n\n${n}\n\n${t.content}`:`${n}\n\n${t.content}`}};const{getOrderedListItemInfo:dI,mapAst:hI,splitText:gI}=nI,mI=/^.$/us;function yI(e,t,n){return hI(e,(e=>{if(!e.children)return e;const r=e.children.reduce(((e,r)=>{const i=_n(e);return i&&t(i,r)?e.splice(-1,1,n(i,r)):e.push(r),e}),[]);return Object.assign(Object.assign({},e),{},{children:r})}))}var DI=function(e,t){return e=function(e){return yI(e,((e,t)=>"importExport"===e.type&&"importExport"===t.type),((e,t)=>({type:"importExport",value:e.value+"\n\n"+t.value,position:{start:e.position.start,end:t.position.end}})))}(e=function(e){return hI(e,(e=>"import"!==e.type&&"export"!==e.type?e:Object.assign(Object.assign({},e),{},{type:"importExport"})))}(e=function(e,t){return hI(e,((e,n,[r])=>{if("text"!==e.type)return e;let{value:i}=e;return"paragraph"===r.type&&(0===n&&(i=i.trimStart()),n===r.children.length-1&&(i=i.trimEnd())),{type:"sentence",position:e.position,children:gI(i,t)}}))}(e=function(e,t){return hI(e,((e,t,n)=>{if("list"===e.type&&e.children.length>0){for(let t=0;t1)return!0;const u=n(r);if(-1===u)return!1;if(1===e.children.length)return u%t.tabWidth==0;if(u!==n(i))return!1;if(u%t.tabWidth==0)return!0;return dI(i,t.originalText).leadingSpaces.length>1}}(e=function(e,t){return hI(e,((e,n,r)=>{if("code"===e.type){const n=/^\n?(?: {4,}|\t)/.test(t.originalText.slice(e.position.start.offset,e.position.end.offset));if(e.isIndented=n,n)for(let e=0;e"inlineCode"!==e.type?e:Object.assign(Object.assign({},e),{},{value:e.value.replace(/\s+/g," ")})))}(e=function(e){return yI(e,((e,t)=>"text"===e.type&&"text"===t.type),((e,t)=>({type:"text",value:e.value+t.value,position:{start:e.position.start,end:t.position.end}})))}(e=function(e,t){return hI(e,(e=>"text"===e.type&&"*"!==e.value&&"_"!==e.value&&mI.test(e.value)&&e.position.end.offset-e.position.start.offset!==e.value.length?Object.assign(Object.assign({},e),{},{value:t.originalText.slice(e.position.start.offset,e.position.end.offset)}):e))}(e,t))),t),t),t)))};const{isFrontMatterNode:EI}=Fi,{startWithPragma:CI}=fI,bI=new Set(["position","raw"]);function AI(e,t,n){return"front-matter"!==e.type&&"code"!==e.type&&"yaml"!==e.type&&"import"!==e.type&&"export"!==e.type&&"jsx"!==e.type||delete t.value,"list"===e.type&&delete t.isAligned,"list"!==e.type&&"listItem"!==e.type||(delete t.spread,delete t.loose),"text"===e.type?null:("inlineCode"===e.type&&(t.value=e.value.replace(/[\t\n ]+/g," ")),"wikiLink"===e.type&&(t.value=e.value.trim().replace(/[\t\n]+/g," ")),"definition"!==e.type&&"linkReference"!==e.type||(t.label=e.label.trim().replace(/[\t\n ]+/g," ").toLowerCase()),"definition"!==e.type&&"link"!==e.type&&"image"!==e.type||!e.title||(t.title=e.title.replace(/\\(["')])/g,"$1")),n&&"root"===n.type&&n.children.length>0&&(n.children[0]===e||EI(n.children[0])&&n.children[1]===e)&&"html"===e.type&&CI(e.value)?null:void 0)}AI.ignoredProperties=bI;var vI=AI;const{getLast:FI,getMinNotPresentContinuousCount:xI,getMaxContinuousCount:SI,getStringWidth:wI,isNonEmptyArray:TI}=Fi,{builders:{breakParent:BI,join:NI,line:kI,literalline:PI,markAsRoot:OI,hardline:II,softline:LI,ifBreak:jI,fill:_I,align:MI,indent:RI,group:$I,hardlineWithoutBreakParent:VI},utils:{normalizeDoc:WI,replaceTextEndOfLine:qI},printer:{printDocToString:UI}}=su,{insertPragma:zI}=fI,{locStart:GI,locEnd:HI}=UO,{getFencedCodeBlockValue:JI,hasGitDiffFriendlyOrderedList:XI,splitText:YI,punctuationPattern:KI,INLINE_NODE_TYPES:QI,INLINE_NODE_WRAPPER_TYPES:ZI,isAutolink:eL}=nI,tL=new Set(["importExport"]),nL=["heading","tableCell","link","wikiLink"],rL=new Set(["listItem","definition","footnoteDefinition"]);function iL(e,t,n,r){const i=e.getValue(),u=null===i.checked?"":i.checked?"[x] ":"[ ] ";return[u,lL(e,t,n,{processor:(e,i)=>{if(0===i&&"list"!==e.getValue().type)return MI(" ".repeat(u.length),n());const o=" ".repeat(function(e,t,n){return en?n:e}(t.tabWidth-r.length,0,3));return[o,MI(o,n())]}})]}function uL(e,t){return function(e,t,n){let r=-1;for(const i of t.children)if(i.type===e.type&&n(i)?r++:r=-1,i===e)return r}(e,t,(t=>t.ordered===e.ordered))}function oL(e,t){const n=Array.isArray(t)?t:[t];let r,i=-1;for(;r=e.getParentNode(++i);)if(n.includes(r.type))return i;return-1}function sL(e,t){const n=oL(e,t);return-1===n?null:e.getParentNode(n)}function aL(e,t,n){if("preserve"===n.proseWrap&&"\n"===t)return II;const r="always"===n.proseWrap&&!sL(e,nL);return""!==t?r?kI:" ":r?LI:""}function cL(e,t,n){const r=[];let i=null;const{children:u}=e.getValue();for(const[e,t]of u.entries())switch(fL(t)){case"start":null===i&&(i={index:e,offset:t.position.end.offset});break;case"end":null!==i&&(r.push({start:i,end:{index:e,offset:t.position.start.offset}}),i=null)}return lL(e,t,n,{processor:(e,i)=>{if(r.length>0){const e=r[0];if(i===e.start.index)return[u[e.start.index].value,t.originalText.slice(e.start.offset,e.end.offset),u[e.end.index].value];if(e.start.indexn()),o=e.getValue(),s=[];let a;return e.each(((e,n)=>{const r=e.getValue(),i=u(e,n);if(!1!==i){const e={parts:s,prevNode:a,parentNode:o,options:t};(function(e,t){const n=0===t.parts.length,r=QI.includes(e.type),i="html"===e.type&&ZI.includes(t.parentNode.type);return!n&&!r&&!i})(r,e)&&(s.push(II),a&&tL.has(a.type)||(function(e,t){const n=(t.prevNode&&t.prevNode.type)===e.type&&rL.has(e.type),r="listItem"===t.parentNode.type&&!t.parentNode.loose,i=t.prevNode&&"listItem"===t.prevNode.type&&t.prevNode.loose,u="next"===fL(t.prevNode),o="html"===e.type&&t.prevNode&&"html"===t.prevNode.type&&t.prevNode.position.end.line+1===e.position.start.line,s="html"===e.type&&"listItem"===t.parentNode.type&&t.prevNode&&"paragraph"===t.prevNode.type&&t.prevNode.position.end.line+1===e.position.start.line;return i||!(n||r||u||o||s)}(r,e)||dL(r,e))&&s.push(II),dL(r,e)&&s.push(II)),s.push(i),a=r}}),"children"),i?i(s):s}function pL(e){let t=e;for(;TI(t.children);)t=FI(t.children);return t}function fL(e){if("html"!==e.type)return!1;const t=e.value.match(/^$/);return null!==t&&(t[1]?t[1]:"next")}function dL(e,t){const n=t.prevNode&&"list"===t.prevNode.type,r="code"===e.type&&e.isIndented;return n&&r}function hL(e,t=[]){const n=[" ",...Array.isArray(t)?t:[t]];return new RegExp(n.map((e=>`\\${e}`)).join("|")).test(e)?`<${e}>`:e}function gL(e,t,n=!0){if(!e)return"";if(n)return" "+gL(e,t,!1);if((e=e.replace(/\\(["')])/g,"$1")).includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;const r=e.split("'").length-1,i=e.split('"').length-1,u=r>i?'"':i>r||t.singleQuote?"'":'"';return`${u}${e=(e=e.replace(/\\/,"\\\\")).replace(new RegExp(`(${u})`,"g"),"\\$1")}${u}`}var mL={preprocess:DI,print:function(e,t,n){const r=e.getValue();if(function(e){const t=sL(e,["linkReference","imageReference"]);return t&&("linkReference"!==t.type||"full"!==t.referenceType)}(e))return YI(t.originalText.slice(r.position.start.offset,r.position.end.offset),t).map((n=>"word"===n.type?n.value:""===n.value?"":aL(e,n.value,t)));switch(r.type){case"front-matter":return t.originalText.slice(r.position.start.offset,r.position.end.offset);case"root":return 0===r.children.length?"":[WI(cL(e,t,n)),tL.has(pL(r).type)?"":II];case"paragraph":return lL(e,t,n,{postprocessor:_I});case"sentence":return lL(e,t,n);case"word":{let t=r.value.replace(/\*/g,"\\$&").replace(new RegExp([`(^|${KI})(_+)`,`(_+)(${KI}|$)`].join("|"),"g"),((e,t,n,r,i)=>(n?`${t}${n}`:`${r}${i}`).replace(/_/g,"\\_")));const n=(e,t,n)=>"sentence"===e.type&&0===n,i=(e,t,n)=>eL(e.children[n-1]);return t!==r.value&&(e.match(void 0,n,i)||e.match(void 0,n,((e,t,n)=>"emphasis"===e.type&&0===n),i))&&(t=t.replace(/^(\\?[*_])+/,(e=>e.replace(/\\/g,"")))),t}case"whitespace":{const n=e.getParentNode(),i=n.children.indexOf(r),u=n.children[i+1],o=u&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(u.value)?"never":t.proseWrap;return aL(e,r.value,{proseWrap:o})}case"emphasis":{let i;if(eL(r.children[0]))i=t.originalText[r.position.start.offset];else{const t=e.getParentNode(),n=t.children.indexOf(r),u=t.children[n-1],o=t.children[n+1];i=u&&"sentence"===u.type&&u.children.length>0&&"word"===FI(u.children).type&&!FI(u.children).hasTrailingPunctuation||o&&"sentence"===o.type&&o.children.length>0&&"word"===o.children[0].type&&!o.children[0].hasLeadingPunctuation||sL(e,"emphasis")?"*":"_"}return[i,lL(e,t,n),i]}case"strong":return["**",lL(e,t,n),"**"];case"delete":return["~~",lL(e,t,n),"~~"];case"inlineCode":{const e=xI(r.value,"`"),t="`".repeat(e||1),n=e&&!/^\s/.test(r.value)?" ":"";return[t,n,r.value,n,t]}case"wikiLink":{let e="";return e="preserve"===t.proseWrap?r.value:r.value.replace(/[\t\n]+/g," "),["[[",e,"]]"]}case"link":switch(t.originalText[r.position.start.offset]){case"<":{const e="mailto:";return["<",r.url.startsWith(e)&&t.originalText.slice(r.position.start.offset+1,r.position.start.offset+1+e.length)!==e?r.url.slice(e.length):r.url,">"]}case"[":return["[",lL(e,t,n),"](",hL(r.url,")"),gL(r.title,t),")"];default:return t.originalText.slice(r.position.start.offset,r.position.end.offset)}case"image":return["![",r.alt||"","](",hL(r.url,")"),gL(r.title,t),")"];case"blockquote":return["> ",MI("> ",lL(e,t,n))];case"heading":return["#".repeat(r.depth)+" ",lL(e,t,n)];case"code":{if(r.isIndented){const e=" ".repeat(4);return MI(e,[e,...qI(r.value,II)])}const e=t.__inJsTemplate?"~":"`",n=e.repeat(Math.max(3,SI(r.value,e)+1));return[n,r.lang||"",r.meta?" "+r.meta:"",II,...qI(JI(r,t.originalText),II),II,n]}case"html":{const t=e.getParentNode(),n="root"===t.type&&FI(t.children)===r?r.value.trimEnd():r.value,i=/^$/s.test(n);return qI(n,i?II:OI(PI))}case"list":{const i=uL(r,e.getParentNode()),u=XI(r,t);return lL(e,t,n,{processor:(e,o)=>{const s=function(){const e=r.ordered?(0===o?r.start:u?1:r.start+o)+(i%2==0?". ":") "):i%2==0?"- ":"* ";return r.isAligned||r.hasIndentedCodeblock?function(e,t){const n=r();return e+" ".repeat(n>=4?0:n);function r(){const n=e.length%t.tabWidth;return 0===n?0:t.tabWidth-n}}(e,t):e}(),a=e.getValue();return 2===a.children.length&&"html"===a.children[1].type&&a.children[0].position.start.column!==a.children[1].position.start.column?[s,iL(e,t,n,s)]:[s,MI(" ".repeat(s.length),iL(e,t,n,s))]}})}case"thematicBreak":{const t=oL(e,"list");if(-1===t)return"---";return uL(e.getParentNode(t),e.getParentNode(t+1))%2==0?"***":"---"}case"linkReference":return["[",lL(e,t,n),"]","full"===r.referenceType?["[",r.identifier,"]"]:"collapsed"===r.referenceType?"[]":""];case"imageReference":switch(r.referenceType){case"full":return["![",r.alt||"","][",r.identifier,"]"];default:return["![",r.alt,"]","collapsed"===r.referenceType?"[]":""]}case"definition":{const e="always"===t.proseWrap?kI:" ";return $I(["[",r.identifier,"]:",RI([e,hL(r.url),null===r.title?"":[e,gL(r.title,t,!1)]])])}case"footnote":return["[^",lL(e,t,n),"]"];case"footnoteReference":return["[^",r.identifier,"]"];case"footnoteDefinition":{const i=e.getParentNode().children[e.getName()+1],u=1===r.children.length&&"paragraph"===r.children[0].type&&("never"===t.proseWrap||"preserve"===t.proseWrap&&r.children[0].position.start.line===r.children[0].position.end.line);return["[^",r.identifier,"]: ",u?lL(e,t,n):$I([MI(" ".repeat(4),lL(e,t,n,{processor:(e,t)=>0===t?$I([LI,n()]):n()})),i&&"footnoteDefinition"===i.type?LI:""])]}case"table":return function(e,t,n){const r=e.getValue(),i=[],u=e.map((e=>e.map(((e,r)=>{const u=UI(n(),t).formatted,o=wI(u);return i[r]=Math.max(i[r]||3,o),{text:u,width:o}}),"children")),"children"),o=a(!1);if("never"!==t.proseWrap)return[BI,o];const s=a(!0);return[BI,$I(jI(s,o))];function a(e){const t=[l(u[0],e),c(e)];return u.length>1&&t.push(NI(VI,u.slice(1).map((t=>l(t,e))))),NI(VI,t)}function c(e){return`| ${i.map(((t,n)=>{const i=r.align[n],u="center"===i||"right"===i?":":"-";return`${"center"===i||"left"===i?":":"-"}${e?"-":"-".repeat(t-2)}${u}`})).join(" | ")} |`}function l(e,t){return`| ${e.map((({text:e,width:n},u)=>{if(t)return e;const o=i[u]-n,s=r.align[u];let a=0;"right"===s?a=o:"center"===s&&(a=Math.floor(o/2));const c=o-a;return`${" ".repeat(a)}${e}${" ".repeat(c)}`})).join(" | ")} |`}}(e,t,n);case"tableCell":return lL(e,t,n);case"break":return/\s/.test(t.originalText[r.position.start.offset])?[" ",OI(PI)]:["\\",II];case"liquidNode":return qI(r.value,II);case"importExport":return[r.value,II];case"jsx":return r.value;case"math":return["$$",II,r.value?[...qI(r.value,II),II]:"","$$"];case"inlineMath":return t.originalText.slice(GI(r),HI(r));case"tableRow":case"listItem":default:throw new Error(`Unknown markdown type ${JSON.stringify(r.type)}`)}},embed:cI,massageAstNode:vI,hasPrettierIgnore:function(e){const t=Number(e.getName());return 0!==t&&"next"===fL(e.getParentNode().children[t-1])},insertPragma:zI},yL={proseWrap:KB.proseWrap,singleQuote:KB.singleQuote},DL={name:"Markdown",type:"prose",color:"#083fa1",aliases:["pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".markdown",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"],tmScope:"source.gfm",languageId:222};var EL={languages:[rh(DL,(e=>({since:"1.8.0",parsers:["markdown"],vscodeLanguageIds:["markdown"],filenames:[...e.filenames,"README"],extensions:e.extensions.filter((e=>".mdx"!==e))}))),rh(DL,(()=>({name:"MDX",since:"1.15.0",parsers:["mdx"],vscodeLanguageIds:["mdx"],filenames:[],extensions:[".mdx"]})))],options:yL,printers:{mdast:mL},parsers:undefined};const{isFrontMatterNode:CL}=Fi,bL=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan"]);function AL(e,t){return"text"===e.type||"comment"===e.type||CL(e)||"yaml"===e.type||"toml"===e.type?null:("attribute"===e.type&&delete t.value,void("docType"===e.type&&delete t.value))}AL.ignoredProperties=bL;var vL=AL,FL={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]};const{inferParserByLanguage:xL,isFrontMatterNode:SL}=Fi,{builders:{line:wL,hardline:TL,join:BL},utils:{getDocParts:NL,replaceTextEndOfLine:kL}}=su,{CSS_DISPLAY_TAGS:PL,CSS_DISPLAY_DEFAULT:OL,CSS_WHITE_SPACE_TAGS:IL,CSS_WHITE_SPACE_DEFAULT:LL}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"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",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",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",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},jL=WL(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),_L=function(e,t){const n=Object.create(null);for(const[r,i]of Object.entries(e))n[r]=t(i,r);return n}(FL,WL),ML=new Set(["\t","\n","\f","\r"," "]),RL=e=>e.replace(/[\t\n\f\r ]+$/,""),$L=e=>(e=>e.replace(/^[\t\f\r ]*?\n/g,""))(RL(e)),VL=e=>e.match(/^[\t\n\f\r ]*/)[0];function WL(e){const t=Object.create(null);for(const n of e)t[n]=!0;return t}function qL(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||ej(e)&&("script"===e.name||"style"===e.name))}function UL(e){return tj(e).startsWith("pre")}function zL(e){return"element"===e.type&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function GL(e){return YL(e)||"element"===e.type&&"br"===e.fullName||HL(e)}function HL(e){return JL(e)&&XL(e)}function JL(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function YL(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function KL(e){const{type:t,lang:n}=e.attrMap;return"module"===t||"text/javascript"===t||"text/babel"===t||"application/javascript"===t||"jsx"===n?"babel":"application/x-typescript"===t||"ts"===n||"tsx"===n?"typescript":"text/markdown"===t?"markdown":"text/html"===t?"html":t&&(t.endsWith("json")||t.endsWith("importmap"))?"json":"text/x-handlebars-template"===t?"glimmer":void 0}function QL(e){return"block"===e||"list-item"===e||e.startsWith("table")}function ZL(e){return tj(e).startsWith("pre")}function ej(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function tj(e){return"element"===e.type&&(!e.namespace||ej(e))&&IL[e.name]||LL}function nj(e,t=function(e){let t=Number.POSITIVE_INFINITY;for(const n of e.split("\n")){if(0===n.length)continue;if(!ML.has(n[0]))return 0;const e=VL(n).length;n.length!==e&&ee.slice(t))).join("\n")}const rj=new Set(["template","style","script"]);function ij(e,t){return uj(e,t)&&!rj.has(e.fullName)}function uj(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function oj(e,t){return uj(e,t)&&(ij(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var sj={HTML_ELEMENT_ATTRIBUTES:_L,HTML_TAGS:jL,htmlTrim:e=>(e=>e.replace(/^[\t\n\f\r ]+/,""))(RL(e)),htmlTrimPreserveIndentation:$L,hasHtmlWhitespace:e=>/[\t\n\f\r ]/.test(e),getLeadingAndTrailingHtmlWhitespace:e=>{const[,t,n,r]=e.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s);return{leadingWhitespace:t,trailingWhitespace:r,text:n}},canHaveInterpolation:function(e){return e.children&&!qL(e)},countChars:function(e,t){let n=0;for(let r=0;r=0;r--){const i=e.stack[r];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&n++}return n},dedentString:nj,forceBreakChildren:zL,forceBreakContent:function(e){return zL(e)||"element"===e.type&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some((e=>function(e){return e.children&&e.children.some((e=>"text"!==e.type))}(e))))||e.firstChild&&e.firstChild===e.lastChild&&"text"!==e.firstChild.type&&JL(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||XL(e.lastChild))},forceNextEmptyLine:function(e){return SL(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1"svg:foreignObject"===e.fullName)))return"svg"===e.name?"inline-block":"block";n=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"vue"===t.parser&&e.parent&&"root"===e.parent.type?"block":"element"===e.type&&(!e.namespace||n||ej(e))&&PL[e.name]||OL}},getNodeCssStyleWhiteSpace:tj,hasPrettierIgnore:function(e){return"attribute"!==e.type&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))},inferScriptParser:function(e,t){return"script"!==e.name||e.attrMap.src?"style"===e.name?function(e){const{lang:t}=e.attrMap;return t&&"postcss"!==t&&"css"!==t?"scss"===t?"scss":"less"===t?"less":void 0:"css"}(e):t&&oj(e,t)?KL(e)||!("src"in e.attrMap)&&xL(e.attrMap.lang,t):void 0:e.attrMap.lang||e.attrMap.type?KL(e):"babel"},isVueCustomBlock:ij,isVueNonHtmlBlock:oj,isVueSlotAttribute:function(e){const t=e.fullName;return"#"===t.charAt(0)||"slot-scope"===t||"v-slot"===t||t.startsWith("v-slot:")},isVueSfcBindingsAttribute:function(e,t){const n=e.parent;if(!uj(n,t))return!1;const r=n.fullName,i=e.fullName;return"script"===r&&"setup"===i||"style"===r&&"vars"===i},isDanglingSpaceSensitiveNode:function(e){return!(t=e.cssDisplay,QL(t)||"inline-block"===t||qL(e));var t},isIndentationSensitiveNode:UL,isLeadingSpaceSensitiveNode:function(e,t){const n=function(){if(SL(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(ZL(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||ZL(e)&&e.parent||qL(e.parent)||ij(e.parent,t)||(n=e.parent.cssDisplay,QL(n)||"inline-block"===n)))return!1;var n;if(e.prev&&!function(e){return!QL(e)}(e.prev.cssDisplay))return!1;return!0}();return n&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:n},isPreLikeNode:ZL,isScriptLikeTag:qL,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e,t){return!SL(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!ZL(e.parent)||!(!e.next&&("root"===e.parent.type||ZL(e)&&e.parent||qL(e.parent)||ij(e.parent,t)||(n=e.parent.cssDisplay,QL(n)||"inline-block"===n)))&&!(e.next&&!function(e){return!QL(e)}(e.next.cssDisplay))));var n},isWhitespaceSensitiveNode:function(e){return qL(e)||"interpolation"===e.type||UL(e)},isUnknownNamespace:ej,preferHardlineAsLeadingSpaces:function(e){return YL(e)||e.prev&&GL(e.prev)||HL(e)},preferHardlineAsTrailingSpaces:GL,shouldPreserveContent:function(e,t){return!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||(!(!ZL(e)||!e.children.some((e=>"text"!==e.type&&"interpolation"!==e.type)))||!(!oj(e,t)||qL(e)||"interpolation"===e.type)))},unescapeQuoteEntities:function(e){return e.replace(/'/g,"'").replace(/"/g,'"')},getTextValueParts:function(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?kL(t):kL(nj($L(t)),TL):NL(BL(wL,(e=>e.split(/[\t\n\f\r ]+/))(t)))}},aj=r((function(e,t){function n(e){return t.$0<=e&&e<=t.$9} +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class cj{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}}var lj=cj;var pj=class{constructor(){this.cache=new Map}get(e,t,n){const r=`"${e}".${t}${(n=n||[]).length?`.${n.join(".")}`:""}`;let i=this.cache.get(r);return i||(i=new cj(e,t,n),this.cache.set(r,i)),i}},fj=Object.defineProperty({StaticSymbol:lj,StaticSymbolCache:pj},"__esModule",{value:!0}); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +const dj=/-+([a-z0-9])/g;var hj=function(e){return e.replace(dj,((...e)=>e[1].toUpperCase()))};var gj=function(e,t){return yj(e,":",t)};var mj=function(e,t){return yj(e,".",t)};function yj(e,t,n){const r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function Dj(e,t,n){return Array.isArray(e)?t.visitArray(e,n):function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===kj}(e)?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n)}var Ej=Dj;var Cj=function(e){return null!=e};var bj=function(e){return void 0===e?null:e};var Aj=class{visitArray(e,t){return e.map((e=>Dj(e,this,t)))}visitStringMap(e,t){const n={};return Object.keys(e).forEach((r=>{n[r]=Dj(e[r],this,t)})),n}visitPrimitive(e,t){return e}visitOther(e,t){return e}},vj={assertSync:e=>{if(Lj(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>Lj(e)?e.then(t):t(e),all:e=>e.some(Lj)?Promise.all(e):e};var Fj=function(e){throw new Error(`Internal Error: ${e}`)};var xj=function(e,t){const n=Error(e);return n[Sj]=!0,t&&(n[wj]=t),n};const Sj="ngSyntaxError",wj="ngParseErrors";var Tj=function(e){return e[Sj]};var Bj=function(e){return e[wj]||[]};var Nj=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const kj=Object.getPrototypeOf({});var Pj=function(e){let t="";for(let n=0;n=55296&&r<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,r=(r-55296<<10)+t-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t};var Oj=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;if(!t.toString)return"object";const n=t.toString();if(null==n)return""+n;const r=n.indexOf("\n");return-1===r?n:n.substring(0,r)};var Ij=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e};function Lj(e){return!!e&&"function"==typeof e.then}var jj=Lj;var _j=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const Mj="undefined"!=typeof window&&window,Rj="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;var $j=void 0!==t&&t||Mj||Rj,Vj=Object.defineProperty({dashCaseToCamelCase:hj,splitAtColon:gj,splitAtPeriod:mj,visitValue:Ej,isDefined:Cj,noUndefined:bj,ValueTransformer:Aj,SyncAsync:vj,error:Fj,syntaxError:xj,isSyntaxError:Tj,getParseErrors:Bj,escapeRegExp:Nj,utf8Encode:Pj,stringify:Oj,resolveForwardRef:Ij,isPromise:jj,Version:_j,global:$j},"__esModule",{value:!0}),Wj=r((function(e,t){ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(t,"__esModule",{value:!0});const n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function r(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=r;let i=0;function u(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof fj.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let n=Vj.stringify(t);return n.indexOf("(")>=0?(n="anonymous_"+i++,t.__anonymousType=n):n=r(n),n}var o;t.identifierName=u,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof fj.StaticSymbol?t.filePath:`./${Vj.stringify(t)}`},t.viewClassName=function(e,t){return`View_${u({reference:e})}_${t}`},t.rendererTypeName=function(e){return`RenderType_${u({reference:e})}`},t.hostViewClassName=function(e){return`HostView_${u({reference:e})}`},t.componentFactoryName=function(e){return`${u({reference:e})}NgFactory`},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?r(e.value):u(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:n}={}){this.moduleUrl=e||null,this.styles=a(t),this.styleUrls=a(n)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:n,htmlAst:r,styles:i,styleUrls:u,externalStylesheets:o,animations:s,ngContentSelectors:l,interpolation:p,isInline:f,preserveWhitespaces:d}){if(this.encapsulation=e,this.template=t,this.templateUrl=n,this.htmlAst=r,this.styles=a(i),this.styleUrls=a(u),this.externalStylesheets=a(o),this.animations=s?c(s):[],this.ngContentSelectors=l||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=f,this.preserveWhitespaces=d}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class s{static create({isHost:e,type:t,isComponent:r,selector:i,exportAs:u,changeDetection:o,inputs:a,outputs:c,host:l,providers:p,viewProviders:f,queries:d,guards:h,viewQueries:g,entryComponents:m,template:y,componentViewType:D,rendererType:E,componentFactory:C}){const b={},A={},v={};null!=l&&Object.keys(l).forEach((e=>{const t=l[e],r=e.match(n);null===r?v[e]=t:null!=r[1]?A[r[1]]=t:null!=r[2]&&(b[r[2]]=t)}));const F={};null!=a&&a.forEach((e=>{const t=Vj.splitAtColon(e,[e,e]);F[t[0]]=t[1]}));const x={};return null!=c&&c.forEach((e=>{const t=Vj.splitAtColon(e,[e,e]);x[t[0]]=t[1]})),new s({isHost:e,type:t,isComponent:!!r,selector:i,exportAs:u,changeDetection:o,inputs:F,outputs:x,hostListeners:b,hostProperties:A,hostAttributes:v,providers:p,viewProviders:f,queries:d,guards:h,viewQueries:g,entryComponents:m,template:y,componentViewType:D,rendererType:E,componentFactory:C})}constructor({isHost:e,type:t,isComponent:n,selector:r,exportAs:i,changeDetection:u,inputs:o,outputs:s,hostListeners:c,hostProperties:l,hostAttributes:p,providers:f,viewProviders:d,queries:h,guards:g,viewQueries:m,entryComponents:y,template:D,componentViewType:E,rendererType:C,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=n,this.selector=r,this.exportAs=i,this.changeDetection=u,this.inputs=o,this.outputs=s,this.hostListeners=c,this.hostProperties=l,this.hostAttributes=p,this.providers=a(f),this.viewProviders=a(d),this.queries=a(h),this.guards=g,this.viewQueries=a(m),this.entryComponents=a(y),this.template=D,this.componentViewType=E,this.rendererType=C,this.componentFactory=b}toSummary(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}t.CompileDirectiveMetadata=s;t.CompilePipeMetadata=class{constructor({type:e,name:t,pure:n}){this.type=e,this.name=t,this.pure=!!n}toSummary(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}};t.CompileShallowModuleMetadata=class{};t.CompileNgModuleMetadata=class{constructor({type:e,providers:t,declaredDirectives:n,exportedDirectives:r,declaredPipes:i,exportedPipes:u,entryComponents:o,bootstrapComponents:s,importedModules:c,exportedModules:l,schemas:p,transitiveModule:f,id:d}){this.type=e||null,this.declaredDirectives=a(n),this.exportedDirectives=a(r),this.declaredPipes=a(i),this.exportedPipes=a(u),this.providers=a(t),this.entryComponents=a(o),this.bootstrapComponents=a(s),this.importedModules=a(c),this.exportedModules=a(l),this.schemas=a(p),this.id=d||null,this.transitiveModule=f||null}toSummary(){const e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}};function a(e){return e||[]}t.TransitiveCompileNgModuleMetadata=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(e,t){this.providers.push({provider:e,module:t})}addDirective(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}addExportedDirective(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}addPipe(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}addExportedPipe(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}addModule(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}addEntryComponent(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}};function c(e){return e.reduce(((e,t)=>{const n=Array.isArray(t)?c(t):t;return e.concat(n)}),[])}function l(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=class{constructor(e,{useClass:t,useValue:n,useExisting:r,useFactory:i,deps:u,multi:o}){this.token=e,this.useClass=t||null,this.useValue=n,this.useExisting=r,this.useFactory=i||null,this.dependencies=u||null,this.multi=!!o}},t.flatten=c,t.templateSourceUrl=function(e,t,n){let r;return r=n.isInline?t.type.reference instanceof fj.StaticSymbol?`${t.type.reference.filePath}.${t.type.reference.name}.html`:`${u(e)}/${u(t.type)}.html`:n.templateUrl,t.type.reference instanceof fj.StaticSymbol?r:l(r)},t.sharedStylesheetJitUrl=function(e,t){const n=e.moduleUrl.split(/\/\\/g);return l(`css/${t}${n[n.length-1]}.ngstyle.js`)},t.ngModuleJitUrl=function(e){return l(`${u(e.type)}/module.ngfactory.js`)},t.templateJitUrl=function(e,t){return l(`${u(e)}/${u(t.type)}.ngfactory.js`)}})),qj=r((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}); +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +class n{constructor(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,r=t.length;let i=this.offset,u=this.line,o=this.col;for(;i>0&&e<0;){i--,e++;if(t.charCodeAt(i)==aj.$LF){u--;const e=t.substr(0,i-1).lastIndexOf(String.fromCharCode(aj.$LF));o=e>0?i-e:i}else o--}for(;i0;){const n=t.charCodeAt(i);i++,e--,n==aj.$LF?(u++,o=0):o++}return new n(this.file,i,u,o)}getContext(e,t){const n=this.file.content;let r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);let i=r,u=0,o=0;for(;u0&&(r--,u++,"\n"!=n[r]||++o!=t););for(u=0,o=0;u]${e.after}")`:this.msg}toString(){const e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}},t.typeSourceSpan=function(e,t){const u=Wj.identifierModuleUrl(t),o=null!=u?`in ${e} ${Wj.identifierName(t)} in ${u}`:`in ${e} ${Wj.identifierName(t)}`,s=new r("",o);return new i(new n(s,-1,-1,-1),new n(s,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,u){const o=new r("",`in ${e} ${t} in ${u}`);return new i(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));const{ParseSourceSpan:Uj}=qj,{htmlTrim:zj,getLeadingAndTrailingHtmlWhitespace:Gj,hasHtmlWhitespace:Hj,canHaveInterpolation:Jj,getNodeCssStyleDisplay:Xj,isDanglingSpaceSensitiveNode:Yj,isIndentationSensitiveNode:Kj,isLeadingSpaceSensitiveNode:Qj,isTrailingSpaceSensitiveNode:Zj,isWhitespaceSensitiveNode:e_}=sj,t_=[function(e){e.walk((e=>{if("element"===e.type&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&"text"===e.children[0].type&&"\n"===e.children[0].value[0]){const[t,...n]=e.children;e.setChildren(1===t.value.length?n:[t.clone({value:t.value.slice(1)}),...n])}}))},function(e){const t=e=>"element"===e.type&&e.prev&&"ieConditionalStartComment"===e.prev.type&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild&&"ieConditionalEndComment"===e.firstChild.type&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset;e.walk((e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r{if(e.children){const r=e.children.map(t);if(r.some(Boolean)){const t=[];for(let i=0;i"cdata"===e.type),(e=>``))},function(e,t){if("html"===t.parser)return;const n=/{{(.+?)}}/s;e.walk((e=>{if(!Jj(e))return;const t=[];for(const r of e.children){if("text"!==r.type){t.push(r);continue}let e=r.sourceSpan.start,i=null;const u=r.value.split(n);for(let n=0;n0&&t.push({type:"text",value:r,sourceSpan:new Uj(e,i)}))}}e.setChildren(t)}))},function(e){e.walk((e=>{if(!e.children)return;if(0===e.children.length||1===e.children.length&&"text"===e.children[0].type&&0===zj(e.children[0].value).length)return e.hasDanglingSpaces=e.children.length>0,void(e.children=[]);const t=e_(e),n=Kj(e);e.setChildren(e.children.flatMap((e=>{if("text"!==e.type||t)return e;const n=[],{leadingWhitespace:r,text:i,trailingWhitespace:u}=Gj(e.value);return r&&n.push(n_),i&&n.push({type:"text",value:i,sourceSpan:new Uj(e.sourceSpan.start.moveBy(r.length),e.sourceSpan.end.moveBy(-u.length))}),u&&n.push(n_),n})).map(((e,t,n)=>{if(e!==n_)return Object.assign(Object.assign({},e),{},{hasLeadingSpaces:n[t-1]===n_,hasTrailingSpaces:n[t+1]===n_})})).filter(Boolean)),e.isWhitespaceSensitive=t,e.isIndentationSensitive=n}))},function(e,t){e.walk((e=>Object.assign(e,{cssDisplay:Xj(e,t)})))},function(e){e.walk((e=>Object.assign(e,{isSelfClosing:!e.children||"element"===e.type&&(e.tagDefinition.isVoid||e.startSourceSpan===e.endSourceSpan)})))},function(e,t){e.walk((e=>"element"!==e.type?e:Object.assign(e,{hasHtmComponentClosingTag:e.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(e.endSourceSpan.start.offset,e.endSourceSpan.end.offset))})))},function(e,t){e.walk((e=>{e.children&&(0!==e.children.length?e.setChildren(e.children.map((e=>Object.assign(Object.assign({},e),{},{isLeadingSpaceSensitive:Qj(e,t),isTrailingSpaceSensitive:Zj(e,t)}))).map(((e,t,n)=>Object.assign(Object.assign({},e),{},{isLeadingSpaceSensitive:(0===t||n[t-1].isTrailingSpaceSensitive)&&e.isLeadingSpaceSensitive,isTrailingSpaceSensitive:(t===n.length-1||n[t+1].isLeadingSpaceSensitive)&&e.isTrailingSpaceSensitive})))):e.isDanglingSpaceSensitive=Yj(e))}))},function(e){const t=e=>"element"===e.type&&0===e.attrs.length&&1===e.children.length&&"text"===e.firstChild.type&&!Hj(e.children[0].value)&&!e.firstChild.hasLeadingSpaces&&!e.firstChild.hasTrailingSpaces&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces&&e.prev&&"text"===e.prev.type&&e.next&&"text"===e.next.type;e.walk((e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r`+i.firstChild.value+``+u.value,sourceSpan:new Uj(n.sourceSpan.start,u.sourceSpan.end),isTrailingSpaceSensitive:o,hasTrailingSpaces:s}))}else t.push(i)}e.setChildren(t)}}}))}];const n_={type:"whitespace"};var r_=function(e,t){const n=e.map((e=>e));for(const e of t_)e(n,t);return n};var i_={hasPragma:function(e){return/^\s*/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};var u_={locStart:function(e){return e.sourceSpan.start.offset},locEnd:function(e){return e.sourceSpan.end.offset}};const{isNonEmptyArray:o_}=Fi,{builders:{indent:s_,join:a_,line:c_,softline:l_},utils:{replaceTextEndOfLine:p_}}=su,{locStart:f_,locEnd:d_}=u_,{isTextLikeNode:h_,getLastDescendant:g_,isPreLikeNode:m_,hasPrettierIgnore:y_,shouldPreserveContent:D_}=sj;function E_(e,t){return e.lastChild&&T_(e.lastChild)?"":[b_(e,t),v_(e,t)]}function C_(e,t){return(e.next?S_(e.next):w_(e.parent))?"":[F_(e,t),A_(e,t)]}function b_(e,t){return w_(e)?F_(e.lastChild,t):""}function A_(e,t){return T_(e)?v_(e.parent,t):B_(e)?L_(e.next):""}function v_(e,t){if(Ff(!e.isSelfClosing),x_(e,t))return"";switch(e.type){case"ieConditionalComment":return"\x3c!--\x3e";case"interpolation":return"}}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function x_(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(y_(e)||D_(e.parent,t))}function S_(e){return e.prev&&"docType"!==e.prev.type&&!h_(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function w_(e){return e.lastChild&&e.lastChild.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!h_(g_(e.lastChild))&&!m_(e)}function T_(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&h_(g_(e))}function B_(e){return e.next&&!h_(e.next)&&h_(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function N_(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function k_(e,t,n){const r=e.getValue();if(!o_(r.attrs))return r.isSelfClosing?" ":"";const i=r.prev&&"comment"===r.prev.type&&function(e){const t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return!!t&&(!t[1]||t[1].split(/\s+/))}(r.prev.value),u="boolean"==typeof i?()=>i:Array.isArray(i)?e=>i.includes(e.rawName):()=>!1,o=e.map((e=>{const r=e.getValue();return u(r)?p_(t.originalText.slice(f_(r),d_(r))):n()}),"attrs"),s="element"===r.type&&"script"===r.fullName&&1===r.attrs.length&&"src"===r.attrs[0].fullName&&0===r.children.length,a=[s_([s?" ":c_,a_(c_,o)])];return r.firstChild&&N_(r.firstChild)||r.isSelfClosing&&w_(r.parent)||s?a.push(r.isSelfClosing?" ":""):a.push(t.bracketSameLine?r.isSelfClosing?" ":"":r.isSelfClosing?c_:l_),a}function P_(e){return e.firstChild&&N_(e.firstChild)?"":j_(e)}function O_(e,t){return e.prev&&B_(e.prev)?"":[I_(e,t),L_(e)]}function I_(e,t){return N_(e)?j_(e.parent):S_(e)?F_(e.prev,t):""}function L_(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return`\x3c!--[if ${e.condition}`;case"ieConditionalEndComment":return"\x3c!--\x3c!--\x3e<${e.rawName}`;default:return`<${e.rawName}`}}function j_(e){switch(Ff(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">\x3c!--"}}var __={printClosingTag:function(e,t){return[e.isSelfClosing?"":E_(e,t),C_(e,t)]},printClosingTagStart:E_,printClosingTagStartMarker:v_,printClosingTagEndMarker:F_,printClosingTagSuffix:A_,printClosingTagEnd:C_,needsToBorrowLastChildClosingTagEndMarker:w_,needsToBorrowParentClosingTagStartMarker:T_,needsToBorrowPrevClosingTagEndMarker:S_,printOpeningTag:function(e,t,n){const r=e.getValue();return[O_(r,t),k_(e,t,n),r.isSelfClosing?"":P_(r)]},printOpeningTagStart:O_,printOpeningTagPrefix:I_,printOpeningTagStartMarker:L_,printOpeningTagEndMarker:j_,needsToBorrowNextOpeningTagStartMarker:B_,needsToBorrowParentOpeningTagEndMarker:N_},M_=r((function(e){var n,r;n=t,r=function(){return function(e,t){var n=t&&t.logger||console;function r(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function i(t){var n,r=t.exec(e.substring(y));if(r)return n=r[0],y+=n.length,n}for(var u,o,s,a,c,l=e.length,p=/^[ \t\n\r\u000c]+/,f=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,g=/^\d+$/,m=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,y=0,D=[];;){if(i(f),y>=l)return D;u=i(d),o=[],","===u.slice(-1)?(u=u.replace(h,""),C()):E()}function E(){for(i(p),s="",a="in descriptor";;){if(c=e.charAt(y),"in descriptor"===a)if(r(c))s&&(o.push(s),s="",a="after descriptor");else{if(","===c)return y+=1,s&&o.push(s),void C();if("("===c)s+=c,a="in parens";else{if(""===c)return s&&o.push(s),void C();s+=c}}else if("in parens"===a)if(")"===c)s+=c,a="in descriptor";else{if(""===c)return o.push(s),void C();s+=c}else if("after descriptor"===a)if(r(c));else{if(""===c)return void C();a="in descriptor",y-=1}y+=1}}function C(){var t,r,i,s,a,c,l,p,f,d=!1,h={};for(s=0;se)),r=t.some((({h:e})=>e));if(n+r+t.some((({d:e})=>e))>1)throw new Error("Mixed descriptor in srcset is not supported");const i=n?"w":r?"h":"d",u=n?"w":r?"h":"x",o=e=>Math.max(...e),s=t.map((e=>e.url)),a=o(s.map((e=>e.length))),c=t.map((e=>e[i])).map((e=>e?e.toString():"")),l=c.map((e=>{const t=e.indexOf(".");return-1===t?e.length:t})),p=o(l);return W_([",",q_],s.map(((e,t)=>{const n=[e],r=c[t];if(r){const i=a-e.length+1,o=p-l[t],s=" ".repeat(i+o);n.push($_(s," "),r+u)}return n})))},printClassNames:function(e){const t=e.trim().split(/\s+/),n=[];let r;for(let e=0;eR_(W_(q_,e)))))]),U_]}};const{builders:{group:J_}}=su;var X_={isVueEventBindingExpression:function(e){const t=e.trim();return/^(?:[\w$]+|\([^)]*?\))\s*=>|^function\s*\(/.test(t)||/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/.test(t)},printVueFor:function(e,t){const{left:n,operator:r,right:i}=function(e){const t=/(.*?)\s+(in|of)\s+(.*)/s,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/,r=/^\(|\)$/g,i=e.match(t);if(!i)return;const u={};u.for=i[3].trim();const o=i[1].trim().replace(r,""),s=o.match(n);s?(u.alias=o.replace(n,""),u.iterator1=s[1].trim(),s[2]&&(u.iterator2=s[2].trim())):u.alias=o;return{left:`${[u.alias,u.iterator1,u.iterator2].filter(Boolean).join(",")}`,operator:i[2],right:u.for}}(e);return[J_(t(`function _(${n}) {}`,{parser:"babel",__isVueForBindingLeft:!0}))," ",r," ",t(i,{parser:"__js_expression"},{stripTrailingHardline:!0})]},printVueBindings:function(e,t){return t(`function _(${e}) {}`,{parser:"babel",__isVueBindings:!0})}};const{needsToBorrowParentClosingTagStartMarker:Y_,printClosingTagStartMarker:K_,needsToBorrowLastChildClosingTagEndMarker:Q_,printClosingTagEndMarker:Z_,needsToBorrowParentOpeningTagEndMarker:eM,printOpeningTagEndMarker:tM}=__;var nM=function(e,t){let n=e.startSourceSpan.end.offset;e.firstChild&&eM(e.firstChild)&&(n-=tM(e).length);let r=e.endSourceSpan.start.offset;return e.lastChild&&Y_(e.lastChild)?r+=K_(e,t).length:Q_(e)&&(r-=Z_(e.lastChild,t).length),t.originalText.slice(n,r)};const{builders:{breakParent:rM,group:iM,hardline:uM,indent:oM,line:sM,fill:aM,softline:cM},utils:{mapDoc:lM,replaceTextEndOfLine:pM}}=su,{printClosingTag:fM,printClosingTagSuffix:dM,needsToBorrowPrevClosingTagEndMarker:hM,printOpeningTagPrefix:gM,printOpeningTag:mM}=__,{printImgSrcset:yM,printClassNames:DM}=H_,{printVueFor:EM,printVueBindings:CM,isVueEventBindingExpression:bM}=X_,{isScriptLikeTag:AM,isVueNonHtmlBlock:vM,inferScriptParser:FM,htmlTrimPreserveIndentation:xM,dedentString:SM,unescapeQuoteEntities:wM,isVueSlotAttribute:TM,isVueSfcBindingsAttribute:BM,getTextValueParts:NM}=sj;function kM(e,t,n){const r=t=>new RegExp(t.join("|")).test(e.fullName),i=()=>wM(e.value);let u=!1;const o=(e,t)=>{const n="NGRoot"===e.type?"NGMicrosyntax"===e.node.type&&1===e.node.body.length&&"NGMicrosyntaxExpression"===e.node.body[0].type?e.node.body[0].expression:e.node:"JsExpressionRoot"===e.type?e.node:e;!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&("__vue_expression"!==t.parser||"TemplateLiteral"!==n.type&&"StringLiteral"!==n.type)||(u=!0)},s=(e,t=!0)=>iM([oM([cM,e]),t?cM:""]),a=e=>u?(e=>iM(e))(e):s(e),c=(e,n)=>t(e,Object.assign({__onHtmlBindingRoot:o,__embeddedInHtml:!0},n),{stripTrailingHardline:!0});if("srcset"===e.fullName&&("img"===e.parent.fullName||"source"===e.parent.fullName))return s(yM(i()));if("class"===e.fullName&&!n.parentParser){const e=i();if(!e.includes("{{"))return DM(e)}if("style"===e.fullName&&!n.parentParser){const e=i();if(!e.includes("{{"))return s(c(e,{parser:"css",__isHTMLStyleAttribute:!0}))}if("vue"===n.parser){if("v-for"===e.fullName)return EM(i(),c);if(TM(e)||BM(e,n))return CM(i(),c);const t=["^:","^v-bind:"],u=["^v-"];if(r(["^@","^v-on:"])){const e=i();return a(c(e,{parser:bM(e)?"__js_expression":"__vue_event_binding"}))}if(r(t))return a(c(i(),{parser:"__vue_expression"}));if(r(u))return a(c(i(),{parser:"__js_expression"}))}if("angular"===n.parser){const t=(e,t)=>c(e,Object.assign(Object.assign({},t),{},{trailingComma:"none"})),n=["^\\*"],u=["^\\[.+\\]$","^bind(on)?-","^ng-(if|show|hide|class|style)$"],o=["^i18n(-.+)?$"];if(r(["^\\(.+\\)$","^on-"]))return a(t(i(),{parser:"__ng_action"}));if(r(u))return a(t(i(),{parser:"__ng_binding"}));if(r(o)){const t=i().trim();return s(aM(NM(e,t)),!t.includes("@@"))}if(r(n))return a(t(i(),{parser:"__ng_directive"}));const l=/{{(.+?)}}/s,p=i();if(l.test(p)){const e=[];for(const[n,r]of p.split(l).entries())if(n%2==0)e.push(pM(r));else try{e.push(iM(["{{",oM([sM,t(r,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),sM,"}}"]))}catch{e.push("{{",pM(r),"}}")}return iM(e)}}return null}var PM=function(e,t,n,r){const i=e.getValue();switch(i.type){case"element":if(AM(i)||"interpolation"===i.type)return;if(!i.isSelfClosing&&vM(i,r)){const u=FM(i,r);if(!u)return;const o=nM(i,r);let s=/^\s*$/.test(o),a="";return s||(a=n(xM(o),{parser:u,__embeddedInHtml:!0},{stripTrailingHardline:!0}),s=""===a),[gM(i,r),iM(mM(e,r,t)),s?"":uM,a,s?"":uM,fM(i,r),dM(i,r)]}break;case"text":if(AM(i.parent)){const e=FM(i.parent);if(e){const t="markdown"===e?SM(i.value.replace(/^[^\S\n]*?\n/,"")):i.value,u={parser:e,__embeddedInHtml:!0};if("html"===r.parser&&"babel"===e){let e="script";const{attrMap:t}=i.parent;t&&("module"===t.type||"text/babel"===t.type&&"module"===t["data-type"])&&(e="module"),u.__babelSourceType=e}return[rM,gM(i,r),n(t,u,{stripTrailingHardline:!0}),dM(i,r)]}}else if("interpolation"===i.parent.type){const e={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return"angular"===r.parser?(e.parser="__ng_interpolation",e.trailingComma="none"):"vue"===r.parser?e.parser="__vue_expression":e.parser="__js_expression",[oM([sM,n(i.value,e,{stripTrailingHardline:!0})]),i.parent.next&&hM(i.parent.next)?" ":sM]}break;case"attribute":{if(!i.value)break;if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.originalText.slice(i.valueSpan.start.offset,i.valueSpan.end.offset)))return[i.rawName,"=",i.value];if("lwc"===r.parser){if(/^{.*}$/s.test(r.originalText.slice(i.valueSpan.start.offset,i.valueSpan.end.offset)))return[i.rawName,"=",i.value]}const e=kM(i,((e,t)=>n(e,Object.assign({__isInHtmlAttribute:!0,__embeddedInHtml:!0},t),{stripTrailingHardline:!0})),r);if(e)return[i.rawName,'="',iM(lM(e,(e=>"string"==typeof e?e.replace(/"/g,"""):e))),'"'];break}case"front-matter":return dN(i,n)}};const{builders:{breakParent:OM,group:IM,ifBreak:LM,line:jM,softline:_M,hardline:MM},utils:{replaceTextEndOfLine:RM}}=su,{locStart:$M,locEnd:VM}=u_,{forceBreakChildren:WM,forceNextEmptyLine:qM,isTextLikeNode:UM,hasPrettierIgnore:zM,preferHardlineAsLeadingSpaces:GM}=sj,{printOpeningTagPrefix:HM,needsToBorrowNextOpeningTagStartMarker:JM,printOpeningTagStartMarker:XM,needsToBorrowPrevClosingTagEndMarker:YM,printClosingTagEndMarker:KM,printClosingTagSuffix:QM,needsToBorrowParentClosingTagStartMarker:ZM}=__;function eR(e,t,n){const r=e.getValue();return zM(r)?[HM(r,t),...RM(t.originalText.slice($M(r)+(r.prev&&JM(r.prev)?XM(r).length:0),VM(r)-(r.next&&YM(r.next)?KM(r,t).length:0))),QM(r,t)]:n()}function tR(e,t){return UM(e)&&UM(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?GM(t)?MM:jM:"":GM(t)?MM:_M:JM(e)&&(zM(t)||t.firstChild||t.isSelfClosing||"element"===t.type&&t.attrs.length>0)||"element"===e.type&&e.isSelfClosing&&YM(t)?"":!t.isLeadingSpaceSensitive||GM(t)||YM(t)&&e.lastChild&&ZM(e.lastChild)&&e.lastChild.lastChild&&ZM(e.lastChild.lastChild)?MM:t.hasLeadingSpaces?jM:_M}var nR={printChildren:function(e,t,n){const r=e.getValue();if(WM(r))return[OM,...e.map((e=>{const r=e.getValue(),i=r.prev?tR(r.prev,r):"";return[i?[i,qM(r.prev)?MM:""]:"",eR(e,t,n)]}),"children")];const i=r.children.map((()=>Symbol("")));return e.map(((e,r)=>{const u=e.getValue();if(UM(u)){if(u.prev&&UM(u.prev)){const r=tR(u.prev,u);if(r)return qM(u.prev)?[MM,MM,eR(e,t,n)]:[r,eR(e,t,n)]}return eR(e,t,n)}const o=[],s=[],a=[],c=[],l=u.prev?tR(u.prev,u):"",p=u.next?tR(u,u.next):"";return l&&(qM(u.prev)?o.push(MM,MM):l===MM?o.push(MM):UM(u.prev)?s.push(l):s.push(LM("",_M,{groupId:i[r-1]}))),p&&(qM(u)?UM(u.next)&&c.push(MM,MM):p===MM?UM(u.next)&&c.push(MM):a.push(p)),[...o,IM([...s,IM([eR(e,t,n),...a],{id:i[r]})]),...c]}),"children")}};const{builders:{breakParent:rR,dedentToRoot:iR,group:uR,ifBreak:oR,indentIfBreak:sR,indent:aR,line:cR,softline:lR},utils:{replaceTextEndOfLine:pR}}=su,{shouldPreserveContent:fR,isScriptLikeTag:dR,isVueCustomBlock:hR,countParents:gR,forceBreakContent:mR}=sj,{printOpeningTagPrefix:yR,printOpeningTag:DR,printClosingTagSuffix:ER,printClosingTag:CR,needsToBorrowPrevClosingTagEndMarker:bR,needsToBorrowLastChildClosingTagEndMarker:AR}=__,{printChildren:vR}=nR;var FR={printElement:function(e,t,n){const r=e.getValue();if(fR(r,t))return[yR(r,t),uR(DR(e,t,n)),...pR(nM(r,t)),...CR(r,t),ER(r,t)];const i=1===r.children.length&&"interpolation"===r.firstChild.type&&r.firstChild.isLeadingSpaceSensitive&&!r.firstChild.hasLeadingSpaces&&r.lastChild.isTrailingSpaceSensitive&&!r.lastChild.hasTrailingSpaces,u=Symbol("element-attr-group-id"),o=i=>uR([uR(DR(e,t,n),{id:u}),i,CR(r,t)]);return 0===r.children.length?o(r.hasDanglingSpaces&&r.isDanglingSpaceSensitive?cR:""):o([mR(r)?rR:"",(s=[i?oR(lR,"",{groupId:u}):r.firstChild.hasLeadingSpaces&&r.firstChild.isLeadingSpaceSensitive?cR:"text"===r.firstChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive?iR(lR):lR,vR(e,t,n)],i?sR(s,{groupId:u}):!dR(r)&&!hR(r,t)||"root"!==r.parent.type||"vue"!==t.parser||t.vueIndentScriptAndStyle?aR(s):s),(r.next?bR(r.next):AR(r.parent))?r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?" ":"":i?oR(lR,"",{groupId:u}):r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?cR:("comment"===r.lastChild.type||"text"===r.lastChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*gR(e,(e=>e.parent&&"root"!==e.parent.type))}}$`).test(r.lastChild.value)?"":lR]);var s}};const{builders:{fill:xR,group:SR,hardline:wR,literalline:TR},utils:{cleanDoc:BR,getDocParts:NR,isConcat:kR,replaceTextEndOfLine:PR}}=su,{countChars:OR,unescapeQuoteEntities:IR,getTextValueParts:LR}=sj,{insertPragma:jR}=i_,{locStart:_R,locEnd:MR}=u_,{printClosingTagSuffix:RR,printClosingTagEnd:$R,printOpeningTagPrefix:VR,printOpeningTagStart:WR}=__,{printElement:qR}=FR,{printChildren:UR}=nR;var zR={preprocess:r_,print:function(e,t,n){const r=e.getValue();switch(r.type){case"front-matter":return PR(r.raw);case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(r),[SR(UR(e,t,n)),wR];case"element":case"ieConditionalComment":return qR(e,t,n);case"ieConditionalStartComment":case"ieConditionalEndComment":return[WR(r),$R(r)];case"interpolation":return[WR(r,t),...e.map(n,"children"),$R(r,t)];case"text":{if("interpolation"===r.parent.type){const e=/\n[^\S\n]*?$/,t=e.test(r.value),n=t?r.value.replace(e,""):r.value;return[...PR(n),t?wR:""]}const e=BR([VR(r,t),...LR(r),RR(r,t)]);return kR(e)||"fill"===e.type?xR(NR(e)):e}case"docType":return[SR([WR(r,t)," ",r.value.replace(/^html\b/i,"html").replace(/\s+/g," ")]),$R(r,t)];case"comment":return[VR(r,t),...PR(t.originalText.slice(_R(r),MR(r)),TR),RR(r,t)];case"attribute":{if(null===r.value)return r.rawName;const e=IR(r.value),t=OR(e,"'")({name:"Angular",since:"1.15.0",parsers:["angular"],vscodeLanguageIds:["html"],extensions:[".component.html"],filenames:[]}))),rh(JR,(e=>({since:"1.15.0",parsers:["html"],vscodeLanguageIds:["html"],extensions:[...e.extensions,".mjml"]}))),rh(JR,(()=>({name:"Lightning Web Components",since:"1.17.0",parsers:["lwc"],vscodeLanguageIds:["html"],extensions:[],filenames:[]}))),rh(XR,(()=>({since:"1.10.0",parsers:["vue"],vscodeLanguageIds:["vue"]})))],printers:{html:zR},options:HR,parsers:undefined};var KR={isPragma:function(e){return/^\s*@(?:prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(e)},insertPragma:function(e){return`# @format\n\n${e}`}};var QR={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}};var ZR=function(e,t,n,r){if("root"===e.getValue().type&&r.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint)rc$/.test(r.filepath))return n(r.originalText,Object.assign(Object.assign({},r),{},{parser:"json"}))};const{getLast:e$,isNonEmptyArray:t$}=Fi;function n$(e,t){return e&&"string"==typeof e.type&&(!t||t.includes(e.type))}function r$(e){return"prettier-ignore"===e.value.trim()}function i$(e){return e&&t$(e.leadingComments)}function u$(e){return e&&t$(e.middleComments)}function o$(e){return e&&e.indicatorComment}function s$(e){return e&&e.trailingComment}function a$(e){return e&&t$(e.endComments)}function c$(e){const t=[];let n;for(const r of e.split(/( +)/))" "!==r?" "===n?t.push(r):t.push((t.pop()||"")+r):void 0===n&&t.unshift(""),n=r;return" "===n&&t.push((t.pop()||"")+" "),""===t[0]&&(t.shift(),t.unshift(" "+(t.shift()||""))),t}var l$={getLast:e$,getAncestorCount:function(e,t){let n=0;const r=e.stack.length-1;for(let i=0;ie(r,n,t)))}):t,r)},defineShortcut:function(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})},isNextLineEmpty:function(e,t){let n=0;const r=t.length;for(let i=e.position.end.offset-1;ie?e[1].length:Number.POSITIVE_INFINITY)(i.match(/^( *)\S/m)):e.indent-1+t,o=i.split("\n").map((e=>e.slice(u)));return"preserve"===r.proseWrap||"blockLiteral"===e.type?s(o.map((e=>0===e.length?[]:[e]))):s(o.map((e=>0===e.length?[]:c$(e))).reduce(((e,t,n)=>0!==n&&o[n-1].length>0&&t.length>0&&!/^\s/.test(t[0])&&!/^\s|\s$/.test(e$(e))?[...e.slice(0,-1),[...e$(e),...t]]:[...e,t]),[]).map((e=>e.reduce(((e,t)=>e.length>0&&/\s$/.test(e$(e))?[...e.slice(0,-1),e$(e)+" "+t]:[...e,t]),[]))).map((e=>"never"===r.proseWrap?[e.join(" ")]:e)));function s(t){if("keep"===e.chomping)return 0===e$(t).length?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&0===t[e].length;e--)r++;return 0===r?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}},getFlowScalarLineContents:function(e,t,n){const r=t.split("\n").map(((e,t,n)=>0===t&&t===n.length-1?e:0!==t&&t!==n.length-1?e.trim():0===t?e.trimEnd():e.trimStart()));return"preserve"===n.proseWrap?r.map((e=>0===e.length?[]:[e])):r.map((e=>0===e.length?[]:c$(e))).reduce(((t,n,i)=>0!==i&&r[i-1].length>0&&n.length>0&&("quoteDouble"!==e||!e$(e$(t)).endsWith("\\"))?[...t.slice(0,-1),[...e$(t),...n]]:[...t,n]),[]).map((e=>"never"===n.proseWrap?[e.join(" ")]:e))},getLastDescendantNode:function e(t){return t$(t.children)?e(e$(t.children)):t},hasPrettierIgnore:function(e){const t=e.getValue();if("documentBody"===t.type){const t=e.getParentNode();return a$(t.head)&&r$(e$(t.head.endComments))}return i$(t)&&r$(e$(t.leadingComments))},hasLeadingComments:i$,hasMiddleComments:u$,hasIndicatorComment:o$,hasTrailingComment:s$,hasEndComments:a$};const{defineShortcut:p$,mapNode:f$}=l$;function d$(e){switch(e.type){case"document":p$(e,"head",(()=>e.children[0])),p$(e,"body",(()=>e.children[1]));break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":p$(e,"content",(()=>e.children[0]));break;case"mappingItem":case"flowMappingItem":p$(e,"key",(()=>e.children[0])),p$(e,"value",(()=>e.children[1]))}return e}var h$=function(e){return f$(e,d$)};const{builders:{softline:g$,align:m$}}=su,{hasEndComments:y$,isNextLineEmpty:D$,isNode:E$}=l$,C$=new WeakMap;function b$(e){return y$(e)&&!E$(e,["documentHead","documentBody","flowMapping","flowSequence"])}var A$={alignWithSpaces:function(e,t){return m$(" ".repeat(e),t)},shouldPrintEndComments:b$,printNextEmptyLine:function(e,t){const n=e.getValue(),r=e.stack[0];let i;return C$.has(r)?i=C$.get(r):(i=new Set,C$.set(r,i)),i.has(n.position.end.line)||(i.add(n.position.end.line),!D$(n,t)||b$(e.getParentNode()))?"":g$}};const{builders:{ifBreak:v$,line:F$,softline:x$,hardline:S$,join:w$}}=su,{isEmptyNode:T$,getLast:B$,hasEndComments:N$}=l$,{printNextEmptyLine:k$,alignWithSpaces:P$}=A$;function O$(e,t,n){const r=e.getValue(),i="flowMapping"===r.type,u=i?"{":"[",o=i?"}":"]";let s=x$;i&&r.children.length>0&&n.bracketSpacing&&(s=F$);const a=B$(r.children),c=a&&"flowMappingItem"===a.type&&T$(a.key)&&T$(a.value);return[u,P$(n.tabWidth,[s,I$(e,t,n),"none"===n.trailingComma?"":v$(","),N$(r)?[S$,w$(S$,e.map(t,"endComments"))]:""]),c?"":s,o]}function I$(e,t,n){const r=e.getValue();return e.map(((e,i)=>[t(),i===r.children.length-1?"":[",",F$,r.children[i].position.start.line!==r.children[i+1].position.start.line?k$(e,n.originalText):""]]),"children")}var L$={printFlowMapping:O$,printFlowSequence:O$};const{builders:{conditionalGroup:j$,group:_$,hardline:M$,ifBreak:R$,join:$$,line:V$}}=su,{hasLeadingComments:W$,hasMiddleComments:q$,hasTrailingComment:U$,hasEndComments:z$,isNode:G$,isEmptyNode:H$,isInlineNode:J$}=l$,{alignWithSpaces:X$}=A$;function Y$(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if("preserve"===t.proseWrap)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes("\n");case"always":return!/[\n ]/.test(e.value);default:return!1}}var K$=function(e,t,n,r,i){const{key:u,value:o}=e,s=H$(u),a=H$(o);if(s&&a)return": ";const c=r("key"),l=function(e){return e.key.content&&"alias"===e.key.content.type}(e)?" ":"";if(a)return"flowMappingItem"===e.type&&"flowMapping"===t.type?c:"mappingItem"!==e.type||!Y$(u.content,i)||U$(u.content)||t.tag&&"tag:yaml.org,2002:set"===t.tag.value?["? ",X$(2,c)]:[c,l,":"];const p=r("value");if(s)return[": ",X$(2,p)];if(W$(o)||!J$(u.content))return["? ",X$(2,c),M$,$$("",n.map(r,"value","leadingComments").map((e=>[e,M$]))),": ",X$(2,p)];if(function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1}}(u.content)&&!W$(u.content)&&!q$(u.content)&&!U$(u.content)&&!z$(u)&&!W$(o.content)&&!q$(o.content)&&!z$(o)&&Y$(o.content,i))return[c,l,": ",p];const f=Symbol("mappingKey"),d=_$([R$("? "),_$(X$(2,c),{id:f})]),h=[M$,": ",X$(2,p)],g=[l,":"];W$(o.content)||z$(o)&&o.content&&!G$(o.content,["mapping","sequence"])||"mapping"===t.type&&U$(u.content)&&J$(o.content)||G$(o.content,["mapping","sequence"])&&null===o.content.tag&&null===o.content.anchor?g.push(M$):o.content&&g.push(V$),g.push(p);const m=X$(i.tabWidth,g);return!Y$(u.content,i)||W$(u.content)||q$(u.content)||z$(u)?j$([[d,R$(h,m,{groupId:f})]]):j$([[c,m]])};const{builders:{dedent:Q$,dedentToRoot:Z$,fill:eV,hardline:tV,join:nV,line:rV,literalline:iV,markAsRoot:uV},utils:{getDocParts:oV}}=su,{getAncestorCount:sV,getBlockValueLineContents:aV,hasIndicatorComment:cV,isLastDescendantNode:lV,isNode:pV}=l$,{alignWithSpaces:fV}=A$;var dV=function(e,t,n){const r=e.getValue(),i=sV(e,(e=>pV(e,["sequence","mapping"]))),u=lV(e),o=["blockFolded"===r.type?">":"|"];null!==r.indent&&o.push(r.indent.toString()),"clip"!==r.chomping&&o.push("keep"===r.chomping?"+":"-"),cV(r)&&o.push(" ",t("indicatorComment"));const s=aV(r,{parentIndent:i,isLastDescendant:u,options:n}),a=[];for(const[e,t]of s.entries())0===e&&a.push(tV),a.push(eV(oV(nV(rV,t)))),e!==s.length-1?a.push(0===t.length?tV:uV(iV)):"keep"===r.chomping&&u&&a.push(Z$(0===t.length?tV:iV));return null===r.indent?o.push(Q$(fV(n.tabWidth,a))):o.push(Z$(fV(r.indent-1+i,a))),o};const{builders:{breakParent:hV,fill:gV,group:mV,hardline:yV,join:DV,line:EV,lineSuffix:CV,literalline:bV},utils:{getDocParts:AV,replaceTextEndOfLine:vV}}=su,{isPreviousLineEmpty:FV}=Fi,{insertPragma:xV,isPragma:SV}=KR,{locStart:wV}=QR,{getFlowScalarLineContents:TV,getLastDescendantNode:BV,hasLeadingComments:NV,hasMiddleComments:kV,hasTrailingComment:PV,hasEndComments:OV,hasPrettierIgnore:IV,isLastDescendantNode:LV,isNode:jV,isInlineNode:_V}=l$,{alignWithSpaces:MV,printNextEmptyLine:RV,shouldPrintEndComments:$V}=A$,{printFlowMapping:VV,printFlowSequence:WV}=L$;function qV(e,t){return PV(e)||t&&(t.head.children.length>0||OV(t.head))}function UV(e,t,n){const r=TV(e,t,n);return DV(yV,r.map((e=>gV(AV(DV(EV,e))))))}var zV={preprocess:h$,embed:ZR,print:function(e,t,n){const r=e.getValue(),i=[];"mappingValue"!==r.type&&NV(r)&&i.push([DV(yV,e.map(n,"leadingComments")),yV]);const{tag:u,anchor:o}=r;u&&i.push(n("tag")),u&&o&&i.push(" "),o&&i.push(n("anchor"));let s="";jV(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!LV(e)&&(s=RV(e,t.originalText)),(u||o)&&(jV(r,["sequence","mapping"])&&!kV(r)?i.push(yV):i.push(" ")),kV(r)&&i.push([1===r.middleComments.length?"":yV,DV(yV,e.map(n,"middleComments")),yV]);const a=e.getParentNode();return IV(e)?i.push(vV(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd(),bV)):i.push(mV(function(e,t,n,r,i){switch(e.type){case"root":{const{children:t}=e,r=[];n.each(((e,n)=>{const u=t[n],o=t[n+1];0!==n&&r.push(yV),r.push(i()),qV(u,o)?(r.push(yV,"..."),PV(u)&&r.push(" ",i("trailingComment"))):o&&!PV(o.head)&&r.push(yV,"---")}),"children");const u=BV(e);return jV(u,["blockLiteral","blockFolded"])&&"keep"===u.chomping||r.push(yV),r}case"document":{const u=[];return"head"===function(e,t,n,r){if(n.children[0]===e&&/---(?:\s|$)/.test(r.originalText.slice(wV(e),wV(e)+4))||e.head.children.length>0||OV(e.head)||PV(e.head))return"head";if(qV(e,t))return!1;return!!t&&"root"}(e,t.children[n.getName()+1],t,r)&&((e.head.children.length>0||e.head.endComments.length>0)&&u.push(i("head")),PV(e.head)?u.push(["---"," ",i(["head","trailingComment"])]):u.push("---")),function(e){return e.body.children.length>0||OV(e.body)}(e)&&u.push(i("body")),DV(yV,u)}case"documentHead":return DV(yV,[...n.map(i,"children"),...n.map(i,"endComments")]);case"documentBody":{const{children:t,endComments:r}=e;let u="";if(t.length>0&&r.length>0){const t=BV(e);jV(t,["blockFolded","blockLiteral"])?"keep"!==t.chomping&&(u=[yV,yV]):u=yV}return[DV(yV,n.map(i,"children")),u,DV(yV,n.map(i,"endComments"))]}case"directive":return["%",DV(" ",[e.name,...e.parameters])];case"comment":return["#",e.value];case"alias":return["*",e.value];case"tag":return r.originalText.slice(e.position.start.offset,e.position.end.offset);case"anchor":return["&",e.value];case"plain":return UV(e.type,r.originalText.slice(e.position.start.offset,e.position.end.offset),r);case"quoteDouble":case"quoteSingle":{const t="'",n='"',i=r.originalText.slice(e.position.start.offset+1,e.position.end.offset-1);if("quoteSingle"===e.type&&i.includes("\\")||"quoteDouble"===e.type&&/\\[^"]/.test(i)){const u="quoteDouble"===e.type?n:t;return[u,UV(e.type,i,r),u]}if(i.includes(n))return[t,UV(e.type,"quoteDouble"===e.type?i.replace(/\\"/g,n).replace(/'/g,t.repeat(2)):i,r),t];if(i.includes(t))return[n,UV(e.type,"quoteSingle"===e.type?i.replace(/''/g,t):i,r),n];const u=r.singleQuote?t:n;return[u,UV(e.type,i,r),u]}case"blockFolded":case"blockLiteral":return dV(n,i,r);case"mapping":case"sequence":return DV(yV,n.map(i,"children"));case"sequenceItem":return["- ",MV(2,e.content?i("content"):"")];case"mappingKey":case"mappingValue":return e.content?i("content"):"";case"mappingItem":case"flowMappingItem":return K$(e,t,n,i,r);case"flowMapping":return VV(n,i,r);case"flowSequence":return WV(n,i,r);case"flowSequenceItem":return i("content");default:throw new Error(`Unexpected node type ${e.type}`)}}(r,a,e,t,n))),PV(r)&&!jV(r,["document","documentHead"])&&i.push(CV(["mappingValue"!==r.type||r.content?" ":"","mappingKey"===a.type&&"mapping"===e.getParentNode(2).type&&_V(r)?"":hV,n("trailingComment")])),$V(r)&&i.push(MV("sequenceItem"===r.type?2:0,[yV,DV(yV,e.map((e=>[FV(t.originalText,e.getValue(),wV)?yV:"",n()]),"endComments"))])),i.push(s),i},massageAstNode:function(e,t){if(jV(t))switch(delete t.position,t.type){case"comment":if(SV(t.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote"}},insertPragma:xV},GV={bracketSpacing:KB.bracketSpacing,singleQuote:KB.singleQuote,proseWrap:KB.proseWrap};var HV=[oN,fP,AO,qO,EL,YR,{languages:[rh({name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","glide.lock","yarn.lock"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",languageId:407},(e=>({since:"1.14.0",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"],filenames:[...e.filenames.filter((e=>"yarn.lock"!==e)),".prettierrc",".stylelintrc"]})))],printers:{yaml:zV},options:GV,parsers:undefined}];const{version:JV}=e,{getSupportInfo:XV}=ui;function YV(e,t=1){return(...n)=>{const r=n[t]||{},i=r.plugins||[];return n[t]=Object.assign(Object.assign({},r),{},{plugins:[...HV,...Array.isArray(i)?i:Object.values(i)]}),e(...n)}}const KV=YV(kd.formatWithCursor);return{formatWithCursor:KV,format:(e,t)=>KV(e,t).formatted,check(e,t){const{formatted:n}=KV(e,t);return n===e},doc:su,getSupportInfo:YV(XV,0),version:JV,util:th,__debug:{parse:YV(kd.parse),formatAST:YV(kd.formatAST),formatDoc:YV(kd.formatDoc),printToDoc:YV(kd.printToDoc),printDocToString:YV(kd.printDocToString)}}})); diff --git a/website/static/js/tweakpane.min.js b/website/static/js/tweakpane.min.js new file mode 100644 index 0000000..8cb8909 --- /dev/null +++ b/website/static/js/tweakpane.min.js @@ -0,0 +1,2 @@ +/*! Tweakpane 4.0.3 (c) 2016 cocopon, licensed under the MIT license. */ +function t(t){return null==t}function e(t){return null!==t&&"object"==typeof t}function n(t){return null!==t&&"object"==typeof t}function i(t,e){if(t.length!==e.length)return!1;for(let n=0;n{const o=t[r],a=e[r];return n(o)&&n(a)?Object.assign(Object.assign({},i),{[r]:s(o,a)}):Object.assign(Object.assign({},i),{[r]:r in e?a:o})}),{})}function r(t){return!!e(t)&&"target"in t}const o={alreadydisposed:()=>"View has been already disposed",invalidparams:t=>`Invalid parameters for '${t.name}'`,nomatchingcontroller:t=>`No matching controller for '${t.key}'`,nomatchingview:t=>`No matching view for '${JSON.stringify(t.params)}'`,notbindable:()=>"Value is not bindable",notcompatible:t=>`Not compatible with plugin '${t.id}'`,propertynotfound:t=>`Property '${t.name}' not found`,shouldneverhappen:()=>"This error should never happen"};class a{static alreadyDisposed(){return new a({type:"alreadydisposed"})}static notBindable(){return new a({type:"notbindable"})}static notCompatible(t,e){return new a({type:"notcompatible",context:{id:`${t}.${e}`}})}static propertyNotFound(t){return new a({type:"propertynotfound",context:{name:t}})}static shouldNeverHappen(){return new a({type:"shouldneverhappen"})}constructor(t){var e;this.message=null!==(e=o[t.type](t.context))&&void 0!==e?e:"Unexpected error",this.name=this.constructor.name,this.stack=new Error(this.message).stack,this.type=t.type}toString(){return this.message}}class l{constructor(t,e){this.obj_=t,this.key=e}static isBindable(t){return null!==t&&("object"==typeof t||"function"==typeof t)}read(){return this.obj_[this.key]}write(t){this.obj_[this.key]=t}writeProperty(t,e){const n=this.read();if(!l.isBindable(n))throw a.notBindable();if(!(t in n))throw a.propertyNotFound(t);n[t]=e}}class p{constructor(){this.observers_={}}on(t,e,n){var i;let s=this.observers_[t];return s||(s=this.observers_[t]=[]),s.push({handler:e,key:null!==(i=null==n?void 0:n.key)&&void 0!==i?i:e}),this}off(t,e){const n=this.observers_[t];return n&&(this.observers_[t]=n.filter((t=>t.key!==e))),this}emit(t,e){const n=this.observers_[t];n&&n.forEach((t=>{t.handler(e)}))}}class c{constructor(t,e){var n;this.constraint_=null==e?void 0:e.constraint,this.equals_=null!==(n=null==e?void 0:e.equals)&&void 0!==n?n:(t,e)=>t===e,this.emitter=new p,this.rawValue_=t}get constraint(){return this.constraint_}get rawValue(){return this.rawValue_}set rawValue(t){this.setRawValue(t,{forceEmit:!1,last:!0})}setRawValue(t,e){const n=null!=e?e:{forceEmit:!1,last:!0},i=this.constraint_?this.constraint_.constrain(t):t,s=this.rawValue_;(!this.equals_(s,i)||n.forceEmit)&&(this.emitter.emit("beforechange",{sender:this}),this.rawValue_=i,this.emitter.emit("change",{options:n,previousRawValue:s,rawValue:i,sender:this}))}}class d{constructor(t){this.emitter=new p,this.value_=t}get rawValue(){return this.value_}set rawValue(t){this.setRawValue(t,{forceEmit:!1,last:!0})}setRawValue(t,e){const n=null!=e?e:{forceEmit:!1,last:!0},i=this.value_;(i!==t||n.forceEmit)&&(this.emitter.emit("beforechange",{sender:this}),this.value_=t,this.emitter.emit("change",{options:n,previousRawValue:i,rawValue:this.value_,sender:this}))}}class h{constructor(t){this.emitter=new p,this.onValueBeforeChange_=this.onValueBeforeChange_.bind(this),this.onValueChange_=this.onValueChange_.bind(this),this.value_=t,this.value_.emitter.on("beforechange",this.onValueBeforeChange_),this.value_.emitter.on("change",this.onValueChange_)}get rawValue(){return this.value_.rawValue}onValueBeforeChange_(t){this.emitter.emit("beforechange",Object.assign(Object.assign({},t),{sender:this}))}onValueChange_(t){this.emitter.emit("change",Object.assign(Object.assign({},t),{sender:this}))}}function u(t,e){const n=null==e?void 0:e.constraint,i=null==e?void 0:e.equals;return n||i?new c(t,e):new d(t)}class v{constructor(t){this.emitter=new p,this.valMap_=t;for(const t in this.valMap_){this.valMap_[t].emitter.on("change",(()=>{this.emitter.emit("change",{key:t,sender:this})}))}}static createCore(t){return Object.keys(t).reduce(((e,n)=>Object.assign(e,{[n]:u(t[n])})),{})}static fromObject(t){const e=this.createCore(t);return new v(e)}get(t){return this.valMap_[t].rawValue}set(t,e){this.valMap_[t].rawValue=e}value(t){return this.valMap_[t]}}class m{constructor(t){this.values=v.fromObject({max:t.max,min:t.min})}constrain(t){const e=this.values.get("max"),n=this.values.get("min");return Math.min(Math.max(t,n),e)}}class b{constructor(t){this.values=v.fromObject({max:t.max,min:t.min})}constrain(e){const n=this.values.get("max"),i=this.values.get("min");let s=e;return t(i)||(s=Math.max(s,i)),t(n)||(s=Math.min(s,n)),s}}class g{constructor(t,e=0){this.step=t,this.origin=e}constrain(t){const e=this.origin%this.step;return e+Math.round((t-e)/this.step)*this.step}}class _{constructor(t){this.text=t}evaluate(){return Number(this.text)}toString(){return this.text}}const f={"**":(t,e)=>Math.pow(t,e),"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"<<":(t,e)=>t<>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"&":(t,e)=>t&e,"^":(t,e)=>t^e,"|":(t,e)=>t|e};class w{constructor(t,e,n){this.left=e,this.operator=t,this.right=n}evaluate(){const t=f[this.operator];if(!t)throw new Error(`unexpected binary operator: '${this.operator}`);return t(this.left.evaluate(),this.right.evaluate())}toString(){return["b(",this.left.toString(),this.operator,this.right.toString(),")"].join(" ")}}const x={"+":t=>t,"-":t=>-t,"~":t=>~t};class y{constructor(t,e){this.operator=t,this.expression=e}evaluate(){const t=x[this.operator];if(!t)throw new Error(`unexpected unary operator: '${this.operator}`);return t(this.expression.evaluate())}toString(){return["u(",this.operator,this.expression.toString(),")"].join(" ")}}function C(t){return(e,n)=>{for(let i=0;ie.startsWith(t,n)))[0];return i?(n+=i.length,{cursor:n+=P(e,n).length,operator:i}):null}const A=[["**"],["*","/","%"],["+","-"],["<<",">>>",">>"],["&"],["^"],["|"]].reduce(((t,e)=>function(t,e){return(n,i)=>{const s=t(n,i);if(!s)return null;i=s.cursor;let r=s.evaluable;for(;;){const s=D(e,n,i);if(!s)break;i=s.cursor;const o=t(n,i);if(!o)return null;i=o.cursor,r=new w(s.operator,r,o.evaluable)}return r?{cursor:i,evaluable:r}:null}}(t,e)),(function t(e,n){const i=j(e,n);if(i)return i;const s=e.substr(n,1);if(n+=s.length,"+"!==s&&"-"!==s&&"~"!==s)return null;const r=t(e,n);return r?{cursor:n=r.cursor,evaluable:new y(s,r.evaluable)}:null}));function O(t,e){return e+=P(t,e).length,A(t,e)}function R(t){var e;const n=function(t){const e=O(t,0);return e?e.cursor+P(t,e.cursor).length!==t.length?null:e.evaluable:null}(t);return null!==(e=null==n?void 0:n.evaluate())&&void 0!==e?e:null}function B(e){if("number"==typeof e)return e;if("string"==typeof e){const n=R(e);if(!t(n))return n}return 0}function K(t){return String(t)}function z(t){return e=>e.toFixed(Math.max(Math.min(t,20),0))}function N(t,e,n,i,s){return i+(t-e)/(n-e)*(s-i)}function I(t){return String(t.toFixed(10)).split(".")[1].replace(/0+$/,"").length}function T(t,e,n){return Math.min(Math.max(t,e),n)}function U(t,e){return(t%e+e)%e}function F(e,n){return t(e.step)?Math.max(I(n),2):I(e.step)}function $(t){var e;return null!==(e=t.step)&&void 0!==e?e:1}function q(t,e){var n;const i=Math.abs(null!==(n=t.step)&&void 0!==n?n:e);return 0===i?.1:Math.pow(10,Math.floor(Math.log10(i))-1)}function H(e,n){return t(e.step)?null:new g(e.step,n)}function G(e){return t(e.max)||t(e.min)?t(e.max)&&t(e.min)?null:new b({max:e.max,min:e.min}):new m({max:e.max,min:e.min})}function Y(t,e){var n,i,s;return{formatter:null!==(n=t.format)&&void 0!==n?n:z(F(t,e)),keyScale:null!==(i=t.keyScale)&&void 0!==i?i:$(t),pointerScale:null!==(s=t.pointerScale)&&void 0!==s?s:q(t,e)}}function X(t){return{format:t.optional.function,keyScale:t.optional.number,max:t.optional.number,min:t.optional.number,pointerScale:t.optional.number,step:t.optional.number}}function Q(t){return{constraint:t.constraint,textProps:v.fromObject(Y(t.params,t.initialValue))}}class W{constructor(t){this.controller=t}get element(){return this.controller.view.element}get disabled(){return this.controller.viewProps.get("disabled")}set disabled(t){this.controller.viewProps.set("disabled",t)}get hidden(){return this.controller.viewProps.get("hidden")}set hidden(t){this.controller.viewProps.set("hidden",t)}dispose(){this.controller.viewProps.set("disposed",!0)}importState(t){return this.controller.importState(t)}exportState(){return this.controller.exportState()}}class J{constructor(t){this.target=t}}class Z extends J{constructor(t,e,n){super(t),this.value=e,this.last=null==n||n}}class tt extends J{constructor(t,e){super(t),this.expanded=e}}class et extends J{constructor(t,e){super(t),this.index=e}}class nt extends J{constructor(t,e){super(t),this.native=e}}class it extends W{constructor(t){super(t),this.onValueChange_=this.onValueChange_.bind(this),this.emitter_=new p,this.controller.value.emitter.on("change",this.onValueChange_)}get label(){return this.controller.labelController.props.get("label")}set label(t){this.controller.labelController.props.set("label",t)}get key(){return this.controller.value.binding.target.key}get tag(){return this.controller.tag}set tag(t){this.controller.tag=t}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}refresh(){this.controller.value.fetch()}onValueChange_(t){const e=this.controller.value;this.emitter_.emit("change",new Z(this,e.binding.target.read(),t.options.last))}}class st{constructor(t,e){this.onValueBeforeChange_=this.onValueBeforeChange_.bind(this),this.onValueChange_=this.onValueChange_.bind(this),this.binding=e,this.value_=t,this.value_.emitter.on("beforechange",this.onValueBeforeChange_),this.value_.emitter.on("change",this.onValueChange_),this.emitter=new p}get rawValue(){return this.value_.rawValue}set rawValue(t){this.value_.rawValue=t}setRawValue(t,e){this.value_.setRawValue(t,e)}fetch(){this.value_.rawValue=this.binding.read()}push(){this.binding.write(this.value_.rawValue)}onValueBeforeChange_(t){this.emitter.emit("beforechange",Object.assign(Object.assign({},t),{sender:this}))}onValueChange_(t){this.push(),this.emitter.emit("change",Object.assign(Object.assign({},t),{sender:this}))}}function rt(t){return e=>n=>{if(!e&&void 0===n)return{succeeded:!1,value:void 0};if(e&&void 0===n)return{succeeded:!0,value:void 0};const i=t(n);return void 0!==i?{succeeded:!0,value:i}:{succeeded:!1,value:void 0}}}function ot(t){return{custom:e=>rt(e)(t),boolean:rt((t=>"boolean"==typeof t?t:void 0))(t),number:rt((t=>"number"==typeof t?t:void 0))(t),string:rt((t=>"string"==typeof t?t:void 0))(t),function:rt((t=>"function"==typeof t?t:void 0))(t),constant:e=>rt((t=>t===e?e:void 0))(t),raw:rt((t=>t))(t),object:e=>rt((t=>{var n;if(null!==(n=t)&&"object"==typeof n)return function(t,e){return Object.keys(e).reduce(((n,i)=>{if(void 0===n)return;const s=(0,e[i])(t[i]);return s.succeeded?Object.assign(Object.assign({},n),{[i]:s.value}):void 0}),{})}(t,e)}))(t),array:e=>rt((t=>{var n;if(Array.isArray(t))return n=e,t.reduce(((t,e)=>{if(void 0===t)return;const i=n(e);return i.succeeded&&void 0!==i.value?[...t,i.value]:void 0}),[])}))(t)}}const at={optional:ot(!0),required:ot(!1)};function lt(t,e){const n=e(at),i=at.required.object(n)(t);return i.succeeded?i.value:void 0}function pt(t,e,n,i){if(e&&!e(t))return!1;const s=lt(t,n);return!!s&&i(s)}function ct(t,e){var n;return s(null!==(n=null==t?void 0:t())&&void 0!==n?n:{},e)}function dt(t){return"value"in t}function ht(t){if(!e(t)||!("binding"in t))return!1;return r(t.binding)}const ut="http://www.w3.org/2000/svg";function vt(t){t.offsetHeight}function mt(t){return void 0!==t.ontouchstart}function bt(){return globalThis.document}const gt={check:'',dropdown:'',p2dpad:''};function _t(t,e){const n=t.createElementNS(ut,"svg");return n.innerHTML=gt[e],n}function ft(t,e,n){t.insertBefore(e,t.children[n])}function wt(t){t.parentElement&&t.parentElement.removeChild(t)}function xt(t){for(;t.children.length>0;)t.removeChild(t.children[0])}function yt(t){return t.relatedTarget?t.relatedTarget:"explicitOriginalTarget"in t?t.explicitOriginalTarget:null}function Ct(t,e){t.emitter.on("change",(t=>{e(t.rawValue)})),e(t.rawValue)}function Pt(t,e,n){Ct(t.value(e),n)}const kt="tp";function Et(t){return(e,n)=>[kt,"-",t,"v",e?`_${e}`:"",n?`-${n}`:""].join("")}const Vt=Et("lbl");class Lt{constructor(e,n){this.element=e.createElement("div"),this.element.classList.add(Vt()),n.viewProps.bindClassModifiers(this.element);const i=e.createElement("div");i.classList.add(Vt("l")),Pt(n.props,"label",(n=>{t(n)?this.element.classList.add(Vt(void 0,"nol")):(this.element.classList.remove(Vt(void 0,"nol")),function(t){for(;t.childNodes.length>0;)t.removeChild(t.childNodes[0])}(i),i.appendChild(function(t,e){const n=t.createDocumentFragment();return e.split("\n").map((e=>t.createTextNode(e))).forEach(((e,i)=>{i>0&&n.appendChild(t.createElement("br")),n.appendChild(e)})),n}(e,n)))})),this.element.appendChild(i),this.labelElement=i;const s=e.createElement("div");s.classList.add(Vt("v")),this.element.appendChild(s),this.valueElement=s}}class St{constructor(t,e){this.props=e.props,this.valueController=e.valueController,this.viewProps=e.valueController.viewProps,this.view=new Lt(t,{props:e.props,viewProps:this.viewProps}),this.view.valueElement.appendChild(this.valueController.view.element)}importProps(t){return pt(t,null,(t=>({label:t.optional.string})),(t=>(this.props.set("label",t.label),!0)))}exportProps(){return ct(null,{label:this.props.get("label")})}}const Mt=Et(""),jt={veryfirst:"vfst",first:"fst",last:"lst",verylast:"vlst"};class Dt{constructor(t){this.parent_=null,this.blade=t.blade,this.view=t.view,this.viewProps=t.viewProps;const e=this.view.element;this.blade.value("positions").emitter.on("change",(()=>{["veryfirst","first","last","verylast"].forEach((t=>{e.classList.remove(Mt(void 0,jt[t]))})),this.blade.get("positions").forEach((t=>{e.classList.add(Mt(void 0,jt[t]))}))})),this.viewProps.handleDispose((()=>{wt(e)}))}get parent(){return this.parent_}set parent(t){this.parent_=t,this.viewProps.set("parent",this.parent_?this.parent_.viewProps:null)}importState(t){return pt(t,null,(t=>({disabled:t.required.boolean,hidden:t.required.boolean})),(t=>(this.viewProps.importState(t),!0)))}exportState(){return ct(null,Object.assign({},this.viewProps.exportState()))}}class At extends Dt{constructor(t,e){if(e.value!==e.valueController.value)throw a.shouldNeverHappen();const n=e.valueController.viewProps,i=new St(t,{blade:e.blade,props:e.props,valueController:e.valueController});super(Object.assign(Object.assign({},e),{view:new Lt(t,{props:e.props,viewProps:n}),viewProps:n})),this.labelController=i,this.value=e.value,this.valueController=e.valueController,this.view.valueElement.appendChild(this.valueController.view.element)}importState(t){return pt(t,(e=>{var n,i,s;return super.importState(e)&&this.labelController.importProps(e)&&(null===(s=null===(i=(n=this.valueController).importProps)||void 0===i?void 0:i.call(n,t))||void 0===s||s)}),(t=>({value:t.optional.raw})),(t=>(t.value&&(this.value.rawValue=t.value),!0)))}exportState(){var t,e,n;return ct((()=>super.exportState()),Object.assign(Object.assign({value:this.value.rawValue},this.labelController.exportProps()),null!==(n=null===(e=(t=this.valueController).exportProps)||void 0===e?void 0:e.call(t))&&void 0!==n?n:{}))}}function Ot(t){const e=Object.assign({},t);return delete e.value,e}class Rt extends At{constructor(t,e){super(t,e),this.tag=e.tag}importState(t){return pt(t,(e=>super.importState(Ot(t))),(t=>({tag:t.optional.string})),(t=>(this.tag=t.tag,!0)))}exportState(){return ct((()=>Ot(super.exportState())),{binding:{key:this.value.binding.target.key,value:this.value.binding.target.read()},tag:this.tag})}}class Bt extends Rt{importState(t){return pt(t,(t=>super.importState(t)),(t=>({binding:t.required.object({value:t.required.raw})})),(t=>(this.value.binding.inject(t.binding.value),this.value.fetch(),!0)))}}function Kt(t){return dt(t)&&function(t){if(!("binding"in t))return!1;const e=t.binding;return r(e)&&"read"in e&&"write"in e}(t.value)}function zt(t,e){for(;t.lengtht.length?n.splice(0,n.length-t.length):zt(n,t.length),n}(this.value_.rawValue,this.binding.read())}onTick_(){this.fetch()}onValueBeforeChange_(t){this.emitter.emit("beforechange",Object.assign(Object.assign({},t),{sender:this}))}onValueChange_(t){this.emitter.emit("change",Object.assign(Object.assign({},t),{sender:this}))}}class Tt extends Rt{exportState(){return ct((()=>super.exportState()),{binding:{readonly:!0}})}}function Ut(t){return dt(t)&&function(t){if(!("binding"in t))return!1;const e=t.binding;return r(e)&&"read"in e&&!("write"in e)}(t.value)}class Ft extends W{get label(){return this.controller.labelController.props.get("label")}set label(t){this.controller.labelController.props.set("label",t)}get title(){var t;return null!==(t=this.controller.buttonController.props.get("title"))&&void 0!==t?t:""}set title(t){this.controller.buttonController.props.set("title",t)}on(t,e){const n=e.bind(this);return this.controller.buttonController.emitter.on(t,(t=>{n(new nt(this,t.nativeEvent))})),this}off(t,e){return this.controller.buttonController.emitter.off(t,e),this}}function $t(t,e){return n=>{!function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}(t,e,n)}}function qt(t,e){Ct(t,(t=>{e.textContent=null!=t?t:""}))}const Ht=Et("btn");class Gt{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(Ht()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("button");n.classList.add(Ht("b")),e.viewProps.bindDisabled(n),this.element.appendChild(n),this.buttonElement=n;const i=t.createElement("div");i.classList.add(Ht("t")),qt(e.props.value("title"),i),this.buttonElement.appendChild(i)}}class Yt{constructor(t,e){this.emitter=new p,this.onClick_=this.onClick_.bind(this),this.props=e.props,this.viewProps=e.viewProps,this.view=new Gt(t,{props:this.props,viewProps:this.viewProps}),this.view.buttonElement.addEventListener("click",this.onClick_)}importProps(t){return pt(t,null,(t=>({title:t.optional.string})),(t=>(this.props.set("title",t.title),!0)))}exportProps(){return ct(null,{title:this.props.get("title")})}onClick_(t){this.emitter.emit("click",{nativeEvent:t,sender:this})}}class Xt extends Dt{constructor(t,e){const n=new Yt(t,{props:e.buttonProps,viewProps:e.viewProps}),i=new St(t,{blade:e.blade,props:e.labelProps,valueController:n});super({blade:e.blade,view:i.view,viewProps:e.viewProps}),this.buttonController=n,this.labelController=i}importState(t){return pt(t,(t=>super.importState(t)&&this.buttonController.importProps(t)&&this.labelController.importProps(t)),(()=>({})),(()=>!0))}exportState(){return ct((()=>super.exportState()),Object.assign(Object.assign({},this.buttonController.exportProps()),this.labelController.exportProps()))}}class Qt{constructor(t){const[e,n]=t.split("-"),i=e.split(".");this.major=parseInt(i[0],10),this.minor=parseInt(i[1],10),this.patch=parseInt(i[2],10),this.prerelease=null!=n?n:null}toString(){const t=[this.major,this.minor,this.patch].join(".");return null!==this.prerelease?[t,this.prerelease].join("-"):t}}const Wt=new Qt("2.0.3");function Jt(t){return Object.assign({core:Wt},t)}const Zt=Jt({id:"button",type:"blade",accept(t){const e=lt(t,(t=>({title:t.required.string,view:t.required.constant("button"),label:t.optional.string})));return e?{params:e}:null},controller:t=>new Xt(t.document,{blade:t.blade,buttonProps:v.fromObject({title:t.params.title}),labelProps:v.fromObject({label:t.params.label}),viewProps:t.viewProps}),api:t=>t.controller instanceof Xt?new Ft(t.controller):null});class te{constructor(t,e){this.onRackValueChange_=this.onRackValueChange_.bind(this),this.controller_=t,this.emitter_=new p,this.pool_=e;this.controller_.rack.emitter.on("valuechange",this.onRackValueChange_)}get children(){return this.controller_.rack.children.map((t=>this.pool_.createApi(t)))}addBinding(t,e,n){const i=null!=n?n:{},s=this.controller_.element.ownerDocument,r=this.pool_.createBinding(s,function(t,e){if(!l.isBindable(t))throw a.notBindable();return new l(t,e)}(t,e),i),o=this.pool_.createBindingApi(r);return this.add(o,i.index)}addFolder(t){return function(t,e){return t.addBlade(Object.assign(Object.assign({},e),{view:"folder"}))}(this,t)}addButton(t){return function(t,e){return t.addBlade(Object.assign(Object.assign({},e),{view:"button"}))}(this,t)}addTab(t){return function(t,e){return t.addBlade(Object.assign(Object.assign({},e),{view:"tab"}))}(this,t)}add(t,e){const n=t.controller;return this.controller_.rack.add(n,e),t}remove(t){this.controller_.rack.remove(t.controller)}addBlade(t){const e=this.controller_.element.ownerDocument,n=this.pool_.createBlade(e,t),i=this.pool_.createApi(n);return this.add(i,t.index)}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}refresh(){this.children.forEach((t=>{var n;e(n=t)&&"refresh"in n&&"function"==typeof n.refresh&&t.refresh()}))}onRackValueChange_(t){const e=t.bladeController,n=this.pool_.createApi(e),i=ht(e.value)?e.value.binding:null;this.emitter_.emit("change",new Z(n,i?i.target.read():e.value.rawValue,t.options.last))}}class ee extends W{constructor(t,e){super(t),this.rackApi_=new te(t.rackController,e)}refresh(){this.rackApi_.refresh()}}class ne extends Dt{constructor(t){super({blade:t.blade,view:t.view,viewProps:t.rackController.viewProps}),this.rackController=t.rackController}importState(t){return pt(t,(t=>super.importState(t)),(t=>({children:t.required.array(t.required.raw)})),(t=>this.rackController.rack.children.every(((e,n)=>e.importState(t.children[n])))))}exportState(){return ct((()=>super.exportState()),{children:this.rackController.rack.children.map((t=>t.exportState()))})}}function ie(t){return"rackController"in t}class se{constructor(t){this.emitter=new p,this.items_=[],this.cache_=new Set,this.onSubListAdd_=this.onSubListAdd_.bind(this),this.onSubListRemove_=this.onSubListRemove_.bind(this),this.extract_=t}get items(){return this.items_}allItems(){return Array.from(this.cache_)}find(t){for(const e of this.allItems())if(t(e))return e;return null}includes(t){return this.cache_.has(t)}add(t,e){if(this.includes(t))throw a.shouldNeverHappen();const n=void 0!==e?e:this.items_.length;this.items_.splice(n,0,t),this.cache_.add(t);const i=this.extract_(t);i&&(i.emitter.on("add",this.onSubListAdd_),i.emitter.on("remove",this.onSubListRemove_),i.allItems().forEach((t=>{this.cache_.add(t)}))),this.emitter.emit("add",{index:n,item:t,root:this,target:this})}remove(t){const e=this.items_.indexOf(t);if(e<0)return;this.items_.splice(e,1),this.cache_.delete(t);const n=this.extract_(t);n&&(n.allItems().forEach((t=>{this.cache_.delete(t)})),n.emitter.off("add",this.onSubListAdd_),n.emitter.off("remove",this.onSubListRemove_)),this.emitter.emit("remove",{index:e,item:t,root:this,target:this})}onSubListAdd_(t){this.cache_.add(t.item),this.emitter.emit("add",{index:t.index,item:t.item,root:this,target:t.target})}onSubListRemove_(t){this.cache_.delete(t.item),this.emitter.emit("remove",{index:t.index,item:t.item,root:this,target:t.target})}}function re(t){return ie(t)?t.rackController.rack.bcSet_:null}class oe{constructor(t){var e,n;this.emitter=new p,this.onBladePositionsChange_=this.onBladePositionsChange_.bind(this),this.onSetAdd_=this.onSetAdd_.bind(this),this.onSetRemove_=this.onSetRemove_.bind(this),this.onChildDispose_=this.onChildDispose_.bind(this),this.onChildPositionsChange_=this.onChildPositionsChange_.bind(this),this.onChildValueChange_=this.onChildValueChange_.bind(this),this.onChildViewPropsChange_=this.onChildViewPropsChange_.bind(this),this.onRackLayout_=this.onRackLayout_.bind(this),this.onRackValueChange_=this.onRackValueChange_.bind(this),this.blade_=null!==(e=t.blade)&&void 0!==e?e:null,null===(n=this.blade_)||void 0===n||n.value("positions").emitter.on("change",this.onBladePositionsChange_),this.viewProps=t.viewProps,this.bcSet_=new se(re),this.bcSet_.emitter.on("add",this.onSetAdd_),this.bcSet_.emitter.on("remove",this.onSetRemove_)}get children(){return this.bcSet_.items}add(t,e){var n;null===(n=t.parent)||void 0===n||n.remove(t),t.parent=this,this.bcSet_.add(t,e)}remove(t){t.parent=null,this.bcSet_.remove(t)}find(t){return this.bcSet_.allItems().filter(t)}onSetAdd_(t){this.updatePositions_();const e=t.target===t.root;if(this.emitter.emit("add",{bladeController:t.item,index:t.index,root:e,sender:this}),!e)return;const n=t.item;if(n.viewProps.emitter.on("change",this.onChildViewPropsChange_),n.blade.value("positions").emitter.on("change",this.onChildPositionsChange_),n.viewProps.handleDispose(this.onChildDispose_),dt(n))n.value.emitter.on("change",this.onChildValueChange_);else if(ie(n)){const t=n.rackController.rack;if(t){const e=t.emitter;e.on("layout",this.onRackLayout_),e.on("valuechange",this.onRackValueChange_)}}}onSetRemove_(t){this.updatePositions_();const e=t.target===t.root;if(this.emitter.emit("remove",{bladeController:t.item,root:e,sender:this}),!e)return;const n=t.item;if(dt(n))n.value.emitter.off("change",this.onChildValueChange_);else if(ie(n)){const t=n.rackController.rack;if(t){const e=t.emitter;e.off("layout",this.onRackLayout_),e.off("valuechange",this.onRackValueChange_)}}}updatePositions_(){const t=this.bcSet_.items.filter((t=>!t.viewProps.get("hidden"))),e=t[0],n=t[t.length-1];this.bcSet_.items.forEach((t=>{const i=[];t===e&&(i.push("first"),this.blade_&&!this.blade_.get("positions").includes("veryfirst")||i.push("veryfirst")),t===n&&(i.push("last"),this.blade_&&!this.blade_.get("positions").includes("verylast")||i.push("verylast")),t.blade.set("positions",i)}))}onChildPositionsChange_(){this.updatePositions_(),this.emitter.emit("layout",{sender:this})}onChildViewPropsChange_(t){this.updatePositions_(),this.emitter.emit("layout",{sender:this})}onChildDispose_(){this.bcSet_.items.filter((t=>t.viewProps.get("disposed"))).forEach((t=>{this.bcSet_.remove(t)}))}onChildValueChange_(t){const e=function(t,e){for(let n=0;n{for(let t=this.rack.children.length-1;t>=0;t--){this.rack.children[t].viewProps.set("disposed",!0)}}))}onRackAdd_(t){t.root&&ft(this.element,t.bladeController.view.element,t.index)}onRackRemove_(t){t.root&&wt(t.bladeController.view.element)}}function le(){return new v({positions:u([],{equals:i})})}class pe extends v{constructor(t){super(t)}static create(t){const e={completed:!0,expanded:t,expandedHeight:null,shouldFixHeight:!1,temporaryExpanded:null},n=v.createCore(e);return new pe(n)}get styleExpanded(){var t;return null!==(t=this.get("temporaryExpanded"))&&void 0!==t?t:this.get("expanded")}get styleHeight(){if(!this.styleExpanded)return"0";const e=this.get("expandedHeight");return this.get("shouldFixHeight")&&!t(e)?`${e}px`:"auto"}bindExpandedClass(t,e){const n=()=>{this.styleExpanded?t.classList.add(e):t.classList.remove(e)};Pt(this,"expanded",n),Pt(this,"temporaryExpanded",n)}cleanUpTransition(){this.set("shouldFixHeight",!1),this.set("expandedHeight",null),this.set("completed",!0)}}function ce(t,e){e.style.height=t.styleHeight}function de(e,n){e.value("expanded").emitter.on("beforechange",(()=>{if(e.set("completed",!1),t(e.get("expandedHeight"))){const t=function(t,e){let n=0;return function(t,e){const n=t.style.transition;t.style.transition="none",e(),t.style.transition=n}(e,(()=>{t.set("expandedHeight",null),t.set("temporaryExpanded",!0),vt(e),n=e.clientHeight,t.set("temporaryExpanded",null),vt(e)})),n}(e,n);t>0&&e.set("expandedHeight",t)}e.set("shouldFixHeight",!0),vt(n)})),e.emitter.on("change",(()=>{ce(e,n)})),ce(e,n),n.addEventListener("transitionend",(t=>{"height"===t.propertyName&&e.cleanUpTransition()}))}class he extends ee{constructor(t,e){super(t,e),this.emitter_=new p,this.controller.foldable.value("expanded").emitter.on("change",(t=>{this.emitter_.emit("fold",new tt(this,t.sender.rawValue))})),this.rackApi_.on("change",(t=>{this.emitter_.emit("change",t)}))}get expanded(){return this.controller.foldable.get("expanded")}set expanded(t){this.controller.foldable.set("expanded",t)}get title(){return this.controller.props.get("title")}set title(t){this.controller.props.set("title",t)}get children(){return this.rackApi_.children}addBinding(t,e,n){return this.rackApi_.addBinding(t,e,n)}addFolder(t){return this.rackApi_.addFolder(t)}addButton(t){return this.rackApi_.addButton(t)}addTab(t){return this.rackApi_.addTab(t)}add(t,e){return this.rackApi_.add(t,e)}remove(t){this.rackApi_.remove(t)}addBlade(t){return this.rackApi_.addBlade(t)}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}}const ue=Et("cnt");class ve{constructor(e,n){var i;this.className_=Et(null!==(i=n.viewName)&&void 0!==i?i:"fld"),this.element=e.createElement("div"),this.element.classList.add(this.className_(),ue()),n.viewProps.bindClassModifiers(this.element),this.foldable_=n.foldable,this.foldable_.bindExpandedClass(this.element,this.className_(void 0,"expanded")),Pt(this.foldable_,"completed",$t(this.element,this.className_(void 0,"cpl")));const s=e.createElement("button");s.classList.add(this.className_("b")),Pt(n.props,"title",(e=>{t(e)?this.element.classList.add(this.className_(void 0,"not")):this.element.classList.remove(this.className_(void 0,"not"))})),n.viewProps.bindDisabled(s),this.element.appendChild(s),this.buttonElement=s;const r=e.createElement("div");r.classList.add(this.className_("i")),this.element.appendChild(r);const o=e.createElement("div");o.classList.add(this.className_("t")),qt(n.props.value("title"),o),this.buttonElement.appendChild(o),this.titleElement=o;const a=e.createElement("div");a.classList.add(this.className_("m")),this.buttonElement.appendChild(a);const l=e.createElement("div");l.classList.add(this.className_("c")),this.element.appendChild(l),this.containerElement=l}}class me extends ne{constructor(t,e){var n;const i=pe.create(null===(n=e.expanded)||void 0===n||n),s=new ve(t,{foldable:i,props:e.props,viewName:e.root?"rot":void 0,viewProps:e.viewProps});super(Object.assign(Object.assign({},e),{rackController:new ae({blade:e.blade,element:s.containerElement,root:e.root,viewProps:e.viewProps}),view:s})),this.onTitleClick_=this.onTitleClick_.bind(this),this.props=e.props,this.foldable=i,de(this.foldable,this.view.containerElement),this.rackController.rack.emitter.on("add",(()=>{this.foldable.cleanUpTransition()})),this.rackController.rack.emitter.on("remove",(()=>{this.foldable.cleanUpTransition()})),this.view.buttonElement.addEventListener("click",this.onTitleClick_)}get document(){return this.view.element.ownerDocument}importState(t){return pt(t,(t=>super.importState(t)),(t=>({expanded:t.required.boolean,title:t.optional.string})),(t=>(this.foldable.set("expanded",t.expanded),this.props.set("title",t.title),!0)))}exportState(){return ct((()=>super.exportState()),{expanded:this.foldable.get("expanded"),title:this.props.get("title")})}onTitleClick_(){this.foldable.set("expanded",!this.foldable.get("expanded"))}}const be=Jt({id:"folder",type:"blade",accept(t){const e=lt(t,(t=>({title:t.required.string,view:t.required.constant("folder"),expanded:t.optional.boolean})));return e?{params:e}:null},controller:t=>new me(t.document,{blade:t.blade,expanded:t.params.expanded,props:v.fromObject({title:t.params.title}),viewProps:t.viewProps}),api:t=>t.controller instanceof me?new he(t.controller,t.pool):null}),ge=Et("");function _e(t,e){return $t(t,ge(void 0,e))}class fe extends v{constructor(t){var e,n;super(t),this.onDisabledChange_=this.onDisabledChange_.bind(this),this.onParentChange_=this.onParentChange_.bind(this),this.onParentGlobalDisabledChange_=this.onParentGlobalDisabledChange_.bind(this),[this.globalDisabled_,this.setGlobalDisabled_]=(n=u(this.getGlobalDisabled_()),[new h(n),(t,e)=>{n.setRawValue(t,e)}]),this.value("disabled").emitter.on("change",this.onDisabledChange_),this.value("parent").emitter.on("change",this.onParentChange_),null===(e=this.get("parent"))||void 0===e||e.globalDisabled.emitter.on("change",this.onParentGlobalDisabledChange_)}static create(t){var e,n,i;const s=null!=t?t:{};return new fe(v.createCore({disabled:null!==(e=s.disabled)&&void 0!==e&&e,disposed:!1,hidden:null!==(n=s.hidden)&&void 0!==n&&n,parent:null!==(i=s.parent)&&void 0!==i?i:null}))}get globalDisabled(){return this.globalDisabled_}bindClassModifiers(t){Ct(this.globalDisabled_,_e(t,"disabled")),Pt(this,"hidden",_e(t,"hidden"))}bindDisabled(t){Ct(this.globalDisabled_,(e=>{t.disabled=e}))}bindTabIndex(t){Ct(this.globalDisabled_,(e=>{t.tabIndex=e?-1:0}))}handleDispose(t){this.value("disposed").emitter.on("change",(e=>{e&&t()}))}importState(t){this.set("disabled",t.disabled),this.set("hidden",t.hidden)}exportState(){return{disabled:this.get("disabled"),hidden:this.get("hidden")}}getGlobalDisabled_(){const t=this.get("parent");return!!t&&t.globalDisabled.rawValue||this.get("disabled")}updateGlobalDisabled_(){this.setGlobalDisabled_(this.getGlobalDisabled_())}onDisabledChange_(){this.updateGlobalDisabled_()}onParentGlobalDisabledChange_(){this.updateGlobalDisabled_()}onParentChange_(t){var e;const n=t.previousRawValue;null==n||n.globalDisabled.emitter.off("change",this.onParentGlobalDisabledChange_),null===(e=this.get("parent"))||void 0===e||e.globalDisabled.emitter.on("change",this.onParentGlobalDisabledChange_),this.updateGlobalDisabled_()}}const we=Et("tbp");class xe{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(we()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(we("c")),this.element.appendChild(n),this.containerElement=n}}const ye=Et("tbi");class Ce{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(ye()),e.viewProps.bindClassModifiers(this.element),Pt(e.props,"selected",(t=>{t?this.element.classList.add(ye(void 0,"sel")):this.element.classList.remove(ye(void 0,"sel"))}));const n=t.createElement("button");n.classList.add(ye("b")),e.viewProps.bindDisabled(n),this.element.appendChild(n),this.buttonElement=n;const i=t.createElement("div");i.classList.add(ye("t")),qt(e.props.value("title"),i),this.buttonElement.appendChild(i),this.titleElement=i}}class Pe{constructor(t,e){this.emitter=new p,this.onClick_=this.onClick_.bind(this),this.props=e.props,this.viewProps=e.viewProps,this.view=new Ce(t,{props:e.props,viewProps:e.viewProps}),this.view.buttonElement.addEventListener("click",this.onClick_)}onClick_(){this.emitter.emit("click",{sender:this})}}class ke extends ne{constructor(t,e){const n=new xe(t,{viewProps:e.viewProps});super(Object.assign(Object.assign({},e),{rackController:new ae({blade:e.blade,element:n.containerElement,viewProps:e.viewProps}),view:n})),this.onItemClick_=this.onItemClick_.bind(this),this.ic_=new Pe(t,{props:e.itemProps,viewProps:fe.create()}),this.ic_.emitter.on("click",this.onItemClick_),this.props=e.props,Pt(this.props,"selected",(t=>{this.itemController.props.set("selected",t),this.viewProps.set("hidden",!t)}))}get itemController(){return this.ic_}importState(t){return pt(t,(t=>super.importState(t)),(t=>({selected:t.required.boolean,title:t.required.string})),(t=>(this.ic_.props.set("selected",t.selected),this.ic_.props.set("title",t.title),!0)))}exportState(){return ct((()=>super.exportState()),{selected:this.ic_.props.get("selected"),title:this.ic_.props.get("title")})}onItemClick_(){this.props.set("selected",!0)}}class Ee extends ee{constructor(t,e){super(t,e),this.emitter_=new p,this.onSelect_=this.onSelect_.bind(this),this.pool_=e,this.rackApi_.on("change",(t=>{this.emitter_.emit("change",t)})),this.controller.tab.selectedIndex.emitter.on("change",this.onSelect_)}get pages(){return this.rackApi_.children}addPage(t){const e=this.controller.view.element.ownerDocument,n=new ke(e,{blade:le(),itemProps:v.fromObject({selected:!1,title:t.title}),props:v.fromObject({selected:!1}),viewProps:fe.create()}),i=this.pool_.createApi(n);return this.rackApi_.add(i,t.index)}removePage(t){this.rackApi_.remove(this.rackApi_.children[t])}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}onSelect_(t){this.emitter_.emit("select",new et(this,t.rawValue))}}class Ve extends ee{get title(){var t;return null!==(t=this.controller.itemController.props.get("title"))&&void 0!==t?t:""}set title(t){this.controller.itemController.props.set("title",t)}get selected(){return this.controller.props.get("selected")}set selected(t){this.controller.props.set("selected",t)}get children(){return this.rackApi_.children}addButton(t){return this.rackApi_.addButton(t)}addFolder(t){return this.rackApi_.addFolder(t)}addTab(t){return this.rackApi_.addTab(t)}add(t,e){this.rackApi_.add(t,e)}remove(t){this.rackApi_.remove(t)}addBinding(t,e,n){return this.rackApi_.addBinding(t,e,n)}addBlade(t){return this.rackApi_.addBlade(t)}}class Le{constructor(){this.onItemSelectedChange_=this.onItemSelectedChange_.bind(this),this.empty=u(!0),this.selectedIndex=u(-1),this.items_=[]}add(t,e){const n=null!=e?e:this.items_.length;this.items_.splice(n,0,t),t.emitter.on("change",this.onItemSelectedChange_),this.keepSelection_()}remove(t){const e=this.items_.indexOf(t);e<0||(this.items_.splice(e,1),t.emitter.off("change",this.onItemSelectedChange_),this.keepSelection_())}keepSelection_(){if(0===this.items_.length)return this.selectedIndex.rawValue=-1,void(this.empty.rawValue=!0);const t=this.items_.findIndex((t=>t.rawValue));t<0?(this.items_.forEach(((t,e)=>{t.rawValue=0===e})),this.selectedIndex.rawValue=0):(this.items_.forEach(((e,n)=>{e.rawValue=n===t})),this.selectedIndex.rawValue=t),this.empty.rawValue=!1}onItemSelectedChange_(t){if(t.rawValue){const e=this.items_.findIndex((e=>e===t.sender));this.items_.forEach(((t,n)=>{t.rawValue=n===e})),this.selectedIndex.rawValue=e}else this.keepSelection_()}}const Se=Et("tab");class Me{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(Se(),ue()),e.viewProps.bindClassModifiers(this.element),Ct(e.empty,$t(this.element,Se(void 0,"nop")));const n=t.createElement("div");n.classList.add(Se("t")),this.element.appendChild(n),this.itemsElement=n;const i=t.createElement("div");i.classList.add(Se("i")),this.element.appendChild(i);const s=t.createElement("div");s.classList.add(Se("c")),this.element.appendChild(s),this.contentsElement=s}}class je extends ne{constructor(t,e){const n=new Le,i=new Me(t,{empty:n.empty,viewProps:e.viewProps});super({blade:e.blade,rackController:new ae({blade:e.blade,element:i.contentsElement,viewProps:e.viewProps}),view:i}),this.onRackAdd_=this.onRackAdd_.bind(this),this.onRackRemove_=this.onRackRemove_.bind(this);const s=this.rackController.rack;s.emitter.on("add",this.onRackAdd_),s.emitter.on("remove",this.onRackRemove_),this.tab=n}add(t,e){this.rackController.rack.add(t,e)}remove(t){this.rackController.rack.remove(this.rackController.rack.children[t])}onRackAdd_(t){if(!t.root)return;const e=t.bladeController;ft(this.view.itemsElement,e.itemController.view.element,t.index),e.itemController.viewProps.set("parent",this.viewProps),this.tab.add(e.props.value("selected"))}onRackRemove_(t){if(!t.root)return;const e=t.bladeController;wt(e.itemController.view.element),e.itemController.viewProps.set("parent",null),this.tab.remove(e.props.value("selected"))}}const De=Jt({id:"tab",type:"blade",accept(t){const e=lt(t,(t=>({pages:t.required.array(t.required.object({title:t.required.string})),view:t.required.constant("tab")})));return e&&0!==e.pages.length?{params:e}:null},controller(t){const e=new je(t.document,{blade:t.blade,viewProps:t.viewProps});return t.params.pages.forEach((n=>{const i=new ke(t.document,{blade:le(),itemProps:v.fromObject({selected:!1,title:n.title}),props:v.fromObject({selected:!1}),viewProps:fe.create()});e.add(i)})),e},api:t=>t.controller instanceof je?new Ee(t.controller,t.pool):t.controller instanceof ke?new Ve(t.controller,t.pool):null});class Ae extends it{get options(){return this.controller.valueController.props.get("options")}set options(t){this.controller.valueController.props.set("options",t)}}class Oe{constructor(){this.disabled=!1,this.emitter=new p}dispose(){}tick(){this.disabled||this.emitter.emit("tick",{sender:this})}}class Re{constructor(t,e){this.disabled_=!1,this.timerId_=null,this.onTick_=this.onTick_.bind(this),this.doc_=t,this.emitter=new p,this.interval_=e,this.setTimer_()}get disabled(){return this.disabled_}set disabled(t){this.disabled_=t,this.disabled_?this.clearTimer_():this.setTimer_()}dispose(){this.clearTimer_()}clearTimer_(){if(null===this.timerId_)return;const t=this.doc_.defaultView;t&&t.clearInterval(this.timerId_),this.timerId_=null}setTimer_(){if(this.clearTimer_(),this.interval_<=0)return;const t=this.doc_.defaultView;t&&(this.timerId_=t.setInterval(this.onTick_,this.interval_))}onTick_(){this.disabled_||this.emitter.emit("tick",{sender:this})}}class Be{constructor(t){this.constraints=t}constrain(t){return this.constraints.reduce(((t,e)=>e.constrain(t)),t)}}function Ke(t,e){if(t instanceof e)return t;if(t instanceof Be){const n=t.constraints.reduce(((t,n)=>t||(n instanceof e?n:null)),null);if(n)return n}return null}class ze{constructor(t){this.values=v.fromObject({options:t})}constrain(t){const e=this.values.get("options");if(0===e.length)return t;return e.filter((e=>e.value===t)).length>0?t:e[0].value}}function Ne(t){var e;const n=at;return Array.isArray(t)?null===(e=lt({items:t},(t=>({items:t.required.array(t.required.object({text:t.required.string,value:t.required.raw}))}))))||void 0===e?void 0:e.items:"object"==typeof t?n.required.raw(t).value:void 0}function Ie(t){if(Array.isArray(t))return t;const e=[];return Object.keys(t).forEach((n=>{e.push({text:n,value:t[n]})})),e}function Te(e){return t(e)?null:new ze(Ie(e))}const Ue=Et("lst");class Fe{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),this.props_=e.props,this.element=t.createElement("div"),this.element.classList.add(Ue()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("select");n.classList.add(Ue("s")),e.viewProps.bindDisabled(n),this.element.appendChild(n),this.selectElement=n;const i=t.createElement("div");i.classList.add(Ue("m")),i.appendChild(_t(t,"dropdown")),this.element.appendChild(i),e.value.emitter.on("change",this.onValueChange_),this.value_=e.value,Pt(this.props_,"options",(e=>{xt(this.selectElement),e.forEach((e=>{const n=t.createElement("option");n.textContent=e.text,this.selectElement.appendChild(n)})),this.update_()}))}update_(){const t=this.props_.get("options").map((t=>t.value));this.selectElement.selectedIndex=t.indexOf(this.value_.rawValue)}onValueChange_(){this.update_()}}class $e{constructor(t,e){this.onSelectChange_=this.onSelectChange_.bind(this),this.props=e.props,this.value=e.value,this.viewProps=e.viewProps,this.view=new Fe(t,{props:this.props,value:this.value,viewProps:this.viewProps}),this.view.selectElement.addEventListener("change",this.onSelectChange_)}onSelectChange_(t){const e=t.currentTarget;this.value.rawValue=this.props.get("options")[e.selectedIndex].value}importProps(t){return pt(t,null,(t=>({options:t.required.custom(Ne)})),(t=>(this.props.set("options",Ie(t.options)),!0)))}exportProps(){return ct(null,{options:this.props.get("options")})}}const qe=Et("pop");class He{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(qe()),e.viewProps.bindClassModifiers(this.element),Ct(e.shows,$t(this.element,qe(void 0,"v")))}}class Ge{constructor(t,e){this.shows=u(!1),this.viewProps=e.viewProps,this.view=new He(t,{shows:this.shows,viewProps:this.viewProps})}}const Ye=Et("txt");class Xe{constructor(t,e){this.onChange_=this.onChange_.bind(this),this.element=t.createElement("div"),this.element.classList.add(Ye()),e.viewProps.bindClassModifiers(this.element),this.props_=e.props,this.props_.emitter.on("change",this.onChange_);const n=t.createElement("input");n.classList.add(Ye("i")),n.type="text",e.viewProps.bindDisabled(n),this.element.appendChild(n),this.inputElement=n,e.value.emitter.on("change",this.onChange_),this.value_=e.value,this.refresh()}refresh(){const t=this.props_.get("formatter");this.inputElement.value=t(this.value_.rawValue)}onChange_(){this.refresh()}}class Qe{constructor(t,e){this.onInputChange_=this.onInputChange_.bind(this),this.parser_=e.parser,this.props=e.props,this.value=e.value,this.viewProps=e.viewProps,this.view=new Xe(t,{props:e.props,value:this.value,viewProps:this.viewProps}),this.view.inputElement.addEventListener("change",this.onInputChange_)}onInputChange_(e){const n=e.currentTarget.value,i=this.parser_(n);t(i)||(this.value.rawValue=i),this.view.refresh()}}function We(t){return"false"!==t&&!!t}function Je(t){return function(t){return String(t)}(t)}const Ze=z(0);function tn(t){return Ze(t)+"%"}function en(t){return String(t)}function nn(t){return t}function sn({primary:t,secondary:e,forward:n,backward:i}){let s=!1;function r(t){s||(s=!0,t(),s=!1)}t.emitter.on("change",(i=>{r((()=>{e.setRawValue(n(t.rawValue,e.rawValue),i.options)}))})),e.emitter.on("change",(s=>{r((()=>{t.setRawValue(i(t.rawValue,e.rawValue),s.options)})),r((()=>{e.setRawValue(n(t.rawValue,e.rawValue),s.options)}))})),r((()=>{e.setRawValue(n(t.rawValue,e.rawValue),{forceEmit:!1,last:!0})}))}function rn(t,e){const n=t*(e.altKey?.1:1)*(e.shiftKey?10:1);return e.upKey?+n:e.downKey?-n:0}function on(t){return{altKey:t.altKey,downKey:"ArrowDown"===t.key,shiftKey:t.shiftKey,upKey:"ArrowUp"===t.key}}function an(t){return{altKey:t.altKey,downKey:"ArrowLeft"===t.key,shiftKey:t.shiftKey,upKey:"ArrowRight"===t.key}}function ln(t){return function(t){return"ArrowUp"===t||"ArrowDown"===t}(t)||"ArrowLeft"===t||"ArrowRight"===t}function pn(t,e){var n,i;const s=e.ownerDocument.defaultView,r=e.getBoundingClientRect();return{x:t.pageX-((null!==(n=s&&s.scrollX)&&void 0!==n?n:0)+r.left),y:t.pageY-((null!==(i=s&&s.scrollY)&&void 0!==i?i:0)+r.top)}}class cn{constructor(t){this.lastTouch_=null,this.onDocumentMouseMove_=this.onDocumentMouseMove_.bind(this),this.onDocumentMouseUp_=this.onDocumentMouseUp_.bind(this),this.onMouseDown_=this.onMouseDown_.bind(this),this.onTouchEnd_=this.onTouchEnd_.bind(this),this.onTouchMove_=this.onTouchMove_.bind(this),this.onTouchStart_=this.onTouchStart_.bind(this),this.elem_=t,this.emitter=new p,t.addEventListener("touchstart",this.onTouchStart_,{passive:!1}),t.addEventListener("touchmove",this.onTouchMove_,{passive:!0}),t.addEventListener("touchend",this.onTouchEnd_),t.addEventListener("mousedown",this.onMouseDown_)}computePosition_(t){const e=this.elem_.getBoundingClientRect();return{bounds:{width:e.width,height:e.height},point:t?{x:t.x,y:t.y}:null}}onMouseDown_(t){var e;t.preventDefault(),null===(e=t.currentTarget)||void 0===e||e.focus();const n=this.elem_.ownerDocument;n.addEventListener("mousemove",this.onDocumentMouseMove_),n.addEventListener("mouseup",this.onDocumentMouseUp_),this.emitter.emit("down",{altKey:t.altKey,data:this.computePosition_(pn(t,this.elem_)),sender:this,shiftKey:t.shiftKey})}onDocumentMouseMove_(t){this.emitter.emit("move",{altKey:t.altKey,data:this.computePosition_(pn(t,this.elem_)),sender:this,shiftKey:t.shiftKey})}onDocumentMouseUp_(t){const e=this.elem_.ownerDocument;e.removeEventListener("mousemove",this.onDocumentMouseMove_),e.removeEventListener("mouseup",this.onDocumentMouseUp_),this.emitter.emit("up",{altKey:t.altKey,data:this.computePosition_(pn(t,this.elem_)),sender:this,shiftKey:t.shiftKey})}onTouchStart_(t){t.preventDefault();const e=t.targetTouches.item(0),n=this.elem_.getBoundingClientRect();this.emitter.emit("down",{altKey:t.altKey,data:this.computePosition_(e?{x:e.clientX-n.left,y:e.clientY-n.top}:void 0),sender:this,shiftKey:t.shiftKey}),this.lastTouch_=e}onTouchMove_(t){const e=t.targetTouches.item(0),n=this.elem_.getBoundingClientRect();this.emitter.emit("move",{altKey:t.altKey,data:this.computePosition_(e?{x:e.clientX-n.left,y:e.clientY-n.top}:void 0),sender:this,shiftKey:t.shiftKey}),this.lastTouch_=e}onTouchEnd_(t){var e;const n=null!==(e=t.targetTouches.item(0))&&void 0!==e?e:this.lastTouch_,i=this.elem_.getBoundingClientRect();this.emitter.emit("up",{altKey:t.altKey,data:this.computePosition_(n?{x:n.clientX-i.left,y:n.clientY-i.top}:void 0),sender:this,shiftKey:t.shiftKey})}}const dn=Et("txt");class hn{constructor(t,e){this.onChange_=this.onChange_.bind(this),this.props_=e.props,this.props_.emitter.on("change",this.onChange_),this.element=t.createElement("div"),this.element.classList.add(dn(),dn(void 0,"num")),e.arrayPosition&&this.element.classList.add(dn(void 0,e.arrayPosition)),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("input");n.classList.add(dn("i")),n.type="text",e.viewProps.bindDisabled(n),this.element.appendChild(n),this.inputElement=n,this.onDraggingChange_=this.onDraggingChange_.bind(this),this.dragging_=e.dragging,this.dragging_.emitter.on("change",this.onDraggingChange_),this.element.classList.add(dn()),this.inputElement.classList.add(dn("i"));const i=t.createElement("div");i.classList.add(dn("k")),this.element.appendChild(i),this.knobElement=i;const s=t.createElementNS(ut,"svg");s.classList.add(dn("g")),this.knobElement.appendChild(s);const r=t.createElementNS(ut,"path");r.classList.add(dn("gb")),s.appendChild(r),this.guideBodyElem_=r;const o=t.createElementNS(ut,"path");o.classList.add(dn("gh")),s.appendChild(o),this.guideHeadElem_=o;const a=t.createElement("div");a.classList.add(Et("tt")()),this.knobElement.appendChild(a),this.tooltipElem_=a,e.value.emitter.on("change",this.onChange_),this.value=e.value,this.refresh()}onDraggingChange_(t){if(null===t.rawValue)return void this.element.classList.remove(dn(void 0,"drg"));this.element.classList.add(dn(void 0,"drg"));const e=t.rawValue/this.props_.get("pointerScale"),n=e+(e>0?-1:e<0?1:0),i=T(-n,-4,4);this.guideHeadElem_.setAttributeNS(null,"d",[`M ${n+i},0 L${n},4 L${n+i},8`,`M ${e},-1 L${e},9`].join(" ")),this.guideBodyElem_.setAttributeNS(null,"d",`M 0,4 L${e},4`);const s=this.props_.get("formatter");this.tooltipElem_.textContent=s(this.value.rawValue),this.tooltipElem_.style.left=`${e}px`}refresh(){const t=this.props_.get("formatter");this.inputElement.value=t(this.value.rawValue)}onChange_(){this.refresh()}}class un{constructor(t,e){var n;this.originRawValue_=0,this.onInputChange_=this.onInputChange_.bind(this),this.onInputKeyDown_=this.onInputKeyDown_.bind(this),this.onInputKeyUp_=this.onInputKeyUp_.bind(this),this.onPointerDown_=this.onPointerDown_.bind(this),this.onPointerMove_=this.onPointerMove_.bind(this),this.onPointerUp_=this.onPointerUp_.bind(this),this.parser_=e.parser,this.props=e.props,this.sliderProps_=null!==(n=e.sliderProps)&&void 0!==n?n:null,this.value=e.value,this.viewProps=e.viewProps,this.dragging_=u(null),this.view=new hn(t,{arrayPosition:e.arrayPosition,dragging:this.dragging_,props:this.props,value:this.value,viewProps:this.viewProps}),this.view.inputElement.addEventListener("change",this.onInputChange_),this.view.inputElement.addEventListener("keydown",this.onInputKeyDown_),this.view.inputElement.addEventListener("keyup",this.onInputKeyUp_);const i=new cn(this.view.knobElement);i.emitter.on("down",this.onPointerDown_),i.emitter.on("move",this.onPointerMove_),i.emitter.on("up",this.onPointerUp_)}constrainValue_(t){var e,n;const i=null===(e=this.sliderProps_)||void 0===e?void 0:e.get("min"),s=null===(n=this.sliderProps_)||void 0===n?void 0:n.get("max");let r=t;return void 0!==i&&(r=Math.max(r,i)),void 0!==s&&(r=Math.min(r,s)),r}onInputChange_(e){const n=e.currentTarget.value,i=this.parser_(n);t(i)||(this.value.rawValue=this.constrainValue_(i)),this.view.refresh()}onInputKeyDown_(t){const e=rn(this.props.get("keyScale"),on(t));0!==e&&this.value.setRawValue(this.constrainValue_(this.value.rawValue+e),{forceEmit:!1,last:!1})}onInputKeyUp_(t){0!==rn(this.props.get("keyScale"),on(t))&&this.value.setRawValue(this.value.rawValue,{forceEmit:!0,last:!0})}onPointerDown_(){this.originRawValue_=this.value.rawValue,this.dragging_.rawValue=0}computeDraggingValue_(t){if(!t.point)return null;const e=t.point.x-t.bounds.width/2;return this.constrainValue_(this.originRawValue_+e*this.props.get("pointerScale"))}onPointerMove_(t){const e=this.computeDraggingValue_(t.data);null!==e&&(this.value.setRawValue(e,{forceEmit:!1,last:!1}),this.dragging_.rawValue=this.value.rawValue-this.originRawValue_)}onPointerUp_(t){const e=this.computeDraggingValue_(t.data);null!==e&&(this.value.setRawValue(e,{forceEmit:!0,last:!0}),this.dragging_.rawValue=null)}}const vn=Et("sld");class mn{constructor(t,e){this.onChange_=this.onChange_.bind(this),this.props_=e.props,this.props_.emitter.on("change",this.onChange_),this.element=t.createElement("div"),this.element.classList.add(vn()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(vn("t")),e.viewProps.bindTabIndex(n),this.element.appendChild(n),this.trackElement=n;const i=t.createElement("div");i.classList.add(vn("k")),this.trackElement.appendChild(i),this.knobElement=i,e.value.emitter.on("change",this.onChange_),this.value=e.value,this.update_()}update_(){const t=T(N(this.value.rawValue,this.props_.get("min"),this.props_.get("max"),0,100),0,100);this.knobElement.style.width=`${t}%`}onChange_(){this.update_()}}class bn{constructor(t,e){this.onKeyDown_=this.onKeyDown_.bind(this),this.onKeyUp_=this.onKeyUp_.bind(this),this.onPointerDownOrMove_=this.onPointerDownOrMove_.bind(this),this.onPointerUp_=this.onPointerUp_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.props=e.props,this.view=new mn(t,{props:this.props,value:this.value,viewProps:this.viewProps}),this.ptHandler_=new cn(this.view.trackElement),this.ptHandler_.emitter.on("down",this.onPointerDownOrMove_),this.ptHandler_.emitter.on("move",this.onPointerDownOrMove_),this.ptHandler_.emitter.on("up",this.onPointerUp_),this.view.trackElement.addEventListener("keydown",this.onKeyDown_),this.view.trackElement.addEventListener("keyup",this.onKeyUp_)}handlePointerEvent_(t,e){t.point&&this.value.setRawValue(N(T(t.point.x,0,t.bounds.width),0,t.bounds.width,this.props.get("min"),this.props.get("max")),e)}onPointerDownOrMove_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerUp_(t){this.handlePointerEvent_(t.data,{forceEmit:!0,last:!0})}onKeyDown_(t){const e=rn(this.props.get("keyScale"),an(t));0!==e&&this.value.setRawValue(this.value.rawValue+e,{forceEmit:!1,last:!1})}onKeyUp_(t){0!==rn(this.props.get("keyScale"),an(t))&&this.value.setRawValue(this.value.rawValue,{forceEmit:!0,last:!0})}}const gn=Et("sldtxt");class _n{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(gn());const n=t.createElement("div");n.classList.add(gn("s")),this.sliderView_=e.sliderView,n.appendChild(this.sliderView_.element),this.element.appendChild(n);const i=t.createElement("div");i.classList.add(gn("t")),this.textView_=e.textView,i.appendChild(this.textView_.element),this.element.appendChild(i)}}class fn{constructor(t,e){this.value=e.value,this.viewProps=e.viewProps,this.sliderC_=new bn(t,{props:e.sliderProps,value:e.value,viewProps:this.viewProps}),this.textC_=new un(t,{parser:e.parser,props:e.textProps,sliderProps:e.sliderProps,value:e.value,viewProps:e.viewProps}),this.view=new _n(t,{sliderView:this.sliderC_.view,textView:this.textC_.view})}get sliderController(){return this.sliderC_}get textController(){return this.textC_}importProps(t){return pt(t,null,(t=>({max:t.required.number,min:t.required.number})),(t=>{const e=this.sliderC_.props;return e.set("max",t.max),e.set("min",t.min),!0}))}exportProps(){const t=this.sliderC_.props;return ct(null,{max:t.get("max"),min:t.get("min")})}}function wn(t){return{sliderProps:new v({keyScale:t.keyScale,max:t.max,min:t.min}),textProps:new v({formatter:u(t.formatter),keyScale:t.keyScale,pointerScale:u(t.pointerScale)})}}const xn={containerUnitSize:"cnt-usz"};function yn(t){return`--${xn[t]}`}function Cn(t){return X(t)}function Pn(t){if(n(t))return lt(t,Cn)}function kn(t,e){if(!t)return;const n=[],i=H(t,e);i&&n.push(i);const s=G(t);return s&&n.push(s),new Be(n)}function En(t){if("inline"===t||"popup"===t)return t}function Vn(t,e){t.write(e)}const Ln=Et("ckb");class Sn{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),this.element=t.createElement("div"),this.element.classList.add(Ln()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("label");n.classList.add(Ln("l")),this.element.appendChild(n),this.labelElement=n;const i=t.createElement("input");i.classList.add(Ln("i")),i.type="checkbox",this.labelElement.appendChild(i),this.inputElement=i,e.viewProps.bindDisabled(this.inputElement);const s=t.createElement("div");s.classList.add(Ln("w")),this.labelElement.appendChild(s);const r=_t(t,"check");s.appendChild(r),e.value.emitter.on("change",this.onValueChange_),this.value=e.value,this.update_()}update_(){this.inputElement.checked=this.value.rawValue}onValueChange_(){this.update_()}}class Mn{constructor(t,e){this.onInputChange_=this.onInputChange_.bind(this),this.onLabelMouseDown_=this.onLabelMouseDown_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.view=new Sn(t,{value:this.value,viewProps:this.viewProps}),this.view.inputElement.addEventListener("change",this.onInputChange_),this.view.labelElement.addEventListener("mousedown",this.onLabelMouseDown_)}onInputChange_(t){const e=t.currentTarget;this.value.rawValue=e.checked,t.preventDefault(),t.stopPropagation()}onLabelMouseDown_(t){t.preventDefault()}}const jn=Jt({id:"input-bool",type:"input",accept:(t,e)=>{if("boolean"!=typeof t)return null;const n=lt(e,(t=>({options:t.optional.custom(Ne),readonly:t.optional.constant(!1)})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>We,constraint:t=>function(t){const e=[],n=Te(t.options);return n&&e.push(n),new Be(e)}(t.params),writer:t=>Vn},controller:t=>{const e=t.document,n=t.value,i=t.constraint,s=i&&Ke(i,ze);return s?new $e(e,{props:new v({options:s.values.value("options")}),value:n,viewProps:t.viewProps}):new Mn(e,{value:n,viewProps:t.viewProps})},api:t=>"boolean"!=typeof t.controller.value.rawValue?null:t.controller.valueController instanceof $e?new Ae(t.controller):null}),Dn=Et("col");class An{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(Dn()),e.foldable.bindExpandedClass(this.element,Dn(void 0,"expanded")),Pt(e.foldable,"completed",$t(this.element,Dn(void 0,"cpl")));const n=t.createElement("div");n.classList.add(Dn("h")),this.element.appendChild(n);const i=t.createElement("div");i.classList.add(Dn("s")),n.appendChild(i),this.swatchElement=i;const s=t.createElement("div");if(s.classList.add(Dn("t")),n.appendChild(s),this.textElement=s,"inline"===e.pickerLayout){const e=t.createElement("div");e.classList.add(Dn("p")),this.element.appendChild(e),this.pickerElement=e}else this.pickerElement=null}}function On(t,e,n){const i=U(t,360),s=T(e/100,0,1),r=T(n/100,0,1),o=r*s,a=o*(1-Math.abs(i/60%2-1)),l=r-o;let p,c,d;return[p,c,d]=i>=0&&i<60?[o,a,0]:i>=60&&i<120?[a,o,0]:i>=120&&i<180?[0,o,a]:i>=180&&i<240?[0,a,o]:i>=240&&i<300?[a,0,o]:[o,0,a],[255*(p+l),255*(c+l),255*(d+l)]}function Rn(t){return[t[0],t[1],t[2]]}function Bn(t,e){return[t[0],t[1],t[2],e]}const Kn={hsl:{hsl:(t,e,n)=>[t,e,n],hsv:function(t,e,n){const i=n+e*(100-Math.abs(2*n-100))/200;return[t,0!==i?e*(100-Math.abs(2*n-100))/i:0,n+e*(100-Math.abs(2*n-100))/200]},rgb:function(t,e,n){const i=(t%360+360)%360,s=T(e/100,0,1),r=T(n/100,0,1),o=(1-Math.abs(2*r-1))*s,a=o*(1-Math.abs(i/60%2-1)),l=r-o/2;let p,c,d;return[p,c,d]=i>=0&&i<60?[o,a,0]:i>=60&&i<120?[a,o,0]:i>=120&&i<180?[0,o,a]:i>=180&&i<240?[0,a,o]:i>=240&&i<300?[a,0,o]:[o,0,a],[255*(p+l),255*(c+l),255*(d+l)]}},hsv:{hsl:function(t,e,n){const i=100-Math.abs(n*(200-e)/100-100);return[t,0!==i?e*n/i:0,n*(200-e)/200]},hsv:(t,e,n)=>[t,e,n],rgb:On},rgb:{hsl:function(t,e,n){const i=T(t/255,0,1),s=T(e/255,0,1),r=T(n/255,0,1),o=Math.max(i,s,r),a=Math.min(i,s,r),l=o-a;let p=0,c=0;const d=(a+o)/2;return 0!==l&&(c=l/(1-Math.abs(o+a-1)),p=i===o?(s-r)/l:s===o?2+(r-i)/l:4+(i-s)/l,p=p/6+(p<0?1:0)),[360*p,100*c,100*d]},hsv:function(t,e,n){const i=T(t/255,0,1),s=T(e/255,0,1),r=T(n/255,0,1),o=Math.max(i,s,r),a=o-Math.min(i,s,r);let l;return l=0===a?0:o===i?((s-r)/a%6+6)%6*60:o===s?60*((r-i)/a+2):60*((i-s)/a+4),[l,100*(0===o?0:a/o),100*o]},rgb:(t,e,n)=>[t,e,n]}};function zn(t,e){return["float"===e?1:"rgb"===t?255:360,"float"===e?1:"rgb"===t?255:100,"float"===e?1:"rgb"===t?255:100]}function Nn(t,e,n){var i;const s=zn(e,n);return["rgb"===e?T(t[0],0,s[0]):(r=t[0],o=s[0],r===o?o:U(r,o)),T(t[1],0,s[1]),T(t[2],0,s[2]),T(null!==(i=t[3])&&void 0!==i?i:1,0,1)];var r,o}function In(t,e,n,i){const s=zn(e,n),r=zn(e,i);return t.map(((t,e)=>t/s[e]*r[e]))}function Tn(t,e,n){const i=In(t,e.mode,e.type,"int");return In(Kn[e.mode][n.mode](...i),n.mode,"int",n.type)}class Un{static black(){return new Un([0,0,0],"rgb")}constructor(t,e){this.type="int",this.mode=e,this.comps_=Nn(t,e,this.type)}getComponents(t){return Bn(Tn(Rn(this.comps_),{mode:this.mode,type:this.type},{mode:null!=t?t:this.mode,type:this.type}),this.comps_[3])}toRgbaObject(){const t=this.getComponents("rgb");return{r:t[0],g:t[1],b:t[2],a:t[3]}}}const Fn=Et("colp");class $n{constructor(t,e){this.alphaViews_=null,this.element=t.createElement("div"),this.element.classList.add(Fn()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(Fn("hsv"));const i=t.createElement("div");i.classList.add(Fn("sv")),this.svPaletteView_=e.svPaletteView,i.appendChild(this.svPaletteView_.element),n.appendChild(i);const s=t.createElement("div");s.classList.add(Fn("h")),this.hPaletteView_=e.hPaletteView,s.appendChild(this.hPaletteView_.element),n.appendChild(s),this.element.appendChild(n);const r=t.createElement("div");if(r.classList.add(Fn("rgb")),this.textsView_=e.textsView,r.appendChild(this.textsView_.element),this.element.appendChild(r),e.alphaViews){this.alphaViews_={palette:e.alphaViews.palette,text:e.alphaViews.text};const n=t.createElement("div");n.classList.add(Fn("a"));const i=t.createElement("div");i.classList.add(Fn("ap")),i.appendChild(this.alphaViews_.palette.element),n.appendChild(i);const s=t.createElement("div");s.classList.add(Fn("at")),s.appendChild(this.alphaViews_.text.element),n.appendChild(s),this.element.appendChild(n)}}get allFocusableElements(){const t=[this.svPaletteView_.element,this.hPaletteView_.element,this.textsView_.modeSelectElement,...this.textsView_.inputViews.map((t=>t.inputElement))];return this.alphaViews_&&t.push(this.alphaViews_.palette.element,this.alphaViews_.text.inputElement),t}}function qn(t){return"int"===t?"int":"float"===t?"float":void 0}function Hn(t){return lt(t,(t=>({color:t.optional.object({alpha:t.optional.boolean,type:t.optional.custom(qn)}),expanded:t.optional.boolean,picker:t.optional.custom(En),readonly:t.optional.constant(!1)})))}function Gn(t){return t?.1:1}function Yn(t){var e;return null===(e=t.color)||void 0===e?void 0:e.type}class Xn{constructor(t,e){this.type="float",this.mode=e,this.comps_=Nn(t,e,this.type)}getComponents(t){return Bn(Tn(Rn(this.comps_),{mode:this.mode,type:this.type},{mode:null!=t?t:this.mode,type:this.type}),this.comps_[3])}toRgbaObject(){const t=this.getComponents("rgb");return{r:t[0],g:t[1],b:t[2],a:t[3]}}}const Qn={int:(t,e)=>new Un(t,e),float:(t,e)=>new Xn(t,e)};function Wn(t,e,n){return Qn[n](t,e)}function Jn(t,e){if(t.type===e)return t;if(function(t){return"int"===t.type}(t)&&"float"===e)return function(t){const e=t.getComponents(),n=zn(t.mode,"int");return new Xn([N(e[0],0,n[0],0,1),N(e[1],0,n[1],0,1),N(e[2],0,n[2],0,1),e[3]],t.mode)}(t);if(function(t){return"float"===t.type}(t)&&"int"===e)return function(t){const e=t.getComponents(),n=zn(t.mode,"int");return new Un([Math.round(N(e[0],0,1,0,n[0])),Math.round(N(e[1],0,1,0,n[1])),Math.round(N(e[2],0,1,0,n[2])),e[3]],t.mode)}(t);throw a.shouldNeverHappen()}function Zn(t,e){const n=t.match(/^(.+)%$/);return n?Math.min(.01*parseFloat(n[1])*e,e):Math.min(parseFloat(t),e)}const ti={deg:t=>t,grad:t=>360*t/400,rad:t=>360*t/(2*Math.PI),turn:t=>360*t};function ei(t){const e=t.match(/^([0-9.]+?)(deg|grad|rad|turn)$/);if(!e)return parseFloat(t);const n=parseFloat(e[1]),i=e[2];return ti[i](n)}function ni(t){const e=t.match(/^rgb\(\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*\)$/);if(!e)return null;const n=[Zn(e[1],255),Zn(e[2],255),Zn(e[3],255)];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])?null:n}function ii(t){const e=ni(t);return e?new Un(e,"rgb"):null}function si(t){const e=t.match(/^rgba\(\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*\)$/);if(!e)return null;const n=[Zn(e[1],255),Zn(e[2],255),Zn(e[3],255),Zn(e[4],1)];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])||isNaN(n[3])?null:n}function ri(t){const e=si(t);return e?new Un(e,"rgb"):null}function oi(t){const e=t.match(/^hsl\(\s*([0-9A-Fa-f.]+(?:deg|grad|rad|turn)?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*\)$/);if(!e)return null;const n=[ei(e[1]),Zn(e[2],100),Zn(e[3],100)];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])?null:n}function ai(t){const e=oi(t);return e?new Un(e,"hsl"):null}function li(t){const e=t.match(/^hsla\(\s*([0-9A-Fa-f.]+(?:deg|grad|rad|turn)?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*\)$/);if(!e)return null;const n=[ei(e[1]),Zn(e[2],100),Zn(e[3],100),Zn(e[4],1)];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])||isNaN(n[3])?null:n}function pi(t){const e=li(t);return e?new Un(e,"hsl"):null}function ci(t){const e=t.match(/^#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/);if(e)return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)];const n=t.match(/^(?:#|0x)([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:null}function di(t){const e=ci(t);return e?new Un(e,"rgb"):null}function hi(t){const e=t.match(/^#?([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/);if(e)return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),N(parseInt(e[4]+e[4],16),0,255,0,1)];const n=t.match(/^(?:#|0x)?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),N(parseInt(n[4],16),0,255,0,1)]:null}function ui(t){const e=hi(t);return e?new Un(e,"rgb"):null}function vi(t){const e=t.match(/^\{\s*r\s*:\s*([0-9A-Fa-f.]+%?)\s*,\s*g\s*:\s*([0-9A-Fa-f.]+%?)\s*,\s*b\s*:\s*([0-9A-Fa-f.]+%?)\s*\}$/);if(!e)return null;const n=[parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])?null:n}function mi(t){return e=>{const n=vi(e);return n?Wn(n,"rgb",t):null}}function bi(t){const e=t.match(/^\{\s*r\s*:\s*([0-9A-Fa-f.]+%?)\s*,\s*g\s*:\s*([0-9A-Fa-f.]+%?)\s*,\s*b\s*:\s*([0-9A-Fa-f.]+%?)\s*,\s*a\s*:\s*([0-9A-Fa-f.]+%?)\s*\}$/);if(!e)return null;const n=[parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4])];return isNaN(n[0])||isNaN(n[1])||isNaN(n[2])||isNaN(n[3])?null:n}function gi(t){return e=>{const n=bi(e);return n?Wn(n,"rgb",t):null}}const _i=[{parser:ci,result:{alpha:!1,mode:"rgb",notation:"hex"}},{parser:hi,result:{alpha:!0,mode:"rgb",notation:"hex"}},{parser:ni,result:{alpha:!1,mode:"rgb",notation:"func"}},{parser:si,result:{alpha:!0,mode:"rgb",notation:"func"}},{parser:oi,result:{alpha:!1,mode:"hsl",notation:"func"}},{parser:li,result:{alpha:!0,mode:"hsl",notation:"func"}},{parser:vi,result:{alpha:!1,mode:"rgb",notation:"object"}},{parser:bi,result:{alpha:!0,mode:"rgb",notation:"object"}}];function fi(t,e="int"){const n=function(t){return _i.reduce(((e,{parser:n,result:i})=>e||(n(t)?i:null)),null)}(t);return n?"hex"===n.notation&&"float"!==e?Object.assign(Object.assign({},n),{type:"int"}):"func"===n.notation?Object.assign(Object.assign({},n),{type:e}):null:null}function wi(t){const e=[di,ui,ii,ri,ai,pi];"int"===t&&e.push(mi("int"),gi("int")),"float"===t&&e.push(mi("float"),gi("float"));const n=function(t){return e=>t.reduce(((t,n)=>null!==t?t:n(e)),null)}(e);return e=>{const i=n(e);return i?Jn(i,t):null}}function xi(t){const e=wi("int");if("string"!=typeof t)return Un.black();const n=e(t);return null!=n?n:Un.black()}function yi(t){const e=T(Math.floor(t),0,255).toString(16);return 1===e.length?`0${e}`:e}function Ci(t,e="#"){return`${e}${Rn(t.getComponents("rgb")).map(yi).join("")}`}function Pi(t,e="#"){const n=t.getComponents("rgb");return`${e}${[n[0],n[1],n[2],255*n[3]].map(yi).join("")}`}function ki(t){const e=z(0);return`rgb(${Rn(Jn(t,"int").getComponents("rgb")).map((t=>e(t))).join(", ")})`}function Ei(t){const e=z(2),n=z(0);return`rgba(${Jn(t,"int").getComponents("rgb").map(((t,i)=>(3===i?e:n)(t))).join(", ")})`}function Vi(t,e){const n=z("float"===e?2:0),i=["r","g","b"];return`{${Rn(Jn(t,e).getComponents("rgb")).map(((t,e)=>`${i[e]}: ${n(t)}`)).join(", ")}}`}function Li(t){return e=>Vi(e,t)}function Si(t,e){const n=z(2),i=z("float"===e?2:0),s=["r","g","b","a"];return`{${Jn(t,e).getComponents("rgb").map(((t,e)=>`${s[e]}: ${(3===e?n:i)(t)}`)).join(", ")}}`}function Mi(t){return e=>Si(e,t)}const ji=[{format:{alpha:!1,mode:"rgb",notation:"hex",type:"int"},stringifier:Ci},{format:{alpha:!0,mode:"rgb",notation:"hex",type:"int"},stringifier:Pi},{format:{alpha:!1,mode:"rgb",notation:"func",type:"int"},stringifier:ki},{format:{alpha:!0,mode:"rgb",notation:"func",type:"int"},stringifier:Ei},{format:{alpha:!1,mode:"hsl",notation:"func",type:"int"},stringifier:function(t){const e=[z(0),tn,tn];return`hsl(${Rn(Jn(t,"int").getComponents("hsl")).map(((t,n)=>e[n](t))).join(", ")})`}},{format:{alpha:!0,mode:"hsl",notation:"func",type:"int"},stringifier:function(t){const e=[z(0),tn,tn,z(2)];return`hsla(${Jn(t,"int").getComponents("hsl").map(((t,n)=>e[n](t))).join(", ")})`}},...["int","float"].reduce(((t,e)=>[...t,{format:{alpha:!1,mode:"rgb",notation:"object",type:e},stringifier:Li(e)},{format:{alpha:!0,mode:"rgb",notation:"object",type:e},stringifier:Mi(e)}]),[])];function Di(t){return ji.reduce(((e,n)=>{return e||(i=n.format,s=t,i.alpha===s.alpha&&i.mode===s.mode&&i.notation===s.notation&&i.type===s.type?n.stringifier:null);var i,s}),null)}const Ai=Et("apl");class Oi{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),this.value=e.value,this.value.emitter.on("change",this.onValueChange_),this.element=t.createElement("div"),this.element.classList.add(Ai()),e.viewProps.bindClassModifiers(this.element),e.viewProps.bindTabIndex(this.element);const n=t.createElement("div");n.classList.add(Ai("b")),this.element.appendChild(n);const i=t.createElement("div");i.classList.add(Ai("c")),n.appendChild(i),this.colorElem_=i;const s=t.createElement("div");s.classList.add(Ai("m")),this.element.appendChild(s),this.markerElem_=s;const r=t.createElement("div");r.classList.add(Ai("p")),this.markerElem_.appendChild(r),this.previewElem_=r,this.update_()}update_(){const t=this.value.rawValue,e=t.getComponents("rgb"),n=new Un([e[0],e[1],e[2],0],"rgb"),i=new Un([e[0],e[1],e[2],255],"rgb"),s=["to right",Ei(n),Ei(i)];this.colorElem_.style.background=`linear-gradient(${s.join(",")})`,this.previewElem_.style.backgroundColor=Ei(t);const r=N(e[3],0,1,0,100);this.markerElem_.style.left=`${r}%`}onValueChange_(){this.update_()}}class Ri{constructor(t,e){this.onKeyDown_=this.onKeyDown_.bind(this),this.onKeyUp_=this.onKeyUp_.bind(this),this.onPointerDown_=this.onPointerDown_.bind(this),this.onPointerMove_=this.onPointerMove_.bind(this),this.onPointerUp_=this.onPointerUp_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.view=new Oi(t,{value:this.value,viewProps:this.viewProps}),this.ptHandler_=new cn(this.view.element),this.ptHandler_.emitter.on("down",this.onPointerDown_),this.ptHandler_.emitter.on("move",this.onPointerMove_),this.ptHandler_.emitter.on("up",this.onPointerUp_),this.view.element.addEventListener("keydown",this.onKeyDown_),this.view.element.addEventListener("keyup",this.onKeyUp_)}handlePointerEvent_(t,e){if(!t.point)return;const n=t.point.x/t.bounds.width,i=this.value.rawValue,[s,r,o]=i.getComponents("hsv");this.value.setRawValue(new Un([s,r,o,n],"hsv"),e)}onPointerDown_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerMove_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerUp_(t){this.handlePointerEvent_(t.data,{forceEmit:!0,last:!0})}onKeyDown_(t){const e=rn(Gn(!0),an(t));if(0===e)return;const n=this.value.rawValue,[i,s,r,o]=n.getComponents("hsv");this.value.setRawValue(new Un([i,s,r,o+e],"hsv"),{forceEmit:!1,last:!1})}onKeyUp_(t){0!==rn(Gn(!0),an(t))&&this.value.setRawValue(this.value.rawValue,{forceEmit:!0,last:!0})}}const Bi=Et("coltxt");class Ki{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(Bi()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(Bi("m")),this.modeElem_=function(t){const e=t.createElement("select");return e.appendChild([{text:"RGB",value:"rgb"},{text:"HSL",value:"hsl"},{text:"HSV",value:"hsv"},{text:"HEX",value:"hex"}].reduce(((e,n)=>{const i=t.createElement("option");return i.textContent=n.text,i.value=n.value,e.appendChild(i),e}),t.createDocumentFragment())),e}(t),this.modeElem_.classList.add(Bi("ms")),n.appendChild(this.modeSelectElement),e.viewProps.bindDisabled(this.modeElem_);const i=t.createElement("div");i.classList.add(Bi("mm")),i.appendChild(_t(t,"dropdown")),n.appendChild(i),this.element.appendChild(n);const s=t.createElement("div");s.classList.add(Bi("w")),this.element.appendChild(s),this.inputsElem_=s,this.inputViews_=e.inputViews,this.applyInputViews_(),Ct(e.mode,(t=>{this.modeElem_.value=t}))}get modeSelectElement(){return this.modeElem_}get inputViews(){return this.inputViews_}set inputViews(t){this.inputViews_=t,this.applyInputViews_()}applyInputViews_(){xt(this.inputsElem_);const t=this.element.ownerDocument;this.inputViews_.forEach((e=>{const n=t.createElement("div");n.classList.add(Bi("c")),n.appendChild(e.element),this.inputsElem_.appendChild(n)}))}}function zi(t,e,n){const i=zn(t,e)[n];return new m({min:0,max:i})}function Ni(t,e){const n={colorMode:e.colorMode,colorType:e.colorType,parser:R,viewProps:e.viewProps};return[0,1,2].map((i=>{const s=function(t,e,n){return new un(t,{arrayPosition:0===n?"fst":2===n?"lst":"mid",parser:e.parser,props:v.fromObject({formatter:(i=e.colorType,z("float"===i?2:0)),keyScale:Gn(!1),pointerScale:"float"===e.colorType?.01:1}),value:u(0,{constraint:zi(e.colorMode,e.colorType,n)}),viewProps:e.viewProps});var i}(t,n,i);return sn({primary:e.value,secondary:s.value,forward:t=>Jn(t,e.colorType).getComponents(e.colorMode)[i],backward(t,n){const s=e.colorMode,r=Jn(t,e.colorType).getComponents(s);r[i]=n;return Jn(Wn(Bn(Rn(r),r[3]),s,e.colorType),"int")}}),s}))}class Ii{constructor(t,e){this.onModeSelectChange_=this.onModeSelectChange_.bind(this),this.colorType_=e.colorType,this.value=e.value,this.viewProps=e.viewProps,this.colorMode=u(this.value.rawValue.mode),this.ccs_=this.createComponentControllers_(t),this.view=new Ki(t,{mode:this.colorMode,inputViews:[this.ccs_[0].view,this.ccs_[1].view,this.ccs_[2].view],viewProps:this.viewProps}),this.view.modeSelectElement.addEventListener("change",this.onModeSelectChange_)}createComponentControllers_(t){const e=this.colorMode.rawValue;return function(t){return"hex"!==t}(e)?Ni(t,{colorMode:e,colorType:this.colorType_,value:this.value,viewProps:this.viewProps}):function(t,e){const n=new Qe(t,{parser:wi("int"),props:v.fromObject({formatter:Ci}),value:u(Un.black()),viewProps:e.viewProps});return sn({primary:e.value,secondary:n.value,forward:t=>new Un(Rn(t.getComponents()),t.mode),backward:(t,e)=>new Un(Bn(Rn(e.getComponents(t.mode)),t.getComponents()[3]),t.mode)}),[n]}(t,{value:this.value,viewProps:this.viewProps})}onModeSelectChange_(t){const e=t.currentTarget;this.colorMode.rawValue=e.value,this.ccs_=this.createComponentControllers_(this.view.element.ownerDocument),this.view.inputViews=this.ccs_.map((t=>t.view))}}const Ti=Et("hpl");class Ui{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),this.value=e.value,this.value.emitter.on("change",this.onValueChange_),this.element=t.createElement("div"),this.element.classList.add(Ti()),e.viewProps.bindClassModifiers(this.element),e.viewProps.bindTabIndex(this.element);const n=t.createElement("div");n.classList.add(Ti("c")),this.element.appendChild(n);const i=t.createElement("div");i.classList.add(Ti("m")),this.element.appendChild(i),this.markerElem_=i,this.update_()}update_(){const t=this.value.rawValue,[e]=t.getComponents("hsv");this.markerElem_.style.backgroundColor=ki(new Un([e,100,100],"hsv"));const n=N(e,0,360,0,100);this.markerElem_.style.left=`${n}%`}onValueChange_(){this.update_()}}class Fi{constructor(t,e){this.onKeyDown_=this.onKeyDown_.bind(this),this.onKeyUp_=this.onKeyUp_.bind(this),this.onPointerDown_=this.onPointerDown_.bind(this),this.onPointerMove_=this.onPointerMove_.bind(this),this.onPointerUp_=this.onPointerUp_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.view=new Ui(t,{value:this.value,viewProps:this.viewProps}),this.ptHandler_=new cn(this.view.element),this.ptHandler_.emitter.on("down",this.onPointerDown_),this.ptHandler_.emitter.on("move",this.onPointerMove_),this.ptHandler_.emitter.on("up",this.onPointerUp_),this.view.element.addEventListener("keydown",this.onKeyDown_),this.view.element.addEventListener("keyup",this.onKeyUp_)}handlePointerEvent_(t,e){if(!t.point)return;const n=N(T(t.point.x,0,t.bounds.width),0,t.bounds.width,0,360),i=this.value.rawValue,[,s,r,o]=i.getComponents("hsv");this.value.setRawValue(new Un([n,s,r,o],"hsv"),e)}onPointerDown_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerMove_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerUp_(t){this.handlePointerEvent_(t.data,{forceEmit:!0,last:!0})}onKeyDown_(t){const e=rn(Gn(!1),an(t));if(0===e)return;const n=this.value.rawValue,[i,s,r,o]=n.getComponents("hsv");this.value.setRawValue(new Un([i+e,s,r,o],"hsv"),{forceEmit:!1,last:!1})}onKeyUp_(t){0!==rn(Gn(!1),an(t))&&this.value.setRawValue(this.value.rawValue,{forceEmit:!0,last:!0})}}const $i=Et("svp");class qi{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),this.value=e.value,this.value.emitter.on("change",this.onValueChange_),this.element=t.createElement("div"),this.element.classList.add($i()),e.viewProps.bindClassModifiers(this.element),e.viewProps.bindTabIndex(this.element);const n=t.createElement("canvas");n.height=64,n.width=64,n.classList.add($i("c")),this.element.appendChild(n),this.canvasElement=n;const i=t.createElement("div");i.classList.add($i("m")),this.element.appendChild(i),this.markerElem_=i,this.update_()}update_(){const t=function(t){const e=t.ownerDocument.defaultView;return e&&"document"in e?t.getContext("2d",{willReadFrequently:!0}):null}(this.canvasElement);if(!t)return;const e=this.value.rawValue.getComponents("hsv"),n=this.canvasElement.width,i=this.canvasElement.height,s=t.getImageData(0,0,n,i),r=s.data;for(let t=0;tt.getComponents()[3],backward:(t,e)=>{const n=t.getComponents();return n[3]=e,new Un(n,t.mode)}}),this.textsC_=new Ii(t,{colorType:e.colorType,value:this.value,viewProps:this.viewProps}),this.view=new $n(t,{alphaViews:this.alphaIcs_?{palette:this.alphaIcs_.palette.view,text:this.alphaIcs_.text.view}:null,hPaletteView:this.hPaletteC_.view,supportsAlpha:e.supportsAlpha,svPaletteView:this.svPaletteC_.view,textsView:this.textsC_.view,viewProps:this.viewProps})}get textsController(){return this.textsC_}}const Yi=Et("colsw");class Xi{constructor(t,e){this.onValueChange_=this.onValueChange_.bind(this),e.value.emitter.on("change",this.onValueChange_),this.value=e.value,this.element=t.createElement("div"),this.element.classList.add(Yi()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(Yi("sw")),this.element.appendChild(n),this.swatchElem_=n;const i=t.createElement("button");i.classList.add(Yi("b")),e.viewProps.bindDisabled(i),this.element.appendChild(i),this.buttonElement=i,this.update_()}update_(){const t=this.value.rawValue;this.swatchElem_.style.backgroundColor=Pi(t)}onValueChange_(){this.update_()}}class Qi{constructor(t,e){this.value=e.value,this.viewProps=e.viewProps,this.view=new Xi(t,{value:this.value,viewProps:this.viewProps})}}class Wi{constructor(t,e){this.onButtonBlur_=this.onButtonBlur_.bind(this),this.onButtonClick_=this.onButtonClick_.bind(this),this.onPopupChildBlur_=this.onPopupChildBlur_.bind(this),this.onPopupChildKeydown_=this.onPopupChildKeydown_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.foldable_=pe.create(e.expanded),this.swatchC_=new Qi(t,{value:this.value,viewProps:this.viewProps});const n=this.swatchC_.view.buttonElement;n.addEventListener("blur",this.onButtonBlur_),n.addEventListener("click",this.onButtonClick_),this.textC_=new Qe(t,{parser:e.parser,props:v.fromObject({formatter:e.formatter}),value:this.value,viewProps:this.viewProps}),this.view=new An(t,{foldable:this.foldable_,pickerLayout:e.pickerLayout}),this.view.swatchElement.appendChild(this.swatchC_.view.element),this.view.textElement.appendChild(this.textC_.view.element),this.popC_="popup"===e.pickerLayout?new Ge(t,{viewProps:this.viewProps}):null;const i=new Gi(t,{colorType:e.colorType,supportsAlpha:e.supportsAlpha,value:this.value,viewProps:this.viewProps});i.view.allFocusableElements.forEach((t=>{t.addEventListener("blur",this.onPopupChildBlur_),t.addEventListener("keydown",this.onPopupChildKeydown_)})),this.pickerC_=i,this.popC_?(this.view.element.appendChild(this.popC_.view.element),this.popC_.view.element.appendChild(i.view.element),sn({primary:this.foldable_.value("expanded"),secondary:this.popC_.shows,forward:t=>t,backward:(t,e)=>e})):this.view.pickerElement&&(this.view.pickerElement.appendChild(this.pickerC_.view.element),de(this.foldable_,this.view.pickerElement))}get textController(){return this.textC_}onButtonBlur_(t){if(!this.popC_)return;const e=this.view.element,n=t.relatedTarget;n&&e.contains(n)||(this.popC_.shows.rawValue=!1)}onButtonClick_(){this.foldable_.set("expanded",!this.foldable_.get("expanded")),this.foldable_.get("expanded")&&this.pickerC_.view.allFocusableElements[0].focus()}onPopupChildBlur_(t){if(!this.popC_)return;const e=this.popC_.view.element,n=yt(t);n&&e.contains(n)||n&&n===this.swatchC_.view.buttonElement&&!mt(e.ownerDocument)||(this.popC_.shows.rawValue=!1)}onPopupChildKeydown_(t){this.popC_?"Escape"===t.key&&(this.popC_.shows.rawValue=!1):this.view.pickerElement&&"Escape"===t.key&&this.swatchC_.view.buttonElement.focus()}}function Ji(t){return Rn(t.getComponents("rgb")).reduce(((t,e)=>t<<8|255&Math.floor(e)),0)}function Zi(t){return t.getComponents("rgb").reduce(((t,e,n)=>t<<8|255&Math.floor(3===n?255*e:e)),0)>>>0}function ts(t){return"number"!=typeof t?Un.black():new Un([(e=t)>>16&255,e>>8&255,255&e],"rgb");var e}function es(t){return"number"!=typeof t?Un.black():new Un([(e=t)>>24&255,e>>16&255,e>>8&255,N(255&e,0,255,0,1)],"rgb");var e}function ns(e,n){return"object"==typeof e&&!t(e)&&(n in e&&"number"==typeof e[n])}function is(t){return ns(t,"r")&&ns(t,"g")&&ns(t,"b")}function ss(t){return is(t)&&ns(t,"a")}function rs(t){return is(t)}function os(t,e){if(t.mode!==e.mode)return!1;if(t.type!==e.type)return!1;const n=t.getComponents(),i=e.getComponents();for(let t=0;t{t?function(t,e,n){const i=Jn(e,n).toRgbaObject();t.writeProperty("r",i.r),t.writeProperty("g",i.g),t.writeProperty("b",i.b),t.writeProperty("a",i.a)}(n,i,e):function(t,e,n){const i=Jn(e,n).toRgbaObject();t.writeProperty("r",i.r),t.writeProperty("g",i.g),t.writeProperty("b",i.b)}(n,i,e)}}const ps=Jt({id:"input-color-number",type:"input",accept:(t,e)=>{if("number"!=typeof t)return null;if(!function(t){return"color"in t||"color"===t.view}(e))return null;const n=Hn(e);return n?{initialValue:t,params:Object.assign(Object.assign({},n),{supportsAlpha:(i=e,!!(null===(s=null==i?void 0:i.color)||void 0===s?void 0:s.alpha))})}:null;var i,s},binding:{reader:t=>t.params.supportsAlpha?es:ts,equals:os,writer:t=>function(t){const e=t?Zi:Ji;return(t,n)=>{Vn(t,e(n))}}(t.params.supportsAlpha)},controller:t=>{var e,n,i;return new Wi(t.document,{colorType:"int",expanded:null!==(e=t.params.expanded)&&void 0!==e&&e,formatter:(i=t.params.supportsAlpha,i?t=>Pi(t,"0x"):t=>Ci(t,"0x")),parser:wi("int"),pickerLayout:null!==(n=t.params.picker)&&void 0!==n?n:"popup",supportsAlpha:t.params.supportsAlpha,value:t.value,viewProps:t.viewProps})}});function cs(t){return e=>{const n=function(t,e){if(!rs(t))return Jn(Un.black(),e);if("int"===e){const e=as(t);return new Un(e,"rgb")}if("float"===e){const e=as(t);return new Xn(e,"rgb")}return Jn(Un.black(),"int")}(e,t);return Jn(n,"int")}}function ds(t,e){return n=>t?Si(n,e):Vi(n,e)}const hs=Jt({id:"input-color-object",type:"input",accept:(t,e)=>{var n;if(!rs(t))return null;const i=Hn(e);return i?{initialValue:t,params:Object.assign(Object.assign({},i),{colorType:null!==(n=Yn(e))&&void 0!==n?n:"int"})}:null},binding:{reader:t=>cs(t.params.colorType),equals:os,writer:t=>ls(ss(t.initialValue),t.params.colorType)},controller:t=>{var e,n;const i=ss(t.initialValue);return new Wi(t.document,{colorType:t.params.colorType,expanded:null!==(e=t.params.expanded)&&void 0!==e&&e,formatter:ds(i,t.params.colorType),parser:wi("int"),pickerLayout:null!==(n=t.params.picker)&&void 0!==n?n:"popup",supportsAlpha:i,value:t.value,viewProps:t.viewProps})}}),us=Jt({id:"input-color-string",type:"input",accept:(t,e)=>{if("string"!=typeof t)return null;if("text"===e.view)return null;const n=fi(t,Yn(e));if(!n)return null;const i=Di(n);if(!i)return null;const s=Hn(e);return s?{initialValue:t,params:Object.assign(Object.assign({},s),{format:n,stringifier:i})}:null},binding:{reader:()=>xi,equals:os,writer:t=>{const e=function(t){const e=Di(t);return e?(t,n)=>{Vn(t,e(n))}:null}(t.params.format);if(!e)throw a.notBindable();return e}},controller:t=>{var e,n;return new Wi(t.document,{colorType:t.params.format.type,expanded:null!==(e=t.params.expanded)&&void 0!==e&&e,formatter:t.params.stringifier,parser:wi("int"),pickerLayout:null!==(n=t.params.picker)&&void 0!==n?n:"popup",supportsAlpha:t.params.format.alpha,value:t.value,viewProps:t.viewProps})}});class vs{constructor(t){this.components=t.components,this.asm_=t.assembly}constrain(t){const e=this.asm_.toComponents(t).map(((t,e)=>{var n,i;return null!==(i=null===(n=this.components[e])||void 0===n?void 0:n.constrain(t))&&void 0!==i?i:t}));return this.asm_.fromComponents(e)}}const ms=Et("pndtxt");class bs{constructor(t,e){this.textViews=e.textViews,this.element=t.createElement("div"),this.element.classList.add(ms()),this.textViews.forEach((e=>{const n=t.createElement("div");n.classList.add(ms("a")),n.appendChild(e.element),this.element.appendChild(n)}))}}class gs{constructor(t,e){this.value=e.value,this.viewProps=e.viewProps,this.acs_=e.axes.map(((n,i)=>function(t,e,n){return new un(t,{arrayPosition:0===n?"fst":n===e.axes.length-1?"lst":"mid",parser:e.parser,props:e.axes[n].textProps,value:u(0,{constraint:e.axes[n].constraint}),viewProps:e.viewProps})}(t,e,i))),this.acs_.forEach(((t,n)=>{sn({primary:this.value,secondary:t.value,forward:t=>e.assembly.toComponents(t)[n],backward:(t,i)=>{const s=e.assembly.toComponents(t);return s[n]=i,e.assembly.fromComponents(s)}})})),this.view=new bs(t,{textViews:this.acs_.map((t=>t.view))})}get textControllers(){return this.acs_}}class _s extends it{get max(){return this.controller.valueController.sliderController.props.get("max")}set max(t){this.controller.valueController.sliderController.props.set("max",t)}get min(){return this.controller.valueController.sliderController.props.get("min")}set min(t){this.controller.valueController.sliderController.props.set("min",t)}}const fs=Jt({id:"input-number",type:"input",accept:(t,e)=>{if("number"!=typeof t)return null;const n=lt(e,(t=>Object.assign(Object.assign({},X(t)),{options:t.optional.custom(Ne),readonly:t.optional.constant(!1)})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>B,constraint:t=>function(t,e){const n=[],i=H(t,e);i&&n.push(i);const s=G(t);s&&n.push(s);const r=Te(t.options);return r&&n.push(r),new Be(n)}(t.params,t.initialValue),writer:t=>Vn},controller:t=>{const e=t.value,n=t.constraint,i=n&&Ke(n,ze);if(i)return new $e(t.document,{props:new v({options:i.values.value("options")}),value:e,viewProps:t.viewProps});const s=Y(t.params,e.rawValue),r=n&&Ke(n,m);return r?new fn(t.document,Object.assign(Object.assign({},wn(Object.assign(Object.assign({},s),{keyScale:u(s.keyScale),max:r.values.value("max"),min:r.values.value("min")}))),{parser:R,value:e,viewProps:t.viewProps})):new un(t.document,{parser:R,props:v.fromObject(s),value:e,viewProps:t.viewProps})},api:t=>"number"!=typeof t.controller.value.rawValue?null:t.controller.valueController instanceof fn?new _s(t.controller):t.controller.valueController instanceof $e?new Ae(t.controller):null});class ws{constructor(t=0,e=0){this.x=t,this.y=e}getComponents(){return[this.x,this.y]}static isObject(e){if(t(e))return!1;const n=e.x,i=e.y;return"number"==typeof n&&"number"==typeof i}static equals(t,e){return t.x===e.x&&t.y===e.y}toObject(){return{x:this.x,y:this.y}}}const xs={toComponents:t=>t.getComponents(),fromComponents:t=>new ws(...t)},ys=Et("p2d");class Cs{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(ys()),e.viewProps.bindClassModifiers(this.element),Ct(e.expanded,$t(this.element,ys(void 0,"expanded")));const n=t.createElement("div");n.classList.add(ys("h")),this.element.appendChild(n);const i=t.createElement("button");i.classList.add(ys("b")),i.appendChild(_t(t,"p2dpad")),e.viewProps.bindDisabled(i),n.appendChild(i),this.buttonElement=i;const s=t.createElement("div");if(s.classList.add(ys("t")),n.appendChild(s),this.textElement=s,"inline"===e.pickerLayout){const e=t.createElement("div");e.classList.add(ys("p")),this.element.appendChild(e),this.pickerElement=e}else this.pickerElement=null}}const Ps=Et("p2dp");class ks{constructor(t,e){this.onFoldableChange_=this.onFoldableChange_.bind(this),this.onPropsChange_=this.onPropsChange_.bind(this),this.onValueChange_=this.onValueChange_.bind(this),this.props_=e.props,this.props_.emitter.on("change",this.onPropsChange_),this.element=t.createElement("div"),this.element.classList.add(Ps()),"popup"===e.layout&&this.element.classList.add(Ps(void 0,"p")),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("div");n.classList.add(Ps("p")),e.viewProps.bindTabIndex(n),this.element.appendChild(n),this.padElement=n;const i=t.createElementNS(ut,"svg");i.classList.add(Ps("g")),this.padElement.appendChild(i),this.svgElem_=i;const s=t.createElementNS(ut,"line");s.classList.add(Ps("ax")),s.setAttributeNS(null,"x1","0"),s.setAttributeNS(null,"y1","50%"),s.setAttributeNS(null,"x2","100%"),s.setAttributeNS(null,"y2","50%"),this.svgElem_.appendChild(s);const r=t.createElementNS(ut,"line");r.classList.add(Ps("ax")),r.setAttributeNS(null,"x1","50%"),r.setAttributeNS(null,"y1","0"),r.setAttributeNS(null,"x2","50%"),r.setAttributeNS(null,"y2","100%"),this.svgElem_.appendChild(r);const o=t.createElementNS(ut,"line");o.classList.add(Ps("l")),o.setAttributeNS(null,"x1","50%"),o.setAttributeNS(null,"y1","50%"),this.svgElem_.appendChild(o),this.lineElem_=o;const a=t.createElement("div");a.classList.add(Ps("m")),this.padElement.appendChild(a),this.markerElem_=a,e.value.emitter.on("change",this.onValueChange_),this.value=e.value,this.update_()}get allFocusableElements(){return[this.padElement]}update_(){const[t,e]=this.value.rawValue.getComponents(),n=this.props_.get("max"),i=N(t,-n,+n,0,100),s=N(e,-n,+n,0,100),r=this.props_.get("invertsY")?100-s:s;this.lineElem_.setAttributeNS(null,"x2",`${i}%`),this.lineElem_.setAttributeNS(null,"y2",`${r}%`),this.markerElem_.style.left=`${i}%`,this.markerElem_.style.top=`${r}%`}onValueChange_(){this.update_()}onPropsChange_(){this.update_()}onFoldableChange_(){this.update_()}}function Es(t,e,n){return[rn(e[0],an(t)),rn(e[1],on(t))*(n?1:-1)]}class Vs{constructor(t,e){this.onPadKeyDown_=this.onPadKeyDown_.bind(this),this.onPadKeyUp_=this.onPadKeyUp_.bind(this),this.onPointerDown_=this.onPointerDown_.bind(this),this.onPointerMove_=this.onPointerMove_.bind(this),this.onPointerUp_=this.onPointerUp_.bind(this),this.props=e.props,this.value=e.value,this.viewProps=e.viewProps,this.view=new ks(t,{layout:e.layout,props:this.props,value:this.value,viewProps:this.viewProps}),this.ptHandler_=new cn(this.view.padElement),this.ptHandler_.emitter.on("down",this.onPointerDown_),this.ptHandler_.emitter.on("move",this.onPointerMove_),this.ptHandler_.emitter.on("up",this.onPointerUp_),this.view.padElement.addEventListener("keydown",this.onPadKeyDown_),this.view.padElement.addEventListener("keyup",this.onPadKeyUp_)}handlePointerEvent_(t,e){if(!t.point)return;const n=this.props.get("max"),i=N(t.point.x,0,t.bounds.width,-n,+n),s=N(this.props.get("invertsY")?t.bounds.height-t.point.y:t.point.y,0,t.bounds.height,-n,+n);this.value.setRawValue(new ws(i,s),e)}onPointerDown_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerMove_(t){this.handlePointerEvent_(t.data,{forceEmit:!1,last:!1})}onPointerUp_(t){this.handlePointerEvent_(t.data,{forceEmit:!0,last:!0})}onPadKeyDown_(t){ln(t.key)&&t.preventDefault();const[e,n]=Es(t,[this.props.get("xKeyScale"),this.props.get("yKeyScale")],this.props.get("invertsY"));0===e&&0===n||this.value.setRawValue(new ws(this.value.rawValue.x+e,this.value.rawValue.y+n),{forceEmit:!1,last:!1})}onPadKeyUp_(t){const[e,n]=Es(t,[this.props.get("xKeyScale"),this.props.get("yKeyScale")],this.props.get("invertsY"));0===e&&0===n||this.value.setRawValue(this.value.rawValue,{forceEmit:!0,last:!0})}}class Ls{constructor(t,e){var n,i;this.onPopupChildBlur_=this.onPopupChildBlur_.bind(this),this.onPopupChildKeydown_=this.onPopupChildKeydown_.bind(this),this.onPadButtonBlur_=this.onPadButtonBlur_.bind(this),this.onPadButtonClick_=this.onPadButtonClick_.bind(this),this.value=e.value,this.viewProps=e.viewProps,this.foldable_=pe.create(e.expanded),this.popC_="popup"===e.pickerLayout?new Ge(t,{viewProps:this.viewProps}):null;const s=new Vs(t,{layout:e.pickerLayout,props:new v({invertsY:u(e.invertsY),max:u(e.max),xKeyScale:e.axes[0].textProps.value("keyScale"),yKeyScale:e.axes[1].textProps.value("keyScale")}),value:this.value,viewProps:this.viewProps});s.view.allFocusableElements.forEach((t=>{t.addEventListener("blur",this.onPopupChildBlur_),t.addEventListener("keydown",this.onPopupChildKeydown_)})),this.pickerC_=s,this.textC_=new gs(t,{assembly:xs,axes:e.axes,parser:e.parser,value:this.value,viewProps:this.viewProps}),this.view=new Cs(t,{expanded:this.foldable_.value("expanded"),pickerLayout:e.pickerLayout,viewProps:this.viewProps}),this.view.textElement.appendChild(this.textC_.view.element),null===(n=this.view.buttonElement)||void 0===n||n.addEventListener("blur",this.onPadButtonBlur_),null===(i=this.view.buttonElement)||void 0===i||i.addEventListener("click",this.onPadButtonClick_),this.popC_?(this.view.element.appendChild(this.popC_.view.element),this.popC_.view.element.appendChild(this.pickerC_.view.element),sn({primary:this.foldable_.value("expanded"),secondary:this.popC_.shows,forward:t=>t,backward:(t,e)=>e})):this.view.pickerElement&&(this.view.pickerElement.appendChild(this.pickerC_.view.element),de(this.foldable_,this.view.pickerElement))}get textController(){return this.textC_}onPadButtonBlur_(t){if(!this.popC_)return;const e=this.view.element,n=t.relatedTarget;n&&e.contains(n)||(this.popC_.shows.rawValue=!1)}onPadButtonClick_(){this.foldable_.set("expanded",!this.foldable_.get("expanded")),this.foldable_.get("expanded")&&this.pickerC_.view.allFocusableElements[0].focus()}onPopupChildBlur_(t){if(!this.popC_)return;const e=this.popC_.view.element,n=yt(t);n&&e.contains(n)||n&&n===this.view.buttonElement&&!mt(e.ownerDocument)||(this.popC_.shows.rawValue=!1)}onPopupChildKeydown_(t){this.popC_?"Escape"===t.key&&(this.popC_.shows.rawValue=!1):this.view.pickerElement&&"Escape"===t.key&&this.view.buttonElement.focus()}}function Ss(t){return ws.isObject(t)?new ws(t.x,t.y):new ws}function Ms(t,e){t.writeProperty("x",e.x),t.writeProperty("y",e.y)}function js(e,n){var i,s;if(!t(e.min)||!t(e.max))return Math.max(Math.abs(null!==(i=e.min)&&void 0!==i?i:0),Math.abs(null!==(s=e.max)&&void 0!==s?s:0));const r=$(e);return Math.max(10*Math.abs(r),10*Math.abs(n))}function Ds(t,e){var n,i;const r=js(s(t,null!==(n=t.x)&&void 0!==n?n:{}),e.x),o=js(s(t,null!==(i=t.y)&&void 0!==i?i:{}),e.y);return Math.max(r,o)}function As(t){if(!("y"in t))return!1;const e=t.y;return!!e&&("inverted"in e&&!!e.inverted)}const Os=Jt({id:"input-point2d",type:"input",accept:(t,e)=>{if(!ws.isObject(t))return null;const n=lt(e,(t=>Object.assign(Object.assign({},Cn(t)),{expanded:t.optional.boolean,picker:t.optional.custom(En),readonly:t.optional.constant(!1),x:t.optional.custom(Pn),y:t.optional.object(Object.assign(Object.assign({},Cn(t)),{inverted:t.optional.boolean}))})));return n?{initialValue:t,params:n}:null},binding:{reader:()=>Ss,constraint:t=>{return e=t.params,n=t.initialValue,new vs({assembly:xs,components:[kn(Object.assign(Object.assign({},e),e.x),n.x),kn(Object.assign(Object.assign({},e),e.y),n.y)]});var e,n},equals:ws.equals,writer:()=>Ms},controller:t=>{var e,n;const i=t.document,r=t.value,o=t.constraint,a=[t.params.x,t.params.y];return new Ls(i,{axes:r.rawValue.getComponents().map(((e,n)=>{var i;return Q({constraint:o.components[n],initialValue:e,params:s(t.params,null!==(i=a[n])&&void 0!==i?i:{})})})),expanded:null!==(e=t.params.expanded)&&void 0!==e&&e,invertsY:As(t.params),max:Ds(t.params,r.rawValue),parser:R,pickerLayout:null!==(n=t.params.picker)&&void 0!==n?n:"popup",value:r,viewProps:t.viewProps})}});class Rs{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}getComponents(){return[this.x,this.y,this.z]}static isObject(e){if(t(e))return!1;const n=e.x,i=e.y,s=e.z;return"number"==typeof n&&"number"==typeof i&&"number"==typeof s}static equals(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z}toObject(){return{x:this.x,y:this.y,z:this.z}}}const Bs={toComponents:t=>t.getComponents(),fromComponents:t=>new Rs(...t)};function Ks(t){return Rs.isObject(t)?new Rs(t.x,t.y,t.z):new Rs}function zs(t,e){t.writeProperty("x",e.x),t.writeProperty("y",e.y),t.writeProperty("z",e.z)}const Ns=Jt({id:"input-point3d",type:"input",accept:(t,e)=>{if(!Rs.isObject(t))return null;const n=lt(e,(t=>Object.assign(Object.assign({},Cn(t)),{readonly:t.optional.constant(!1),x:t.optional.custom(Pn),y:t.optional.custom(Pn),z:t.optional.custom(Pn)})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>Ks,constraint:t=>{return e=t.params,n=t.initialValue,new vs({assembly:Bs,components:[kn(Object.assign(Object.assign({},e),e.x),n.x),kn(Object.assign(Object.assign({},e),e.y),n.y),kn(Object.assign(Object.assign({},e),e.z),n.z)]});var e,n},equals:Rs.equals,writer:t=>zs},controller:t=>{const e=t.value,n=t.constraint,i=[t.params.x,t.params.y,t.params.z];return new gs(t.document,{assembly:Bs,axes:e.rawValue.getComponents().map(((e,r)=>{var o;return Q({constraint:n.components[r],initialValue:e,params:s(t.params,null!==(o=i[r])&&void 0!==o?o:{})})})),parser:R,value:e,viewProps:t.viewProps})}});class Is{constructor(t=0,e=0,n=0,i=0){this.x=t,this.y=e,this.z=n,this.w=i}getComponents(){return[this.x,this.y,this.z,this.w]}static isObject(e){if(t(e))return!1;const n=e.x,i=e.y,s=e.z,r=e.w;return"number"==typeof n&&"number"==typeof i&&"number"==typeof s&&"number"==typeof r}static equals(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w}toObject(){return{x:this.x,y:this.y,z:this.z,w:this.w}}}const Ts={toComponents:t=>t.getComponents(),fromComponents:t=>new Is(...t)};function Us(t){return Is.isObject(t)?new Is(t.x,t.y,t.z,t.w):new Is}function Fs(t,e){t.writeProperty("x",e.x),t.writeProperty("y",e.y),t.writeProperty("z",e.z),t.writeProperty("w",e.w)}const $s=Jt({id:"input-point4d",type:"input",accept:(t,e)=>{if(!Is.isObject(t))return null;const n=lt(e,(t=>Object.assign(Object.assign({},Cn(t)),{readonly:t.optional.constant(!1),w:t.optional.custom(Pn),x:t.optional.custom(Pn),y:t.optional.custom(Pn),z:t.optional.custom(Pn)})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>Us,constraint:t=>{return e=t.params,n=t.initialValue,new vs({assembly:Ts,components:[kn(Object.assign(Object.assign({},e),e.x),n.x),kn(Object.assign(Object.assign({},e),e.y),n.y),kn(Object.assign(Object.assign({},e),e.z),n.z),kn(Object.assign(Object.assign({},e),e.w),n.w)]});var e,n},equals:Is.equals,writer:t=>Fs},controller:t=>{const e=t.value,n=t.constraint,i=[t.params.x,t.params.y,t.params.z,t.params.w];return new gs(t.document,{assembly:Ts,axes:e.rawValue.getComponents().map(((e,r)=>{var o;return Q({constraint:n.components[r],initialValue:e,params:s(t.params,null!==(o=i[r])&&void 0!==o?o:{})})})),parser:R,value:e,viewProps:t.viewProps})}});const qs=Jt({id:"input-string",type:"input",accept:(t,e)=>{if("string"!=typeof t)return null;const n=lt(e,(t=>({readonly:t.optional.constant(!1),options:t.optional.custom(Ne)})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>en,constraint:t=>function(t){const e=[],n=Te(t.options);return n&&e.push(n),new Be(e)}(t.params),writer:t=>Vn},controller:t=>{const e=t.document,n=t.value,i=t.constraint,s=i&&Ke(i,ze);return s?new $e(e,{props:new v({options:s.values.value("options")}),value:n,viewProps:t.viewProps}):new Qe(e,{parser:t=>t,props:v.fromObject({formatter:nn}),value:n,viewProps:t.viewProps})},api:t=>"string"!=typeof t.controller.value.rawValue?null:t.controller.valueController instanceof $e?new Ae(t.controller):null}),Hs={monitor:{defaultInterval:200,defaultRows:3}},Gs=Et("mll");class Ys{constructor(t,e){this.onValueUpdate_=this.onValueUpdate_.bind(this),this.formatter_=e.formatter,this.element=t.createElement("div"),this.element.classList.add(Gs()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("textarea");n.classList.add(Gs("i")),n.style.height=`calc(var(${yn("containerUnitSize")}) * ${e.rows})`,n.readOnly=!0,e.viewProps.bindDisabled(n),this.element.appendChild(n),this.textareaElem_=n,e.value.emitter.on("change",this.onValueUpdate_),this.value=e.value,this.update_()}update_(){const t=this.textareaElem_,e=t.scrollTop===t.scrollHeight-t.clientHeight,n=[];this.value.rawValue.forEach((t=>{void 0!==t&&n.push(this.formatter_(t))})),t.textContent=n.join("\n"),e&&(t.scrollTop=t.scrollHeight)}onValueUpdate_(){this.update_()}}class Xs{constructor(t,e){this.value=e.value,this.viewProps=e.viewProps,this.view=new Ys(t,{formatter:e.formatter,rows:e.rows,value:this.value,viewProps:this.viewProps})}}const Qs=Et("sgl");class Ws{constructor(t,e){this.onValueUpdate_=this.onValueUpdate_.bind(this),this.formatter_=e.formatter,this.element=t.createElement("div"),this.element.classList.add(Qs()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("input");n.classList.add(Qs("i")),n.readOnly=!0,n.type="text",e.viewProps.bindDisabled(n),this.element.appendChild(n),this.inputElement=n,e.value.emitter.on("change",this.onValueUpdate_),this.value=e.value,this.update_()}update_(){const t=this.value.rawValue,e=t[t.length-1];this.inputElement.value=void 0!==e?this.formatter_(e):""}onValueUpdate_(){this.update_()}}class Js{constructor(t,e){this.value=e.value,this.viewProps=e.viewProps,this.view=new Ws(t,{formatter:e.formatter,value:this.value,viewProps:this.viewProps})}}const Zs=Jt({id:"monitor-bool",type:"monitor",accept:(t,e)=>{if("boolean"!=typeof t)return null;const n=lt(e,(t=>({readonly:t.required.constant(!0),rows:t.optional.number})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>We},controller:t=>{var e;return 1===t.value.rawValue.length?new Js(t.document,{formatter:Je,value:t.value,viewProps:t.viewProps}):new Xs(t.document,{formatter:Je,rows:null!==(e=t.params.rows)&&void 0!==e?e:Hs.monitor.defaultRows,value:t.value,viewProps:t.viewProps})}});class tr extends it{get max(){return this.controller.valueController.props.get("max")}set max(t){this.controller.valueController.props.set("max",t)}get min(){return this.controller.valueController.props.get("min")}set min(t){this.controller.valueController.props.set("min",t)}}const er=Et("grl");class nr{constructor(t,e){this.onCursorChange_=this.onCursorChange_.bind(this),this.onValueUpdate_=this.onValueUpdate_.bind(this),this.element=t.createElement("div"),this.element.classList.add(er()),e.viewProps.bindClassModifiers(this.element),this.formatter_=e.formatter,this.props_=e.props,this.cursor_=e.cursor,this.cursor_.emitter.on("change",this.onCursorChange_);const n=t.createElementNS(ut,"svg");n.classList.add(er("g")),n.style.height=`calc(var(${yn("containerUnitSize")}) * ${e.rows})`,this.element.appendChild(n),this.svgElem_=n;const i=t.createElementNS(ut,"polyline");this.svgElem_.appendChild(i),this.lineElem_=i;const s=t.createElement("div");s.classList.add(er("t"),Et("tt")()),this.element.appendChild(s),this.tooltipElem_=s,e.value.emitter.on("change",this.onValueUpdate_),this.value=e.value,this.update_()}get graphElement(){return this.svgElem_}update_(){const{clientWidth:t,clientHeight:e}=this.element,n=this.value.rawValue.length-1,i=this.props_.get("min"),s=this.props_.get("max"),r=[];this.value.rawValue.forEach(((o,a)=>{if(void 0===o)return;const l=N(a,0,n,0,t),p=N(o,i,s,e,0);r.push([l,p].join(","))})),this.lineElem_.setAttributeNS(null,"points",r.join(" "));const o=this.tooltipElem_,a=this.value.rawValue[this.cursor_.rawValue];if(void 0===a)return void o.classList.remove(er("t","a"));const l=N(this.cursor_.rawValue,0,n,0,t),p=N(a,i,s,e,0);o.style.left=`${l}px`,o.style.top=`${p}px`,o.textContent=`${this.formatter_(a)}`,o.classList.contains(er("t","a"))||(o.classList.add(er("t","a"),er("t","in")),vt(o),o.classList.remove(er("t","in")))}onValueUpdate_(){this.update_()}onCursorChange_(){this.update_()}}class ir{constructor(t,e){if(this.onGraphMouseMove_=this.onGraphMouseMove_.bind(this),this.onGraphMouseLeave_=this.onGraphMouseLeave_.bind(this),this.onGraphPointerDown_=this.onGraphPointerDown_.bind(this),this.onGraphPointerMove_=this.onGraphPointerMove_.bind(this),this.onGraphPointerUp_=this.onGraphPointerUp_.bind(this),this.props=e.props,this.value=e.value,this.viewProps=e.viewProps,this.cursor_=u(-1),this.view=new nr(t,{cursor:this.cursor_,formatter:e.formatter,rows:e.rows,props:this.props,value:this.value,viewProps:this.viewProps}),mt(t)){const t=new cn(this.view.element);t.emitter.on("down",this.onGraphPointerDown_),t.emitter.on("move",this.onGraphPointerMove_),t.emitter.on("up",this.onGraphPointerUp_)}else this.view.element.addEventListener("mousemove",this.onGraphMouseMove_),this.view.element.addEventListener("mouseleave",this.onGraphMouseLeave_)}importProps(t){return pt(t,null,(t=>({max:t.required.number,min:t.required.number})),(t=>(this.props.set("max",t.max),this.props.set("min",t.min),!0)))}exportProps(){return ct(null,{max:this.props.get("max"),min:this.props.get("min")})}onGraphMouseLeave_(){this.cursor_.rawValue=-1}onGraphMouseMove_(t){const{clientWidth:e}=this.view.element;this.cursor_.rawValue=Math.floor(N(t.offsetX,0,e,0,this.value.rawValue.length))}onGraphPointerDown_(t){this.onGraphPointerMove_(t)}onGraphPointerMove_(t){t.data.point?this.cursor_.rawValue=Math.floor(N(t.data.point.x,0,t.data.bounds.width,0,this.value.rawValue.length)):this.cursor_.rawValue=-1}onGraphPointerUp_(){this.cursor_.rawValue=-1}}function sr(e){return t(e.format)?z(2):e.format}function rr(t){return"graph"===t.view}const or=Jt({id:"monitor-number",type:"monitor",accept:(t,e)=>{if("number"!=typeof t)return null;const n=lt(e,(t=>({format:t.optional.function,max:t.optional.number,min:t.optional.number,readonly:t.required.constant(!0),rows:t.optional.number,view:t.optional.string})));return n?{initialValue:t,params:n}:null},binding:{defaultBufferSize:t=>rr(t)?64:1,reader:t=>B},controller:t=>rr(t.params)?function(t){var e,n,i;return new ir(t.document,{formatter:sr(t.params),rows:null!==(e=t.params.rows)&&void 0!==e?e:Hs.monitor.defaultRows,props:v.fromObject({max:null!==(n=t.params.max)&&void 0!==n?n:100,min:null!==(i=t.params.min)&&void 0!==i?i:0}),value:t.value,viewProps:t.viewProps})}(t):function(t){var e;return 1===t.value.rawValue.length?new Js(t.document,{formatter:sr(t.params),value:t.value,viewProps:t.viewProps}):new Xs(t.document,{formatter:sr(t.params),rows:null!==(e=t.params.rows)&&void 0!==e?e:Hs.monitor.defaultRows,value:t.value,viewProps:t.viewProps})}(t),api:t=>t.controller.valueController instanceof ir?new tr(t.controller):null}),ar=Jt({id:"monitor-string",type:"monitor",accept:(t,e)=>{if("string"!=typeof t)return null;const n=lt(e,(t=>({multiline:t.optional.boolean,readonly:t.required.constant(!0),rows:t.optional.number})));return n?{initialValue:t,params:n}:null},binding:{reader:t=>en},controller:t=>{var e;const n=t.value;return n.rawValue.length>1||t.params.multiline?new Xs(t.document,{formatter:nn,rows:null!==(e=t.params.rows)&&void 0!==e?e:Hs.monitor.defaultRows,value:n,viewProps:t.viewProps}):new Js(t.document,{formatter:nn,value:n,viewProps:t.viewProps})}});class lr{constructor(t){this.target=t.target,this.reader_=t.reader,this.writer_=t.writer}read(){return this.reader_(this.target.read())}write(t){this.writer_(this.target,t)}inject(t){this.write(this.reader_(t))}}class pr{constructor(t){this.target=t.target,this.reader_=t.reader}read(){return this.reader_(this.target.read())}}class cr{constructor(t){this.pluginsMap_={blades:[],inputs:[],monitors:[]},this.apiCache_=t}getAll(){return[...this.pluginsMap_.blades,...this.pluginsMap_.inputs,...this.pluginsMap_.monitors]}register(t,e){if(!(n=e.core)||n.major!==Wt.major)throw a.notCompatible(t,e.id);var n;"blade"===e.type?this.pluginsMap_.blades.unshift(e):"input"===e.type?this.pluginsMap_.inputs.unshift(e):"monitor"===e.type&&this.pluginsMap_.monitors.unshift(e)}createInput_(e,n,i){return this.pluginsMap_.inputs.reduce(((s,r)=>null!=s?s:function(e,n){var i;const s=e.accept(n.target.read(),n.params);if(t(s))return null;const r={target:n.target,initialValue:s.initialValue,params:s.params},o=lt(n.params,(t=>({disabled:t.optional.boolean,hidden:t.optional.boolean,label:t.optional.string,tag:t.optional.string}))),a=e.binding.reader(r),l=e.binding.constraint?e.binding.constraint(r):void 0,p=new lr({reader:a,target:n.target,writer:e.binding.writer(r)}),c=new st(u(a(s.initialValue),{constraint:l,equals:e.binding.equals}),p),d=e.controller({constraint:l,document:n.document,initialValue:s.initialValue,params:s.params,value:c,viewProps:fe.create({disabled:null==o?void 0:o.disabled,hidden:null==o?void 0:o.hidden})});return new Bt(n.document,{blade:le(),props:v.fromObject({label:"label"in n.params?null!==(i=null==o?void 0:o.label)&&void 0!==i?i:null:n.target.key}),tag:null==o?void 0:o.tag,value:c,valueController:d})}(r,{document:e,target:n,params:i})),null)}createMonitor_(e,n,i){return this.pluginsMap_.monitors.reduce(((s,r)=>null!=s?s:function(e,n){var i,s,r;const o=e.accept(n.target.read(),n.params);if(t(o))return null;const a={target:n.target,initialValue:o.initialValue,params:o.params},l=lt(n.params,(t=>({bufferSize:t.optional.number,disabled:t.optional.boolean,hidden:t.optional.boolean,interval:t.optional.number,label:t.optional.string}))),p=e.binding.reader(a),c=null!==(s=null!==(i=null==l?void 0:l.bufferSize)&&void 0!==i?i:e.binding.defaultBufferSize&&e.binding.defaultBufferSize(o.params))&&void 0!==s?s:1,d=new It({binding:new pr({reader:p,target:n.target}),bufferSize:c,ticker:(h=n.document,u=null==l?void 0:l.interval,0===u?new Oe:new Re(h,null!=u?u:Hs.monitor.defaultInterval))});var h,u;const m=e.controller({document:n.document,params:o.params,value:d,viewProps:fe.create({disabled:null==l?void 0:l.disabled,hidden:null==l?void 0:l.hidden})});return m.viewProps.bindDisabled(d.ticker),m.viewProps.handleDispose((()=>{d.ticker.dispose()})),new Tt(n.document,{blade:le(),props:v.fromObject({label:"label"in n.params?null!==(r=null==l?void 0:l.label)&&void 0!==r?r:null:n.target.key}),value:d,valueController:m})}(r,{document:e,params:i,target:n})),null)}createBinding(e,n,i){if(t(n.read()))throw new a({context:{key:n.key},type:"nomatchingcontroller"});const s=this.createInput_(e,n,i);if(s)return s;const r=this.createMonitor_(e,n,i);if(r)return r;throw new a({context:{key:n.key},type:"nomatchingcontroller"})}createBlade(t,e){const n=this.pluginsMap_.blades.reduce(((n,i)=>null!=n?n:function(t,e){const n=t.accept(e.params);if(!n)return null;const i=lt(e.params,(t=>({disabled:t.optional.boolean,hidden:t.optional.boolean})));return t.controller({blade:le(),document:e.document,params:Object.assign(Object.assign({},n.params),{disabled:null==i?void 0:i.disabled,hidden:null==i?void 0:i.hidden}),viewProps:fe.create({disabled:null==i?void 0:i.disabled,hidden:null==i?void 0:i.hidden})})}(i,{document:t,params:e})),null);if(!n)throw new a({type:"nomatchingview",context:{params:e}});return n}createInputBindingApi_(t){const e=this.pluginsMap_.inputs.reduce(((e,n)=>{var i,s;return e||(null!==(s=null===(i=n.api)||void 0===i?void 0:i.call(n,{controller:t}))&&void 0!==s?s:null)}),null);return this.apiCache_.add(t,null!=e?e:new it(t))}createMonitorBindingApi_(t){const e=this.pluginsMap_.monitors.reduce(((e,n)=>{var i,s;return e||(null!==(s=null===(i=n.api)||void 0===i?void 0:i.call(n,{controller:t}))&&void 0!==s?s:null)}),null);return this.apiCache_.add(t,null!=e?e:new it(t))}createBindingApi(t){if(this.apiCache_.has(t))return this.apiCache_.get(t);if(Kt(t))return this.createInputBindingApi_(t);if(Ut(t))return this.createMonitorBindingApi_(t);throw a.shouldNeverHappen()}createApi(t){if(this.apiCache_.has(t))return this.apiCache_.get(t);if(function(t){return dt(t)&&ht(t.value)}(t))return this.createBindingApi(t);const e=this.pluginsMap_.blades.reduce(((e,n)=>null!=e?e:n.api({controller:t,pool:this})),null);if(!e)throw a.shouldNeverHappen();return this.apiCache_.add(t,e)}}const dr=new class{constructor(){this.map_=new Map}get(t){var e;return null!==(e=this.map_.get(t))&&void 0!==e?e:null}has(t){return this.map_.has(t)}add(t,e){return this.map_.set(t,e),t.viewProps.handleDispose((()=>{this.map_.delete(t)})),e}};class hr extends W{constructor(t){super(t),this.emitter_=new p,this.controller.value.emitter.on("change",(t=>{this.emitter_.emit("change",new Z(this,t.rawValue))}))}get label(){return this.controller.labelController.props.get("label")}set label(t){this.controller.labelController.props.set("label",t)}get options(){return this.controller.valueController.props.get("options")}set options(t){this.controller.valueController.props.set("options",t)}get value(){return this.controller.value.rawValue}set value(t){this.controller.value.rawValue=t}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}}class ur extends W{}class vr extends W{constructor(t){super(t),this.emitter_=new p,this.controller.value.emitter.on("change",(t=>{this.emitter_.emit("change",new Z(this,t.rawValue))}))}get label(){return this.controller.labelController.props.get("label")}set label(t){this.controller.labelController.props.set("label",t)}get max(){return this.controller.valueController.sliderController.props.get("max")}set max(t){this.controller.valueController.sliderController.props.set("max",t)}get min(){return this.controller.valueController.sliderController.props.get("min")}set min(t){this.controller.valueController.sliderController.props.set("min",t)}get value(){return this.controller.value.rawValue}set value(t){this.controller.value.rawValue=t}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}}class mr extends W{constructor(t){super(t),this.emitter_=new p,this.controller.value.emitter.on("change",(t=>{this.emitter_.emit("change",new Z(this,t.rawValue))}))}get label(){return this.controller.labelController.props.get("label")}set label(t){this.controller.labelController.props.set("label",t)}get formatter(){return this.controller.valueController.props.get("formatter")}set formatter(t){this.controller.valueController.props.set("formatter",t)}get value(){return this.controller.value.rawValue}set value(t){this.controller.value.rawValue=t}on(t,e){const n=e.bind(this);return this.emitter_.on(t,(t=>{n(t)}),{key:e}),this}off(t,e){return this.emitter_.off(t,e),this}}const br={id:"list",type:"blade",core:Wt,accept(t){const e=lt(t,(t=>({options:t.required.custom(Ne),value:t.required.raw,view:t.required.constant("list"),label:t.optional.string})));return e?{params:e}:null},controller(t){const e=new ze(Ie(t.params.options)),n=u(t.params.value,{constraint:e}),i=new $e(t.document,{props:new v({options:e.values.value("options")}),value:n,viewProps:t.viewProps});return new At(t.document,{blade:t.blade,props:v.fromObject({label:t.params.label}),value:n,valueController:i})},api:t=>t.controller instanceof At&&t.controller.valueController instanceof $e?new hr(t.controller):null};class gr extends he{constructor(t,e){super(t,e)}get element(){return this.controller.view.element}}class _r extends me{constructor(t,e){super(t,{expanded:e.expanded,blade:e.blade,props:e.props,root:!0,viewProps:e.viewProps})}}const fr=Et("spr");class wr{constructor(t,e){this.element=t.createElement("div"),this.element.classList.add(fr()),e.viewProps.bindClassModifiers(this.element);const n=t.createElement("hr");n.classList.add(fr("r")),this.element.appendChild(n)}}class xr extends Dt{constructor(t,e){super(Object.assign(Object.assign({},e),{view:new wr(t,{viewProps:e.viewProps})}))}}const yr={id:"separator",type:"blade",core:Wt,accept(t){const e=lt(t,(t=>({view:t.required.constant("separator")})));return e?{params:e}:null},controller:t=>new xr(t.document,{blade:t.blade,viewProps:t.viewProps}),api:t=>t.controller instanceof xr?new ur(t.controller):null},Cr={id:"slider",type:"blade",core:Wt,accept(t){const e=lt(t,(t=>({max:t.required.number,min:t.required.number,view:t.required.constant("slider"),format:t.optional.function,label:t.optional.string,value:t.optional.number})));return e?{params:e}:null},controller(t){var e,n;const i=null!==(e=t.params.value)&&void 0!==e?e:0,s=new m({max:t.params.max,min:t.params.min}),r=u(i,{constraint:s}),o=new fn(t.document,Object.assign(Object.assign({},wn({formatter:null!==(n=t.params.format)&&void 0!==n?n:K,keyScale:u(1),max:s.values.value("max"),min:s.values.value("min"),pointerScale:q(t.params,i)})),{parser:R,value:r,viewProps:t.viewProps}));return new At(t.document,{blade:t.blade,props:v.fromObject({label:t.params.label}),value:r,valueController:o})},api:t=>t.controller instanceof At&&t.controller.valueController instanceof fn?new vr(t.controller):null},Pr={id:"text",type:"blade",core:Wt,accept(t){const e=lt(t,(t=>({parse:t.required.function,value:t.required.raw,view:t.required.constant("text"),format:t.optional.function,label:t.optional.string})));return e?{params:e}:null},controller(t){var e;const n=u(t.params.value),i=new Qe(t.document,{parser:t.params.parse,props:v.fromObject({formatter:null!==(e=t.params.format)&&void 0!==e?e:t=>String(t)}),value:n,viewProps:t.viewProps});return new At(t.document,{blade:t.blade,props:v.fromObject({label:t.params.label}),value:n,valueController:i})},api:t=>t.controller instanceof At&&t.controller.valueController instanceof Qe?new mr(t.controller):null};class kr extends gr{constructor(t){var e,n;const i=null!=t?t:{},s=null!==(e=i.document)&&void 0!==e?e:bt(),r=function(){const t=new cr(dr);return[Os,Ns,$s,qs,fs,us,hs,ps,jn,Zs,ar,or,Zt,be,De].forEach((e=>{t.register("core",e)})),t}();super(new _r(s,{expanded:i.expanded,blade:le(),props:v.fromObject({title:i.title}),viewProps:fe.create()}),r),this.pool_=r,this.containerElem_=null!==(n=i.container)&&void 0!==n?n:function(t){const e=t.createElement("div");return e.classList.add(Et("dfw")()),t.body&&t.body.appendChild(e),e}(s),this.containerElem_.appendChild(this.element),this.doc_=s,this.usesDefaultWrapper_=!i.container,this.setUpDefaultPlugins_()}get document(){if(!this.doc_)throw a.alreadyDisposed();return this.doc_}dispose(){const t=this.containerElem_;if(!t)throw a.alreadyDisposed();if(this.usesDefaultWrapper_){const e=t.parentElement;e&&e.removeChild(t)}this.containerElem_=null,this.doc_=null,super.dispose()}registerPlugin(t){t.css&&function(t,e,n){if(t.querySelector(`style[data-tp-style=${e}]`))return;const i=t.createElement("style");i.dataset.tpStyle=e,i.textContent=n,t.head.appendChild(i)}(this.document,`plugin-${t.id}`,t.css);("plugin"in t?[t.plugin]:"plugins"in t?t.plugins:[]).forEach((e=>{this.pool_.register(t.id,e)}))}setUpDefaultPlugins_(){this.registerPlugin({id:"default",css:'.tp-tbiv_b,.tp-coltxtv_ms,.tp-colswv_b,.tp-ckbv_i,.tp-sglv_i,.tp-mllv_i,.tp-grlv_g,.tp-txtv_i,.tp-p2dpv_p,.tp-colswv_sw,.tp-rotv_b,.tp-fldv_b,.tp-p2dv_b,.tp-btnv_b,.tp-lstv_s{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:rgba(0,0,0,0);border-width:0;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0;outline:none;padding:0}.tp-p2dv_b,.tp-btnv_b,.tp-lstv_s{background-color:var(--btn-bg);border-radius:var(--bld-br);color:var(--btn-fg);cursor:pointer;display:block;font-weight:bold;height:var(--cnt-usz);line-height:var(--cnt-usz);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-p2dv_b:hover,.tp-btnv_b:hover,.tp-lstv_s:hover{background-color:var(--btn-bg-h)}.tp-p2dv_b:focus,.tp-btnv_b:focus,.tp-lstv_s:focus{background-color:var(--btn-bg-f)}.tp-p2dv_b:active,.tp-btnv_b:active,.tp-lstv_s:active{background-color:var(--btn-bg-a)}.tp-p2dv_b:disabled,.tp-btnv_b:disabled,.tp-lstv_s:disabled{opacity:.5}.tp-rotv_c>.tp-cntv.tp-v-lst,.tp-tbpv_c>.tp-cntv.tp-v-lst,.tp-fldv_c>.tp-cntv.tp-v-lst{margin-bottom:calc(-1*var(--cnt-vp))}.tp-rotv_c>.tp-fldv.tp-v-lst .tp-fldv_c,.tp-tbpv_c>.tp-fldv.tp-v-lst .tp-fldv_c,.tp-fldv_c>.tp-fldv.tp-v-lst .tp-fldv_c{border-bottom-left-radius:0}.tp-rotv_c>.tp-fldv.tp-v-lst .tp-fldv_b,.tp-tbpv_c>.tp-fldv.tp-v-lst .tp-fldv_b,.tp-fldv_c>.tp-fldv.tp-v-lst .tp-fldv_b{border-bottom-left-radius:0}.tp-rotv_c>*:not(.tp-v-fst),.tp-tbpv_c>*:not(.tp-v-fst),.tp-fldv_c>*:not(.tp-v-fst){margin-top:var(--cnt-usp)}.tp-rotv_c>.tp-sprv:not(.tp-v-fst),.tp-tbpv_c>.tp-sprv:not(.tp-v-fst),.tp-fldv_c>.tp-sprv:not(.tp-v-fst),.tp-rotv_c>.tp-cntv:not(.tp-v-fst),.tp-tbpv_c>.tp-cntv:not(.tp-v-fst),.tp-fldv_c>.tp-cntv:not(.tp-v-fst){margin-top:var(--cnt-vp)}.tp-rotv_c>.tp-sprv+*:not(.tp-v-hidden),.tp-tbpv_c>.tp-sprv+*:not(.tp-v-hidden),.tp-fldv_c>.tp-sprv+*:not(.tp-v-hidden),.tp-rotv_c>.tp-cntv+*:not(.tp-v-hidden),.tp-tbpv_c>.tp-cntv+*:not(.tp-v-hidden),.tp-fldv_c>.tp-cntv+*:not(.tp-v-hidden){margin-top:var(--cnt-vp)}.tp-rotv_c>.tp-sprv:not(.tp-v-hidden)+.tp-sprv,.tp-tbpv_c>.tp-sprv:not(.tp-v-hidden)+.tp-sprv,.tp-fldv_c>.tp-sprv:not(.tp-v-hidden)+.tp-sprv,.tp-rotv_c>.tp-cntv:not(.tp-v-hidden)+.tp-cntv,.tp-tbpv_c>.tp-cntv:not(.tp-v-hidden)+.tp-cntv,.tp-fldv_c>.tp-cntv:not(.tp-v-hidden)+.tp-cntv{margin-top:0}.tp-tbpv_c>.tp-cntv,.tp-fldv_c>.tp-cntv{margin-left:4px}.tp-tbpv_c>.tp-fldv>.tp-fldv_b,.tp-fldv_c>.tp-fldv>.tp-fldv_b{border-top-left-radius:var(--bld-br);border-bottom-left-radius:var(--bld-br)}.tp-tbpv_c>.tp-fldv.tp-fldv-expanded>.tp-fldv_b,.tp-fldv_c>.tp-fldv.tp-fldv-expanded>.tp-fldv_b{border-bottom-left-radius:0}.tp-tbpv_c .tp-fldv>.tp-fldv_c,.tp-fldv_c .tp-fldv>.tp-fldv_c{border-bottom-left-radius:var(--bld-br)}.tp-tbpv_c>.tp-cntv+.tp-fldv>.tp-fldv_b,.tp-fldv_c>.tp-cntv+.tp-fldv>.tp-fldv_b{border-top-left-radius:0}.tp-tbpv_c>.tp-cntv+.tp-tabv>.tp-tabv_t,.tp-fldv_c>.tp-cntv+.tp-tabv>.tp-tabv_t{border-top-left-radius:0}.tp-tbpv_c>.tp-tabv>.tp-tabv_t,.tp-fldv_c>.tp-tabv>.tp-tabv_t{border-top-left-radius:var(--bld-br)}.tp-tbpv_c .tp-tabv>.tp-tabv_c,.tp-fldv_c .tp-tabv>.tp-tabv_c{border-bottom-left-radius:var(--bld-br)}.tp-rotv_b,.tp-fldv_b{background-color:var(--cnt-bg);color:var(--cnt-fg);cursor:pointer;display:block;height:calc(var(--cnt-usz) + 4px);line-height:calc(var(--cnt-usz) + 4px);overflow:hidden;padding-left:var(--cnt-hp);padding-right:calc(4px + var(--cnt-usz) + var(--cnt-hp));position:relative;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%;transition:border-radius .2s ease-in-out .2s}.tp-rotv_b:hover,.tp-fldv_b:hover{background-color:var(--cnt-bg-h)}.tp-rotv_b:focus,.tp-fldv_b:focus{background-color:var(--cnt-bg-f)}.tp-rotv_b:active,.tp-fldv_b:active{background-color:var(--cnt-bg-a)}.tp-rotv_b:disabled,.tp-fldv_b:disabled{opacity:.5}.tp-rotv_m,.tp-fldv_m{background:linear-gradient(to left, var(--cnt-fg), var(--cnt-fg) 2px, transparent 2px, transparent 4px, var(--cnt-fg) 4px);border-radius:2px;bottom:0;content:"";display:block;height:6px;right:calc(var(--cnt-hp) + (var(--cnt-usz) + 4px - 6px)/2 - 2px);margin:auto;opacity:.5;position:absolute;top:0;transform:rotate(90deg);transition:transform .2s ease-in-out;width:6px}.tp-rotv.tp-rotv-expanded .tp-rotv_m,.tp-fldv.tp-fldv-expanded>.tp-fldv_b>.tp-fldv_m{transform:none}.tp-rotv_c,.tp-fldv_c{box-sizing:border-box;height:0;opacity:0;overflow:hidden;padding-bottom:0;padding-top:0;position:relative;transition:height .2s ease-in-out,opacity .2s linear,padding .2s ease-in-out}.tp-rotv.tp-rotv-cpl:not(.tp-rotv-expanded) .tp-rotv_c,.tp-fldv.tp-fldv-cpl:not(.tp-fldv-expanded)>.tp-fldv_c{display:none}.tp-rotv.tp-rotv-expanded .tp-rotv_c,.tp-fldv.tp-fldv-expanded>.tp-fldv_c{opacity:1;padding-bottom:var(--cnt-vp);padding-top:var(--cnt-vp);transform:none;overflow:visible;transition:height .2s ease-in-out,opacity .2s linear .2s,padding .2s ease-in-out}.tp-txtv_i,.tp-p2dpv_p,.tp-colswv_sw{background-color:var(--in-bg);border-radius:var(--bld-br);box-sizing:border-box;color:var(--in-fg);font-family:inherit;height:var(--cnt-usz);line-height:var(--cnt-usz);min-width:0;width:100%}.tp-txtv_i:hover,.tp-p2dpv_p:hover,.tp-colswv_sw:hover{background-color:var(--in-bg-h)}.tp-txtv_i:focus,.tp-p2dpv_p:focus,.tp-colswv_sw:focus{background-color:var(--in-bg-f)}.tp-txtv_i:active,.tp-p2dpv_p:active,.tp-colswv_sw:active{background-color:var(--in-bg-a)}.tp-txtv_i:disabled,.tp-p2dpv_p:disabled,.tp-colswv_sw:disabled{opacity:.5}.tp-lstv,.tp-coltxtv_m{position:relative}.tp-lstv_s{padding:0 20px 0 4px;width:100%}.tp-lstv_m,.tp-coltxtv_mm{bottom:0;margin:auto;pointer-events:none;position:absolute;right:2px;top:0}.tp-lstv_m svg,.tp-coltxtv_mm svg{bottom:0;height:16px;margin:auto;position:absolute;right:0;top:0;width:16px}.tp-lstv_m svg path,.tp-coltxtv_mm svg path{fill:currentColor}.tp-sglv_i,.tp-mllv_i,.tp-grlv_g{background-color:var(--mo-bg);border-radius:var(--bld-br);box-sizing:border-box;color:var(--mo-fg);height:var(--cnt-usz);scrollbar-color:currentColor rgba(0,0,0,0);scrollbar-width:thin;width:100%}.tp-sglv_i::-webkit-scrollbar,.tp-mllv_i::-webkit-scrollbar,.tp-grlv_g::-webkit-scrollbar{height:8px;width:8px}.tp-sglv_i::-webkit-scrollbar-corner,.tp-mllv_i::-webkit-scrollbar-corner,.tp-grlv_g::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}.tp-sglv_i::-webkit-scrollbar-thumb,.tp-mllv_i::-webkit-scrollbar-thumb,.tp-grlv_g::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:currentColor;border:rgba(0,0,0,0) solid 2px;border-radius:4px}.tp-pndtxtv,.tp-coltxtv_w{display:flex}.tp-pndtxtv_a,.tp-coltxtv_c{width:100%}.tp-pndtxtv_a+.tp-pndtxtv_a,.tp-coltxtv_c+.tp-pndtxtv_a,.tp-pndtxtv_a+.tp-coltxtv_c,.tp-coltxtv_c+.tp-coltxtv_c{margin-left:2px}.tp-rotv{--bs-bg: var(--tp-base-background-color, hsl(230, 7%, 17%));--bs-br: var(--tp-base-border-radius, 6px);--bs-ff: var(--tp-base-font-family, Roboto Mono, Source Code Pro, Menlo, Courier, monospace);--bs-sh: var(--tp-base-shadow-color, rgba(0, 0, 0, 0.2));--bld-br: var(--tp-blade-border-radius, 2px);--bld-hp: var(--tp-blade-horizontal-padding, 4px);--bld-vw: var(--tp-blade-value-width, 160px);--btn-bg: var(--tp-button-background-color, hsl(230, 7%, 70%));--btn-bg-a: var(--tp-button-background-color-active, #d6d7db);--btn-bg-f: var(--tp-button-background-color-focus, #c8cad0);--btn-bg-h: var(--tp-button-background-color-hover, #bbbcc4);--btn-fg: var(--tp-button-foreground-color, hsl(230, 7%, 17%));--cnt-bg: var(--tp-container-background-color, rgba(187, 188, 196, 0.1));--cnt-bg-a: var(--tp-container-background-color-active, rgba(187, 188, 196, 0.25));--cnt-bg-f: var(--tp-container-background-color-focus, rgba(187, 188, 196, 0.2));--cnt-bg-h: var(--tp-container-background-color-hover, rgba(187, 188, 196, 0.15));--cnt-fg: var(--tp-container-foreground-color, hsl(230, 7%, 75%));--cnt-hp: var(--tp-container-horizontal-padding, 4px);--cnt-vp: var(--tp-container-vertical-padding, 4px);--cnt-usp: var(--tp-container-unit-spacing, 4px);--cnt-usz: var(--tp-container-unit-size, 20px);--in-bg: var(--tp-input-background-color, rgba(187, 188, 196, 0.1));--in-bg-a: var(--tp-input-background-color-active, rgba(187, 188, 196, 0.25));--in-bg-f: var(--tp-input-background-color-focus, rgba(187, 188, 196, 0.2));--in-bg-h: var(--tp-input-background-color-hover, rgba(187, 188, 196, 0.15));--in-fg: var(--tp-input-foreground-color, hsl(230, 7%, 75%));--lbl-fg: var(--tp-label-foreground-color, rgba(187, 188, 196, 0.7));--mo-bg: var(--tp-monitor-background-color, rgba(0, 0, 0, 0.2));--mo-fg: var(--tp-monitor-foreground-color, rgba(187, 188, 196, 0.7));--grv-fg: var(--tp-groove-foreground-color, rgba(187, 188, 196, 0.1))}.tp-btnv_b{width:100%}.tp-btnv_t{text-align:center}.tp-ckbv_l{display:block;position:relative}.tp-ckbv_i{left:0;opacity:0;position:absolute;top:0}.tp-ckbv_w{background-color:var(--in-bg);border-radius:var(--bld-br);cursor:pointer;display:block;height:var(--cnt-usz);position:relative;width:var(--cnt-usz)}.tp-ckbv_w svg{bottom:0;display:block;height:16px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;width:16px}.tp-ckbv_w svg path{fill:none;stroke:var(--in-fg);stroke-width:2}.tp-ckbv_i:hover+.tp-ckbv_w{background-color:var(--in-bg-h)}.tp-ckbv_i:focus+.tp-ckbv_w{background-color:var(--in-bg-f)}.tp-ckbv_i:active+.tp-ckbv_w{background-color:var(--in-bg-a)}.tp-ckbv_i:checked+.tp-ckbv_w svg{opacity:1}.tp-ckbv.tp-v-disabled .tp-ckbv_w{opacity:.5}.tp-colv{position:relative}.tp-colv_h{display:flex}.tp-colv_s{flex-grow:0;flex-shrink:0;width:var(--cnt-usz)}.tp-colv_t{flex:1;margin-left:4px}.tp-colv_p{height:0;margin-top:0;opacity:0;overflow:hidden;transition:height .2s ease-in-out,opacity .2s linear,margin .2s ease-in-out}.tp-colv.tp-colv-expanded.tp-colv-cpl .tp-colv_p{overflow:visible}.tp-colv.tp-colv-expanded .tp-colv_p{margin-top:var(--cnt-usp);opacity:1}.tp-colv .tp-popv{left:calc(-1*var(--cnt-hp));right:calc(-1*var(--cnt-hp));top:var(--cnt-usz)}.tp-colpv_h,.tp-colpv_ap{margin-left:6px;margin-right:6px}.tp-colpv_h{margin-top:var(--cnt-usp)}.tp-colpv_rgb{display:flex;margin-top:var(--cnt-usp);width:100%}.tp-colpv_a{display:flex;margin-top:var(--cnt-vp);padding-top:calc(var(--cnt-vp) + 2px);position:relative}.tp-colpv_a::before{background-color:var(--grv-fg);content:"";height:2px;left:calc(-1*var(--cnt-hp));position:absolute;right:calc(-1*var(--cnt-hp));top:0}.tp-colpv.tp-v-disabled .tp-colpv_a::before{opacity:.5}.tp-colpv_ap{align-items:center;display:flex;flex:3}.tp-colpv_at{flex:1;margin-left:4px}.tp-svpv{border-radius:var(--bld-br);outline:none;overflow:hidden;position:relative}.tp-svpv.tp-v-disabled{opacity:.5}.tp-svpv_c{cursor:crosshair;display:block;height:calc(var(--cnt-usz)*4);width:100%}.tp-svpv_m{border-radius:100%;border:rgba(255,255,255,.75) solid 2px;box-sizing:border-box;filter:drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));height:12px;margin-left:-6px;margin-top:-6px;pointer-events:none;position:absolute;width:12px}.tp-svpv:focus .tp-svpv_m{border-color:#fff}.tp-hplv{cursor:pointer;height:var(--cnt-usz);outline:none;position:relative}.tp-hplv.tp-v-disabled{opacity:.5}.tp-hplv_c{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAABCAYAAABubagXAAAAQ0lEQVQoU2P8z8Dwn0GCgQEDi2OK/RBgYHjBgIpfovFh8j8YBIgzFGQxuqEgPhaDOT5gOhPkdCxOZeBg+IDFZZiGAgCaSSMYtcRHLgAAAABJRU5ErkJggg==);background-position:left top;background-repeat:no-repeat;background-size:100% 100%;border-radius:2px;display:block;height:4px;left:0;margin-top:-2px;position:absolute;top:50%;width:100%}.tp-hplv_m{border-radius:var(--bld-br);border:rgba(255,255,255,.75) solid 2px;box-shadow:0 0 2px rgba(0,0,0,.1);box-sizing:border-box;height:12px;left:50%;margin-left:-6px;margin-top:-6px;pointer-events:none;position:absolute;top:50%;width:12px}.tp-hplv:focus .tp-hplv_m{border-color:#fff}.tp-aplv{cursor:pointer;height:var(--cnt-usz);outline:none;position:relative;width:100%}.tp-aplv.tp-v-disabled{opacity:.5}.tp-aplv_b{background-color:#fff;background-image:linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%),linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);background-size:4px 4px;background-position:0 0,2px 2px;border-radius:2px;display:block;height:4px;left:0;margin-top:-2px;overflow:hidden;position:absolute;top:50%;width:100%}.tp-aplv_c{bottom:0;left:0;position:absolute;right:0;top:0}.tp-aplv_m{background-color:#fff;background-image:linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%),linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);background-size:12px 12px;background-position:0 0,6px 6px;border-radius:var(--bld-br);box-shadow:0 0 2px rgba(0,0,0,.1);height:12px;left:50%;margin-left:-6px;margin-top:-6px;overflow:hidden;pointer-events:none;position:absolute;top:50%;width:12px}.tp-aplv_p{border-radius:var(--bld-br);border:rgba(255,255,255,.75) solid 2px;box-sizing:border-box;bottom:0;left:0;position:absolute;right:0;top:0}.tp-aplv:focus .tp-aplv_p{border-color:#fff}.tp-colswv{background-color:#fff;background-image:linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%),linear-gradient(to top right, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);background-size:10px 10px;background-position:0 0,5px 5px;border-radius:var(--bld-br);overflow:hidden}.tp-colswv.tp-v-disabled{opacity:.5}.tp-colswv_sw{border-radius:0}.tp-colswv_b{cursor:pointer;display:block;height:var(--cnt-usz);left:0;position:absolute;top:0;width:var(--cnt-usz)}.tp-colswv_b:focus::after{border:rgba(255,255,255,.75) solid 2px;border-radius:var(--bld-br);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.tp-coltxtv{display:flex;width:100%}.tp-coltxtv_m{margin-right:4px}.tp-coltxtv_ms{border-radius:var(--bld-br);color:var(--lbl-fg);cursor:pointer;height:var(--cnt-usz);line-height:var(--cnt-usz);padding:0 18px 0 4px}.tp-coltxtv_ms:hover{background-color:var(--in-bg-h)}.tp-coltxtv_ms:focus{background-color:var(--in-bg-f)}.tp-coltxtv_ms:active{background-color:var(--in-bg-a)}.tp-coltxtv_mm{color:var(--lbl-fg)}.tp-coltxtv.tp-v-disabled .tp-coltxtv_mm{opacity:.5}.tp-coltxtv_w{flex:1}.tp-dfwv{position:absolute;top:8px;right:8px;width:256px}.tp-fldv{position:relative}.tp-fldv_t{padding-left:4px}.tp-fldv_b:disabled .tp-fldv_m{display:none}.tp-fldv_c{padding-left:4px}.tp-fldv_i{bottom:0;color:var(--cnt-bg);left:0;overflow:hidden;position:absolute;top:calc(var(--cnt-usz) + 4px);width:max(var(--bs-br),4px)}.tp-fldv_i::before{background-color:currentColor;bottom:0;content:"";left:0;position:absolute;top:0;width:4px}.tp-fldv_b:hover+.tp-fldv_i{color:var(--cnt-bg-h)}.tp-fldv_b:focus+.tp-fldv_i{color:var(--cnt-bg-f)}.tp-fldv_b:active+.tp-fldv_i{color:var(--cnt-bg-a)}.tp-fldv.tp-v-disabled>.tp-fldv_i{opacity:.5}.tp-grlv{position:relative}.tp-grlv_g{display:block;height:calc(var(--cnt-usz)*3)}.tp-grlv_g polyline{fill:none;stroke:var(--mo-fg);stroke-linejoin:round}.tp-grlv_t{margin-top:-4px;transition:left .05s,top .05s;visibility:hidden}.tp-grlv_t.tp-grlv_t-a{visibility:visible}.tp-grlv_t.tp-grlv_t-in{transition:none}.tp-grlv.tp-v-disabled .tp-grlv_g{opacity:.5}.tp-grlv .tp-ttv{background-color:var(--mo-fg)}.tp-grlv .tp-ttv::before{border-top-color:var(--mo-fg)}.tp-lblv{align-items:center;display:flex;line-height:1.3;padding-left:var(--cnt-hp);padding-right:var(--cnt-hp)}.tp-lblv.tp-lblv-nol{display:block}.tp-lblv_l{color:var(--lbl-fg);flex:1;-webkit-hyphens:auto;hyphens:auto;overflow:hidden;padding-left:4px;padding-right:16px}.tp-lblv.tp-v-disabled .tp-lblv_l{opacity:.5}.tp-lblv.tp-lblv-nol .tp-lblv_l{display:none}.tp-lblv_v{align-self:flex-start;flex-grow:0;flex-shrink:0;width:var(--bld-vw)}.tp-lblv.tp-lblv-nol .tp-lblv_v{width:100%}.tp-lstv_s{padding:0 20px 0 var(--bld-hp);width:100%}.tp-lstv_m{color:var(--btn-fg)}.tp-sglv_i{padding-left:var(--bld-hp);padding-right:var(--bld-hp)}.tp-sglv.tp-v-disabled .tp-sglv_i{opacity:.5}.tp-mllv_i{display:block;height:calc(var(--cnt-usz)*3);line-height:var(--cnt-usz);padding-left:var(--bld-hp);padding-right:var(--bld-hp);resize:none;white-space:pre}.tp-mllv.tp-v-disabled .tp-mllv_i{opacity:.5}.tp-p2dv{position:relative}.tp-p2dv_h{display:flex}.tp-p2dv_b{height:var(--cnt-usz);margin-right:4px;position:relative;width:var(--cnt-usz)}.tp-p2dv_b svg{display:block;height:16px;left:50%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}.tp-p2dv_b svg path{stroke:currentColor;stroke-width:2}.tp-p2dv_b svg circle{fill:currentColor}.tp-p2dv_t{flex:1}.tp-p2dv_p{height:0;margin-top:0;opacity:0;overflow:hidden;transition:height .2s ease-in-out,opacity .2s linear,margin .2s ease-in-out}.tp-p2dv.tp-p2dv-expanded .tp-p2dv_p{margin-top:var(--cnt-usp);opacity:1}.tp-p2dv .tp-popv{left:calc(-1*var(--cnt-hp));right:calc(-1*var(--cnt-hp));top:var(--cnt-usz)}.tp-p2dpv{padding-left:calc(var(--cnt-usz) + 4px)}.tp-p2dpv_p{cursor:crosshair;height:0;overflow:hidden;padding-bottom:100%;position:relative}.tp-p2dpv.tp-v-disabled .tp-p2dpv_p{opacity:.5}.tp-p2dpv_g{display:block;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.tp-p2dpv_ax{opacity:.1;stroke:var(--in-fg);stroke-dasharray:1}.tp-p2dpv_l{opacity:.5;stroke:var(--in-fg);stroke-dasharray:1}.tp-p2dpv_m{border:var(--in-fg) solid 1px;border-radius:50%;box-sizing:border-box;height:4px;margin-left:-2px;margin-top:-2px;position:absolute;width:4px}.tp-p2dpv_p:focus .tp-p2dpv_m{background-color:var(--in-fg);border-width:0}.tp-popv{background-color:var(--bs-bg);border-radius:var(--bs-br);box-shadow:0 2px 4px var(--bs-sh);display:none;max-width:var(--bld-vw);padding:var(--cnt-vp) var(--cnt-hp);position:absolute;visibility:hidden;z-index:1000}.tp-popv.tp-popv-v{display:block;visibility:visible}.tp-sldv.tp-v-disabled{opacity:.5}.tp-sldv_t{box-sizing:border-box;cursor:pointer;height:var(--cnt-usz);margin:0 6px;outline:none;position:relative}.tp-sldv_t::before{background-color:var(--in-bg);border-radius:1px;bottom:0;content:"";display:block;height:2px;left:0;margin:auto;position:absolute;right:0;top:0}.tp-sldv_k{height:100%;left:0;position:absolute;top:0}.tp-sldv_k::before{background-color:var(--in-fg);border-radius:1px;bottom:0;content:"";display:block;height:2px;left:0;margin-bottom:auto;margin-top:auto;position:absolute;right:0;top:0}.tp-sldv_k::after{background-color:var(--btn-bg);border-radius:var(--bld-br);bottom:0;content:"";display:block;height:12px;margin-bottom:auto;margin-top:auto;position:absolute;right:-6px;top:0;width:12px}.tp-sldv_t:hover .tp-sldv_k::after{background-color:var(--btn-bg-h)}.tp-sldv_t:focus .tp-sldv_k::after{background-color:var(--btn-bg-f)}.tp-sldv_t:active .tp-sldv_k::after{background-color:var(--btn-bg-a)}.tp-sldtxtv{display:flex}.tp-sldtxtv_s{flex:2}.tp-sldtxtv_t{flex:1;margin-left:4px}.tp-tabv{position:relative}.tp-tabv_t{align-items:flex-end;color:var(--cnt-bg);display:flex;overflow:hidden;position:relative}.tp-tabv_t:hover{color:var(--cnt-bg-h)}.tp-tabv_t:has(*:focus){color:var(--cnt-bg-f)}.tp-tabv_t:has(*:active){color:var(--cnt-bg-a)}.tp-tabv_t::before{background-color:currentColor;bottom:0;content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0}.tp-tabv.tp-v-disabled .tp-tabv_t::before{opacity:.5}.tp-tabv.tp-tabv-nop .tp-tabv_t{height:calc(var(--cnt-usz) + 4px);position:relative}.tp-tabv.tp-tabv-nop .tp-tabv_t::before{background-color:var(--cnt-bg);bottom:0;content:"";height:2px;left:0;position:absolute;right:0}.tp-tabv_i{bottom:0;color:var(--cnt-bg);left:0;overflow:hidden;position:absolute;top:calc(var(--cnt-usz) + 4px);width:max(var(--bs-br),4px)}.tp-tabv_i::before{background-color:currentColor;bottom:0;content:"";left:0;position:absolute;top:0;width:4px}.tp-tabv_t:hover+.tp-tabv_i{color:var(--cnt-bg-h)}.tp-tabv_t:has(*:focus)+.tp-tabv_i{color:var(--cnt-bg-f)}.tp-tabv_t:has(*:active)+.tp-tabv_i{color:var(--cnt-bg-a)}.tp-tabv.tp-v-disabled>.tp-tabv_i{opacity:.5}.tp-tbiv{flex:1;min-width:0;position:relative}.tp-tbiv+.tp-tbiv{margin-left:2px}.tp-tbiv+.tp-tbiv.tp-v-disabled::before{opacity:.5}.tp-tbiv_b{display:block;padding-left:calc(var(--cnt-hp) + 4px);padding-right:calc(var(--cnt-hp) + 4px);position:relative;width:100%}.tp-tbiv_b:disabled{opacity:.5}.tp-tbiv_b::before{background-color:var(--cnt-bg);bottom:2px;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.tp-tbiv_b:hover::before{background-color:var(--cnt-bg-h)}.tp-tbiv_b:focus::before{background-color:var(--cnt-bg-f)}.tp-tbiv_b:active::before{background-color:var(--cnt-bg-a)}.tp-tbiv_t{color:var(--cnt-fg);height:calc(var(--cnt-usz) + 4px);line-height:calc(var(--cnt-usz) + 4px);opacity:.5;overflow:hidden;position:relative;text-overflow:ellipsis}.tp-tbiv.tp-tbiv-sel .tp-tbiv_t{opacity:1}.tp-tbpv_c{padding-bottom:var(--cnt-vp);padding-left:4px;padding-top:var(--cnt-vp)}.tp-txtv{position:relative}.tp-txtv_i{padding-left:var(--bld-hp);padding-right:var(--bld-hp)}.tp-txtv.tp-txtv-fst .tp-txtv_i{border-bottom-right-radius:0;border-top-right-radius:0}.tp-txtv.tp-txtv-mid .tp-txtv_i{border-radius:0}.tp-txtv.tp-txtv-lst .tp-txtv_i{border-bottom-left-radius:0;border-top-left-radius:0}.tp-txtv.tp-txtv-num .tp-txtv_i{text-align:right}.tp-txtv.tp-txtv-drg .tp-txtv_i{opacity:.3}.tp-txtv_k{cursor:pointer;height:100%;left:calc(var(--bld-hp) - 5px);position:absolute;top:0;width:12px}.tp-txtv_k::before{background-color:var(--in-fg);border-radius:1px;bottom:0;content:"";height:calc(var(--cnt-usz) - 4px);left:50%;margin-bottom:auto;margin-left:-1px;margin-top:auto;opacity:.1;position:absolute;top:0;transition:border-radius .1s,height .1s,transform .1s,width .1s;width:2px}.tp-txtv_k:hover::before,.tp-txtv.tp-txtv-drg .tp-txtv_k::before{opacity:1}.tp-txtv.tp-txtv-drg .tp-txtv_k::before{border-radius:50%;height:4px;transform:translateX(-1px);width:4px}.tp-txtv_g{bottom:0;display:block;height:8px;left:50%;margin:auto;overflow:visible;pointer-events:none;position:absolute;top:0;visibility:hidden;width:100%}.tp-txtv.tp-txtv-drg .tp-txtv_g{visibility:visible}.tp-txtv_gb{fill:none;stroke:var(--in-fg);stroke-dasharray:1}.tp-txtv_gh{fill:none;stroke:var(--in-fg)}.tp-txtv .tp-ttv{margin-left:6px;visibility:hidden}.tp-txtv.tp-txtv-drg .tp-ttv{visibility:visible}.tp-ttv{background-color:var(--in-fg);border-radius:var(--bld-br);color:var(--bs-bg);padding:2px 4px;pointer-events:none;position:absolute;transform:translate(-50%, -100%)}.tp-ttv::before{border-color:var(--in-fg) rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);border-style:solid;border-width:2px;box-sizing:border-box;content:"";font-size:.9em;height:4px;left:50%;margin-left:-2px;position:absolute;top:100%;width:4px}.tp-rotv{background-color:var(--bs-bg);border-radius:var(--bs-br);box-shadow:0 2px 4px var(--bs-sh);font-family:var(--bs-ff);font-size:11px;font-weight:500;line-height:1;text-align:left}.tp-rotv_b{border-bottom-left-radius:var(--bs-br);border-bottom-right-radius:var(--bs-br);border-top-left-radius:var(--bs-br);border-top-right-radius:var(--bs-br);padding-left:calc(4px + var(--cnt-usz) + var(--cnt-hp));text-align:center}.tp-rotv.tp-rotv-expanded .tp-rotv_b{border-bottom-left-radius:0;border-bottom-right-radius:0;transition-delay:0s;transition-duration:0s}.tp-rotv.tp-rotv-not>.tp-rotv_b{display:none}.tp-rotv_b:disabled .tp-rotv_m{display:none}.tp-rotv_c>.tp-fldv.tp-v-lst>.tp-fldv_c{border-bottom-left-radius:var(--bs-br);border-bottom-right-radius:var(--bs-br)}.tp-rotv_c>.tp-fldv.tp-v-lst>.tp-fldv_i{border-bottom-left-radius:var(--bs-br)}.tp-rotv_c>.tp-fldv.tp-v-lst:not(.tp-fldv-expanded)>.tp-fldv_b{border-bottom-left-radius:var(--bs-br);border-bottom-right-radius:var(--bs-br)}.tp-rotv_c>.tp-fldv.tp-v-lst.tp-fldv-expanded>.tp-fldv_b{transition-delay:0s;transition-duration:0s}.tp-rotv_c .tp-fldv.tp-v-vlst:not(.tp-fldv-expanded)>.tp-fldv_b{border-bottom-right-radius:var(--bs-br)}.tp-rotv.tp-rotv-not .tp-rotv_c>.tp-fldv.tp-v-fst{margin-top:calc(-1*var(--cnt-vp))}.tp-rotv.tp-rotv-not .tp-rotv_c>.tp-fldv.tp-v-fst>.tp-fldv_b{border-top-left-radius:var(--bs-br);border-top-right-radius:var(--bs-br)}.tp-rotv_c>.tp-tabv.tp-v-lst>.tp-tabv_c{border-bottom-left-radius:var(--bs-br);border-bottom-right-radius:var(--bs-br)}.tp-rotv_c>.tp-tabv.tp-v-lst>.tp-tabv_i{border-bottom-left-radius:var(--bs-br)}.tp-rotv.tp-rotv-not .tp-rotv_c>.tp-tabv.tp-v-fst{margin-top:calc(-1*var(--cnt-vp))}.tp-rotv.tp-rotv-not .tp-rotv_c>.tp-tabv.tp-v-fst>.tp-tabv_t{border-top-left-radius:var(--bs-br);border-top-right-radius:var(--bs-br)}.tp-rotv.tp-v-disabled,.tp-rotv .tp-v-disabled{pointer-events:none}.tp-rotv.tp-v-hidden,.tp-rotv .tp-v-hidden{display:none}.tp-sprv_r{background-color:var(--grv-fg);border-width:0;display:block;height:2px;margin:0;width:100%}.tp-sprv.tp-v-disabled .tp-sprv_r{opacity:.5}',plugins:[br,yr,Cr,De,Pr]})}}const Er=new Qt("4.0.3");export{W as BladeApi,Ft as ButtonApi,he as FolderApi,hr as ListBladeApi,Ae as ListInputBindingApi,kr as Pane,Qt as Semver,ur as SeparatorBladeApi,vr as SliderBladeApi,_s as SliderInputBindingApi,Ee as TabApi,Ve as TabPageApi,mr as TextBladeApi,Z as TpChangeEvent,Er as VERSION};