@cardstack/boxel-cli 0.10.0 → 0.10.1-unstable.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-realms/pretui/README.md +49 -0
- package/bundled-realms/pretui/color/LICENSE +21 -0
- package/bundled-realms/pretui/color/README.md +155 -0
- package/bundled-realms/pretui/color/index.js +78 -0
- package/bundled-realms/pretui/color-engine.ts +1243 -0
- package/bundled-realms/pretui/components/accordion.gts +58 -0
- package/bundled-realms/pretui/components/accordion.md +60 -0
- package/bundled-realms/pretui/components/accordion.usage.gts +129 -0
- package/bundled-realms/pretui/components/action-bar.gts +407 -0
- package/bundled-realms/pretui/components/action-bar.md +48 -0
- package/bundled-realms/pretui/components/action-bar.usage.gts +213 -0
- package/bundled-realms/pretui/components/affix.gts +116 -0
- package/bundled-realms/pretui/components/affix.md +54 -0
- package/bundled-realms/pretui/components/affix.usage.gts +73 -0
- package/bundled-realms/pretui/components/agent-question.gts +116 -0
- package/bundled-realms/pretui/components/agent-question.md +50 -0
- package/bundled-realms/pretui/components/agent-question.usage.gts +22 -0
- package/bundled-realms/pretui/components/ai-instructions.gts +378 -0
- package/bundled-realms/pretui/components/ai-instructions.md +49 -0
- package/bundled-realms/pretui/components/ai-instructions.usage.gts +101 -0
- package/bundled-realms/pretui/components/alert-dialog.gts +223 -0
- package/bundled-realms/pretui/components/alert-dialog.md +76 -0
- package/bundled-realms/pretui/components/alert-dialog.usage.gts +128 -0
- package/bundled-realms/pretui/components/alert.gts +163 -0
- package/bundled-realms/pretui/components/alert.md +57 -0
- package/bundled-realms/pretui/components/alert.usage.gts +99 -0
- package/bundled-realms/pretui/components/amount-input.gts +621 -0
- package/bundled-realms/pretui/components/amount-input.md +63 -0
- package/bundled-realms/pretui/components/amount-input.usage.gts +170 -0
- package/bundled-realms/pretui/components/angle-dial.gts +367 -0
- package/bundled-realms/pretui/components/angle-dial.md +56 -0
- package/bundled-realms/pretui/components/angle-dial.usage.gts +166 -0
- package/bundled-realms/pretui/components/animated-image.gts +291 -0
- package/bundled-realms/pretui/components/animated-image.md +49 -0
- package/bundled-realms/pretui/components/animated-image.usage.gts +127 -0
- package/bundled-realms/pretui/components/app-shell.gts +19 -0
- package/bundled-realms/pretui/components/app-shell.md +43 -0
- package/bundled-realms/pretui/components/app-shell.usage.gts +52 -0
- package/bundled-realms/pretui/components/approval-footer.gts +69 -0
- package/bundled-realms/pretui/components/approval-footer.md +49 -0
- package/bundled-realms/pretui/components/approval-footer.usage.gts +22 -0
- package/bundled-realms/pretui/components/aspect-ratio.gts +328 -0
- package/bundled-realms/pretui/components/aspect-ratio.md +72 -0
- package/bundled-realms/pretui/components/aspect-ratio.usage.gts +174 -0
- package/bundled-realms/pretui/components/asset-grid.gts +542 -0
- package/bundled-realms/pretui/components/asset-grid.md +54 -0
- package/bundled-realms/pretui/components/asset-grid.usage.gts +171 -0
- package/bundled-realms/pretui/components/asset-well.gts +731 -0
- package/bundled-realms/pretui/components/asset-well.md +72 -0
- package/bundled-realms/pretui/components/asset-well.usage.gts +264 -0
- package/bundled-realms/pretui/components/audio-player.gts +152 -0
- package/bundled-realms/pretui/components/audio-player.md +51 -0
- package/bundled-realms/pretui/components/audio-player.usage.gts +118 -0
- package/bundled-realms/pretui/components/autocomplete.gts +1150 -0
- package/bundled-realms/pretui/components/autocomplete.md +67 -0
- package/bundled-realms/pretui/components/autocomplete.usage.gts +339 -0
- package/bundled-realms/pretui/components/avatar-group.gts +30 -0
- package/bundled-realms/pretui/components/avatar-group.md +48 -0
- package/bundled-realms/pretui/components/avatar-group.usage.gts +39 -0
- package/bundled-realms/pretui/components/avatar.gts +134 -0
- package/bundled-realms/pretui/components/avatar.md +69 -0
- package/bundled-realms/pretui/components/avatar.usage.gts +101 -0
- package/bundled-realms/pretui/components/backdrop.gts +179 -0
- package/bundled-realms/pretui/components/backdrop.md +56 -0
- package/bundled-realms/pretui/components/backdrop.usage.gts +223 -0
- package/bundled-realms/pretui/components/background-field.gts +743 -0
- package/bundled-realms/pretui/components/background-field.md +62 -0
- package/bundled-realms/pretui/components/background-field.usage.gts +328 -0
- package/bundled-realms/pretui/components/badge.gts +188 -0
- package/bundled-realms/pretui/components/badge.md +62 -0
- package/bundled-realms/pretui/components/badge.usage.gts +73 -0
- package/bundled-realms/pretui/components/bar-list.gts +255 -0
- package/bundled-realms/pretui/components/bar-list.md +49 -0
- package/bundled-realms/pretui/components/bar-list.usage.gts +129 -0
- package/bundled-realms/pretui/components/board.gts +108 -0
- package/bundled-realms/pretui/components/board.md +54 -0
- package/bundled-realms/pretui/components/board.usage.gts +321 -0
- package/bundled-realms/pretui/components/bottom-nav.gts +217 -0
- package/bundled-realms/pretui/components/bottom-nav.md +64 -0
- package/bundled-realms/pretui/components/bottom-nav.usage.gts +68 -0
- package/bundled-realms/pretui/components/breadcrumb.gts +56 -0
- package/bundled-realms/pretui/components/breadcrumb.md +52 -0
- package/bundled-realms/pretui/components/breadcrumb.usage.gts +24 -0
- package/bundled-realms/pretui/components/broken-link.gts +46 -0
- package/bundled-realms/pretui/components/broken-link.md +50 -0
- package/bundled-realms/pretui/components/broken-link.usage.gts +57 -0
- package/bundled-realms/pretui/components/button-group.gts +246 -0
- package/bundled-realms/pretui/components/button-group.md +46 -0
- package/bundled-realms/pretui/components/button-group.usage.gts +137 -0
- package/bundled-realms/pretui/components/button.examples.gts +67 -0
- package/bundled-realms/pretui/components/button.gts +594 -0
- package/bundled-realms/pretui/components/button.md +81 -0
- package/bundled-realms/pretui/components/button.usage.gts +159 -0
- package/bundled-realms/pretui/components/calendar.gts +457 -0
- package/bundled-realms/pretui/components/calendar.md +57 -0
- package/bundled-realms/pretui/components/calendar.usage.gts +161 -0
- package/bundled-realms/pretui/components/callout.gts +2 -0
- package/bundled-realms/pretui/components/callout.md +40 -0
- package/bundled-realms/pretui/components/callout.usage.gts +48 -0
- package/bundled-realms/pretui/components/card.gts +637 -0
- package/bundled-realms/pretui/components/card.md +105 -0
- package/bundled-realms/pretui/components/card.usage.gts +279 -0
- package/bundled-realms/pretui/components/carousel.gts +583 -0
- package/bundled-realms/pretui/components/carousel.md +53 -0
- package/bundled-realms/pretui/components/carousel.usage.gts +220 -0
- package/bundled-realms/pretui/components/cascader.gts +436 -0
- package/bundled-realms/pretui/components/cascader.md +61 -0
- package/bundled-realms/pretui/components/cascader.usage.gts +79 -0
- package/bundled-realms/pretui/components/channel-slider.gts +251 -0
- package/bundled-realms/pretui/components/channel-slider.md +51 -0
- package/bundled-realms/pretui/components/channel-slider.usage.gts +104 -0
- package/bundled-realms/pretui/components/chart.gts +1011 -0
- package/bundled-realms/pretui/components/chart.md +60 -0
- package/bundled-realms/pretui/components/chart.usage.gts +660 -0
- package/bundled-realms/pretui/components/checkbox-card.gts +82 -0
- package/bundled-realms/pretui/components/checkbox-card.md +73 -0
- package/bundled-realms/pretui/components/checkbox-card.usage.gts +114 -0
- package/bundled-realms/pretui/components/checkbox.examples.gts +61 -0
- package/bundled-realms/pretui/components/checkbox.gts +123 -0
- package/bundled-realms/pretui/components/checkbox.md +55 -0
- package/bundled-realms/pretui/components/checkbox.usage.gts +31 -0
- package/bundled-realms/pretui/components/chip.gts +136 -0
- package/bundled-realms/pretui/components/chip.md +54 -0
- package/bundled-realms/pretui/components/chip.usage.gts +97 -0
- package/bundled-realms/pretui/components/code-block.gts +888 -0
- package/bundled-realms/pretui/components/code-block.md +61 -0
- package/bundled-realms/pretui/components/code-block.usage.gts +374 -0
- package/bundled-realms/pretui/components/collapsed-turn.gts +44 -0
- package/bundled-realms/pretui/components/collapsed-turn.md +48 -0
- package/bundled-realms/pretui/components/collapsed-turn.usage.gts +21 -0
- package/bundled-realms/pretui/components/collapsible.gts +283 -0
- package/bundled-realms/pretui/components/collapsible.md +69 -0
- package/bundled-realms/pretui/components/collapsible.usage.gts +173 -0
- package/bundled-realms/pretui/components/color-area.gts +339 -0
- package/bundled-realms/pretui/components/color-area.md +49 -0
- package/bundled-realms/pretui/components/color-area.usage.gts +72 -0
- package/bundled-realms/pretui/components/color-field.gts +179 -0
- package/bundled-realms/pretui/components/color-field.md +47 -0
- package/bundled-realms/pretui/components/color-field.usage.gts +87 -0
- package/bundled-realms/pretui/components/color-palette.gts +198 -0
- package/bundled-realms/pretui/components/color-palette.md +48 -0
- package/bundled-realms/pretui/components/color-picker.gts +721 -0
- package/bundled-realms/pretui/components/color-picker.md +59 -0
- package/bundled-realms/pretui/components/color-picker.usage.gts +122 -0
- package/bundled-realms/pretui/components/color-stop-editor.gts +184 -0
- package/bundled-realms/pretui/components/color-stop-editor.md +46 -0
- package/bundled-realms/pretui/components/color-stop-editor.usage.gts +75 -0
- package/bundled-realms/pretui/components/combobox.gts +333 -0
- package/bundled-realms/pretui/components/combobox.md +49 -0
- package/bundled-realms/pretui/components/combobox.usage.gts +143 -0
- package/bundled-realms/pretui/components/command-palette.gts +982 -0
- package/bundled-realms/pretui/components/command-palette.md +47 -0
- package/bundled-realms/pretui/components/command-palette.usage.gts +95 -0
- package/bundled-realms/pretui/components/command.gts +2 -0
- package/bundled-realms/pretui/components/command.md +45 -0
- package/bundled-realms/pretui/components/command.usage.gts +58 -0
- package/bundled-realms/pretui/components/compaction-chip.gts +273 -0
- package/bundled-realms/pretui/components/compaction-chip.md +45 -0
- package/bundled-realms/pretui/components/compaction-chip.usage.gts +110 -0
- package/bundled-realms/pretui/components/comparison.gts +223 -0
- package/bundled-realms/pretui/components/comparison.md +46 -0
- package/bundled-realms/pretui/components/comparison.usage.gts +148 -0
- package/bundled-realms/pretui/components/composer.gts +566 -0
- package/bundled-realms/pretui/components/composer.md +59 -0
- package/bundled-realms/pretui/components/composer.usage.gts +173 -0
- package/bundled-realms/pretui/components/compound-field.gts +289 -0
- package/bundled-realms/pretui/components/compound-field.md +66 -0
- package/bundled-realms/pretui/components/compound-field.usage.gts +378 -0
- package/bundled-realms/pretui/components/contact-link.gts +583 -0
- package/bundled-realms/pretui/components/contact-link.md +53 -0
- package/bundled-realms/pretui/components/contact-link.usage.gts +273 -0
- package/bundled-realms/pretui/components/context-menu.gts +811 -0
- package/bundled-realms/pretui/components/context-menu.md +74 -0
- package/bundled-realms/pretui/components/context-menu.usage.gts +244 -0
- package/bundled-realms/pretui/components/copy-button.gts +237 -0
- package/bundled-realms/pretui/components/copy-button.md +71 -0
- package/bundled-realms/pretui/components/copy-button.usage.gts +135 -0
- package/bundled-realms/pretui/components/copy-fit.gts +396 -0
- package/bundled-realms/pretui/components/copy-fit.md +60 -0
- package/bundled-realms/pretui/components/copy-fit.usage.gts +200 -0
- package/bundled-realms/pretui/components/cta-band.gts +285 -0
- package/bundled-realms/pretui/components/cta-band.md +50 -0
- package/bundled-realms/pretui/components/cta-band.usage.gts +208 -0
- package/bundled-realms/pretui/components/cue.gts +180 -0
- package/bundled-realms/pretui/components/cue.md +53 -0
- package/bundled-realms/pretui/components/cue.usage.gts +88 -0
- package/bundled-realms/pretui/components/cursor-trail.gts +221 -0
- package/bundled-realms/pretui/components/cursor-trail.md +56 -0
- package/bundled-realms/pretui/components/cursor-trail.usage.gts +218 -0
- package/bundled-realms/pretui/components/dashboard-grid.gts +939 -0
- package/bundled-realms/pretui/components/dashboard-grid.md +60 -0
- package/bundled-realms/pretui/components/dashboard-grid.usage.gts +307 -0
- package/bundled-realms/pretui/components/dashboard-item.gts +286 -0
- package/bundled-realms/pretui/components/dashboard-item.md +52 -0
- package/bundled-realms/pretui/components/dashboard-item.usage.gts +87 -0
- package/bundled-realms/pretui/components/data-grid.gts +263 -0
- package/bundled-realms/pretui/components/data-grid.md +64 -0
- package/bundled-realms/pretui/components/data-grid.usage.gts +50 -0
- package/bundled-realms/pretui/components/data-table.gts +1618 -0
- package/bundled-realms/pretui/components/data-table.md +104 -0
- package/bundled-realms/pretui/components/data-table.usage.gts +324 -0
- package/bundled-realms/pretui/components/date-picker.gts +98 -0
- package/bundled-realms/pretui/components/date-picker.md +59 -0
- package/bundled-realms/pretui/components/date-picker.usage.gts +66 -0
- package/bundled-realms/pretui/components/date-range-picker.gts +131 -0
- package/bundled-realms/pretui/components/date-range-picker.md +55 -0
- package/bundled-realms/pretui/components/date-range-picker.usage.gts +125 -0
- package/bundled-realms/pretui/components/date-time-picker.gts +227 -0
- package/bundled-realms/pretui/components/date-time-picker.md +60 -0
- package/bundled-realms/pretui/components/date-time-picker.usage.gts +64 -0
- package/bundled-realms/pretui/components/defer.gts +374 -0
- package/bundled-realms/pretui/components/defer.md +61 -0
- package/bundled-realms/pretui/components/defer.usage.gts +174 -0
- package/bundled-realms/pretui/components/delta.gts +45 -0
- package/bundled-realms/pretui/components/delta.md +53 -0
- package/bundled-realms/pretui/components/delta.usage.gts +31 -0
- package/bundled-realms/pretui/components/descriptions.gts +365 -0
- package/bundled-realms/pretui/components/descriptions.md +73 -0
- package/bundled-realms/pretui/components/descriptions.usage.gts +123 -0
- package/bundled-realms/pretui/components/dialog.gts +153 -0
- package/bundled-realms/pretui/components/dialog.md +60 -0
- package/bundled-realms/pretui/components/dialog.usage.gts +86 -0
- package/bundled-realms/pretui/components/diff-block.gts +89 -0
- package/bundled-realms/pretui/components/diff-block.md +51 -0
- package/bundled-realms/pretui/components/diff-block.usage.gts +27 -0
- package/bundled-realms/pretui/components/disclosure.gts +2 -0
- package/bundled-realms/pretui/components/disclosure.md +45 -0
- package/bundled-realms/pretui/components/disclosure.usage.gts +47 -0
- package/bundled-realms/pretui/components/divider.gts +75 -0
- package/bundled-realms/pretui/components/divider.md +49 -0
- package/bundled-realms/pretui/components/divider.usage.gts +98 -0
- package/bundled-realms/pretui/components/doc-report.gts +306 -0
- package/bundled-realms/pretui/components/doc-report.md +45 -0
- package/bundled-realms/pretui/components/doc-report.usage.gts +126 -0
- package/bundled-realms/pretui/components/dock.gts +165 -0
- package/bundled-realms/pretui/components/dock.md +42 -0
- package/bundled-realms/pretui/components/dock.usage.gts +114 -0
- package/bundled-realms/pretui/components/drawer.gts +166 -0
- package/bundled-realms/pretui/components/drawer.md +66 -0
- package/bundled-realms/pretui/components/drawer.usage.gts +111 -0
- package/bundled-realms/pretui/components/dropzone.gts +314 -0
- package/bundled-realms/pretui/components/dropzone.md +56 -0
- package/bundled-realms/pretui/components/dropzone.usage.gts +203 -0
- package/bundled-realms/pretui/components/dueling-picklist.gts +991 -0
- package/bundled-realms/pretui/components/dueling-picklist.md +67 -0
- package/bundled-realms/pretui/components/dueling-picklist.usage.gts +182 -0
- package/bundled-realms/pretui/components/dynamic-island.gts +264 -0
- package/bundled-realms/pretui/components/dynamic-island.md +45 -0
- package/bundled-realms/pretui/components/dynamic-island.usage.gts +195 -0
- package/bundled-realms/pretui/components/easing-curve.gts +629 -0
- package/bundled-realms/pretui/components/easing-curve.md +46 -0
- package/bundled-realms/pretui/components/easing-curve.usage.gts +122 -0
- package/bundled-realms/pretui/components/edit-in-place.gts +559 -0
- package/bundled-realms/pretui/components/edit-in-place.md +63 -0
- package/bundled-realms/pretui/components/edit-in-place.usage.gts +209 -0
- package/bundled-realms/pretui/components/editable.gts +299 -0
- package/bundled-realms/pretui/components/editable.md +79 -0
- package/bundled-realms/pretui/components/editable.usage.gts +68 -0
- package/bundled-realms/pretui/components/email-input.gts +83 -0
- package/bundled-realms/pretui/components/email-input.md +52 -0
- package/bundled-realms/pretui/components/email-input.usage.gts +90 -0
- package/bundled-realms/pretui/components/emoji-button.gts +162 -0
- package/bundled-realms/pretui/components/emoji-button.md +46 -0
- package/bundled-realms/pretui/components/emoji-button.usage.gts +174 -0
- package/bundled-realms/pretui/components/emoji-picker.gts +1396 -0
- package/bundled-realms/pretui/components/emoji-picker.md +53 -0
- package/bundled-realms/pretui/components/emoji-picker.usage.gts +235 -0
- package/bundled-realms/pretui/components/empty-state.gts +162 -0
- package/bundled-realms/pretui/components/empty-state.md +63 -0
- package/bundled-realms/pretui/components/empty-state.usage.gts +113 -0
- package/bundled-realms/pretui/components/empty.gts +2 -0
- package/bundled-realms/pretui/components/empty.md +43 -0
- package/bundled-realms/pretui/components/empty.usage.gts +33 -0
- package/bundled-realms/pretui/components/entity-display.gts +126 -0
- package/bundled-realms/pretui/components/entity-display.md +50 -0
- package/bundled-realms/pretui/components/error-summary.gts +321 -0
- package/bundled-realms/pretui/components/error-summary.md +60 -0
- package/bundled-realms/pretui/components/error-summary.usage.gts +155 -0
- package/bundled-realms/pretui/components/expression-builder.gts +1211 -0
- package/bundled-realms/pretui/components/expression-builder.md +60 -0
- package/bundled-realms/pretui/components/expression-builder.usage.gts +246 -0
- package/bundled-realms/pretui/components/fab.gts +2 -0
- package/bundled-realms/pretui/components/fab.md +38 -0
- package/bundled-realms/pretui/components/fab.usage.gts +38 -0
- package/bundled-realms/pretui/components/feature-voting.gts +365 -0
- package/bundled-realms/pretui/components/feature-voting.md +44 -0
- package/bundled-realms/pretui/components/feature-voting.usage.gts +114 -0
- package/bundled-realms/pretui/components/feed.gts +244 -0
- package/bundled-realms/pretui/components/feed.md +56 -0
- package/bundled-realms/pretui/components/feed.usage.gts +250 -0
- package/bundled-realms/pretui/components/field-error.gts +127 -0
- package/bundled-realms/pretui/components/field-error.md +60 -0
- package/bundled-realms/pretui/components/field-error.usage.gts +146 -0
- package/bundled-realms/pretui/components/field.gts +185 -0
- package/bundled-realms/pretui/components/field.md +60 -0
- package/bundled-realms/pretui/components/field.usage.gts +73 -0
- package/bundled-realms/pretui/components/fieldset.gts +124 -0
- package/bundled-realms/pretui/components/fieldset.md +65 -0
- package/bundled-realms/pretui/components/fieldset.usage.gts +105 -0
- package/bundled-realms/pretui/components/file-trigger.gts +185 -0
- package/bundled-realms/pretui/components/file-trigger.md +53 -0
- package/bundled-realms/pretui/components/file-trigger.usage.gts +121 -0
- package/bundled-realms/pretui/components/file-upload.gts +353 -0
- package/bundled-realms/pretui/components/file-upload.md +63 -0
- package/bundled-realms/pretui/components/file-upload.usage.gts +64 -0
- package/bundled-realms/pretui/components/filmstrip.gts +465 -0
- package/bundled-realms/pretui/components/filmstrip.md +53 -0
- package/bundled-realms/pretui/components/filmstrip.usage.gts +115 -0
- package/bundled-realms/pretui/components/filter-chips.gts +236 -0
- package/bundled-realms/pretui/components/filter-chips.md +58 -0
- package/bundled-realms/pretui/components/filter-chips.usage.gts +102 -0
- package/bundled-realms/pretui/components/filter-set.gts +293 -0
- package/bundled-realms/pretui/components/filter-set.md +60 -0
- package/bundled-realms/pretui/components/filter-set.usage.gts +145 -0
- package/bundled-realms/pretui/components/float-button.gts +339 -0
- package/bundled-realms/pretui/components/float-button.md +69 -0
- package/bundled-realms/pretui/components/float-button.usage.gts +134 -0
- package/bundled-realms/pretui/components/fold.gts +86 -0
- package/bundled-realms/pretui/components/fold.md +54 -0
- package/bundled-realms/pretui/components/fold.usage.gts +19 -0
- package/bundled-realms/pretui/components/form-field.gts +609 -0
- package/bundled-realms/pretui/components/form-field.md +77 -0
- package/bundled-realms/pretui/components/form-field.usage.gts +279 -0
- package/bundled-realms/pretui/components/form-footer.gts +246 -0
- package/bundled-realms/pretui/components/form-footer.md +59 -0
- package/bundled-realms/pretui/components/form-footer.usage.gts +217 -0
- package/bundled-realms/pretui/components/form-layout.gts +130 -0
- package/bundled-realms/pretui/components/form-layout.md +52 -0
- package/bundled-realms/pretui/components/form-layout.usage.gts +200 -0
- package/bundled-realms/pretui/components/form-section.gts +434 -0
- package/bundled-realms/pretui/components/form-section.md +67 -0
- package/bundled-realms/pretui/components/form-section.usage.gts +402 -0
- package/bundled-realms/pretui/components/form.gts +315 -0
- package/bundled-realms/pretui/components/form.md +82 -0
- package/bundled-realms/pretui/components/form.usage.gts +306 -0
- package/bundled-realms/pretui/components/format-bytes.gts +212 -0
- package/bundled-realms/pretui/components/format-bytes.md +47 -0
- package/bundled-realms/pretui/components/format-bytes.usage.gts +274 -0
- package/bundled-realms/pretui/components/format-date.gts +249 -0
- package/bundled-realms/pretui/components/format-date.md +55 -0
- package/bundled-realms/pretui/components/format-date.usage.gts +245 -0
- package/bundled-realms/pretui/components/format-number.gts +138 -0
- package/bundled-realms/pretui/components/format-number.md +51 -0
- package/bundled-realms/pretui/components/format-number.usage.gts +261 -0
- package/bundled-realms/pretui/components/formatted-value.gts +65 -0
- package/bundled-realms/pretui/components/freestyle-usage.gts +311 -0
- package/bundled-realms/pretui/components/freestyle-usage.md +49 -0
- package/bundled-realms/pretui/components/gallery.gts +819 -0
- package/bundled-realms/pretui/components/gallery.md +65 -0
- package/bundled-realms/pretui/components/gallery.usage.gts +212 -0
- package/bundled-realms/pretui/components/gradient-editor.gts +682 -0
- package/bundled-realms/pretui/components/gradient-editor.md +43 -0
- package/bundled-realms/pretui/components/gradient-editor.usage.gts +69 -0
- package/bundled-realms/pretui/components/graph-layout.md +54 -0
- package/bundled-realms/pretui/components/graph-layout.usage.gts +343 -0
- package/bundled-realms/pretui/components/graph-outline.gts +553 -0
- package/bundled-realms/pretui/components/graph-outline.md +50 -0
- package/bundled-realms/pretui/components/graph-outline.usage.gts +88 -0
- package/bundled-realms/pretui/components/grid.gts +68 -0
- package/bundled-realms/pretui/components/grid.md +54 -0
- package/bundled-realms/pretui/components/grid.usage.gts +144 -0
- package/bundled-realms/pretui/components/handle.gts +192 -0
- package/bundled-realms/pretui/components/handle.md +55 -0
- package/bundled-realms/pretui/components/handle.usage.gts +174 -0
- package/bundled-realms/pretui/components/hero-split.gts +307 -0
- package/bundled-realms/pretui/components/hero-split.md +50 -0
- package/bundled-realms/pretui/components/hero-split.usage.gts +200 -0
- package/bundled-realms/pretui/components/hover-actions.gts +485 -0
- package/bundled-realms/pretui/components/hover-actions.md +55 -0
- package/bundled-realms/pretui/components/hover-actions.usage.gts +224 -0
- package/bundled-realms/pretui/components/hover-card.gts +347 -0
- package/bundled-realms/pretui/components/hover-card.md +72 -0
- package/bundled-realms/pretui/components/hover-card.usage.gts +174 -0
- package/bundled-realms/pretui/components/hover-video-player.gts +315 -0
- package/bundled-realms/pretui/components/hover-video-player.md +57 -0
- package/bundled-realms/pretui/components/hover-video-player.usage.gts +152 -0
- package/bundled-realms/pretui/components/icon-button.examples.gts +69 -0
- package/bundled-realms/pretui/components/icon-button.gts +153 -0
- package/bundled-realms/pretui/components/icon-button.md +72 -0
- package/bundled-realms/pretui/components/icon-button.usage.gts +208 -0
- package/bundled-realms/pretui/components/image-cropper.gts +693 -0
- package/bundled-realms/pretui/components/image-cropper.md +52 -0
- package/bundled-realms/pretui/components/image-cropper.usage.gts +108 -0
- package/bundled-realms/pretui/components/image-frame.gts +91 -0
- package/bundled-realms/pretui/components/image-frame.md +42 -0
- package/bundled-realms/pretui/components/image-frame.usage.gts +28 -0
- package/bundled-realms/pretui/components/image.gts +326 -0
- package/bundled-realms/pretui/components/image.md +71 -0
- package/bundled-realms/pretui/components/image.usage.gts +126 -0
- package/bundled-realms/pretui/components/in-view.gts +245 -0
- package/bundled-realms/pretui/components/in-view.md +53 -0
- package/bundled-realms/pretui/components/in-view.usage.gts +264 -0
- package/bundled-realms/pretui/components/indicator.gts +137 -0
- package/bundled-realms/pretui/components/indicator.md +60 -0
- package/bundled-realms/pretui/components/indicator.usage.gts +66 -0
- package/bundled-realms/pretui/components/infinite-scroll.gts +163 -0
- package/bundled-realms/pretui/components/infinite-scroll.md +54 -0
- package/bundled-realms/pretui/components/infinite-scroll.usage.gts +73 -0
- package/bundled-realms/pretui/components/input-group.gts +264 -0
- package/bundled-realms/pretui/components/input-group.md +55 -0
- package/bundled-realms/pretui/components/input-group.usage.gts +283 -0
- package/bundled-realms/pretui/components/input.examples.gts +61 -0
- package/bundled-realms/pretui/components/input.gts +202 -0
- package/bundled-realms/pretui/components/input.md +67 -0
- package/bundled-realms/pretui/components/input.usage.gts +208 -0
- package/bundled-realms/pretui/components/interactive-input.gts +343 -0
- package/bundled-realms/pretui/components/interactive-input.md +45 -0
- package/bundled-realms/pretui/components/interactive-input.usage.gts +98 -0
- package/bundled-realms/pretui/components/item.gts +218 -0
- package/bundled-realms/pretui/components/item.md +66 -0
- package/bundled-realms/pretui/components/item.usage.gts +121 -0
- package/bundled-realms/pretui/components/joystick.gts +381 -0
- package/bundled-realms/pretui/components/joystick.md +52 -0
- package/bundled-realms/pretui/components/joystick.usage.gts +140 -0
- package/bundled-realms/pretui/components/json-editor.gts +1016 -0
- package/bundled-realms/pretui/components/json-editor.md +51 -0
- package/bundled-realms/pretui/components/json-editor.usage.gts +230 -0
- package/bundled-realms/pretui/components/json-tree.gts +596 -0
- package/bundled-realms/pretui/components/json-tree.md +52 -0
- package/bundled-realms/pretui/components/json-tree.usage.gts +217 -0
- package/bundled-realms/pretui/components/jump-chip.gts +230 -0
- package/bundled-realms/pretui/components/jump-chip.md +44 -0
- package/bundled-realms/pretui/components/jump-chip.usage.gts +151 -0
- package/bundled-realms/pretui/components/kbd.gts +60 -0
- package/bundled-realms/pretui/components/kbd.md +50 -0
- package/bundled-realms/pretui/components/kbd.usage.gts +98 -0
- package/bundled-realms/pretui/components/key-value.gts +150 -0
- package/bundled-realms/pretui/components/key-value.md +81 -0
- package/bundled-realms/pretui/components/key-value.usage.gts +125 -0
- package/bundled-realms/pretui/components/known-date.gts +770 -0
- package/bundled-realms/pretui/components/known-date.md +56 -0
- package/bundled-realms/pretui/components/known-date.usage.gts +192 -0
- package/bundled-realms/pretui/components/label.gts +60 -0
- package/bundled-realms/pretui/components/label.md +56 -0
- package/bundled-realms/pretui/components/label.usage.gts +63 -0
- package/bundled-realms/pretui/components/layer-manager.gts +1884 -0
- package/bundled-realms/pretui/components/layer-manager.md +59 -0
- package/bundled-realms/pretui/components/layer-manager.usage.gts +233 -0
- package/bundled-realms/pretui/components/lightbox.gts +461 -0
- package/bundled-realms/pretui/components/lightbox.md +57 -0
- package/bundled-realms/pretui/components/lightbox.usage.gts +180 -0
- package/bundled-realms/pretui/components/line-grid.examples.gts +156 -0
- package/bundled-realms/pretui/components/line-grid.gts +523 -0
- package/bundled-realms/pretui/components/line-grid.md +55 -0
- package/bundled-realms/pretui/components/line-grid.usage.gts +181 -0
- package/bundled-realms/pretui/components/list.gts +679 -0
- package/bundled-realms/pretui/components/list.md +90 -0
- package/bundled-realms/pretui/components/list.usage.gts +203 -0
- package/bundled-realms/pretui/components/loader.gts +2 -0
- package/bundled-realms/pretui/components/loader.md +33 -0
- package/bundled-realms/pretui/components/loader.usage.gts +35 -0
- package/bundled-realms/pretui/components/loading-overlay.gts +120 -0
- package/bundled-realms/pretui/components/loading-overlay.md +68 -0
- package/bundled-realms/pretui/components/loading-overlay.usage.gts +102 -0
- package/bundled-realms/pretui/components/loading-state.gts +124 -0
- package/bundled-realms/pretui/components/loading-state.md +48 -0
- package/bundled-realms/pretui/components/loading-state.usage.gts +16 -0
- package/bundled-realms/pretui/components/lookup.gts +451 -0
- package/bundled-realms/pretui/components/lookup.md +59 -0
- package/bundled-realms/pretui/components/lookup.usage.gts +235 -0
- package/bundled-realms/pretui/components/magnetic.gts +158 -0
- package/bundled-realms/pretui/components/magnetic.md +48 -0
- package/bundled-realms/pretui/components/magnetic.usage.gts +125 -0
- package/bundled-realms/pretui/components/marquee.gts +141 -0
- package/bundled-realms/pretui/components/marquee.md +43 -0
- package/bundled-realms/pretui/components/marquee.usage.gts +116 -0
- package/bundled-realms/pretui/components/masonry.gts +95 -0
- package/bundled-realms/pretui/components/masonry.md +59 -0
- package/bundled-realms/pretui/components/masonry.usage.gts +238 -0
- package/bundled-realms/pretui/components/media-inspector.gts +145 -0
- package/bundled-realms/pretui/components/media-inspector.md +46 -0
- package/bundled-realms/pretui/components/media-inspector.usage.gts +83 -0
- package/bundled-realms/pretui/components/media-player.gts +1133 -0
- package/bundled-realms/pretui/components/media-player.md +74 -0
- package/bundled-realms/pretui/components/media-player.usage.gts +265 -0
- package/bundled-realms/pretui/components/media-viewer.gts +136 -0
- package/bundled-realms/pretui/components/media-viewer.md +47 -0
- package/bundled-realms/pretui/components/media-viewer.usage.gts +70 -0
- package/bundled-realms/pretui/components/mentions.gts +340 -0
- package/bundled-realms/pretui/components/mentions.md +65 -0
- package/bundled-realms/pretui/components/mentions.usage.gts +73 -0
- package/bundled-realms/pretui/components/menu-panel.gts +367 -0
- package/bundled-realms/pretui/components/menu.gts +652 -0
- package/bundled-realms/pretui/components/menu.md +69 -0
- package/bundled-realms/pretui/components/menu.usage.gts +116 -0
- package/bundled-realms/pretui/components/menubar.gts +1200 -0
- package/bundled-realms/pretui/components/menubar.md +49 -0
- package/bundled-realms/pretui/components/menubar.usage.gts +220 -0
- package/bundled-realms/pretui/components/meter.gts +113 -0
- package/bundled-realms/pretui/components/meter.md +50 -0
- package/bundled-realms/pretui/components/meter.usage.gts +50 -0
- package/bundled-realms/pretui/components/modal.gts +2 -0
- package/bundled-realms/pretui/components/modal.md +41 -0
- package/bundled-realms/pretui/components/modal.usage.gts +50 -0
- package/bundled-realms/pretui/components/model-viewer.gts +658 -0
- package/bundled-realms/pretui/components/model-viewer.md +57 -0
- package/bundled-realms/pretui/components/model-viewer.usage.gts +123 -0
- package/bundled-realms/pretui/components/money-input.gts +66 -0
- package/bundled-realms/pretui/components/money-input.md +43 -0
- package/bundled-realms/pretui/components/money-input.usage.gts +293 -0
- package/bundled-realms/pretui/components/morphing-dialog.gts +173 -0
- package/bundled-realms/pretui/components/morphing-dialog.md +46 -0
- package/bundled-realms/pretui/components/morphing-dialog.usage.gts +168 -0
- package/bundled-realms/pretui/components/morphing-popover.gts +245 -0
- package/bundled-realms/pretui/components/morphing-popover.md +47 -0
- package/bundled-realms/pretui/components/morphing-popover.usage.gts +176 -0
- package/bundled-realms/pretui/components/multi-select.gts +392 -0
- package/bundled-realms/pretui/components/multi-select.md +57 -0
- package/bundled-realms/pretui/components/multi-select.usage.gts +97 -0
- package/bundled-realms/pretui/components/native-select.gts +212 -0
- package/bundled-realms/pretui/components/native-select.md +77 -0
- package/bundled-realms/pretui/components/native-select.usage.gts +109 -0
- package/bundled-realms/pretui/components/navigation-menu.gts +351 -0
- package/bundled-realms/pretui/components/navigation-menu.md +65 -0
- package/bundled-realms/pretui/components/navigation-menu.usage.gts +61 -0
- package/bundled-realms/pretui/components/node-canvas.gts +1174 -0
- package/bundled-realms/pretui/components/node-canvas.md +57 -0
- package/bundled-realms/pretui/components/node-canvas.usage.gts +548 -0
- package/bundled-realms/pretui/components/node-card.gts +181 -0
- package/bundled-realms/pretui/components/node-card.md +53 -0
- package/bundled-realms/pretui/components/node-card.usage.gts +156 -0
- package/bundled-realms/pretui/components/notification.gts +242 -0
- package/bundled-realms/pretui/components/notification.md +69 -0
- package/bundled-realms/pretui/components/notification.usage.gts +125 -0
- package/bundled-realms/pretui/components/number-input.gts +191 -0
- package/bundled-realms/pretui/components/number-input.md +54 -0
- package/bundled-realms/pretui/components/number-input.usage.gts +132 -0
- package/bundled-realms/pretui/components/odometer.gts +349 -0
- package/bundled-realms/pretui/components/odometer.md +55 -0
- package/bundled-realms/pretui/components/odometer.usage.gts +258 -0
- package/bundled-realms/pretui/components/onboarding.gts +298 -0
- package/bundled-realms/pretui/components/onboarding.md +48 -0
- package/bundled-realms/pretui/components/onboarding.usage.gts +155 -0
- package/bundled-realms/pretui/components/origin-grid.gts +486 -0
- package/bundled-realms/pretui/components/origin-grid.md +47 -0
- package/bundled-realms/pretui/components/origin-grid.usage.gts +87 -0
- package/bundled-realms/pretui/components/otp-input.gts +289 -0
- package/bundled-realms/pretui/components/otp-input.md +47 -0
- package/bundled-realms/pretui/components/otp-input.usage.gts +131 -0
- package/bundled-realms/pretui/components/page-scaffold.gts +343 -0
- package/bundled-realms/pretui/components/page-scaffold.md +57 -0
- package/bundled-realms/pretui/components/page-scaffold.usage.gts +391 -0
- package/bundled-realms/pretui/components/pagination.gts +150 -0
- package/bundled-realms/pretui/components/pagination.md +56 -0
- package/bundled-realms/pretui/components/pagination.usage.gts +33 -0
- package/bundled-realms/pretui/components/panel-section.gts +301 -0
- package/bundled-realms/pretui/components/panel-section.md +48 -0
- package/bundled-realms/pretui/components/panel-section.usage.gts +137 -0
- package/bundled-realms/pretui/components/panel.gts +158 -0
- package/bundled-realms/pretui/components/panel.md +58 -0
- package/bundled-realms/pretui/components/panel.usage.gts +82 -0
- package/bundled-realms/pretui/components/password-input.gts +329 -0
- package/bundled-realms/pretui/components/password-input.md +58 -0
- package/bundled-realms/pretui/components/password-input.usage.gts +156 -0
- package/bundled-realms/pretui/components/password-strength.gts +485 -0
- package/bundled-realms/pretui/components/password-strength.md +50 -0
- package/bundled-realms/pretui/components/password-strength.usage.gts +34 -0
- package/bundled-realms/pretui/components/path-text.gts +288 -0
- package/bundled-realms/pretui/components/path-text.md +58 -0
- package/bundled-realms/pretui/components/path-text.usage.gts +239 -0
- package/bundled-realms/pretui/components/period-input.gts +1100 -0
- package/bundled-realms/pretui/components/period-input.md +54 -0
- package/bundled-realms/pretui/components/period-input.usage.gts +299 -0
- package/bundled-realms/pretui/components/phone-input.gts +80 -0
- package/bundled-realms/pretui/components/phone-input.md +55 -0
- package/bundled-realms/pretui/components/phone-input.usage.gts +91 -0
- package/bundled-realms/pretui/components/pin-input.gts +2 -0
- package/bundled-realms/pretui/components/pin-input.md +45 -0
- package/bundled-realms/pretui/components/pin-input.usage.gts +39 -0
- package/bundled-realms/pretui/components/pip-scale.gts +717 -0
- package/bundled-realms/pretui/components/pip-scale.md +55 -0
- package/bundled-realms/pretui/components/pip-scale.usage.gts +318 -0
- package/bundled-realms/pretui/components/popconfirm.gts +380 -0
- package/bundled-realms/pretui/components/popconfirm.md +78 -0
- package/bundled-realms/pretui/components/popconfirm.usage.gts +171 -0
- package/bundled-realms/pretui/components/popover.gts +198 -0
- package/bundled-realms/pretui/components/popover.md +57 -0
- package/bundled-realms/pretui/components/popover.usage.gts +106 -0
- package/bundled-realms/pretui/components/popup.gts +85 -0
- package/bundled-realms/pretui/components/popup.md +42 -0
- package/bundled-realms/pretui/components/popup.usage.gts +23 -0
- package/bundled-realms/pretui/components/presence.gts +156 -0
- package/bundled-realms/pretui/components/presence.md +55 -0
- package/bundled-realms/pretui/components/presence.usage.gts +204 -0
- package/bundled-realms/pretui/components/progress-bar.gts +177 -0
- package/bundled-realms/pretui/components/progress-bar.md +63 -0
- package/bundled-realms/pretui/components/progress-bar.usage.gts +172 -0
- package/bundled-realms/pretui/components/progress-radial.gts +67 -0
- package/bundled-realms/pretui/components/progress-radial.md +55 -0
- package/bundled-realms/pretui/components/progress-radial.usage.gts +76 -0
- package/bundled-realms/pretui/components/prompt-library.gts +358 -0
- package/bundled-realms/pretui/components/prompt-library.md +45 -0
- package/bundled-realms/pretui/components/prompt-library.usage.gts +117 -0
- package/bundled-realms/pretui/components/property-row.gts +316 -0
- package/bundled-realms/pretui/components/property-row.md +55 -0
- package/bundled-realms/pretui/components/property-row.usage.gts +146 -0
- package/bundled-realms/pretui/components/property-sheet.gts +133 -0
- package/bundled-realms/pretui/components/property-sheet.md +48 -0
- package/bundled-realms/pretui/components/property-sheet.usage.gts +132 -0
- package/bundled-realms/pretui/components/prose.gts +31 -0
- package/bundled-realms/pretui/components/prose.md +57 -0
- package/bundled-realms/pretui/components/prose.usage.gts +15 -0
- package/bundled-realms/pretui/components/pulsing-border.gts +297 -0
- package/bundled-realms/pretui/components/pulsing-border.md +65 -0
- package/bundled-realms/pretui/components/pulsing-border.usage.gts +253 -0
- package/bundled-realms/pretui/components/qr-code.gts +660 -0
- package/bundled-realms/pretui/components/qr-code.md +58 -0
- package/bundled-realms/pretui/components/qr-code.usage.gts +224 -0
- package/bundled-realms/pretui/components/queued-message.gts +83 -0
- package/bundled-realms/pretui/components/queued-message.md +53 -0
- package/bundled-realms/pretui/components/queued-message.usage.gts +21 -0
- package/bundled-realms/pretui/components/radio-card.gts +88 -0
- package/bundled-realms/pretui/components/radio-card.md +72 -0
- package/bundled-realms/pretui/components/radio-card.usage.gts +148 -0
- package/bundled-realms/pretui/components/radio-group.gts +119 -0
- package/bundled-realms/pretui/components/radio-group.md +46 -0
- package/bundled-realms/pretui/components/radio-group.usage.gts +80 -0
- package/bundled-realms/pretui/components/range-slider.gts +34 -0
- package/bundled-realms/pretui/components/range-slider.md +47 -0
- package/bundled-realms/pretui/components/range-slider.usage.gts +46 -0
- package/bundled-realms/pretui/components/rating.examples.gts +67 -0
- package/bundled-realms/pretui/components/rating.gts +266 -0
- package/bundled-realms/pretui/components/rating.md +55 -0
- package/bundled-realms/pretui/components/rating.usage.gts +96 -0
- package/bundled-realms/pretui/components/readiness-panel.gts +856 -0
- package/bundled-realms/pretui/components/readiness-panel.md +64 -0
- package/bundled-realms/pretui/components/readiness-panel.usage.gts +372 -0
- package/bundled-realms/pretui/components/recommendation.gts +316 -0
- package/bundled-realms/pretui/components/recommendation.md +49 -0
- package/bundled-realms/pretui/components/recommendation.usage.gts +103 -0
- package/bundled-realms/pretui/components/record-detail.gts +1170 -0
- package/bundled-realms/pretui/components/record-detail.md +63 -0
- package/bundled-realms/pretui/components/record-detail.usage.gts +533 -0
- package/bundled-realms/pretui/components/record-face.gts +153 -0
- package/bundled-realms/pretui/components/record-pill.gts +116 -0
- package/bundled-realms/pretui/components/record-pill.md +55 -0
- package/bundled-realms/pretui/components/record-pill.usage.gts +108 -0
- package/bundled-realms/pretui/components/relative-time.gts +88 -0
- package/bundled-realms/pretui/components/relative-time.md +58 -0
- package/bundled-realms/pretui/components/relative-time.usage.gts +89 -0
- package/bundled-realms/pretui/components/reorder.gts +620 -0
- package/bundled-realms/pretui/components/reorder.md +47 -0
- package/bundled-realms/pretui/components/reorder.usage.gts +171 -0
- package/bundled-realms/pretui/components/resizable.gts +2 -0
- package/bundled-realms/pretui/components/resizable.md +37 -0
- package/bundled-realms/pretui/components/resizable.usage.gts +53 -0
- package/bundled-realms/pretui/components/result-card.gts +68 -0
- package/bundled-realms/pretui/components/result-card.md +45 -0
- package/bundled-realms/pretui/components/result-card.usage.gts +29 -0
- package/bundled-realms/pretui/components/result.gts +204 -0
- package/bundled-realms/pretui/components/result.md +67 -0
- package/bundled-realms/pretui/components/result.usage.gts +85 -0
- package/bundled-realms/pretui/components/rule-row.gts +462 -0
- package/bundled-realms/pretui/components/rule-row.md +60 -0
- package/bundled-realms/pretui/components/rule-row.usage.gts +157 -0
- package/bundled-realms/pretui/components/scroll-area.gts +121 -0
- package/bundled-realms/pretui/components/scroll-area.md +59 -0
- package/bundled-realms/pretui/components/scroll-area.usage.gts +175 -0
- package/bundled-realms/pretui/components/scroll-progress.gts +222 -0
- package/bundled-realms/pretui/components/scroll-progress.md +48 -0
- package/bundled-realms/pretui/components/scroll-progress.usage.gts +162 -0
- package/bundled-realms/pretui/components/scroller.gts +323 -0
- package/bundled-realms/pretui/components/scroller.md +44 -0
- package/bundled-realms/pretui/components/scroller.usage.gts +184 -0
- package/bundled-realms/pretui/components/scrub-input.gts +691 -0
- package/bundled-realms/pretui/components/scrub-input.md +61 -0
- package/bundled-realms/pretui/components/scrub-input.usage.gts +275 -0
- package/bundled-realms/pretui/components/search-input.gts +141 -0
- package/bundled-realms/pretui/components/search-input.md +56 -0
- package/bundled-realms/pretui/components/search-input.usage.gts +91 -0
- package/bundled-realms/pretui/components/segmented-control.gts +198 -0
- package/bundled-realms/pretui/components/segmented-control.md +39 -0
- package/bundled-realms/pretui/components/segmented-control.usage.gts +66 -0
- package/bundled-realms/pretui/components/select.examples.gts +80 -0
- package/bundled-realms/pretui/components/select.gts +481 -0
- package/bundled-realms/pretui/components/select.md +71 -0
- package/bundled-realms/pretui/components/select.usage.gts +109 -0
- package/bundled-realms/pretui/components/separator.gts +2 -0
- package/bundled-realms/pretui/components/separator.md +36 -0
- package/bundled-realms/pretui/components/separator.usage.gts +32 -0
- package/bundled-realms/pretui/components/session-prep.gts +164 -0
- package/bundled-realms/pretui/components/session-prep.md +48 -0
- package/bundled-realms/pretui/components/session-prep.usage.gts +122 -0
- package/bundled-realms/pretui/components/sheet-toolbar.gts +130 -0
- package/bundled-realms/pretui/components/sheet-toolbar.md +51 -0
- package/bundled-realms/pretui/components/sheet-toolbar.usage.gts +151 -0
- package/bundled-realms/pretui/components/sheet.gts +1166 -0
- package/bundled-realms/pretui/components/sheet.md +78 -0
- package/bundled-realms/pretui/components/sheet.usage.gts +318 -0
- package/bundled-realms/pretui/components/sidebar.gts +1165 -0
- package/bundled-realms/pretui/components/sidebar.md +88 -0
- package/bundled-realms/pretui/components/sidebar.usage.gts +360 -0
- package/bundled-realms/pretui/components/signature-pad.gts +840 -0
- package/bundled-realms/pretui/components/signature-pad.md +57 -0
- package/bundled-realms/pretui/components/signature-pad.usage.gts +222 -0
- package/bundled-realms/pretui/components/skeleton.gts +46 -0
- package/bundled-realms/pretui/components/skeleton.md +56 -0
- package/bundled-realms/pretui/components/skeleton.usage.gts +56 -0
- package/bundled-realms/pretui/components/skip-link.gts +65 -0
- package/bundled-realms/pretui/components/skip-link.md +49 -0
- package/bundled-realms/pretui/components/skip-link.usage.gts +47 -0
- package/bundled-realms/pretui/components/slide-over.gts +2 -0
- package/bundled-realms/pretui/components/slide-over.md +41 -0
- package/bundled-realms/pretui/components/slide-over.usage.gts +50 -0
- package/bundled-realms/pretui/components/slider.examples.gts +61 -0
- package/bundled-realms/pretui/components/slider.gts +331 -0
- package/bundled-realms/pretui/components/slider.md +59 -0
- package/bundled-realms/pretui/components/slider.usage.gts +99 -0
- package/bundled-realms/pretui/components/sliding-highlight.gts +249 -0
- package/bundled-realms/pretui/components/sliding-highlight.md +58 -0
- package/bundled-realms/pretui/components/sliding-highlight.usage.gts +184 -0
- package/bundled-realms/pretui/components/snackbar.gts +2 -0
- package/bundled-realms/pretui/components/snackbar.md +34 -0
- package/bundled-realms/pretui/components/snackbar.usage.gts +31 -0
- package/bundled-realms/pretui/components/sonner.gts +2 -0
- package/bundled-realms/pretui/components/sonner.md +42 -0
- package/bundled-realms/pretui/components/sonner.usage.gts +43 -0
- package/bundled-realms/pretui/components/sparkline.gts +233 -0
- package/bundled-realms/pretui/components/sparkline.md +58 -0
- package/bundled-realms/pretui/components/sparkline.usage.gts +74 -0
- package/bundled-realms/pretui/components/spinner.gts +57 -0
- package/bundled-realms/pretui/components/spinner.md +49 -0
- package/bundled-realms/pretui/components/spinner.usage.gts +65 -0
- package/bundled-realms/pretui/components/split-panes.gts +69 -0
- package/bundled-realms/pretui/components/split-panes.md +54 -0
- package/bundled-realms/pretui/components/split-panes.usage.gts +171 -0
- package/bundled-realms/pretui/components/spotlight.gts +174 -0
- package/bundled-realms/pretui/components/spotlight.md +51 -0
- package/bundled-realms/pretui/components/spotlight.usage.gts +197 -0
- package/bundled-realms/pretui/components/stack-divider.gts +58 -0
- package/bundled-realms/pretui/components/stack.gts +284 -0
- package/bundled-realms/pretui/components/stack.md +81 -0
- package/bundled-realms/pretui/components/stack.usage.gts +228 -0
- package/bundled-realms/pretui/components/stacking-cards.gts +137 -0
- package/bundled-realms/pretui/components/stacking-cards.md +40 -0
- package/bundled-realms/pretui/components/stacking-cards.usage.gts +124 -0
- package/bundled-realms/pretui/components/stat.gts +216 -0
- package/bundled-realms/pretui/components/stat.md +57 -0
- package/bundled-realms/pretui/components/stat.usage.gts +16 -0
- package/bundled-realms/pretui/components/statement-table.examples.gts +185 -0
- package/bundled-realms/pretui/components/statement-table.gts +792 -0
- package/bundled-realms/pretui/components/statement-table.md +58 -0
- package/bundled-realms/pretui/components/statement-table.usage.gts +252 -0
- package/bundled-realms/pretui/components/status-chip.gts +37 -0
- package/bundled-realms/pretui/components/status-chip.md +48 -0
- package/bundled-realms/pretui/components/status-chip.usage.gts +36 -0
- package/bundled-realms/pretui/components/step-list.gts +624 -0
- package/bundled-realms/pretui/components/step-list.md +50 -0
- package/bundled-realms/pretui/components/step-list.usage.gts +166 -0
- package/bundled-realms/pretui/components/stepper.gts +201 -0
- package/bundled-realms/pretui/components/stepper.md +54 -0
- package/bundled-realms/pretui/components/stepper.usage.gts +103 -0
- package/bundled-realms/pretui/components/steps-with-media.gts +254 -0
- package/bundled-realms/pretui/components/steps-with-media.md +54 -0
- package/bundled-realms/pretui/components/steps-with-media.usage.gts +208 -0
- package/bundled-realms/pretui/components/streaming-text.gts +77 -0
- package/bundled-realms/pretui/components/streaming-text.md +55 -0
- package/bundled-realms/pretui/components/streaming-text.usage.gts +15 -0
- package/bundled-realms/pretui/components/swatch-chip.gts +104 -0
- package/bundled-realms/pretui/components/swatch-chip.md +47 -0
- package/bundled-realms/pretui/components/swatch-chip.usage.gts +21 -0
- package/bundled-realms/pretui/components/swatch.gts +141 -0
- package/bundled-realms/pretui/components/swatch.md +50 -0
- package/bundled-realms/pretui/components/swatch.usage.gts +80 -0
- package/bundled-realms/pretui/components/switch.examples.gts +53 -0
- package/bundled-realms/pretui/components/switch.gts +118 -0
- package/bundled-realms/pretui/components/switch.md +62 -0
- package/bundled-realms/pretui/components/switch.usage.gts +59 -0
- package/bundled-realms/pretui/components/table-of-contents.gts +384 -0
- package/bundled-realms/pretui/components/table-of-contents.md +75 -0
- package/bundled-realms/pretui/components/table-of-contents.usage.gts +270 -0
- package/bundled-realms/pretui/components/table.gts +158 -0
- package/bundled-realms/pretui/components/table.md +80 -0
- package/bundled-realms/pretui/components/table.usage.gts +44 -0
- package/bundled-realms/pretui/components/tabs.gts +117 -0
- package/bundled-realms/pretui/components/tabs.md +58 -0
- package/bundled-realms/pretui/components/tabs.usage.gts +94 -0
- package/bundled-realms/pretui/components/tags-input.gts +52 -0
- package/bundled-realms/pretui/components/tags-input.md +48 -0
- package/bundled-realms/pretui/components/tags-input.usage.gts +56 -0
- package/bundled-realms/pretui/components/task-row.gts +483 -0
- package/bundled-realms/pretui/components/task-row.md +48 -0
- package/bundled-realms/pretui/components/task-row.usage.gts +119 -0
- package/bundled-realms/pretui/components/terminal-animation.gts +355 -0
- package/bundled-realms/pretui/components/terminal-animation.md +49 -0
- package/bundled-realms/pretui/components/terminal-animation.usage.gts +110 -0
- package/bundled-realms/pretui/components/text-effects.gts +339 -0
- package/bundled-realms/pretui/components/text-effects.md +49 -0
- package/bundled-realms/pretui/components/text-effects.usage.gts +192 -0
- package/bundled-realms/pretui/components/text-morph.gts +292 -0
- package/bundled-realms/pretui/components/text-morph.md +45 -0
- package/bundled-realms/pretui/components/text-morph.usage.gts +117 -0
- package/bundled-realms/pretui/components/text-rotate.gts +121 -0
- package/bundled-realms/pretui/components/text-rotate.md +44 -0
- package/bundled-realms/pretui/components/text-rotate.usage.gts +73 -0
- package/bundled-realms/pretui/components/text-scramble.gts +189 -0
- package/bundled-realms/pretui/components/text-scramble.md +42 -0
- package/bundled-realms/pretui/components/text-scramble.usage.gts +80 -0
- package/bundled-realms/pretui/components/text-shimmer.gts +89 -0
- package/bundled-realms/pretui/components/text-shimmer.md +42 -0
- package/bundled-realms/pretui/components/text-shimmer.usage.gts +69 -0
- package/bundled-realms/pretui/components/textarea.gts +112 -0
- package/bundled-realms/pretui/components/textarea.md +51 -0
- package/bundled-realms/pretui/components/textarea.usage.gts +100 -0
- package/bundled-realms/pretui/components/theme-frame.gts +272 -0
- package/bundled-realms/pretui/components/theme-frame.md +48 -0
- package/bundled-realms/pretui/components/thinking.gts +431 -0
- package/bundled-realms/pretui/components/thinking.md +47 -0
- package/bundled-realms/pretui/components/thinking.usage.gts +134 -0
- package/bundled-realms/pretui/components/tilt.gts +194 -0
- package/bundled-realms/pretui/components/tilt.md +50 -0
- package/bundled-realms/pretui/components/tilt.usage.gts +174 -0
- package/bundled-realms/pretui/components/time-input.gts +583 -0
- package/bundled-realms/pretui/components/time-input.md +51 -0
- package/bundled-realms/pretui/components/time-input.usage.gts +110 -0
- package/bundled-realms/pretui/components/timeline.gts +269 -0
- package/bundled-realms/pretui/components/timeline.md +63 -0
- package/bundled-realms/pretui/components/timeline.usage.gts +180 -0
- package/bundled-realms/pretui/components/toast.gts +85 -0
- package/bundled-realms/pretui/components/toast.md +57 -0
- package/bundled-realms/pretui/components/toast.usage.gts +18 -0
- package/bundled-realms/pretui/components/toaster.gts +808 -0
- package/bundled-realms/pretui/components/toaster.md +83 -0
- package/bundled-realms/pretui/components/toaster.usage.gts +256 -0
- package/bundled-realms/pretui/components/toggle-group.gts +435 -0
- package/bundled-realms/pretui/components/toggle-group.md +59 -0
- package/bundled-realms/pretui/components/toggle-group.usage.gts +260 -0
- package/bundled-realms/pretui/components/toggle-matrix.gts +994 -0
- package/bundled-realms/pretui/components/toggle-matrix.md +44 -0
- package/bundled-realms/pretui/components/toggle-matrix.usage.gts +243 -0
- package/bundled-realms/pretui/components/toggle.gts +235 -0
- package/bundled-realms/pretui/components/toggle.md +59 -0
- package/bundled-realms/pretui/components/toggle.usage.gts +244 -0
- package/bundled-realms/pretui/components/token-input.gts +483 -0
- package/bundled-realms/pretui/components/token-input.md +50 -0
- package/bundled-realms/pretui/components/token-input.usage.gts +137 -0
- package/bundled-realms/pretui/components/token.gts +197 -0
- package/bundled-realms/pretui/components/token.md +63 -0
- package/bundled-realms/pretui/components/token.usage.gts +128 -0
- package/bundled-realms/pretui/components/toolbar.gts +62 -0
- package/bundled-realms/pretui/components/toolbar.md +50 -0
- package/bundled-realms/pretui/components/toolbar.usage.gts +78 -0
- package/bundled-realms/pretui/components/tooltip.gts +212 -0
- package/bundled-realms/pretui/components/tooltip.md +53 -0
- package/bundled-realms/pretui/components/tooltip.usage.gts +64 -0
- package/bundled-realms/pretui/components/tour.gts +436 -0
- package/bundled-realms/pretui/components/tour.md +62 -0
- package/bundled-realms/pretui/components/tour.usage.gts +70 -0
- package/bundled-realms/pretui/components/transfer.gts +2 -0
- package/bundled-realms/pretui/components/transfer.md +39 -0
- package/bundled-realms/pretui/components/transfer.usage.gts +52 -0
- package/bundled-realms/pretui/components/transmute.gts +103 -0
- package/bundled-realms/pretui/components/transmute.md +49 -0
- package/bundled-realms/pretui/components/transmute.usage.gts +16 -0
- package/bundled-realms/pretui/components/tree-select.gts +596 -0
- package/bundled-realms/pretui/components/tree-select.md +70 -0
- package/bundled-realms/pretui/components/tree-select.usage.gts +75 -0
- package/bundled-realms/pretui/components/tree.gts +532 -0
- package/bundled-realms/pretui/components/tree.md +68 -0
- package/bundled-realms/pretui/components/tree.usage.gts +278 -0
- package/bundled-realms/pretui/components/trim-bar.gts +611 -0
- package/bundled-realms/pretui/components/trim-bar.md +48 -0
- package/bundled-realms/pretui/components/trim-bar.usage.gts +112 -0
- package/bundled-realms/pretui/components/typewriter.gts +122 -0
- package/bundled-realms/pretui/components/typewriter.md +45 -0
- package/bundled-realms/pretui/components/typewriter.usage.gts +105 -0
- package/bundled-realms/pretui/components/typography.gts +379 -0
- package/bundled-realms/pretui/components/typography.md +77 -0
- package/bundled-realms/pretui/components/typography.usage.gts +52 -0
- package/bundled-realms/pretui/components/url-input.gts +130 -0
- package/bundled-realms/pretui/components/url-input.md +58 -0
- package/bundled-realms/pretui/components/url-input.usage.gts +97 -0
- package/bundled-realms/pretui/components/usage-action.gts +16 -0
- package/bundled-realms/pretui/components/usage-argument.gts +109 -0
- package/bundled-realms/pretui/components/usage-argument.md +44 -0
- package/bundled-realms/pretui/components/usage-array.gts +80 -0
- package/bundled-realms/pretui/components/usage-array.md +47 -0
- package/bundled-realms/pretui/components/usage-bool.gts +62 -0
- package/bundled-realms/pretui/components/usage-bool.md +47 -0
- package/bundled-realms/pretui/components/usage-component-arg.gts +16 -0
- package/bundled-realms/pretui/components/usage-css-variable.gts +56 -0
- package/bundled-realms/pretui/components/usage-css-variable.md +48 -0
- package/bundled-realms/pretui/components/usage-number.gts +127 -0
- package/bundled-realms/pretui/components/usage-number.md +48 -0
- package/bundled-realms/pretui/components/usage-object.gts +58 -0
- package/bundled-realms/pretui/components/usage-object.md +48 -0
- package/bundled-realms/pretui/components/usage-string.gts +89 -0
- package/bundled-realms/pretui/components/usage-string.md +46 -0
- package/bundled-realms/pretui/components/usage-yield.gts +16 -0
- package/bundled-realms/pretui/components/value-input.gts +265 -0
- package/bundled-realms/pretui/components/value-input.md +49 -0
- package/bundled-realms/pretui/components/value-input.usage.gts +176 -0
- package/bundled-realms/pretui/components/video-player.gts +80 -0
- package/bundled-realms/pretui/components/video-player.md +46 -0
- package/bundled-realms/pretui/components/video-player.usage.gts +107 -0
- package/bundled-realms/pretui/components/viewport.gts +520 -0
- package/bundled-realms/pretui/components/viewport.md +55 -0
- package/bundled-realms/pretui/components/visually-hidden.gts +49 -0
- package/bundled-realms/pretui/components/visually-hidden.md +47 -0
- package/bundled-realms/pretui/components/visually-hidden.usage.gts +27 -0
- package/bundled-realms/pretui/components/watermark.gts +141 -0
- package/bundled-realms/pretui/components/watermark.md +58 -0
- package/bundled-realms/pretui/components/watermark.usage.gts +63 -0
- package/bundled-realms/pretui/components/waveform.gts +376 -0
- package/bundled-realms/pretui/components/waveform.md +56 -0
- package/bundled-realms/pretui/components/waveform.usage.gts +131 -0
- package/bundled-realms/pretui/components/wizard.gts +677 -0
- package/bundled-realms/pretui/components/wizard.md +58 -0
- package/bundled-realms/pretui/components/wizard.usage.gts +188 -0
- package/bundled-realms/pretui/components/work-item.gts +207 -0
- package/bundled-realms/pretui/components/work-item.md +58 -0
- package/bundled-realms/pretui/components/work-item.usage.gts +103 -0
- package/bundled-realms/pretui/components/zoomable-frame.gts +541 -0
- package/bundled-realms/pretui/components/zoomable-frame.md +50 -0
- package/bundled-realms/pretui/components/zoomable-frame.usage.gts +175 -0
- package/bundled-realms/pretui/cropper/LICENSE +21 -0
- package/bundled-realms/pretui/cropper/README.md +92 -0
- package/bundled-realms/pretui/cropper/index.js +81 -0
- package/bundled-realms/pretui/data-component.gts +1161 -0
- package/bundled-realms/pretui/demo-design-layers.gts +112 -0
- package/bundled-realms/pretui/demo-design-tools.gts +463 -0
- package/bundled-realms/pretui/demo-design-value.gts +9 -0
- package/bundled-realms/pretui/demo-forms-core.gts +82 -0
- package/bundled-realms/pretui/demo-forms-expression.gts +76 -0
- package/bundled-realms/pretui/demo-forms-record.gts +16 -0
- package/bundled-realms/pretui/demo-foundations-more.gts +10 -0
- package/bundled-realms/pretui/demo-foundations.gts +8 -0
- package/bundled-realms/pretui/demo-ink-feedback.gts +12 -0
- package/bundled-realms/pretui/demo-json.gts +17 -0
- package/bundled-realms/pretui/demo-locations.ts +103 -0
- package/bundled-realms/pretui/demo-media-library.gts +101 -0
- package/bundled-realms/pretui/demo-media.gts +6 -0
- package/bundled-realms/pretui/demo-menu.gts +182 -0
- package/bundled-realms/pretui/demo-motion-core.gts +4 -0
- package/bundled-realms/pretui/demo-motion-pointer.gts +21 -0
- package/bundled-realms/pretui/demo-reading-format.gts +10 -0
- package/bundled-realms/pretui/demo-structure-dashboard.gts +212 -0
- package/bundled-realms/pretui/demo-structure-data.gts +4 -0
- package/bundled-realms/pretui/demo-structure-scroll.gts +19 -0
- package/bundled-realms/pretui/demo-structure.gts +21 -0
- package/bundled-realms/pretui/demo-surfaces-grid.gts +104 -0
- package/bundled-realms/pretui/demo-texture.gts +21 -0
- package/bundled-realms/pretui/docs/catalog-taxonomy.md +200 -0
- package/bundled-realms/pretui/docs/composites.md +13 -0
- package/bundled-realms/pretui/docs/reading.md +12 -0
- package/bundled-realms/pretui/docs/structure.md +8 -0
- package/bundled-realms/pretui/emoji-data/LICENSE +202 -0
- package/bundled-realms/pretui/emoji-data/LICENSE.data +202 -0
- package/bundled-realms/pretui/emoji-data/LICENSE.emojibase +21 -0
- package/bundled-realms/pretui/emoji-data/LICENSE.unicode +39 -0
- package/bundled-realms/pretui/emoji-data/README.md +360 -0
- package/bundled-realms/pretui/emoji-data/data.ts +45 -0
- package/bundled-realms/pretui/emoji-data/engine.ts +465 -0
- package/bundled-realms/pretui/example-gallery.gts +129 -0
- package/bundled-realms/pretui/examples-kit.gts +228 -0
- package/bundled-realms/pretui/examples-listing.gts +51 -0
- package/bundled-realms/pretui/examples.gts +584 -0
- package/bundled-realms/pretui/focus.gts +459 -0
- package/bundled-realms/pretui/gridstack/LICENSE +21 -0
- package/bundled-realms/pretui/gridstack/README.md +103 -0
- package/bundled-realms/pretui/gridstack/index.js +169 -0
- package/bundled-realms/pretui/icon-registry.gts +753 -0
- package/bundled-realms/pretui/index.json +11 -0
- package/bundled-realms/pretui/internal/agentic-chat.gts +101 -0
- package/bundled-realms/pretui/internal/blocks.gts +35 -0
- package/bundled-realms/pretui/internal/choice-cards.gts +258 -0
- package/bundled-realms/pretui/internal/color-fixtures.gts +3 -0
- package/bundled-realms/pretui/internal/composites-fixtures.gts +16 -0
- package/bundled-realms/pretui/internal/corner-mark.gts +83 -0
- package/bundled-realms/pretui/internal/design-tools.gts +881 -0
- package/bundled-realms/pretui/internal/extras.gts +31 -0
- package/bundled-realms/pretui/internal/feedback.gts +27 -0
- package/bundled-realms/pretui/internal/file-intake-fixtures.gts +17 -0
- package/bundled-realms/pretui/internal/file-intake.gts +193 -0
- package/bundled-realms/pretui/internal/forms-core.gts +394 -0
- package/bundled-realms/pretui/internal/forms-expression.gts +837 -0
- package/bundled-realms/pretui/internal/forms-picker-fixtures.gts +10 -0
- package/bundled-realms/pretui/internal/forms-picker.gts +129 -0
- package/bundled-realms/pretui/internal/forms-record.gts +173 -0
- package/bundled-realms/pretui/internal/freestyle.gts +117 -0
- package/bundled-realms/pretui/internal/ink.gts +25 -0
- package/bundled-realms/pretui/internal/json-tree.gts +526 -0
- package/bundled-realms/pretui/internal/keep-style.gts +168 -0
- package/bundled-realms/pretui/internal/media-assets.gts +10 -0
- package/bundled-realms/pretui/internal/media-library.gts +14 -0
- package/bundled-realms/pretui/internal/media-viewer.gts +322 -0
- package/bundled-realms/pretui/internal/media-wave.gts +270 -0
- package/bundled-realms/pretui/internal/menu.gts +522 -0
- package/bundled-realms/pretui/internal/money-fixtures.gts +6 -0
- package/bundled-realms/pretui/internal/money.gts +477 -0
- package/bundled-realms/pretui/internal/motion-core.gts +54 -0
- package/bundled-realms/pretui/internal/motion-pointer.gts +234 -0
- package/bundled-realms/pretui/internal/overlay-confirm.gts +35 -0
- package/bundled-realms/pretui/internal/overlay.gts +291 -0
- package/bundled-realms/pretui/internal/reading-extras.gts +56 -0
- package/bundled-realms/pretui/internal/reading-format.gts +232 -0
- package/bundled-realms/pretui/internal/reading-listing.gts +232 -0
- package/bundled-realms/pretui/internal/structure-chart.gts +414 -0
- package/bundled-realms/pretui/internal/structure-dashboard.gts +503 -0
- package/bundled-realms/pretui/internal/structure-flow.gts +48 -0
- package/bundled-realms/pretui/internal/structure-layout-fixtures.gts +36 -0
- package/bundled-realms/pretui/internal/structure-layout.gts +99 -0
- package/bundled-realms/pretui/internal/structure-morph.gts +140 -0
- package/bundled-realms/pretui/internal/structure-scenes.gts +25 -0
- package/bundled-realms/pretui/internal/structure-scroll.gts +72 -0
- package/bundled-realms/pretui/internal/structure-shell-fixtures.gts +25 -0
- package/bundled-realms/pretui/internal/surfaces-canvas-fixtures.gts +5 -0
- package/bundled-realms/pretui/internal/surfaces-canvas.gts +283 -0
- package/bundled-realms/pretui/internal/texture.gts +81 -0
- package/bundled-realms/pretui/internal/toggle-controls-fixtures.gts +7 -0
- package/bundled-realms/pretui/internal/toggle-controls.gts +81 -0
- package/bundled-realms/pretui/json-model.ts +1981 -0
- package/bundled-realms/pretui/media-chrome/LICENSE +19 -0
- package/bundled-realms/pretui/media-chrome/README.md +111 -0
- package/bundled-realms/pretui/media-chrome/index.js +1647 -0
- package/bundled-realms/pretui/media-examples.gts +315 -0
- package/bundled-realms/pretui/model-viewer/LICENSE +202 -0
- package/{LICENSE → bundled-realms/pretui/model-viewer/LICENSE-gainmap-js} +1 -1
- package/bundled-realms/pretui/model-viewer/LICENSE-lit +28 -0
- package/bundled-realms/pretui/model-viewer/LICENSE-three +21 -0
- package/bundled-realms/pretui/model-viewer/NOTICE +67 -0
- package/bundled-realms/pretui/model-viewer/README.md +122 -0
- package/bundled-realms/pretui/model-viewer/index.js +6413 -0
- package/bundled-realms/pretui/package.json +51 -0
- package/bundled-realms/pretui/photoswipe/LICENSE +21 -0
- package/bundled-realms/pretui/photoswipe/README.md +91 -0
- package/bundled-realms/pretui/photoswipe/index.js +149 -0
- package/bundled-realms/pretui/photoswipe/style.ts +465 -0
- package/bundled-realms/pretui/plot/LICENSE +13 -0
- package/bundled-realms/pretui/plot/LICENSE.d3 +13 -0
- package/bundled-realms/pretui/plot/LICENSE.interval-tree-1d +22 -0
- package/bundled-realms/pretui/plot/LICENSE.isoformat +13 -0
- package/bundled-realms/pretui/plot/README.md +35 -0
- package/bundled-realms/pretui/plot/index.d.ts +31 -0
- package/bundled-realms/pretui/plot/index.js +449 -0
- package/bundled-realms/pretui/pretui-component.gts +1336 -0
- package/bundled-realms/pretui/pretui-css.gts +380 -0
- package/bundled-realms/pretui/pretui-primitives.gts +162 -0
- package/bundled-realms/pretui/qrcode/LICENSE +34 -0
- package/bundled-realms/pretui/qrcode/README.md +87 -0
- package/bundled-realms/pretui/qrcode/index.js +35 -0
- package/bundled-realms/pretui/realm.json +16 -0
- package/bundled-realms/pretui/registry.ts +40 -0
- package/bundled-realms/pretui/sigpad/LICENSE +21 -0
- package/bundled-realms/pretui/sigpad/README.md +103 -0
- package/bundled-realms/pretui/sigpad/index.js +30 -0
- package/bundled-realms/pretui/structure-dashboard-css.ts +166 -0
- package/bundled-realms/pretui/surfaces/README.md +37 -0
- package/bundled-realms/pretui/surfaces/canvas/LICENSE.d3 +168 -0
- package/bundled-realms/pretui/surfaces/canvas/LICENSE.xyflow +21 -0
- package/bundled-realms/pretui/surfaces/canvas/index.js +25420 -0
- package/bundled-realms/pretui/surfaces/grid/LICENSE.tanstack +50 -0
- package/bundled-realms/pretui/surfaces/grid/index.js +21478 -0
- package/bundled-realms/pretui/surfaces/layout/index.js +9036 -0
- package/bundled-realms/pretui/surfaces-canvas-css.ts +1640 -0
- package/bundled-realms/pretui/surfaces-canvas-layout.ts +607 -0
- package/bundled-realms/pretui/tsconfig.json +54 -0
- package/bundled-realms/pretui/wavesurfer/LICENSE +29 -0
- package/bundled-realms/pretui/wavesurfer/README.md +85 -0
- package/bundled-realms/pretui/wavesurfer/index.js +184 -0
- package/bundled-realms/pretui/zxcvbn/LICENSE +21 -0
- package/bundled-realms/pretui/zxcvbn/README.md +192 -0
- package/bundled-realms/pretui/zxcvbn/index.d.ts +28 -0
- package/bundled-realms/pretui/zxcvbn/index.js +5931 -0
- package/bundled-test-harness/index.html +1 -1
- package/bundled-test-harness/tests/index.html +1 -1
- package/dist/api.js +1 -1
- package/dist/index.js +33 -33
- package/package.json +1 -1
- package/src/lib/test-engine.ts +14 -4
package/dist/index.js
CHANGED
|
@@ -65,8 +65,8 @@ ${c.toString(16)}\r
|
|
|
65
65
|
`,"latin1"):r===null&&e.write(`\r
|
|
66
66
|
0\r
|
|
67
67
|
\r
|
|
68
|
-
`,"latin1"),r!==null&&s!==r){if(n[t_])throw new ap;process.emitWarning(new ap)}e[_r].timeout&&e[_r].timeoutType===Bd&&e[_r].timeout.refresh&&e[_r].timeout.refresh(),n[al]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[yc]=!1,e&&(Je(n[En]<=1,"pipeline should only contain this request"),s(e))}};$W.exports=zQe});var eJ=y((A$t,ZW)=>{"use strict";var Gi=require("node:assert"),{pipeline:cRe}=require("node:stream"),
|
|
69
|
-
`;YW.sendHeaders.publish({request:e,headers:q,socket:s[Yr]})}let w=i==="GET"||i==="HEAD"||d===null;c?(A[IRe]="100-continue",h=s.request(A,{endStream:w,signal:u}),h[OC]=!0,h.once("continue",U)):(h=s.request(A,{endStream:w,signal:u}),h[OC]=!0,U()),++s[Vi],h.setTimeout(r);let L=!1;return h.once("response",q=>{let{[l_]:V,...ie}=q;if(e.onResponseStarted(),L=!0,h.setTimeout(n),e.aborted){h.removeAllListeners("data");return}e.onHeaders(Number(V),c_(ie),h.resume.bind(h),"")===!1&&h.pause(),h.on("data",re=>{e.aborted||e.completed||e.onData(re)===!1&&h.pause()})}),h.once("end",()=>{h.removeAllListeners("data"),L?(!e.aborted&&!e.completed&&e.onComplete({}),Um(t,e),t[ga]()):(E(new Ec("HTTP/2: stream half-closed (remote)")),Um(t,e,!0),t[ga]())}),h.once("close",()=>{h.removeAllListeners("data"),s[Vi]-=1,s[Vi]===0&&s.unref(),!e.aborted&&!e.completed&&E(new Ec("HTTP/2: stream closed before the response was complete"))}),h.once("error",function(q){h.removeAllListeners("data"),E(q)}),h.once("frameError",(q,V)=>{h.removeAllListeners("data"),E(new Ec(`HTTP/2: "frameError" received - type ${q}, code ${V}`))}),h.on("aborted",()=>{h.removeAllListeners("data")}),h.on("timeout",()=>{let q=L?new dRe(`HTTP/2: "body timeout after ${n}"`):new fRe(`HTTP/2: "headers timeout after ${r}"`);h.removeAllListeners("data"),s[Vi]-=1,s[Vi]===0&&s.unref(),E(q)}),h.once("trailers",q=>{e.aborted||e.completed||(h.removeAllListeners("data"),e.onComplete(q))}),!0;function U(){!d||I===0?zW(E,h,null,t,e,t[Yr],I,b):
|
|
68
|
+
`,"latin1"),r!==null&&s!==r){if(n[t_])throw new ap;process.emitWarning(new ap)}e[_r].timeout&&e[_r].timeoutType===Bd&&e[_r].timeout.refresh&&e[_r].timeout.refresh(),n[al]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[yc]=!1,e&&(Je(n[En]<=1,"pipeline should only contain this request"),s(e))}};$W.exports=zQe});var eJ=y((A$t,ZW)=>{"use strict";var Gi=require("node:assert"),{pipeline:cRe}=require("node:stream"),At=at(),{RequestContentLengthMismatchError:u_,RequestAbortedError:uRe,SocketError:Vm,InformationalError:Ec,InvalidArgumentError:pRe,HeadersTimeoutError:fRe,BodyTimeoutError:dRe}=st(),{kUrl:$m,kReset:LC,kClient:yi,kRunning:Gm,kPending:hRe,kQueue:jm,kPendingIdx:pp,kRunningIdx:ma,kError:Ei,kSocket:Yr,kStrictContentLength:ARe,kOnError:Td,kMaxConcurrentStreams:p_,kPingInterval:GW,kHTTP2Session:ll,kHTTP2InitialWindowSize:mRe,kHTTP2ConnectionWindowSize:gRe,kResume:ga,kSize:yRe,kHTTPContext:d_,kClosed:f_,kBodyTimeout:ERe,kHeadersTimeout:bRe,kEnableConnectProtocol:qm,kRemoteSettings:Hm,kHTTP2Stream:OC,kHTTP2SessionState:h_}=cr(),{channels:YW}=Ac(),Vi=Symbol("open streams"),WW,FC;try{FC=require("node:http2")}catch{FC={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:CRe,HTTP2_HEADER_METHOD:JW,HTTP2_HEADER_PATH:KW,HTTP2_HEADER_SCHEME:a_,HTTP2_HEADER_CONTENT_LENGTH:SRe,HTTP2_HEADER_EXPECT:IRe,HTTP2_HEADER_STATUS:l_,HTTP2_HEADER_PROTOCOL:vRe,NGHTTP2_REFUSED_STREAM:xRe,NGHTTP2_CANCEL:wRe}}=FC;function c_(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}function BRe(t,e){t[Yr]=e;let r=t[mRe],n=t[gRe],s=FC.connect(t[$m],{createConnection:()=>e,peerMaxConcurrentStreams:t[p_],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[Yr]=e,s[Vi]=0,s[yi]=t,s[Yr]=e,s[h_]={ping:{interval:t[GW]===0?null:setInterval(_Re,t[GW],s).unref()}},s[qm]=!1,s[Hm]=!1,n&&At.addListener(s,"connect",DRe.bind(s,n)),At.addListener(s,"error",NRe),At.addListener(s,"frameError",kRe),At.addListener(s,"end",QRe),At.addListener(s,"goaway",RRe),At.addListener(s,"close",ORe),At.addListener(s,"remoteSettings",PRe),s.unref(),t[ll]=s,e[ll]=s,At.addListener(e,"error",LRe),At.addListener(e,"end",MRe),At.addListener(e,"close",FRe),e[f_]=!1,e.on("close",URe),{version:"h2",defaultPipelining:1/0,write(i){return qRe(t,i)},resume(){TRe(t)},destroy(i,o){e[f_]?queueMicrotask(o):e.destroy(i).on("close",o)},get destroyed(){return e.destroyed},busy(i){if(i!=null)if(t[Gm]>0){if(i.idempotent===!1||(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Hm]===!1||At.bodyLength(i.body)!==0&&(At.isStream(i.body)||At.isAsyncIterable(i.body)||At.isFormDataLike(i.body)))return!0}else return(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Hm]===!1;return!1}}}function TRe(t){let e=t[Yr];e?.destroyed===!1&&(t[yRe]===0?(e.unref(),t[ll].unref()):(e.ref(),t[ll].ref()))}function DRe(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}function PRe(t){if(this[yi][p_]=t.maxConcurrentStreams??this[yi][p_],this[Hm]===!0&&this[qm]===!0&&t.enableConnectProtocol===!1){let e=new Ec("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[Yr][Ei]=e,this[yi][Td](e);return}this[qm]=t.enableConnectProtocol??this[qm],this[Hm]=!0,this[yi][ga]()}function _Re(t){let e=t[h_];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,s){let i=this[yi],o=this[yi];if(n!=null){let a=new Ec(`HTTP/2: "PING" errored - type ${n.message}`);o[Ei]=a,i[Td](a)}else i.emit("ping",s)}}function NRe(t){Gi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Yr][Ei]=t,this[yi][Td](t)}function kRe(t,e,r){if(r===0){let n=new Ec(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Yr][Ei]=n,this[yi][Td](n)}}function QRe(){let t=new Vm("other side closed",At.getSocketInfo(this[Yr]));this.destroy(t),At.destroy(this[Yr],t)}function Um(t,e,r=!1){let n=t[jm],s=t[ma];if(s<t[pp]&&n[s]===e){n[s]=null,t[ma]=s+1;return}let i=n.indexOf(e,s);i===-1||i>=t[pp]||(n.splice(i,1),t[pp]--,r&&t[pp]<t[ma]&&(t[pp]=t[ma]))}function RRe(t){let e=this[Ei]||new Vm(`HTTP/2: "GOAWAY" frame received with code ${t}`,At.getSocketInfo(this[Yr])),r=this[yi];if(r[Yr]=null,r[d_]=null,this.close(),this[ll]=null,At.destroy(this[Yr],e),r[ma]<r[jm].length){let n=r[jm][r[ma]];r[jm][r[ma]++]=null,n!=null&&At.errorRequest(r,n,e),r[pp]=r[ma]}Gi(r[Gm]===0),r.emit("disconnect",r[$m],[r],e),r.emit("connectionError",r[$m],[r],e),r[ga]()}function ORe(){let{[yi]:t,[h_]:e}=this,{[Yr]:r}=t,n=this[Yr][Ei]||this[Ei]||new Vm("closed",At.getSocketInfo(r));if(t[Yr]=null,t[d_]=null,e.ping.interval!=null&&(clearInterval(e.ping.interval),e.ping.interval=null),t.destroyed){Gi(t[hRe]===0);let s=t[jm].splice(t[ma]);for(let i=0;i<s.length;i++){let o=s[i];o!=null&&At.errorRequest(t,o,n)}}}function FRe(){let t=this[Ei]||new Vm("closed",At.getSocketInfo(this)),e=this[ll][yi];e[Yr]=null,e[d_]=null,this[ll]!==null&&this[ll].destroy(t),e[pp]=e[ma],Gi(e[Gm]===0),e.emit("disconnect",e[$m],[e],t),e[ga]()}function LRe(t){Gi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ei]=t,this[yi][Td](t)}function MRe(){At.destroy(this,new Vm("other side closed",At.getSocketInfo(this)))}function URe(){this[f_]=!0}function jRe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function qRe(t,e){let r=e.headersTimeout??t[bRe],n=e.bodyTimeout??t[ERe],s=t[ll],{method:i,path:o,host:a,upgrade:l,expectContinue:c,signal:u,protocol:p,headers:f}=e,{body:d}=e;if(l!=null&&l!=="websocket")return At.errorRequest(t,e,new pRe(`Custom upgrade "${l}" not supported over HTTP/2`)),!1;let A={};for(let q=0;q<f.length;q+=2){let V=f[q+0],ie=f[q+1];if(V==="cookie"){A[V]!=null?A[V]=Array.isArray(A[V])?(A[V].push(ie),A[V]):[A[V],ie]:A[V]=ie;continue}if(Array.isArray(ie))for(let re=0;re<ie.length;re++)A[V]?A[V]+=`, ${ie[re]}`:A[V]=ie[re];else A[V]?A[V]+=`, ${ie}`:A[V]=ie}let h=null,{hostname:m,port:g}=t[$m];A[CRe]=a||`${m}${g?`:${g}`:""}`,A[JW]=i;let E=q=>{e.aborted||e.completed||(q=q||new uRe,At.errorRequest(t,e,q),h!=null&&(h.removeAllListeners("data"),h.close(),t[Td](q),Um(t,e),t[ga]()),At.destroy(d,q))};try{e.onConnect(E)}catch(q){At.errorRequest(t,e,q)}if(e.aborted)return!1;if(l||i==="CONNECT")return s.ref(),l==="websocket"?s[qm]===!1?(At.errorRequest(t,e,new Ec("HTTP/2: Extended CONNECT protocol not supported by server")),s.unref(),!1):(A[JW]="CONNECT",A[vRe]="websocket",A[KW]=o,p==="ws:"||p==="wss:"?A[a_]=p==="ws:"?"http":"https":A[a_]=p==="http:"?"http":"https",h=s.request(A,{endStream:!1,signal:u}),h[OC]=!0,++s[Vi],h.once("response",(q,V)=>{let{[l_]:ie,...re}=q;try{e.onUpgrade(ie,c_(re),h)}catch(Ie){E(Ie);return}Um(t,e)}),h.on("error",()=>{(h.rstCode===xRe||h.rstCode===wRe)&&E(new Ec(`HTTP/2: "stream error" received - code ${h.rstCode}`))}),h.once("close",()=>{s[Vi]-=1,s[Vi]===0&&s.unref()}),h.setTimeout(r),!0):(h=s.request(A,{endStream:!1,signal:u}),h[OC]=!0,++s[Vi],h.on("response",q=>{let{[l_]:V,...ie}=q;try{e.onUpgrade(V,c_(ie),h)}catch(re){E(re);return}Um(t,e)}),h.on("error",E),h.once("close",()=>{s[Vi]-=1,s[Vi]===0&&s.unref()}),h.setTimeout(r),!0);A[KW]=o,A[a_]=p==="http:"?"http":"https";let b=i==="PUT"||i==="POST"||i==="PATCH";d&&typeof d.read=="function"&&d.read(0);let I=At.bodyLength(d);if(At.isFormDataLike(d)){WW??=vd().extractBody;let[q,V]=WW(d);A["content-type"]=V,d=q.stream,I=q.length}if(I==null&&(I=e.contentLength),b||(I=null),jRe(i)&&I>0&&e.contentLength!=null&&e.contentLength!==I){if(t[ARe])return At.errorRequest(t,e,new u_),!1;process.emitWarning(new u_)}if(I!=null&&(Gi(d||I===0,"no body must not have content length"),A[SRe]=`${I}`),s.ref(),YW.sendHeaders.hasSubscribers){let q="";for(let V in A)q+=`${V}: ${A[V]}\r
|
|
69
|
+
`;YW.sendHeaders.publish({request:e,headers:q,socket:s[Yr]})}let w=i==="GET"||i==="HEAD"||d===null;c?(A[IRe]="100-continue",h=s.request(A,{endStream:w,signal:u}),h[OC]=!0,h.once("continue",U)):(h=s.request(A,{endStream:w,signal:u}),h[OC]=!0,U()),++s[Vi],h.setTimeout(r);let L=!1;return h.once("response",q=>{let{[l_]:V,...ie}=q;if(e.onResponseStarted(),L=!0,h.setTimeout(n),e.aborted){h.removeAllListeners("data");return}e.onHeaders(Number(V),c_(ie),h.resume.bind(h),"")===!1&&h.pause(),h.on("data",re=>{e.aborted||e.completed||e.onData(re)===!1&&h.pause()})}),h.once("end",()=>{h.removeAllListeners("data"),L?(!e.aborted&&!e.completed&&e.onComplete({}),Um(t,e),t[ga]()):(E(new Ec("HTTP/2: stream half-closed (remote)")),Um(t,e,!0),t[ga]())}),h.once("close",()=>{h.removeAllListeners("data"),s[Vi]-=1,s[Vi]===0&&s.unref(),!e.aborted&&!e.completed&&E(new Ec("HTTP/2: stream closed before the response was complete"))}),h.once("error",function(q){h.removeAllListeners("data"),E(q)}),h.once("frameError",(q,V)=>{h.removeAllListeners("data"),E(new Ec(`HTTP/2: "frameError" received - type ${q}, code ${V}`))}),h.on("aborted",()=>{h.removeAllListeners("data")}),h.on("timeout",()=>{let q=L?new dRe(`HTTP/2: "body timeout after ${n}"`):new fRe(`HTTP/2: "headers timeout after ${r}"`);h.removeAllListeners("data"),s[Vi]-=1,s[Vi]===0&&s.unref(),E(q)}),h.once("trailers",q=>{e.aborted||e.completed||(h.removeAllListeners("data"),e.onComplete(q))}),!0;function U(){!d||I===0?zW(E,h,null,t,e,t[Yr],I,b):At.isBuffer(d)?zW(E,h,d,t,e,t[Yr],I,b):At.isBlobLike(d)?typeof d.stream=="function"?XW(E,h,d.stream(),t,e,t[Yr],I,b):$Re(E,h,d,t,e,t[Yr],I,b):At.isStream(d)?HRe(E,t[Yr],b,h,d,t,e,I):At.isIterable(d)?XW(E,h,d,t,e,t[Yr],I,b):Gi(!1)}}function zW(t,e,r,n,s,i,o,a){try{r!=null&&At.isBuffer(r)&&(Gi(o===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),a||(i[LC]=!0),s.onRequestSent(),n[ga]()}catch(l){t(l)}}function HRe(t,e,r,n,s,i,o,a){Gi(a!==0||i[Gm]===0,"stream body cannot be pipelined");let l=cRe(s,n,u=>{u?(At.destroy(l,u),t(u)):(At.removeAllListeners(l),o.onRequestSent(),r||(e[LC]=!0),i[ga]())});At.addListener(l,"data",c);function c(u){o.onBodySent(u)}}async function $Re(t,e,r,n,s,i,o,a){Gi(o===r.size,"blob body must have content length");try{if(o!=null&&o!==r.size)throw new u_;let l=Buffer.from(await r.arrayBuffer());e.cork(),e.write(l),e.uncork(),e.end(),s.onBodySent(l),s.onRequestSent(),a||(i[LC]=!0),n[ga]()}catch(l){t(l)}}async function XW(t,e,r,n,s,i,o,a){Gi(o!==0||n[Gm]===0,"iterator body cannot be pipelined");let l=null;function c(){if(l){let p=l;l=null,p()}}let u=()=>new Promise((p,f)=>{Gi(l===null),i[Ei]?f(i[Ei]):l=p});e.on("close",c).on("drain",c);try{for await(let p of r){if(i[Ei])throw i[Ei];let f=e.write(p);s.onBodySent(p),f||await u()}e.end(),s.onRequestSent(),a||(i[LC]=!0),n[ga]()}catch(p){t(p)}finally{e.off("close",c).off("drain",c)}}ZW.exports=BRe});var Ic=y((m$t,lJ)=>{"use strict";var cl=require("node:assert"),sJ=require("node:net"),Ym=require("node:http"),fp=at(),{ClientStats:VRe}=aP(),{channels:Dd}=Ac(),GRe=yY(),YRe=rp(),{InvalidArgumentError:Nr,InformationalError:WRe,ClientDestroyedError:JRe}=st(),KRe=np(),{kUrl:ya,kServerName:Sc,kClient:zRe,kBusy:m_,kConnect:XRe,kResuming:dp,kRunning:zm,kPending:Xm,kSize:Wm,kQueue:_o,kConnected:ZRe,kConnecting:Pd,kNeedDrain:Cc,kKeepAliveDefaultTimeout:tJ,kHostHeader:eOe,kPendingIdx:No,kRunningIdx:pl,kError:tOe,kPipelining:MC,kKeepAliveTimeoutValue:rOe,kMaxHeadersSize:nOe,kKeepAliveMaxTimeout:sOe,kKeepAliveTimeoutThreshold:iOe,kHeadersTimeout:oOe,kBodyTimeout:aOe,kStrictContentLength:lOe,kConnector:Jm,kMaxRequests:g_,kCounter:cOe,kClose:uOe,kDestroy:pOe,kDispatch:fOe,kLocalAddress:Km,kMaxResponseSize:dOe,kOnError:hOe,kHTTPContext:hn,kMaxConcurrentStreams:AOe,kHTTP2InitialWindowSize:mOe,kHTTP2ConnectionWindowSize:gOe,kResume:ul,kPingInterval:yOe}=cr(),EOe=VW(),bOe=eJ(),bc=Symbol("kClosedResolve"),COe=Ym&&Ym.maxHeaderSize&&Number.isInteger(Ym.maxHeaderSize)&&Ym.maxHeaderSize>0?()=>Ym.maxHeaderSize:()=>{throw new Nr("http module not available or http.maxHeaderSize invalid")},rJ=()=>{};function iJ(t){return t[MC]??t[hn]?.defaultPipelining??1}var y_=class extends YRe{constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:s,requestTimeout:i,connectTimeout:o,bodyTimeout:a,idleTimeout:l,keepAlive:c,keepAliveTimeout:u,maxKeepAliveTimeout:p,keepAliveMaxTimeout:f,keepAliveTimeoutThreshold:d,socketPath:A,pipelining:h,tls:m,strictContentLength:g,maxCachedSessions:E,connect:b,maxRequestsPerClient:I,localAddress:w,maxResponseSize:L,autoSelectFamily:U,autoSelectFamilyAttemptTimeout:q,maxConcurrentStreams:V,allowH2:ie,useH2c:re,initialWindowSize:Ie,connectionWindowSize:Ze,pingInterval:je,webSocket:Ct}={}){if(c!==void 0)throw new Nr("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new Nr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(i!==void 0)throw new Nr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(l!==void 0)throw new Nr("unsupported idleTimeout, use keepAliveTimeout instead");if(p!==void 0)throw new Nr("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null){if(!Number.isInteger(r)||r<1)throw new Nr("invalid maxHeaderSize")}else r=COe();if(A!=null&&typeof A!="string")throw new Nr("invalid socketPath");if(o!=null&&(!Number.isFinite(o)||o<0))throw new Nr("invalid connectTimeout");if(u!=null&&(!Number.isFinite(u)||u<=0))throw new Nr("invalid keepAliveTimeout");if(f!=null&&(!Number.isFinite(f)||f<=0))throw new Nr("invalid keepAliveMaxTimeout");if(d!=null&&!Number.isFinite(d))throw new Nr("invalid keepAliveTimeoutThreshold");if(n!=null&&(!Number.isInteger(n)||n<0))throw new Nr("headersTimeout must be a positive integer or zero");if(a!=null&&(!Number.isInteger(a)||a<0))throw new Nr("bodyTimeout must be a positive integer or zero");if(b!=null&&typeof b!="function"&&typeof b!="object")throw new Nr("connect must be a function or an object");if(I!=null&&(!Number.isInteger(I)||I<0))throw new Nr("maxRequestsPerClient must be a positive number");if(w!=null&&(typeof w!="string"||sJ.isIP(w)===0))throw new Nr("localAddress must be valid string IP address");if(L!=null&&(!Number.isInteger(L)||L<-1))throw new Nr("maxResponseSize must be a positive number");if(q!=null&&(!Number.isInteger(q)||q<-1))throw new Nr("autoSelectFamilyAttemptTimeout must be a positive number");if(ie!=null&&typeof ie!="boolean")throw new Nr("allowH2 must be a valid boolean value");if(V!=null&&(typeof V!="number"||V<1))throw new Nr("maxConcurrentStreams must be a positive integer, greater than 0");if(re!=null&&typeof re!="boolean")throw new Nr("useH2c must be a valid boolean value");if(Ie!=null&&(!Number.isInteger(Ie)||Ie<1))throw new Nr("initialWindowSize must be a positive integer, greater than 0");if(Ze!=null&&(!Number.isInteger(Ze)||Ze<1))throw new Nr("connectionWindowSize must be a positive integer, greater than 0");if(je!=null&&(typeof je!="number"||!Number.isInteger(je)||je<0))throw new Nr("pingInterval must be a positive integer, greater or equal to 0");if(super({webSocket:Ct}),typeof b!="function")b=KRe({...m,maxCachedSessions:E,allowH2:ie,useH2c:re,socketPath:A,timeout:o,...typeof U=="boolean"?{autoSelectFamily:U,autoSelectFamilyAttemptTimeout:q}:void 0,...b});else{let Mt=b;b=(qt,Ht)=>Mt({...qt,...A!=null?{socketPath:A}:null,...ie!=null?{allowH2:ie}:null},Ht)}this[ya]=fp.parseOrigin(e),this[Jm]=b,this[MC]=h??1,this[nOe]=r,this[tJ]=u??4e3,this[sOe]=f??6e5,this[iOe]=d??2e3,this[rOe]=this[tJ],this[Sc]=null,this[Km]=w??null,this[dp]=0,this[Cc]=0,this[eOe]=`host: ${this[ya].hostname}${this[ya].port?`:${this[ya].port}`:""}\r
|
|
70
70
|
`,this[aOe]=a??3e5,this[oOe]=n??3e5,this[lOe]=g??!0,this[g_]=I,this[bc]=null,this[dOe]=L>-1?L:-1,this[hn]=null,this[AOe]=V??100,this[mOe]=Ie??262144,this[gOe]=Ze??524288,this[yOe]=je??6e4,this[_o]=[],this[pl]=0,this[No]=0,this[ul]=Mt=>E_(this,Mt),this[hOe]=Mt=>oJ(this,Mt)}get pipelining(){return this[MC]}set pipelining(e){this[MC]=e,this[ul](!0)}get stats(){return new VRe(this)}get[Xm](){return this[_o].length-this[No]}get[zm](){return this[No]-this[pl]}get[Wm](){return this[_o].length-this[pl]}get[ZRe](){return!!this[hn]&&!this[Pd]&&!this[hn].destroyed}get[m_](){return!!(this[hn]?.busy(null)||this[Wm]>=(iJ(this)||1)||this[Xm]>0)}[XRe](e){aJ(this),this.once("connect",e)}[fOe](e,r){let n=new GRe(this[ya].origin,e,r);return this[_o].push(n),this[dp]||(fp.bodyLength(n.body)==null&&fp.isIterable(n.body)?(this[dp]=1,queueMicrotask(()=>E_(this))):this[ul](!0)),this[dp]&&this[Cc]!==2&&this[m_]&&(this[Cc]=2),this[Cc]<2}[uOe](){return new Promise(e=>{this[Wm]?this[bc]=e:e(null)})}[pOe](e){return new Promise(r=>{let n=this[_o].splice(this[No]);for(let i=0;i<n.length;i++){let o=n[i];o!=null&&fp.errorRequest(this,o,e)}let s=()=>{this[bc]&&(this[bc](),this[bc]=null),r(null)};this[hn]?(this[hn].destroy(e,s),this[hn]=null):queueMicrotask(s),this[ul]()})}};function oJ(t,e){if(t[zm]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){cl(t[No]===t[pl]);let r=t[_o].splice(t[pl]);for(let n=0;n<r.length;n++){let s=r[n];s!=null&&fp.errorRequest(t,s,e)}cl(t[Wm]===0)}}function aJ(t){cl(!t[Pd]),cl(!t[hn]);let{host:e,hostname:r,protocol:n,port:s}=t[ya];if(r[0]==="["){let i=r.indexOf("]");cl(i!==-1);let o=r.substring(1,i);cl(sJ.isIPv6(o)),r=o}t[Pd]=!0,Dd.beforeConnect.hasSubscribers&&Dd.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[hn]?.version,servername:t[Sc],localAddress:t[Km]},connector:t[Jm]});try{t[Jm]({host:e,hostname:r,protocol:n,port:s,servername:t[Sc],localAddress:t[Km]},(i,o)=>{if(i){A_(t,i,{host:e,hostname:r,protocol:n,port:s}),t[ul]();return}if(t.destroyed){fp.destroy(o.on("error",rJ),new JRe),t[ul]();return}cl(o);try{t[hn]=o.alpnProtocol==="h2"?bOe(t,o):EOe(t,o)}catch(a){o.destroy().on("error",rJ),A_(t,a,{host:e,hostname:r,protocol:n,port:s}),t[ul]();return}t[Pd]=!1,o[cOe]=0,o[g_]=t[g_],o[zRe]=t,o[tOe]=null,Dd.connected.hasSubscribers&&Dd.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[hn]?.version,servername:t[Sc],localAddress:t[Km]},connector:t[Jm],socket:o}),t.emit("connect",t[ya],[t]),t[ul]()})}catch(i){A_(t,i,{host:e,hostname:r,protocol:n,port:s}),t[ul]()}}function A_(t,e,{host:r,hostname:n,protocol:s,port:i}){if(!t.destroyed){if(t[Pd]=!1,Dd.connectError.hasSubscribers&&Dd.connectError.publish({connectParams:{host:r,hostname:n,protocol:s,port:i,version:t[hn]?.version,servername:t[Sc],localAddress:t[Km]},connector:t[Jm],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(cl(t[zm]===0);t[Xm]>0&&t[_o][t[No]].servername===t[Sc];){let o=t[_o][t[No]++];fp.errorRequest(t,o,e)}else oJ(t,e);t.emit("connectionError",t[ya],[t],e)}}function nJ(t){t[Cc]=0,t.emit("drain",t[ya],[t])}function E_(t,e){t[dp]!==2&&(t[dp]=2,SOe(t,e),t[dp]=0,t[pl]>256&&(t[_o].splice(0,t[pl]),t[No]-=t[pl],t[pl]=0))}function SOe(t,e){for(;;){if(t.destroyed){cl(t[Xm]===0);return}if(t[bc]&&!t[Wm]){t[bc](),t[bc]=null;return}if(t[hn]&&t[hn].resume(),t[m_])t[Cc]=2;else if(t[Cc]===2){e?(t[Cc]=1,queueMicrotask(()=>nJ(t))):nJ(t);continue}if(t[Xm]===0||t[zm]>=(iJ(t)||1))return;let r=t[_o][t[No]];if(r===null)return;if(t[ya].protocol==="https:"&&t[Sc]!==r.servername){if(t[zm]>0)return;t[Sc]=r.servername,t[hn]?.destroy(new WRe("servername changed"),()=>{t[hn]=null,E_(t)})}if(t[Pd])return;if(!t[hn]){aJ(t);return}if(t[hn].destroyed||t[hn].busy(r))return;!r.aborted&&t[hn].write(r)?t[No]++:t[_o].splice(t[No],1)}}lJ.exports=y_});var b_=y((y$t,cJ)=>{"use strict";var UC=class{bottom=0;top=0;list=new Array(2048).fill(void 0);next=null;isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};cJ.exports=class{constructor(){this.head=this.tail=new UC}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new UC),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var jC=y((E$t,yJ)=>{"use strict";var{PoolStats:IOe}=aP(),vOe=rp(),xOe=b_(),{kConnected:C_,kSize:uJ,kRunning:pJ,kPending:fJ,kQueued:Zm,kBusy:wOe,kFree:BOe,kUrl:TOe,kClose:DOe,kDestroy:POe,kDispatch:_Oe}=cr(),Fn=Symbol("clients"),Ds=Symbol("needDrain"),eg=Symbol("queue"),S_=Symbol("closed resolve"),I_=Symbol("onDrain"),dJ=Symbol("onConnect"),hJ=Symbol("onDisconnect"),AJ=Symbol("onConnectionError"),v_=Symbol("get dispatcher"),mJ=Symbol("add client"),gJ=Symbol("remove client"),x_=class extends vOe{[eg]=new xOe;[Zm]=0;[Fn]=[];[Ds]=!1;[I_](e,r,n){let s=this[eg],i=!1;for(;!i;){let o=s.shift();if(!o)break;this[Zm]--,i=!e.dispatch(o.opts,o.handler)}if(e[Ds]=i,!i&&this[Ds]&&(this[Ds]=!1,this.emit("drain",r,[this,...n])),this[S_]&&s.isEmpty()){let o=[];for(let a=0;a<this[Fn].length;a++){let l=this[Fn][a];l.destroyed||o.push(l.close())}return Promise.all(o).then(this[S_])}}[dJ]=(e,r)=>{this.emit("connect",e,[this,...r])};[hJ]=(e,r,n)=>{this.emit("disconnect",e,[this,...r],n)};[AJ]=(e,r,n)=>{this.emit("connectionError",e,[this,...r],n)};get[wOe](){return this[Ds]}get[C_](){let e=0;for(let{[C_]:r}of this[Fn])e+=r;return e}get[BOe](){let e=0;for(let{[C_]:r,[Ds]:n}of this[Fn])e+=r&&!n;return e}get[fJ](){let e=this[Zm];for(let{[fJ]:r}of this[Fn])e+=r;return e}get[pJ](){let e=0;for(let{[pJ]:r}of this[Fn])e+=r;return e}get[uJ](){let e=this[Zm];for(let{[uJ]:r}of this[Fn])e+=r;return e}get stats(){return new IOe(this)}[DOe](){if(this[eg].isEmpty()){let e=[];for(let r=0;r<this[Fn].length;r++){let n=this[Fn][r];n.destroyed||e.push(n.close())}return Promise.all(e)}else return new Promise(e=>{this[S_]=e})}[POe](e){for(;;){let n=this[eg].shift();if(!n)break;n.handler.onError(e)}let r=new Array(this[Fn].length);for(let n=0;n<this[Fn].length;n++)r[n]=this[Fn][n].destroy(e);return Promise.all(r)}[_Oe](e,r){let n=this[v_]();return n?n.dispatch(e,r)||(n[Ds]=!0,this[Ds]=!this[v_]()):(this[Ds]=!0,this[eg].push({opts:e,handler:r}),this[Zm]++),!this[Ds]}[mJ](e){return e.on("drain",this[I_].bind(this,e)).on("connect",this[dJ]).on("disconnect",this[hJ]).on("connectionError",this[AJ]),this[Fn].push(e),this[Ds]&&queueMicrotask(()=>{this[Ds]&&this[I_](e,e[TOe],[e,this])}),this}[gJ](e){e.close(()=>{let r=this[Fn].indexOf(e);r!==-1&&this[Fn].splice(r,1)}),this[Ds]=this[Fn].some(r=>!r[Ds]&&r.closed!==!0&&r.destroyed!==!0)}};yJ.exports={PoolBase:x_,kClients:Fn,kNeedDrain:Ds,kAddClient:mJ,kRemoveClient:gJ,kGetDispatcher:v_}});var hp=y((b$t,SJ)=>{"use strict";var{PoolBase:NOe,kClients:qC,kNeedDrain:kOe,kAddClient:QOe,kGetDispatcher:ROe,kRemoveClient:OOe}=jC(),FOe=Ic(),{InvalidArgumentError:w_}=st(),EJ=at(),{kUrl:bJ}=cr(),LOe=np(),HC=Symbol("options"),B_=Symbol("connections"),CJ=Symbol("factory");function MOe(t,e){return new FOe(t,e)}var T_=class extends NOe{constructor(e,{connections:r,factory:n=MOe,connect:s,connectTimeout:i,tls:o,maxCachedSessions:a,socketPath:l,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u,allowH2:p,clientTtl:f,...d}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new w_("invalid connections");if(typeof n!="function")throw new w_("factory must be a function.");if(s!=null&&typeof s!="function"&&typeof s!="object")throw new w_("connect must be a function or an object");typeof s!="function"&&(s=LOe({...o,maxCachedSessions:a,allowH2:p,socketPath:l,timeout:i,...typeof c=="boolean"?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u}:void 0,...s})),super(d),this[B_]=r||null,this[bJ]=EJ.parseOrigin(e),this[HC]={...EJ.deepClone(d),connect:s,allowH2:p,clientTtl:f,socketPath:l},this[HC].interceptors=d.interceptors?{...d.interceptors}:void 0,this[CJ]=n,this.on("connect",(A,h)=>{if(f!=null&&f>0)for(let m of h)Object.assign(m,{ttl:Date.now()})}),this.on("connectionError",(A,h,m)=>{for(let g of h){let E=this[qC].indexOf(g);E!==-1&&this[qC].splice(E,1)}})}[ROe](){let e=this[HC].clientTtl;for(let r of this[qC])if(e!=null&&e>0&&r.ttl&&Date.now()-r.ttl>e)this[OOe](r);else if(!r[kOe])return r;if(!this[B_]||this[qC].length<this[B_]){let r=this[CJ](this[bJ],this[HC]);return this[QOe](r),r}}};SJ.exports=T_});var wJ=y((C$t,xJ)=>{"use strict";var{BalancedPoolMissingUpstreamError:UOe,InvalidArgumentError:jOe}=st(),{PoolBase:qOe,kClients:es,kNeedDrain:tg,kAddClient:HOe,kRemoveClient:$Oe,kGetDispatcher:VOe}=jC(),GOe=hp(),{kUrl:$C}=cr(),VC=at(),IJ=Symbol("factory"),rg=Symbol("options"),vJ=Symbol("kGreatestCommonDivisor"),Ap=Symbol("kCurrentWeight"),mp=Symbol("kIndex"),Yi=Symbol("kWeight"),GC=Symbol("kMaxWeightPerServer"),YC=Symbol("kErrorPenalty");function YOe(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}function WOe(t,e){return new GOe(t,e)}var D_=class extends qOe{constructor(e=[],{factory:r=WOe,connect:n,tls:s,...i}={}){if(typeof r!="function")throw new jOe("factory must be a function.");super(i),n&&typeof n!="function"&&(n={...n}),s&&typeof s!="function"&&(s={...s}),this[rg]={...VC.deepClone(i),connect:n,tls:s},this[rg].interceptors=i.interceptors?{...i.interceptors}:void 0,this[mp]=-1,this[Ap]=0,this[GC]=this[rg].maxWeightPerServer||100,this[YC]=this[rg].errorPenalty||15,Array.isArray(e)||(e=[e]),this[IJ]=r;for(let o of e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let r=VC.parseOrigin(e).origin;if(this[es].find(s=>s[$C].origin===r&&s.closed!==!0&&s.destroyed!==!0))return this;let n=this[IJ](r,this[rg]);this[HOe](n),n.on("connect",()=>{n[Yi]=Math.min(this[GC],n[Yi]+this[YC])}),n.on("connectionError",()=>{n[Yi]=Math.max(1,n[Yi]-this[YC]),this._updateBalancedPoolStats()}),n.on("disconnect",(...s)=>{let i=s[2];i&&i.code==="UND_ERR_SOCKET"&&(n[Yi]=Math.max(1,n[Yi]-this[YC]),this._updateBalancedPoolStats())});for(let s of this[es])s[Yi]=this[GC];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;r<this[es].length;r++)e=YOe(this[es][r][Yi],e);this[vJ]=e}removeUpstream(e){let r=VC.parseOrigin(e).origin,n=this[es].find(s=>s[$C].origin===r&&s.closed!==!0&&s.destroyed!==!0);return n&&this[$Oe](n),this}getUpstream(e){let r=VC.parseOrigin(e).origin;return this[es].find(n=>n[$C].origin===r&&n.closed!==!0&&n.destroyed!==!0)}get upstreams(){return this[es].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[$C].origin)}[VOe](){if(this[es].length===0)throw new UOe;if(!this[es].find(i=>!i[tg]&&i.closed!==!0&&i.destroyed!==!0)||this[es].map(i=>i[tg]).reduce((i,o)=>i&&o,!0))return;let n=0,s=this[es].findIndex(i=>!i[tg]);for(;n++<this[es].length;){this[mp]=(this[mp]+1)%this[es].length;let i=this[es][this[mp]];if(i[Yi]>this[es][s][Yi]&&!i[tg]&&(s=this[mp]),this[mp]===0&&(this[Ap]=this[Ap]-this[vJ],this[Ap]<=0&&(this[Ap]=this[GC])),i[Yi]>=this[Ap]&&!i[tg])return i}return this[Ap]=this[es][s][Yi],this[mp]=s,this[es][s]}};xJ.exports=D_});var PJ=y((S$t,DJ)=>{"use strict";var{PoolBase:JOe,kClients:WC,kNeedDrain:KOe,kAddClient:BJ,kGetDispatcher:zOe,kRemoveClient:XOe}=jC(),ZOe=Ic(),{InvalidArgumentError:P_}=st(),TJ=at(),{kUrl:__}=cr(),eFe=np(),ng=Symbol("options"),N_=Symbol("connections"),k_=Symbol("factory"),JC=Symbol("index");function tFe(t,e){return new ZOe(t,e)}var Q_=class extends JOe{constructor(e,{connections:r,factory:n=tFe,connect:s,connectTimeout:i,tls:o,maxCachedSessions:a,socketPath:l,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u,allowH2:p,clientTtl:f,...d}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new P_("invalid connections");if(typeof n!="function")throw new P_("factory must be a function.");if(s!=null&&typeof s!="function"&&typeof s!="object")throw new P_("connect must be a function or an object");typeof s!="function"&&(s=eFe({...o,maxCachedSessions:a,allowH2:p,socketPath:l,timeout:i,...typeof c=="boolean"?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u}:void 0,...s})),super(),this[N_]=r||null,this[__]=TJ.parseOrigin(e),this[ng]={...TJ.deepClone(d),connect:s,allowH2:p,clientTtl:f,socketPath:l},this[ng].interceptors=d.interceptors?{...d.interceptors}:void 0,this[k_]=n,this[JC]=-1,this.on("connect",(A,h)=>{if(f!=null&&f>0)for(let m of h)Object.assign(m,{ttl:Date.now()})}),this.on("connectionError",(A,h,m)=>{for(let g of h){let E=this[WC].indexOf(g);E!==-1&&this[WC].splice(E,1)}})}[zOe](){let e=this[ng].clientTtl,r=this[WC].length;if(r===0){let s=this[k_](this[__],this[ng]);return this[BJ](s),s}let n=0;for(;n<r;){this[JC]=(this[JC]+1)%r;let s=this[WC][this[JC]];if(e!=null&&e>0&&s.ttl&&Date.now()-s.ttl>e){this[XOe](s),n++;continue}if(!s[KOe])return s;n++}if(!this[N_]||r<this[N_]){let s=this[k_](this[__],this[ng]);return this[BJ](s),s}}};DJ.exports=Q_});var gp=y((I$t,FJ)=>{"use strict";var{InvalidArgumentError:KC,MaxOriginsReachedError:rFe}=st(),{kClients:Wi,kRunning:_J,kClose:nFe,kDestroy:sFe,kDispatch:iFe,kUrl:oFe}=cr(),aFe=rp(),lFe=hp(),cFe=Ic(),uFe=at(),NJ=Symbol("onConnect"),kJ=Symbol("onDisconnect"),QJ=Symbol("onConnectionError"),RJ=Symbol("onDrain"),OJ=Symbol("factory"),R_=Symbol("options"),sg=Symbol("origins");function pFe(t,e){return e&&e.connections===1?new cFe(t,e):new lFe(t,e)}var O_=class extends aFe{constructor({factory:e=pFe,maxOrigins:r=1/0,connect:n,...s}={}){if(typeof e!="function")throw new KC("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new KC("connect must be a function or an object");if(typeof r!="number"||Number.isNaN(r)||r<=0)throw new KC("maxOrigins must be a number greater than 0");super(s),n&&typeof n!="function"&&(n={...n}),this[R_]={...uFe.deepClone(s),maxOrigins:r,connect:n},this[OJ]=e,this[Wi]=new Map,this[sg]=new Set,this[RJ]=(i,o)=>{this.emit("drain",i,[this,...o])},this[NJ]=(i,o)=>{this.emit("connect",i,[this,...o])},this[kJ]=(i,o,a)=>{this.emit("disconnect",i,[this,...o],a)},this[QJ]=(i,o,a)=>{this.emit("connectionError",i,[this,...o],a)}}get[_J](){let e=0;for(let{dispatcher:r}of this[Wi].values())e+=r[_J];return e}[iFe](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new KC("opts.origin must be a non-empty string or URL.");if(this[sg].size>=this[R_].maxOrigins&&!this[sg].has(n))throw new rFe;let s=this[Wi].get(n),i=s&&s.dispatcher;if(!i){let o=a=>{let l=this[Wi].get(n);l&&(a&&(l.count-=1),l.count<=0&&(this[Wi].delete(n),l.dispatcher.destroyed||l.dispatcher.close()),this[sg].delete(n))};i=this[OJ](e.origin,this[R_]).on("drain",this[RJ]).on("connect",(a,l)=>{let c=this[Wi].get(n);c&&(c.count+=1),this[NJ](a,l)}).on("disconnect",(a,l,c)=>{o(!0),this[kJ](a,l,c)}).on("connectionError",(a,l,c)=>{o(!1),this[QJ](a,l,c)}),this[Wi].set(n,{count:0,dispatcher:i}),this[sg].add(n)}return i.dispatch(e,r)}[nFe](){let e=[];for(let{dispatcher:r}of this[Wi].values())e.push(r.close());return this[Wi].clear(),Promise.all(e)}[sFe](e){let r=[];for(let{dispatcher:n}of this[Wi].values())r.push(n.destroy(e));return this[Wi].clear(),Promise.all(r)}get stats(){let e={};for(let{dispatcher:r}of this[Wi].values())r.stats&&(e[r[oFe].origin]=r.stats);return e}};FJ.exports=O_});var UJ=y((v$t,MJ)=>{"use strict";var{Buffer:xc}=require("node:buffer"),F_=require("node:net"),{InvalidArgumentError:vc}=st();function fFe(t){if(F_.isIPv4(t)){let r=t.split(".").map(Number);return{type:1,buffer:xc.from(r)}}if(F_.isIPv6(t))return{type:4,buffer:LJ(t)};let e=xc.from(t,"utf8");if(e.length>255)throw new vc("Domain name too long (max 255 bytes)");return{type:3,buffer:xc.concat([xc.from([e.length]),e])}}function LJ(t){let e=xc.alloc(16),r=t;if(t.includes(".")){let s=t.lastIndexOf(":"),i=t.slice(s+1);if(F_.isIPv4(i)){let o=i.split(".").map(Number),a=(o[0]<<8|o[1]).toString(16),l=(o[2]<<8|o[3]).toString(16);r=`${t.slice(0,s)}:${a}:${l}`}}let n=r.indexOf("::");if(n!==-1){let s=r.slice(0,n),i=r.slice(n+2),o=s===""?[]:s.split(":"),a=i===""?[]:i.split(":"),l=0;for(let c of o)e.writeUInt16BE(parseInt(c,16),l),l+=2;l=16-a.length*2;for(let c of a)e.writeUInt16BE(parseInt(c,16),l),l+=2}else{let s=r.split(":");for(let i=0;i<s.length;i++)e.writeUInt16BE(parseInt(s[i],16),i*2)}return e}function dFe(t,e,r){let n=xc.allocUnsafe(2);return n.writeUInt16BE(r,0),xc.concat([xc.from([t]),e,n])}function hFe(t,e=0){if(t.length<e+1)throw new vc("Buffer too small to contain address type");let r=t[e],n,s=e+1;switch(r){case 1:{if(t.length<s+6)throw new vc("Buffer too small for IPv4 address");n=Array.from(t.subarray(s,s+4)).join("."),s+=4;break}case 3:{if(t.length<s+1)throw new vc("Buffer too small for domain length");let o=t[s];if(s+=1,t.length<s+o+2)throw new vc("Buffer too small for domain address");n=t.subarray(s,s+o).toString("utf8"),s+=o;break}case 4:{if(t.length<s+18)throw new vc("Buffer too small for IPv6 address");let o=[];for(let a=0;a<8;a++){let l=t.readUInt16BE(s+a*2);o.push(l.toString(16))}n=o.join(":"),s+=16;break}default:throw new vc(`Invalid address type: ${r}`)}if(t.length<s+2)throw new vc("Buffer too small for port");let i=t.readUInt16BE(s);return s+=2,{address:n,port:i,bytesRead:s-e}}function AFe(t){let r={1:"General SOCKS server failure",2:"Connection not allowed by ruleset",3:"Network unreachable",4:"Host unreachable",5:"Connection refused",6:"TTL expired",7:"Command not supported",8:"Address type not supported"}[t]||`Unknown SOCKS5 error code: ${t}`,n=new Error(r);return n.code=`SOCKS5_${t}`,n}MJ.exports={parseAddress:fFe,parseIPv6:LJ,buildAddressBuffer:dFe,parseResponseAddress:hFe,createReplyError:AFe}});var $J=y((x$t,HJ)=>{"use strict";var{EventEmitter:mFe}=require("node:events"),{Buffer:yp}=require("node:buffer"),{InvalidArgumentError:_d,Socks5ProxyError:wc}=st(),{debuglog:gFe}=require("node:util"),{parseAddress:yFe}=UJ(),fl=gFe("undici:socks5"),jJ=yp.alloc(0),zC=5,Nd={NO_AUTH:0,GSSAPI:1,USERNAME_PASSWORD:2,NO_ACCEPTABLE:255},qJ={CONNECT:1,BIND:2,UDP_ASSOCIATE:3},Ep={IPV4:1,DOMAIN:3,IPV6:4},Ea={SUCCEEDED:0,GENERAL_FAILURE:1,CONNECTION_NOT_ALLOWED:2,NETWORK_UNREACHABLE:3,HOST_UNREACHABLE:4,CONNECTION_REFUSED:5,TTL_EXPIRED:6,COMMAND_NOT_SUPPORTED:7,ADDRESS_TYPE_NOT_SUPPORTED:8},ds={INITIAL:"initial",HANDSHAKING:"handshaking",AUTHENTICATING:"authenticating",AUTHENTICATED:"authenticated",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error",CLOSED:"closed"},L_=class extends mFe{constructor(e,r={}){if(super(),!e)throw new _d("socket is required");this.socket=e,this.options=r,this.state=ds.INITIAL,this.buffer=jJ,this.onSocketData=this.onData.bind(this),this.onSocketError=this.onError.bind(this),this.onSocketClose=this.onClose.bind(this),this.authMethods=[],r.username&&r.password&&this.authMethods.push(Nd.USERNAME_PASSWORD),this.authMethods.push(Nd.NO_AUTH),this.socket.on("data",this.onSocketData),this.socket.on("error",this.onSocketError),this.socket.on("close",this.onSocketClose)}onData(e){fl("received data",e.length,"bytes in state",this.state),this.buffer=yp.concat([this.buffer,e]);try{switch(this.state){case ds.HANDSHAKING:this.handleHandshakeResponse();break;case ds.AUTHENTICATING:this.handleAuthResponse();break;case ds.CONNECTING:this.handleConnectResponse();break}}catch(r){this.onError(r)}}onError(e){fl("socket error",e),this.state=ds.ERROR,this.emit("error",e),this.destroy()}onClose(){fl("socket closed"),this.state=ds.CLOSED,this.emit("close")}destroy(){this.socket&&!this.socket.destroyed&&this.socket.destroy()}markAuthenticated(){this.state=ds.AUTHENTICATED,this.emit("authenticated")}handshake(){if(this.state!==ds.INITIAL)throw new _d("Handshake already started");fl("starting handshake with",this.authMethods.length,"auth methods"),this.state=ds.HANDSHAKING;let e=yp.alloc(2+this.authMethods.length);e[0]=zC,e[1]=this.authMethods.length,this.authMethods.forEach((r,n)=>{e[2+n]=r}),this.socket.write(e)}handleHandshakeResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==zC)throw new wc(`Invalid SOCKS version: ${e}`,"UND_ERR_SOCKS5_VERSION");if(r===Nd.NO_ACCEPTABLE)throw new wc("No acceptable authentication method","UND_ERR_SOCKS5_AUTH_REJECTED");if(this.buffer=this.buffer.subarray(2),fl("server selected auth method",r),r===Nd.NO_AUTH)this.markAuthenticated();else if(r===Nd.USERNAME_PASSWORD)this.state=ds.AUTHENTICATING,this.sendAuthRequest();else throw new wc(`Unsupported authentication method: ${r}`,"UND_ERR_SOCKS5_AUTH_METHOD")}sendAuthRequest(){let{username:e,password:r}=this.options;if(!e||!r)throw new _d("Username and password required for authentication");fl("sending username/password auth");let n=yp.from(e),s=yp.from(r);if(n.length>255||s.length>255)throw new _d("Username or password too long");let i=yp.alloc(3+n.length+s.length);i[0]=1,i[1]=n.length,n.copy(i,2),i[2+n.length]=s.length,s.copy(i,3+n.length),this.socket.write(i)}handleAuthResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==1)throw new wc(`Invalid auth sub-negotiation version: ${e}`,"UND_ERR_SOCKS5_AUTH_VERSION");if(r!==0)throw new wc("Authentication failed","UND_ERR_SOCKS5_AUTH_FAILED");this.buffer=this.buffer.subarray(2),fl("authentication successful"),this.markAuthenticated()}connect(e,r){if(this.state===ds.CONNECTING||this.state===ds.CONNECTED)throw new _d("Connection already in progress");if(this.state!==ds.AUTHENTICATED)throw new _d("Client must be authenticated before CONNECT");fl("connecting to",e,r),this.state=ds.CONNECTING;let n=this.buildConnectRequest(qJ.CONNECT,e,r);this.socket.write(n)}buildConnectRequest(e,r,n){let{type:s,buffer:i}=yFe(r),o=yp.alloc(4+i.length+2);return o[0]=zC,o[1]=e,o[2]=0,o[3]=s,i.copy(o,4),o.writeUInt16BE(n,4+i.length),o}handleConnectResponse(){if(this.buffer.length<4)return;let e=this.buffer[0],r=this.buffer[1],n=this.buffer[3];if(e!==zC)throw new wc(`Invalid SOCKS version in reply: ${e}`,"UND_ERR_SOCKS5_REPLY_VERSION");let s=4;if(n===Ep.IPV4)s+=6;else if(n===Ep.DOMAIN){if(this.buffer.length<5)return;s+=1+this.buffer[4]+2}else if(n===Ep.IPV6)s+=18;else throw new wc(`Invalid address type in reply: ${n}`,"UND_ERR_SOCKS5_ADDR_TYPE");if(this.buffer.length<s)return;if(r!==Ea.SUCCEEDED){let l=this.getReplyErrorMessage(r);throw new wc(`SOCKS5 connection failed: ${l}`,`UND_ERR_SOCKS5_REPLY_${r}`)}let i,o=4;if(n===Ep.IPV4)i=Array.from(this.buffer.subarray(o,o+4)).join("."),o+=4;else if(n===Ep.DOMAIN){let l=this.buffer[o];o+=1,i=this.buffer.subarray(o,o+l).toString(),o+=l}else if(n===Ep.IPV6){let l=[];for(let c=0;c<8;c++){let u=this.buffer.readUInt16BE(o+c*2);l.push(u.toString(16))}i=l.join(":"),o+=16}let a=this.buffer.readUInt16BE(o);this.buffer=jJ,this.state=ds.CONNECTED,this.socket.removeListener("data",this.onSocketData),fl("connected, bound address:",i,"port:",a),this.emit("connected",{address:i,port:a})}getReplyErrorMessage(e){switch(e){case Ea.GENERAL_FAILURE:return"General SOCKS server failure";case Ea.CONNECTION_NOT_ALLOWED:return"Connection not allowed by ruleset";case Ea.NETWORK_UNREACHABLE:return"Network unreachable";case Ea.HOST_UNREACHABLE:return"Host unreachable";case Ea.CONNECTION_REFUSED:return"Connection refused";case Ea.TTL_EXPIRED:return"TTL expired";case Ea.COMMAND_NOT_SUPPORTED:return"Command not supported";case Ea.ADDRESS_TYPE_NOT_SUPPORTED:return"Address type not supported";default:return`Unknown error code: ${e}`}}};HJ.exports={Socks5Client:L_,AUTH_METHODS:Nd,COMMANDS:qJ,ADDRESS_TYPES:Ep,REPLY_CODES:Ea,STATES:ds}});var H_=y((w$t,XJ)=>{"use strict";var{URL:VJ}=require("node:url"),M_,EFe=rp(),{InvalidArgumentError:GJ}=st(),{Socks5Client:bFe,STATES:CFe}=$J(),{kDispatch:YJ,kClose:SFe,kDestroy:IFe}=cr(),vFe=hp(),xFe=np(),{debuglog:wFe}=require("node:util"),Bc=wFe("undici:socks5-proxy"),U_=Symbol("proxy url"),BFe=Symbol("proxy headers"),WJ=Symbol("proxy auth"),JJ=Symbol("proxy protocol"),bp=Symbol("pools"),KJ=Symbol("connector"),j_=Symbol("request tls settings"),zJ=!1,q_=class extends EFe{constructor(e,r={}){if(super(),zJ||(process.emitWarning("SOCKS5 proxy support is experimental and subject to change","ExperimentalWarning"),zJ=!0),!e)throw new GJ("Proxy URL is mandatory");let n=typeof e=="string"?new VJ(e):e;if(n.protocol!=="socks5:"&&n.protocol!=="socks:")throw new GJ("Proxy URL must use socks5:// or socks:// protocol");this[U_]=n,this[BFe]=r.headers||{},this[JJ]=r.proxyTls?"https:":"http:",this[j_]=r.requestTls,this[WJ]={username:r.username||(n.username?decodeURIComponent(n.username):null),password:r.password||(n.password?decodeURIComponent(n.password):null)},this[KJ]=r.connect||xFe({...r.proxyTls,servername:r.proxyTls?.servername||n.hostname}),this[bp]=new Map}async createSocks5Connection(e,r){let n=this[U_].hostname,s=parseInt(this[U_].port)||1080;Bc("creating SOCKS5 connection to",n,s);let i=await new Promise((a,l)=>{this[KJ]({hostname:n,host:n,port:s,protocol:this[JJ]},(c,u)=>{c?l(c):a(u)})}),o=new bFe(i,this[WJ]);return o.on("error",a=>{Bc("SOCKS5 error:",a),i.destroy()}),await o.handshake(),await new Promise((a,l)=>{let c=setTimeout(()=>{l(new Error("SOCKS5 authentication timeout"))},5e3),u=()=>{clearTimeout(c),o.removeListener("error",p),a()},p=f=>{clearTimeout(c),o.removeListener("authenticated",u),l(f)};o.state===CFe.AUTHENTICATED?(clearTimeout(c),a()):(o.once("authenticated",u),o.once("error",p))}),await o.connect(e,r),await new Promise((a,l)=>{let c=setTimeout(()=>{l(new Error("SOCKS5 connection timeout"))},5e3),u=f=>{Bc("SOCKS5 tunnel established to",e,r,"via",f),clearTimeout(c),o.removeListener("error",p),a()},p=f=>{clearTimeout(c),o.removeListener("connected",u),l(f)};o.once("connected",u),o.once("error",p)}),i}[YJ](e,r){let{origin:n}=e;Bc("dispatching request to",n,"via SOCKS5");try{let s=String(n),i=this[bp].get(s);return(!i||i.destroyed||i.closed)&&(i=new vFe(n,{pipelining:e.pipelining,connections:e.connections,connect:async(o,a)=>{try{let l=new VJ(n),c=l.hostname,u=parseInt(l.port)||(l.protocol==="https:"?443:80);Bc("establishing SOCKS5 connection to",c,u);let p=await this.createSocks5Connection(c,u),f=p;l.protocol==="https:"&&(M_||(M_=require("node:tls")),Bc("upgrading to TLS"),f=M_.connect({...this[j_],socket:p,servername:this[j_]?.servername||c}),await new Promise((d,A)=>{f.once("secureConnect",d),f.once("error",A)})),a(null,f)}catch(l){Bc("SOCKS5 connection error:",l),a(l)}}}),this[bp].set(s,i)),i[YJ](e,r)}catch(s){if(Bc("dispatch error:",s),typeof r.onResponseError=="function")return r.onResponseError(null,s),!1;if(typeof r.onError=="function")return r.onError(s),!1;throw s}}async[SFe](){let e=[];for(let r of this[bp].values())e.push(r.close());this[bp].clear(),await Promise.all(e)}async[IFe](e){let r=[];for(let n of this[bp].values())r.push(n.destroy(e));this[bp].clear(),await Promise.all(r)}};XJ.exports=q_});var Y_=y((B$t,uK)=>{"use strict";var{kProxy:kd,kClose:iK,kDestroy:oK,kDispatch:ZJ}=cr(),TFe=gp(),aK=hp(),lK=rp(),{InvalidArgumentError:Cp,RequestAbortedError:DFe,SecureProxyConnectionError:PFe}=st(),eK=np(),cK=Ic(),{channels:tK}=Ac(),_Fe=H_(),XC=Symbol("proxy agent"),Tc=Symbol("proxy client"),dl=Symbol("proxy headers"),$_=Symbol("request tls settings"),rK=Symbol("proxy tls settings"),nK=Symbol("connect endpoint function"),sK=Symbol("tunnel proxy");function NFe(t){return t==="https:"?443:80}function kFe(t,e){return new aK(t,e)}var QFe=()=>{};function RFe(t,e){return e.connections===1?new cK(t,e):new aK(t,e)}var V_=class extends lK{#e;constructor(e,{headers:r={},connect:n,factory:s}){if(!e)throw new Cp("Proxy URL is mandatory");super(),this[dl]=r,s?this.#e=s(e,{connect:n}):this.#e=new cK(e,{connect:n})}[ZJ](e,r){let n=r.onHeaders;r.onHeaders=function(a,l,c){if(a===407){typeof r.onError=="function"&&r.onError(new Cp("Proxy Authentication Required (407)"));return}n&&n.call(this,a,l,c)};let{origin:s,path:i="/",headers:o={}}=e;if(e.path=s+i,!("host"in o)&&!("Host"in o)){let{host:a}=new URL(s);o.host=a}return e.headers={...this[dl],...o},this.#e[ZJ](e,r)}[iK](){return this.#e.close()}[oK](e){return this.#e.destroy(e)}},G_=class extends lK{constructor(e){if(!e||typeof e=="object"&&!(e instanceof URL)&&!e.uri)throw new Cp("Proxy uri is mandatory");let{clientFactory:r=kFe}=e;if(typeof r!="function")throw new Cp("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e;super();let s=this.#e(e),{href:i,origin:o,port:a,protocol:l,username:c,password:u,hostname:p}=s;if(this[kd]={uri:i,protocol:l},this[$_]=e.requestTls,this[rK]=e.proxyTls,this[dl]=e.headers||{},this[sK]=n,e.auth&&e.token)throw new Cp("opts.auth cannot be used in combination with opts.token");e.auth?this[dl]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[dl]["proxy-authorization"]=e.token:c&&u&&(this[dl]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(c)}:${decodeURIComponent(u)}`).toString("base64")}`);let f=eK({...e.proxyTls});this[nK]=eK({...e.requestTls});let d=e.factory||RFe,A=(h,m)=>{let{protocol:g}=new URL(h);return this[kd].protocol==="socks5:"||this[kd].protocol==="socks:"?new _Fe(this[kd].uri,{headers:this[dl],connect:f,factory:d,username:e.username||c,password:e.password||u,proxyTls:e.proxyTls,requestTls:e.requestTls}):!this[sK]&&g==="http:"&&this[kd].protocol==="http:"?new V_(this[kd].uri,{headers:this[dl],connect:f,factory:d}):d(h,m)};l==="socks5:"||l==="socks:"?this[Tc]=null:this[Tc]=r(s,{connect:f}),this[XC]=new TFe({...e,factory:A,connect:async(h,m)=>{if(!this[Tc]){m(new Cp("Cannot establish tunnel connection without a proxy client"));return}let g=h.host;h.port||(g+=`:${NFe(h.protocol)}`);try{let E={origin:o,port:a,path:g,signal:h.signal,headers:{...this[dl],host:h.host,...h.connections==null||h.connections>0?{"proxy-connection":"keep-alive"}:{}},servername:this[rK]?.servername||p},{socket:b,statusCode:I}=await this[Tc].connect(E);if(I!==200){b.on("error",QFe).destroy(),m(new DFe(`Proxy response (${I}) !== 200 when HTTP Tunneling`));return}if(tK.proxyConnected.hasSubscribers&&tK.proxyConnected.publish({socket:b,connectParams:E}),h.protocol!=="https:"){m(null,b);return}let w;this[$_]?w=this[$_].servername:w=h.servername,this[nK]({...h,servername:w,httpSocket:b},m)}catch(E){E.code==="ERR_TLS_CERT_ALTNAME_INVALID"?m(new PFe(E)):m(E)}}})}dispatch(e,r){let n=OFe(e.headers);if(FFe(n),n&&!("host"in n)&&!("Host"in n)){let{host:s}=new URL(e.origin);n.host=s}return this[XC].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new URL(e):e instanceof URL?e:new URL(e.uri)}[iK](){let e=[this[XC].close()];return this[Tc]&&e.push(this[Tc].close()),Promise.all(e)}[oK](){let e=[this[XC].destroy()];return this[Tc]&&e.push(this[Tc].destroy()),Promise.all(e)}};function OFe(t){if(Array.isArray(t)){let e={};for(let r=0;r<t.length;r+=2)e[t[r]]=t[r+1];return e}return t}function FFe(t){if(t&&Object.keys(t).find(r=>r.toLowerCase()==="proxy-authorization"))throw new Cp("Proxy-Authorization should be sent in ProxyAgent constructor")}uK.exports=G_});var AK=y((T$t,hK)=>{"use strict";var LFe=rp(),{kClose:MFe,kDestroy:UFe,kClosed:pK,kDestroyed:fK,kDispatch:jFe,kNoProxyAgent:ig,kHttpProxyAgent:Dc,kHttpsProxyAgent:Sp}=cr(),dK=Y_(),qFe=gp(),HFe={"http:":80,"https:":443},W_=class extends LFe{#e=null;#t=null;#r=null;constructor(e={}){super(),this.#r=e;let{httpProxy:r,httpsProxy:n,noProxy:s,...i}=e;this[ig]=new qFe(i);let o=r??process.env.http_proxy??process.env.HTTP_PROXY;o?this[Dc]=new dK({...i,uri:o}):this[Dc]=this[ig];let a=n??process.env.https_proxy??process.env.HTTPS_PROXY;a?this[Sp]=new dK({...i,uri:a}):this[Sp]=this[Dc],this.#s()}[jFe](e,r){let n=new URL(e.origin);return this.#n(n).dispatch(e,r)}[MFe](){return Promise.all([this[ig].close(),!this[Dc][pK]&&this[Dc].close(),!this[Sp][pK]&&this[Sp].close()])}[UFe](e){return Promise.all([this[ig].destroy(e),!this[Dc][fK]&&this[Dc].destroy(e),!this[Sp][fK]&&this[Sp].destroy(e)])}#n(e){let{protocol:r,host:n,port:s}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),s=Number.parseInt(s,10)||HFe[r]||0,this.#i(n,s)?r==="https:"?this[Sp]:this[Dc]:this[ig]}#i(e,r){if(this.#a&&this.#s(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n<this.#t.length;n++){let s=this.#t[n];if(!(s.port&&s.port!==r)&&(e===s.hostname||e.slice(-(s.hostname.length+1))===`.${s.hostname}`))return!1}return!0}#s(){let e=this.#r.noProxy??this.#o,r=e.split(/[,\s]/),n=[];for(let s=0;s<r.length;s++){let i=r[s];if(!i)continue;let o=i.match(/^(.+):(\d+)$/);n.push({hostname:(o?o[1]:i).replace(/^\*?\./,"").toLowerCase(),port:o?Number.parseInt(o[2],10):0})}this.#e=e,this.#t=n}get#a(){return this.#r.noProxy!==void 0?!1:this.#e!==this.#o}get#o(){return process.env.no_proxy??process.env.NO_PROXY??""}};hK.exports=W_});var ZC=y((D$t,bK)=>{"use strict";var og=require("node:assert"),{kRetryHandlerDefaultRetry:mK}=cr(),{RequestRetryError:Ip}=st(),$Fe=Tm(),{isDisturbed:gK,parseRangeHeader:yK,wrapRequestBody:VFe}=at();function GFe(t){let e=new Date(t).getTime();return isNaN(e)?0:e-Date.now()}function EK(t,e,r,n){let s=t["content-length"];if(s==null||!Number.isFinite(e.start)||!Number.isFinite(e.end))return;let i=Number(s),o=e.end-e.start+1;if(!Number.isFinite(i)||i!==o)throw new Ip("Content-Length mismatch",r,{headers:t,data:{count:n}})}var J_=class{#e=!1;#t=null;set target(e){this.#t=e,this.#e&&e?.pause()}get target(){return this.#t}pause(){this.#e=!0,this.#t?.pause()}resume(){this.#e=!1,this.#t?.resume()}abort(e){this.#t?.abort(e)}get paused(){return this.#e||(this.#t?.paused??!1)}get aborted(){return this.#t?.aborted??!1}get reason(){return this.#t?.reason??null}get rawHeaders(){return this.#t?.rawHeaders??null}set rawHeaders(e){this.#t&&(this.#t.rawHeaders=e)}get rawTrailers(){return this.#t?.rawTrailers??null}set rawTrailers(e){this.#t&&(this.#t.rawTrailers=e)}},K_=class t{constructor(e,{dispatch:r,handler:n}){let{retryOptions:s,...i}=e,{retry:o,maxRetries:a,maxTimeout:l,minTimeout:c,timeoutFactor:u,methods:p,errorCodes:f,retryAfter:d,statusCodes:A,throwOnError:h}=s??{};this.error=null,this.dispatch=r,this.handler=$Fe.wrap(n),this.opts={...i,body:VFe(e.body)},this.retryOpts={throwOnError:h??!0,retry:o??t[mK],retryAfter:d??!0,maxTimeout:l??30*1e3,minTimeout:c??500,timeoutFactor:u??2,maxRetries:a??5,methods:p??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:A??[500,502,503,504,429],errorCodes:f??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.headersSent=!1,this.start=0,this.end=null,this.etag=null,this.controllerProxy=new J_}onResponseStartWithRetry(e,r,n,s,i){if(this.retryOpts.throwOnError){this.retryOpts.statusCodes.includes(r)===!1?this.headersSent?this.handler.onResponseError?.(this.controllerProxy,i):(this.headersSent=!0,this.checkpointResponseEnd(n),this.handler.onResponseStart?.(this.controllerProxy,r,n,s)):this.error=i;return}if(gK(this.opts.body)){this.headersSent=!0,this.checkpointResponseEnd(n),this.handler.onResponseStart?.(this.controllerProxy,r,n,s);return}function o(a){if(a){this.headersSent?this.handler.onResponseError?.(this.controllerProxy,a):(this.headersSent=!0,this.checkpointResponseEnd(n),this.handler.onResponseStart?.(this.controllerProxy,r,n,s)),e.resume();return}this.error=i,e.resume()}e.pause(),this.retryOpts.retry(i,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},o.bind(this))}checkpointResponseEnd(e){if(this.end==null&&this.opts.method!=="HEAD"){let r=e["content-length"];this.end=r!=null?Number(r)-1:null,og(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=this.end!=null}}onRequestStart(e,r){this.controllerProxy.target=e,this.headersSent||this.handler.onRequestStart?.(this.controllerProxy,r)}onRequestUpgrade(e,r,n,s){this.handler.onRequestUpgrade?.(this.controllerProxy,r,n,s)}static[mK](e,{state:r,opts:n},s){let{statusCode:i,code:o,headers:a}=e,{method:l,retryOptions:c}=n,{maxRetries:u,minTimeout:p,maxTimeout:f,timeoutFactor:d,statusCodes:A,errorCodes:h,methods:m}=c,{counter:g}=r;if(o&&o!=="UND_ERR_REQ_RETRY"&&!h.includes(o)){s(e);return}if(Array.isArray(m)&&!m.includes(l)){s(e);return}if(i!=null&&Array.isArray(A)&&!A.includes(i)){s(e);return}if(g>u){s(e);return}let E=a?.["retry-after"];E&&(E=Number(E),E=Number.isNaN(E)?GFe(a["retry-after"]):E*1e3);let b=E>0?Math.min(E,f):Math.min(p*d**(g-1),f);setTimeout(()=>s(null),b)}onResponseStart(e,r,n,s){if(this.error=null,this.retryCount+=1,r>=300){let i=new Ip("Request failed",r,{headers:n,data:{count:this.retryCount}});this.onResponseStartWithRetry(e,r,n,s,i);return}if(this.headersSent){if(r!==206&&(this.start>0||r!==200))throw new Ip("server does not support the range header and the payload was partially consumed",r,{headers:n,data:{count:this.retryCount}});let i=yK(n["content-range"]);if(!i)throw new Ip("Content-Range mismatch",r,{headers:n,data:{count:this.retryCount}});if(this.etag!=null&&this.etag!==n.etag)throw new Ip("ETag mismatch",r,{headers:n,data:{count:this.retryCount}});EK(n,i,r,this.retryCount);let{start:o,size:a,end:l=a?a-1:null}=i;if(this.start!==o||this.end!=null&&this.end!==l)throw new Ip("Content-Range mismatch",r,{headers:n,data:{count:this.retryCount}});return}if(this.end==null){if(r===206){let i=yK(n["content-range"]);if(i==null){this.headersSent=!0,this.handler.onResponseStart?.(this.controllerProxy,r,n,s);return}EK(n,i,r,this.retryCount);let{start:o,size:a,end:l=a?a-1:null}=i;og(o!=null&&Number.isFinite(o),"content-range mismatch"),og(l!=null&&Number.isFinite(l),"invalid content-length"),this.start=o,this.end=l}if(this.end==null){let i=n["content-length"];this.end=i!=null?Number(i)-1:null}og(Number.isFinite(this.start)),og(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=!0,this.etag=n.etag!=null?n.etag:null,this.etag!=null&&this.etag[0]==="W"&&this.etag[1]==="/"&&(this.etag=null),this.headersSent=!0,this.handler.onResponseStart?.(this.controllerProxy,r,n,s)}else throw new Ip("Request failed",r,{headers:n,data:{count:this.retryCount}})}onResponseData(e,r){this.error||(this.start+=r.length,this.handler.onResponseData?.(this.controllerProxy,r))}onResponseEnd(e,r){if(this.error&&this.retryOpts.throwOnError)throw this.error;if(!this.error)return this.retryCount=0,this.handler.onResponseEnd?.(this.controllerProxy,r);this.retry()}retry(){if(this.start!==0){let e={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(e["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...e}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(e){this.handler.onResponseError?.(this.controllerProxy,e)}}onResponseError(e,r){if(e?.aborted||gK(this.opts.body)||this.headersSent&&!this.resume){this.handler.onResponseError?.(this.controllerProxy,r);return}function n(s){if(!s){this.retry();return}this.handler?.onResponseError?.(this.controllerProxy,s)}this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(r,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},n.bind(this))}};bK.exports=K_});var SK=y((P$t,CK)=>{"use strict";var YFe=Dm(),WFe=ZC(),z_=class extends YFe{#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new WFe({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};CK.exports=z_});var xK=y((_$t,vK)=>{"use strict";var{InvalidArgumentError:IK}=st(),JFe=Ic(),X_=class extends JFe{constructor(e,r){if(typeof e=="string"&&(e=new URL(e)),e.protocol!=="http:")throw new IK("h2c-client: Only h2c protocol is supported");let{maxConcurrentStreams:n,pipelining:s,...i}=r??{},o=100,a=100;if(n!=null&&Number.isInteger(n)&&n>0&&(o=n),s!=null&&Number.isInteger(s)&&s>0&&(a=s),a>o)throw new IK("h2c-client: pipelining cannot be greater than maxConcurrentStreams");super(e,{...i,maxConcurrentStreams:o,pipelining:a,allowH2:!0,useH2c:!0})}};vK.exports=X_});var QK=y((N$t,kK)=>{"use strict";var DK=require("node:assert"),{Readable:KFe}=require("node:stream"),{RequestAbortedError:PK,NotSupportedError:zFe,InvalidArgumentError:XFe,AbortError:e1}=st(),_K=at(),{ReadableStreamFrom:ZFe}=at(),bi=Symbol("kConsume"),t1=Symbol("kReading"),vp=Symbol("kBody"),wK=Symbol("kAbort"),NK=Symbol("kContentType"),Z_=Symbol("kContentLength"),eN=Symbol("kUsed"),r1=Symbol("kBytesRead"),eLe=()=>{},tN=class extends KFe{constructor({resume:e,abort:r,contentType:n="",contentLength:s,highWaterMark:i=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:i}),this._readableState.dataEmitted=!1,this[wK]=r,this[bi]=null,this[r1]=0,this[vp]=null,this[eN]=!1,this[NK]=n,this[Z_]=Number.isFinite(s)?s:null,this[t1]=!1}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new PK),e&&this[wK](),this[eN]?r(e):setImmediate(r,e)}on(e,r){return(e==="data"||e==="readable")&&(this[t1]=!0,this[eN]=!0),super.on(e,r)}addListener(e,r){return this.on(e,r)}off(e,r){let n=super.off(e,r);return(e==="data"||e==="readable")&&(this[t1]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,r){return this.off(e,r)}push(e){return e&&(this[r1]+=e.length,this[bi])?(nN(this[bi],e),this[t1]?super.push(e):!0):super.push(e)}text(){return ag(this,"text")}json(){return ag(this,"json")}blob(){return ag(this,"blob")}bytes(){return ag(this,"bytes")}arrayBuffer(){return ag(this,"arrayBuffer")}async formData(){throw new zFe}get bodyUsed(){return _K.isDisturbed(this)}get body(){return this[vp]||(this[vp]=ZFe(this),this[bi]&&(this[vp].getReader(),DK(this[vp].locked))),this[vp]}dump(e){let r=e?.signal;if(r!=null&&(typeof r!="object"||!("aborted"in r)))return Promise.reject(new XFe("signal must be an AbortSignal"));let n=e?.limit&&Number.isFinite(e.limit)?e.limit:128*1024;return r?.aborted?Promise.reject(r.reason??new e1):this._readableState.closeEmitted?Promise.resolve(null):new Promise((s,i)=>{if((this[Z_]&&this[Z_]>n||this[r1]>n)&&this.destroy(new e1),r){let o=()=>{this.destroy(r.reason??new e1)};r.addEventListener("abort",o),this.on("close",function(){r.removeEventListener("abort",o),r.aborted?i(r.reason??new e1):s(null)})}else this.on("close",s);this.on("error",eLe).on("data",()=>{this[r1]>n&&this.destroy()}).resume()})}setEncoding(e){return Buffer.isEncoding(e)&&(this._readableState.encoding=e),this}};function tLe(t){return t[vp]?.locked===!0||t[bi]!==null}function rLe(t){return _K.isDisturbed(t)||tLe(t)}function ag(t,e){return DK(!t[bi]),new Promise((r,n)=>{if(rLe(t)){let s=t._readableState;s.destroyed&&s.closeEmitted===!1?t.on("error",n).on("close",()=>{n(new TypeError("unusable"))}):n(s.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[bi]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(s){sN(this[bi],s)}).on("close",function(){this[bi].body!==null&&sN(this[bi],new PK)}),nLe(t[bi])})})}function nLe(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let s=r;s<n;s++)nN(t,e.buffer[s])}else for(let r of e.buffer)nN(t,r);for(e.endEmitted?TK(this[bi],this._readableState.encoding):t.stream.on("end",function(){TK(this[bi],this._readableState.encoding)}),t.stream.resume();t.stream.read()!=null;);}function rN(t,e,r){if(t.length===0||e===0)return"";let n=t.length===1?t[0]:Buffer.concat(t,e),s=n.length,i=s>2&&n[0]===239&&n[1]===187&&n[2]===191?3:0;return!r||r==="utf8"||r==="utf-8"?n.utf8Slice(i,s):n.subarray(i,s).toString(r)}function BK(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let s=0;s<t.length;++s){let i=t[s];r.set(i,n),n+=i.length}return r}function TK(t,e){let{type:r,body:n,resolve:s,stream:i,length:o}=t;try{r==="text"?s(rN(n,o,e)):r==="json"?s(JSON.parse(rN(n,o,e))):r==="arrayBuffer"?s(BK(n,o).buffer):r==="blob"?s(new Blob(n,{type:i[NK]})):r==="bytes"&&s(BK(n,o)),sN(t)}catch(a){i.destroy(a)}}function nN(t,e){t.length+=e.length,t.body.push(e)}function sN(t,e){t.body!==null&&(e?t.reject(e):t.resolve(),t.type=null,t.stream=null,t.resolve=null,t.reject=null,t.length=0,t.body=null)}kK.exports={Readable:tN,chunksDecode:rN}});var FK=y((k$t,iN)=>{"use strict";var sLe=require("node:assert"),{AsyncResource:iLe}=require("node:async_hooks"),{Readable:oLe}=QK(),{InvalidArgumentError:Qd,RequestAbortedError:RK}=st(),Ji=at();function lg(){}var n1=class extends iLe{constructor(e,r){if(!e||typeof e!="object")throw new Qd("invalid opts");let{signal:n,method:s,opaque:i,body:o,onInfo:a,responseHeaders:l,highWaterMark:c}=e;try{if(typeof r!="function")throw new Qd("invalid callback");if(c!=null&&(!Number.isFinite(c)||c<0))throw new Qd("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Qd("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new Qd("invalid method");if(a&&typeof a!="function")throw new Qd("invalid onInfo callback");super("UNDICI_REQUEST")}catch(u){throw Ji.isStream(o)&&Ji.destroy(o.on("error",lg),u),u}this.method=s,this.responseHeaders=l||null,this.opaque=i||null,this.callback=r,this.res=null,this.abort=null,this.body=o,this.trailers={},this.context=null,this.onInfo=a||null,this.highWaterMark=c,this.reason=null,this.removeAbortListener=null,n?.aborted?this.reason=n.reason??new RK:n&&(this.removeAbortListener=Ji.addAbortListener(n,()=>{this.reason=n.reason??new RK,this.res?Ji.destroy(this.res.on("error",lg),this.reason):this.abort&&this.abort(this.reason)}))}onConnect(e,r){if(this.reason){e(this.reason);return}sLe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{callback:i,opaque:o,abort:a,context:l,responseHeaders:c,highWaterMark:u}=this,p=c==="raw"?Ji.parseRawHeaders(r):Ji.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}let f=c==="raw"?Ji.parseHeaders(r):p,d=f["content-type"],A=f["content-length"],h=new oLe({resume:n,abort:a,contentType:d,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:u});if(this.removeAbortListener&&(h.on("close",this.removeAbortListener),this.removeAbortListener=null),this.callback=null,this.res=h,i!==null)try{this.runInAsyncScope(i,null,null,{statusCode:e,statusText:s,headers:p,trailers:this.trailers,opaque:o,body:h,context:l})}catch(m){this.res=null,Ji.destroy(h.on("error",lg),m),queueMicrotask(()=>{throw m})}}onData(e){return this.res.push(e)}onComplete(e){Ji.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:s,opaque:i}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:i})})),r&&(this.res=null,queueMicrotask(()=>{Ji.destroy(r.on("error",lg),e)})),s&&(this.body=null,Ji.isStream(s)&&(s.on("error",lg),Ji.destroy(s,e))),this.removeAbortListener&&(this.removeAbortListener(),this.removeAbortListener=null)}};function OK(t,e){if(e===void 0)return new Promise((r,n)=>{OK.call(this,t,(s,i)=>s?n(s):r(i))});try{let r=new n1(t,e);this.dispatch(t,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}iN.exports=OK;iN.exports.RequestHandler=n1});var cg=y((Q$t,UK)=>{"use strict";var{addAbortListener:aLe}=at(),{RequestAbortedError:lLe}=st(),Rd=Symbol("kListener"),ba=Symbol("kSignal");function LK(t){t.abort?t.abort(t[ba]?.reason):t.reason=t[ba]?.reason??new lLe,MK(t)}function cLe(t,e){if(t.reason=null,t[ba]=null,t[Rd]=null,!!e){if(e.aborted){LK(t);return}t[ba]=e,t[Rd]=()=>{LK(t)},aLe(t[ba],t[Rd])}}function MK(t){t[ba]&&("removeEventListener"in t[ba]?t[ba].removeEventListener("abort",t[Rd]):t[ba].removeListener("abort",t[Rd]),t[ba]=null,t[Rd]=null)}UK.exports={addSignal:cLe,removeSignal:MK}});var $K=y((R$t,HK)=>{"use strict";var uLe=require("node:assert"),{finished:pLe}=require("node:stream"),{AsyncResource:fLe}=require("node:async_hooks"),{InvalidArgumentError:Od,InvalidReturnValueError:dLe}=st(),hl=at(),{addSignal:hLe,removeSignal:jK}=cg();function ALe(){}var oN=class extends fLe{constructor(e,r,n){if(!e||typeof e!="object")throw new Od("invalid opts");let{signal:s,method:i,opaque:o,body:a,onInfo:l,responseHeaders:c}=e;try{if(typeof n!="function")throw new Od("invalid callback");if(typeof r!="function")throw new Od("invalid factory");if(s&&typeof s.on!="function"&&typeof s.addEventListener!="function")throw new Od("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new Od("invalid method");if(l&&typeof l!="function")throw new Od("invalid onInfo callback");super("UNDICI_STREAM")}catch(u){throw hl.isStream(a)&&hl.destroy(a.on("error",ALe),u),u}this.responseHeaders=c||null,this.opaque=o||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=a,this.onInfo=l||null,hl.isStream(a)&&a.on("error",u=>{this.onError(u)}),hLe(this,s)}onConnect(e,r){if(this.reason){e(this.reason);return}uLe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{factory:i,opaque:o,context:a,responseHeaders:l}=this,c=l==="raw"?hl.parseRawHeaders(r):hl.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:c});return}if(this.factory=null,i===null)return;let u=this.runInAsyncScope(i,null,{statusCode:e,headers:c,opaque:o,context:a});if(!u||typeof u.write!="function"||typeof u.end!="function"||typeof u.on!="function")throw new dLe("expected Writable");return pLe(u,{readable:!1},f=>{let{callback:d,res:A,opaque:h,trailers:m,abort:g}=this;this.res=null,(f||!A?.readable)&&hl.destroy(A,f),this.callback=null,this.runInAsyncScope(d,null,f||null,{opaque:h,trailers:m}),f&&g()}),u.on("drain",n),this.res=u,(u.writableNeedDrain!==void 0?u.writableNeedDrain:u._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;jK(this),r&&(this.trailers=hl.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:s,body:i}=this;jK(this),this.factory=null,r?(this.res=null,hl.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),i&&(this.body=null,hl.destroy(i,e))}};function qK(t,e,r){if(r===void 0)return new Promise((n,s)=>{qK.call(this,t,e,(i,o)=>i?s(i):n(o))});try{let n=new oN(t,e,r);this.dispatch(t,n)}catch(n){if(typeof r!="function")throw n;let s=t?.opaque;queueMicrotask(()=>r(n,{opaque:s}))}}HK.exports=qK});var WK=y((O$t,YK)=>{"use strict";var{Readable:GK,Duplex:mLe,PassThrough:gLe}=require("node:stream"),yLe=require("node:assert"),{AsyncResource:ELe}=require("node:async_hooks"),{InvalidArgumentError:ug,InvalidReturnValueError:bLe,RequestAbortedError:aN}=st(),Ca=at(),{addSignal:CLe,removeSignal:SLe}=cg();function VK(){}var Fd=Symbol("resume"),lN=class extends GK{constructor(){super({autoDestroy:!0}),this[Fd]=null}_read(){let{[Fd]:e}=this;e&&(this[Fd]=null,e())}_destroy(e,r){this._read(),r(e)}},cN=class extends GK{constructor(e){super({autoDestroy:!0}),this[Fd]=e}_read(){this[Fd]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new aN),r(e)}},uN=class extends ELe{constructor(e,r){if(!e||typeof e!="object")throw new ug("invalid opts");if(typeof r!="function")throw new ug("invalid handler");let{signal:n,method:s,opaque:i,onInfo:o,responseHeaders:a}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new ug("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new ug("invalid method");if(o&&typeof o!="function")throw new ug("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=i||null,this.responseHeaders=a||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=o||null,this.req=new lN().on("error",VK),this.ret=new mLe({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:l}=this;l?.resume&&l.resume()},write:(l,c,u)=>{let{req:p}=this;p.push(l,c)||p._readableState.destroyed?u():p[Fd]=u},destroy:(l,c)=>{let{body:u,req:p,res:f,ret:d,abort:A}=this;!l&&!d._readableState.endEmitted&&(l=new aN),A&&l&&A(),Ca.destroy(u,l),Ca.destroy(p,l),Ca.destroy(f,l),SLe(this),c(l)}}).on("prefinish",()=>{let{req:l}=this;l.push(null)}),this.res=null,CLe(this,n)}onConnect(e,r){let{res:n}=this;if(this.reason){e(this.reason);return}yLe(!n,"pipeline cannot be retried"),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:s,handler:i,context:o}=this;if(e<200){if(this.onInfo){let l=this.responseHeaders==="raw"?Ca.parseRawHeaders(r):Ca.parseHeaders(r);this.onInfo({statusCode:e,headers:l})}return}this.res=new cN(n);let a;try{this.handler=null;let l=this.responseHeaders==="raw"?Ca.parseRawHeaders(r):Ca.parseHeaders(r);a=this.runInAsyncScope(i,null,{statusCode:e,headers:l,opaque:s,body:this.res,context:o})}catch(l){throw this.res.on("error",VK),l}if(!a||typeof a.on!="function")throw new bLe("expected Readable");a.on("data",l=>{let{ret:c,body:u}=this;!c.push(l)&&u.pause&&u.pause()}).on("error",l=>{let{ret:c}=this;Ca.destroy(c,l)}).on("end",()=>{let{ret:l}=this;l.push(null)}).on("close",()=>{let{ret:l}=this;l._readableState.ended||Ca.destroy(l,new aN)}),this.body=a}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,Ca.destroy(r,e)}};function ILe(t,e){try{let r=new uN(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new gLe().destroy(r)}}YK.exports=ILe});var ez=y((F$t,ZK)=>{"use strict";var{InvalidArgumentError:pN,SocketError:vLe}=st(),{AsyncResource:xLe}=require("node:async_hooks"),JK=require("node:assert"),KK=at(),{kHTTP2Stream:wLe}=cr(),{addSignal:BLe,removeSignal:zK}=cg(),fN=class extends xLe{constructor(e,r){if(!e||typeof e!="object")throw new pN("invalid opts");if(typeof r!="function")throw new pN("invalid callback");let{signal:n,opaque:s,responseHeaders:i}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new pN("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=i||null,this.opaque=s||null,this.callback=r,this.abort=null,this.context=null,BLe(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}JK(this.callback),this.abort=e,this.context=null}onHeaders(){throw new vLe("bad upgrade",null)}onUpgrade(e,r,n){JK(n[wLe]===!0?e===200:e===101);let{callback:s,opaque:i,context:o}=this;zK(this),this.callback=null;let a=this.responseHeaders==="raw"?KK.parseRawHeaders(r):KK.parseHeaders(r);this.runInAsyncScope(s,null,null,{headers:a,socket:n,opaque:i,context:o})}onError(e){let{callback:r,opaque:n}=this;zK(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function XK(t,e){if(e===void 0)return new Promise((r,n)=>{XK.call(this,t,(s,i)=>s?n(s):r(i))});try{let r=new fN(t,e),n={...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}ZK.exports=XK});var iz=y((L$t,sz)=>{"use strict";var TLe=require("node:assert"),{AsyncResource:DLe}=require("node:async_hooks"),{InvalidArgumentError:dN,SocketError:PLe}=st(),tz=at(),{addSignal:_Le,removeSignal:rz}=cg(),hN=class extends DLe{constructor(e,r){if(!e||typeof e!="object")throw new dN("invalid opts");if(typeof r!="function")throw new dN("invalid callback");let{signal:n,opaque:s,responseHeaders:i}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new dN("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=s||null,this.responseHeaders=i||null,this.callback=r,this.abort=null,_Le(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}TLe(this.callback),this.abort=e,this.context=r}onHeaders(){throw new PLe("bad connect",null)}onUpgrade(e,r,n){let{callback:s,opaque:i,context:o}=this;rz(this),this.callback=null;let a=r;a!=null&&(a=this.responseHeaders==="raw"?tz.parseRawHeaders(r):tz.parseHeaders(r)),this.runInAsyncScope(s,null,null,{statusCode:e,headers:a,socket:n,opaque:i,context:o})}onError(e){let{callback:r,opaque:n}=this;rz(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function nz(t,e){if(e===void 0)return new Promise((r,n)=>{nz.call(this,t,(s,i)=>s?n(s):r(i))});try{let r=new hN(t,e),n={...t,method:"CONNECT"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}sz.exports=nz});var oz=y((M$t,Ld)=>{"use strict";Ld.exports.request=FK();Ld.exports.stream=$K();Ld.exports.pipeline=WK();Ld.exports.upgrade=ez();Ld.exports.connect=iz()});var mN=y((U$t,lz)=>{"use strict";var{UndiciError:NLe}=st(),az=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),AN=class extends NLe{constructor(e){super(e),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[az]===!0}get[az](){return!0}};lz.exports={MockNotMatchedError:AN}});var xp=y((j$t,cz)=>{"use strict";cz.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOriginalDispatch:Symbol("original dispatch"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected"),kIgnoreTrailingSlash:Symbol("ignore trailing slash"),kMockAgentMockCallHistoryInstance:Symbol("mock agent mock call history name"),kMockAgentRegisterCallHistory:Symbol("mock agent register mock call history"),kMockAgentAddCallHistoryLog:Symbol("mock agent add call history log"),kMockAgentIsCallHistoryEnabled:Symbol("mock agent is call history enabled"),kMockAgentAcceptsNonStandardSearchParameters:Symbol("mock agent accepts non standard search parameters"),kMockCallHistoryAddLog:Symbol("mock call history add log"),kTotalDispatchCount:Symbol("total dispatch count")}});var pg=y((q$t,bz)=>{"use strict";var{MockNotMatchedError:Md}=mN(),{kDispatches:wp,kMockAgent:kLe,kOriginalDispatch:QLe,kOrigin:RLe,kGetNetConnect:OLe,kTotalDispatchCount:EN}=xp(),{serializePathWithQuery:FLe}=at(),{STATUS_CODES:LLe}=require("node:http"),{types:{isPromise:MLe}}=require("node:util"),{InvalidArgumentError:gN}=st();function Sa(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}function pz(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}function fz(t,e){if(Array.isArray(t)){for(let r=0;r<t.length;r+=2)if(t[r].toLocaleLowerCase()===e.toLocaleLowerCase())return t[r+1];return}else return typeof t.get=="function"?t.get(e):pz(t)[e.toLocaleLowerCase()]}function SN(t){let e=t.slice(),r=[];for(let n=0;n<e.length;n+=2)r.push([e[n],e[n+1]]);return Object.fromEntries(r)}function dz(t,e){if(typeof t.headers=="function")return Array.isArray(e)&&(e=SN(e)),t.headers(e?pz(e):{});if(typeof t.headers>"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let s=fz(e,r);if(!Sa(n,s))return!1}return!0}function ULe(t){if(typeof t!="string")return t;let e=new URLSearchParams(t),r=new URLSearchParams;for(let[n,s]of e.entries()){if(n=n.replace("[]",""),/^(['"]).*\1$/.test(s)){r.append(n,s);continue}if(s.includes(",")){let o=s.split(",");for(let a of o)r.append(n,a);continue}r.append(n,s)}return r}function yN(t){if(typeof t!="string")return t;let e=t.split("?",3);if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}function jLe(t,{path:e,method:r,body:n,headers:s}){let i=Sa(t.path,e),o=Sa(t.method,r),a=typeof t.body<"u"?Sa(t.body,n):!0,l=dz(t,s);return i&&o&&a&&l}function hz(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t?t.toString():""}function Az(t,e){let r=e.query?FLe(e.path,e.query):e.path,n=typeof r=="string"?yN(r):r,s=uz(n),i=t.filter(({consumed:o})=>!o).filter(({path:o,ignoreTrailingSlash:a})=>a?Sa(uz(yN(o)),s):Sa(yN(o),n));if(i.length===0)throw new Md(`Mock dispatch not matched for path '${n}'`);if(i=i.filter(({method:o})=>Sa(o,e.method)),i.length===0)throw new Md(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(i=i.filter(({body:o})=>typeof o<"u"?Sa(o,e.body):!0),i.length===0)throw new Md(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(i=i.filter(o=>dz(o,e.headers)),i.length===0){let o=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new Md(`Mock dispatch not matched for headers '${o}' on path '${n}'`)}return i[0]}function qLe(t,e,r,n){let s={timesInvoked:0,times:1,persist:!1,consumed:!1,...n},i=typeof r=="function"?{callback:r}:{...r},o={...s,...e,pending:!0,data:{error:null,...i}};return t.push(o),t[EN]=(t[EN]||0)+1,o}function bN(t,e){let r=t.findIndex(n=>n.consumed?jLe(n,e):!1);r!==-1&&t.splice(r,1)}function uz(t){for(;t.endsWith("/");)t=t.slice(0,-1);return t.length===0&&(t="/"),t}function mz(t){let{path:e,method:r,body:n,headers:s,query:i}=t;return{path:e,method:r,body:n,headers:s,query:i}}function CN(t){let e=Object.keys(t),r=[];for(let n=0;n<e.length;++n){let s=e[n],i=t[s],o=Buffer.from(`${s}`);if(Array.isArray(i))for(let a=0;a<i.length;++a)r.push(o,Buffer.from(`${i[a]}`));else r.push(o,Buffer.from(`${i}`))}return r}function gz(t){return LLe[t]||"unknown"}async function HLe(t){let e=[];for await(let r of t)e.push(r);return Buffer.concat(e).toString("utf8")}function yz(t,e){let r=mz(t),n=Az(this[wp],r);n.timesInvoked++,n.data.callback&&(n.data={...n.data,...n.data.callback(t)});let{data:{statusCode:s,data:i,headers:o,trailers:a,error:l},delay:c,persist:u}=n,{timesInvoked:p,times:f}=n;if(n.consumed=!u&&p>=f,n.pending=p<f,l!==null)return bN(this[wp],r),e.onError(l),!0;let d=!1,A=null;function h(E){d||(d=!0,A!==null&&(clearTimeout(A),A=null),e.onError(E))}e.onConnect?.(h,null),typeof c=="number"&&c>0?A=setTimeout(()=>{A=null,m(this[wp])},c):m(this[wp]);function m(E,b=i){if(d)return;let I=Array.isArray(t.headers)?SN(t.headers):t.headers,w=typeof b=="function"?b({...t,headers:I}):b;if(MLe(w))return w.then(V=>m(E,V));if(d)return;let L=hz(w),U=CN(o),q=CN(a);e.onHeaders?.(s,U,g,gz(s)),e.onData?.(Buffer.from(L)),e.onComplete?.(q),bN(E,r)}function g(){}return!0}function $Le(){let t=this[kLe],e=this[RLe],r=this[QLe];return function(s,i){if(t.isMockActive)try{yz.call(this,s,i)}catch(o){if(o.code==="UND_MOCK_ERR_MOCK_NOT_MATCHED"){let a=t[OLe](),l=this[wp][EN]||this[wp].length,u=`, ${this[wp].filter(({consumed:p})=>!p).length} interceptor(s) remaining out of ${l} defined`;if(a===!1)throw new Md(`${o.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)${u}`);if(Ez(a,e))r.call(this,s,i);else throw new Md(`${o.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)${u}`)}else throw o}else r.call(this,s,i)}}function Ez(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>Sa(n,r.host)))}function VLe(t){return typeof t!="string"&&!(t instanceof URL)?t:t instanceof URL?t.origin:t.toLowerCase()}function GLe(t){let{agent:e,...r}=t;if("enableCallHistory"in r&&typeof r.enableCallHistory!="boolean")throw new gN("options.enableCallHistory must to be a boolean");if("acceptNonStandardSearchParameters"in r&&typeof r.acceptNonStandardSearchParameters!="boolean")throw new gN("options.acceptNonStandardSearchParameters must to be a boolean");if("ignoreTrailingSlash"in r&&typeof r.ignoreTrailingSlash!="boolean")throw new gN("options.ignoreTrailingSlash must to be a boolean");return r}bz.exports={getResponseData:hz,getMockDispatch:Az,addMockDispatch:qLe,deleteMockDispatch:bN,buildKey:mz,generateKeyValues:CN,matchValue:Sa,getResponse:HLe,getStatusText:gz,mockDispatch:yz,buildMockDispatch:$Le,checkNetConnect:Ez,buildAndValidateMockOptions:GLe,getHeaderByName:fz,buildHeadersFromArray:SN,normalizeSearchParams:ULe,normalizeOrigin:VLe}});var DN=y((H$t,TN)=>{"use strict";var{getResponseData:YLe,buildKey:WLe,addMockDispatch:IN}=pg(),{kDispatches:s1,kDispatchKey:i1,kDefaultHeaders:vN,kDefaultTrailers:xN,kContentLength:wN,kMockDispatch:o1,kIgnoreTrailingSlash:a1}=xp(),{InvalidArgumentError:Ia}=st(),{serializePathWithQuery:JLe}=at(),Ud=class{constructor(e){this[o1]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ia("waitInMs must be a valid integer > 0");return this[o1].delay=e,this}persist(){return this[o1].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ia("repeatTimes must be a valid integer > 0");return this[o1].times=e,this}},BN=class{constructor(e,r){if(typeof e!="object")throw new Ia("opts must be an object");if(typeof e.path>"u")throw new Ia("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=JLe(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[i1]=WLe(e),this[s1]=r,this[a1]=e.ignoreTrailingSlash??!1,this[vN]={},this[xN]={},this[wN]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let s=YLe(r),i=this[wN]?{"content-length":s.length}:{},o={...this[vN],...i,...n.headers},a={...this[xN],...n.trailers};return{statusCode:e,data:r,headers:o,trailers:a}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new Ia("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new Ia("responseOptions must be an object")}reply(e){if(typeof e=="function"){let i=a=>{let l=e(a);if(typeof l!="object"||l===null)throw new Ia("reply options callback must return an object");let c={data:"",responseOptions:{},...l};return this.validateReplyParameters(c),{...this.createMockScopeDispatchData(c)}},o=IN(this[s1],this[i1],i,{ignoreTrailingSlash:this[a1]});return new Ud(o)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),s=IN(this[s1],this[i1],n,{ignoreTrailingSlash:this[a1]});return new Ud(s)}replyWithError(e){if(typeof e>"u")throw new Ia("error must be defined");let r=IN(this[s1],this[i1],{error:e},{ignoreTrailingSlash:this[a1]});return new Ud(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Ia("headers must be defined");return this[vN]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Ia("trailers must be defined");return this[xN]=e,this}replyContentLength(){return this[wN]=!0,this}};TN.exports.MockInterceptor=BN;TN.exports.MockScope=Ud});var kN=y(($$t,Bz)=>{"use strict";var{promisify:KLe}=require("node:util"),zLe=Ic(),{buildMockDispatch:XLe}=pg(),{kDispatches:PN,kMockAgent:Cz,kClose:Sz,kOriginalClose:Iz,kOrigin:vz,kOriginalDispatch:ZLe,kConnected:_N,kIgnoreTrailingSlash:xz}=xp(),{MockInterceptor:eMe}=DN(),wz=cr(),{InvalidArgumentError:tMe}=st(),NN=class extends zLe{constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new tMe("Argument opts.agent must implement Agent");super(e,r),this[Cz]=r.agent,this[vz]=e,this[xz]=r.ignoreTrailingSlash??!1,this[PN]=[],this[_N]=1,this[ZLe]=this.dispatch,this[Iz]=this.close.bind(this),this.dispatch=XLe.call(this),this.close=this[Sz]}get[wz.kConnected](){return this[_N]}intercept(e){return new eMe(e&&{ignoreTrailingSlash:this[xz],...e},this[PN])}cleanMocks(){this[PN]=[]}async[Sz](){await KLe(this[Iz])(),this[_N]=0,this[Cz][wz.kClients].delete(this[vz])}};Bz.exports=NN});var ON=y((V$t,RN)=>{"use strict";var{kMockCallHistoryAddLog:rMe}=xp(),{InvalidArgumentError:Nc}=st();function Pc(t,e,r,n,s){switch(e.operator){case"OR":return n.push(...r(t,s)),n;case"AND":return r(t,n);default:throw new Nc("options.operator must to be a case insensitive string equal to 'OR' or 'AND'")}}function nMe(t={}){let e={};if("operator"in t){if(typeof t.operator!="string"||t.operator.toUpperCase()!=="OR"&&t.operator.toUpperCase()!=="AND")throw new Nc("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");return{...e,operator:t.operator.toUpperCase()}}return e}function _c(t){return(e,r)=>{if(typeof e=="string"||e==null)return r.filter(n=>n[t]===e);if(e instanceof RegExp)return r.filter(n=>e.test(n[t]));throw new Nc(`${t} parameter should be one of string, regexp, undefined or null`)}}function sMe(t){try{let e=new URL(t.path,t.origin);return e.search.length!==0||(e.search=new URLSearchParams(t.query).toString()),e}catch(e){throw new Nc("An error occurred when computing MockCallHistoryLog.url",{cause:e})}}var l1=class{constructor(e={}){this.body=e.body,this.headers=e.headers,this.method=e.method;let r=sMe(e);this.fullUrl=r.toString(),this.origin=r.origin,this.path=r.pathname,this.searchParams=Object.fromEntries(r.searchParams),this.protocol=r.protocol,this.host=r.host,this.port=r.port,this.hash=r.hash}toMap(){return new Map([["protocol",this.protocol],["host",this.host],["port",this.port],["origin",this.origin],["path",this.path],["hash",this.hash],["searchParams",this.searchParams],["fullUrl",this.fullUrl],["method",this.method],["body",this.body],["headers",this.headers]])}toString(){let e={betweenKeyValueSeparator:"->",betweenPairSeparator:"|"},r="";return this.toMap().forEach((n,s)=>{(typeof n=="string"||n===void 0||n===null)&&(r=`${r}${s}${e.betweenKeyValueSeparator}${n}${e.betweenPairSeparator}`),(typeof n=="object"&&n!==null||Array.isArray(n))&&(r=`${r}${s}${e.betweenKeyValueSeparator}${JSON.stringify(n)}${e.betweenPairSeparator}`)}),r.slice(0,-1)}},QN=class{logs=[];calls(){return this.logs}firstCall(){return this.logs.at(0)}lastCall(){return this.logs.at(-1)}nthCall(e){if(typeof e!="number")throw new Nc("nthCall must be called with a number");if(!Number.isInteger(e))throw new Nc("nthCall must be called with an integer");if(Math.sign(e)!==1)throw new Nc("nthCall must be called with a positive value. use firstCall or lastCall instead");return this.logs.at(e-1)}filterCalls(e,r){if(this.logs.length===0)return this.logs;if(typeof e=="function")return this.logs.filter(e);if(e instanceof RegExp)return this.logs.filter(n=>e.test(n.toString()));if(typeof e=="object"&&e!==null){if(Object.keys(e).length===0)return this.logs;let n={operator:"OR",...nMe(r)},s=n.operator==="AND"?this.logs:[];return"protocol"in e&&(s=Pc(e.protocol,n,this.filterCallsByProtocol,s,this.logs)),"host"in e&&(s=Pc(e.host,n,this.filterCallsByHost,s,this.logs)),"port"in e&&(s=Pc(e.port,n,this.filterCallsByPort,s,this.logs)),"origin"in e&&(s=Pc(e.origin,n,this.filterCallsByOrigin,s,this.logs)),"path"in e&&(s=Pc(e.path,n,this.filterCallsByPath,s,this.logs)),"hash"in e&&(s=Pc(e.hash,n,this.filterCallsByHash,s,this.logs)),"fullUrl"in e&&(s=Pc(e.fullUrl,n,this.filterCallsByFullUrl,s,this.logs)),"method"in e&&(s=Pc(e.method,n,this.filterCallsByMethod,s,this.logs)),[...new Set(s)]}throw new Nc("criteria parameter should be one of function, regexp, or object")}filterCallsByProtocol=_c.call(this,"protocol");filterCallsByHost=_c.call(this,"host");filterCallsByPort=_c.call(this,"port");filterCallsByOrigin=_c.call(this,"origin");filterCallsByPath=_c.call(this,"path");filterCallsByHash=_c.call(this,"hash");filterCallsByFullUrl=_c.call(this,"fullUrl");filterCallsByMethod=_c.call(this,"method");clear(){this.logs=[]}[rMe](e){let r=new l1(e);return this.logs.push(r),r}*[Symbol.iterator](){for(let e of this.calls())yield e}};RN.exports.MockCallHistory=QN;RN.exports.MockCallHistoryLog=l1});var UN=y((G$t,Qz)=>{"use strict";var{promisify:iMe}=require("node:util"),oMe=hp(),{buildMockDispatch:aMe}=pg(),{kDispatches:FN,kMockAgent:Tz,kClose:Dz,kOriginalClose:Pz,kOrigin:_z,kOriginalDispatch:lMe,kConnected:LN,kIgnoreTrailingSlash:Nz}=xp(),{MockInterceptor:cMe}=DN(),kz=cr(),{InvalidArgumentError:uMe}=st(),MN=class extends oMe{constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new uMe("Argument opts.agent must implement Agent");super(e,r),this[Tz]=r.agent,this[_z]=e,this[Nz]=r.ignoreTrailingSlash??!1,this[FN]=[],this[LN]=1,this[lMe]=this.dispatch,this[Pz]=this.close.bind(this),this.dispatch=aMe.call(this),this.close=this[Dz]}get[kz.kConnected](){return this[LN]}intercept(e){return new cMe(e&&{ignoreTrailingSlash:this[Nz],...e},this[FN])}cleanMocks(){this[FN]=[]}async[Dz](){await iMe(this[Pz])(),this[LN]=0,this[Tz][kz.kClients].delete(this[_z])}};Qz.exports=MN});var Oz=y((W$t,Rz)=>{"use strict";var{Transform:pMe}=require("node:stream"),{Console:fMe}=require("node:console"),dMe=process.versions.icu?"\u2705":"Y ",hMe=process.versions.icu?"\u274C":"N ";Rz.exports=class{constructor({disableColors:e}={}){this.transform=new pMe({transform(r,n,s){s(null,r)}}),this.logger=new fMe({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:s,data:{statusCode:i},persist:o,times:a,timesInvoked:l,origin:c})=>({Method:n,Origin:c,Path:s,"Status code":i,Persistent:o?dMe:hMe,Invocations:l,Remaining:o?1/0:a-l}));return this.logger.table(r),this.transform.read().toString()}}});var VN=y((J$t,Hz)=>{"use strict";var{kClients:Bp}=cr(),AMe=gp(),{kAgent:jN,kMockAgentSet:c1,kMockAgentGet:Fz,kDispatches:qN,kIsMockActive:u1,kNetConnect:Tp,kGetNetConnect:mMe,kOptions:p1,kFactory:f1,kMockAgentRegisterCallHistory:HN,kMockAgentIsCallHistoryEnabled:fg,kMockAgentAddCallHistoryLog:Lz,kMockAgentMockCallHistoryInstance:jd,kMockAgentAcceptsNonStandardSearchParameters:Mz,kMockCallHistoryAddLog:gMe,kIgnoreTrailingSlash:Uz}=xp(),yMe=kN(),EMe=UN(),{matchValue:bMe,normalizeSearchParams:CMe,buildAndValidateMockOptions:SMe,normalizeOrigin:jz}=pg(),{InvalidArgumentError:qz,UndiciError:IMe}=st(),vMe=Dm(),xMe=Oz(),{MockCallHistory:wMe}=ON(),$N=class extends vMe{constructor(e={}){super(e);let r=SMe(e);if(this[Tp]=!0,this[u1]=!0,this[fg]=r.enableCallHistory??!1,this[Mz]=r.acceptNonStandardSearchParameters??!1,this[Uz]=r.ignoreTrailingSlash??!1,e?.agent&&typeof e.agent.dispatch!="function")throw new qz("Argument opts.agent must implement Agent");let n=e?.agent?e.agent:new AMe(e);this[jN]=n,this[Bp]=n[Bp],this[p1]=r,this[fg]&&this[HN]()}get(e){let r=jz(e),n=this[Uz]?r.replace(/\/$/,""):r,s=this[Fz](n);return s||(s=this[f1](n),this[c1](n,s)),s}dispatch(e,r){e.origin=jz(e.origin),this.get(e.origin),this[Lz](e);let n=this[Mz],s={...e};if(n&&s.path){let[i,o]=s.path.split("?"),a=CMe(o,n);s.path=`${i}?${a}`}return this[jN].dispatch(s,r)}async close(){this.clearCallHistory(),await this[jN].close(),this[Bp].clear()}deactivate(){this[u1]=!1}activate(){this[u1]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[Tp])?this[Tp].push(e):this[Tp]=[e];else if(typeof e>"u")this[Tp]=!0;else throw new qz("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[Tp]=!1}enableCallHistory(){return this[fg]=!0,this}disableCallHistory(){return this[fg]=!1,this}getCallHistory(){return this[jd]}clearCallHistory(){this[jd]!==void 0&&this[jd].clear()}get isMockActive(){return this[u1]}[HN](){this[jd]===void 0&&(this[jd]=new wMe)}[Lz](e){this[fg]&&(this[HN](),this[jd][gMe](e))}[c1](e,r){this[Bp].set(e,{count:0,dispatcher:r})}[f1](e){let r=Object.assign({agent:this},this[p1]);return this[p1]&&this[p1].connections===1?new yMe(e,r):new EMe(e,r)}[Fz](e){let r=this[Bp].get(e);if(r?.dispatcher)return r.dispatcher;if(typeof e!="string"){let n=this[f1]("http://localhost:9999");return this[c1](e,n),n}for(let[n,s]of Array.from(this[Bp]))if(s&&typeof n!="string"&&bMe(n,e)){let i=this[f1](e);return this[c1](e,i),i[qN]=s.dispatcher[qN],i}}[mMe](){return this[Tp]}pendingInterceptors(){let e=this[Bp];return Array.from(e.entries()).flatMap(([r,n])=>n.dispatcher[qN].map(s=>({...s,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new xMe}={}){let r=this.pendingInterceptors();if(r.length!==0)throw new IMe(r.length===1?`1 interceptor is pending:
|
|
71
71
|
|
|
72
72
|
${e.format(r)}`.trim():`${r.length} interceptors are pending:
|
|
@@ -162,7 +162,7 @@ ${i}`:s.stack}ye.exports.fetch=function(e,r=void 0){return K9e(e,r).catch(n=>{th
|
|
|
162
162
|
${i}`)}function RVe(t,e){let{stackTraceLimit:r,prepareStackTrace:n}=Error,s;if(Error.stackTraceLimit=1+t+e,Error.prepareStackTrace=function(o,a){s=a},new Error().stack,Error.stackTraceLimit=r,Error.prepareStackTrace=n,!s)return{internal:!1,trace:""};let i=s.slice(1+t,1+t+e);return{internal:/[\\/]@babel[\\/]/.test(i[1].getFileName()),trace:i.map(o=>` at ${o}`).join(`
|
|
163
163
|
`)}}});var rn=y(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.isAccessor=ZKe;B.isAnyTypeAnnotation=gYe;B.isArgumentPlaceholder=GWe;B.isArrayExpression=OVe;B.isArrayPattern=QGe;B.isArrayTypeAnnotation=yYe;B.isArrowFunctionExpression=RGe;B.isAssignmentExpression=FVe;B.isAssignmentPattern=kGe;B.isAwaitExpression=sYe;B.isBigIntLiteral=oYe;B.isBinary=CKe;B.isBinaryExpression=LVe;B.isBindExpression=YWe;B.isBlock=vKe;B.isBlockParent=IKe;B.isBlockStatement=qVe;B.isBooleanLiteral=cGe;B.isBooleanLiteralTypeAnnotation=bYe;B.isBooleanTypeAnnotation=EYe;B.isBreakStatement=HVe;B.isCallExpression=$Ve;B.isCatchClause=VVe;B.isClass=KKe;B.isClassAccessorProperty=pYe;B.isClassBody=OGe;B.isClassDeclaration=LGe;B.isClassExpression=FGe;B.isClassImplements=SYe;B.isClassMethod=KGe;B.isClassPrivateMethod=dYe;B.isClassPrivateProperty=fYe;B.isClassProperty=uYe;B.isCompletionStatement=BKe;B.isConditional=TKe;B.isConditionalExpression=GVe;B.isContinueStatement=YVe;B.isDebuggerStatement=WVe;B.isDecimalLiteral=ZWe;B.isDeclaration=FKe;B.isDeclareClass=IYe;B.isDeclareExportAllDeclaration=NYe;B.isDeclareExportDeclaration=_Ye;B.isDeclareFunction=vYe;B.isDeclareInterface=xYe;B.isDeclareModule=wYe;B.isDeclareModuleExports=BYe;B.isDeclareOpaqueType=DYe;B.isDeclareTypeAlias=TYe;B.isDeclareVariable=PYe;B.isDeclaredPredicate=kYe;B.isDecorator=WWe;B.isDirective=UVe;B.isDirectiveLiteral=jVe;B.isDoExpression=JWe;B.isDoWhileStatement=JVe;B.isEmptyStatement=KVe;B.isEmptyTypeAnnotation=$Ye;B.isEnumBody=oze;B.isEnumBooleanBody=yWe;B.isEnumBooleanMember=SWe;B.isEnumDeclaration=gWe;B.isEnumDefaultedMember=xWe;B.isEnumMember=aze;B.isEnumNumberBody=EWe;B.isEnumNumberMember=IWe;B.isEnumStringBody=bWe;B.isEnumStringMember=vWe;B.isEnumSymbolBody=CWe;B.isExistsTypeAnnotation=QYe;B.isExportAllDeclaration=MGe;B.isExportDeclaration=zKe;B.isExportDefaultDeclaration=UGe;B.isExportDefaultSpecifier=KWe;B.isExportNamedDeclaration=jGe;B.isExportNamespaceSpecifier=aYe;B.isExportSpecifier=qGe;B.isExpression=bKe;B.isExpressionStatement=zVe;B.isExpressionWrapper=_Ke;B.isFile=XVe;B.isFlow=tze;B.isFlowBaseAnnotation=nze;B.isFlowDeclaration=sze;B.isFlowPredicate=ize;B.isFlowType=rze;B.isFor=NKe;B.isForInStatement=ZVe;B.isForOfStatement=HGe;B.isForStatement=eGe;B.isForXStatement=kKe;B.isFunction=QKe;B.isFunctionDeclaration=tGe;B.isFunctionExpression=rGe;B.isFunctionParameter=LKe;B.isFunctionParent=RKe;B.isFunctionTypeAnnotation=RYe;B.isFunctionTypeParam=OYe;B.isGenericTypeAnnotation=FYe;B.isIdentifier=nGe;B.isIfStatement=sGe;B.isImmutable=HKe;B.isImport=iYe;B.isImportAttribute=mYe;B.isImportDeclaration=$Ge;B.isImportDefaultSpecifier=VGe;B.isImportExpression=WGe;B.isImportNamespaceSpecifier=GGe;B.isImportOrExportDeclaration=aie;B.isImportSpecifier=YGe;B.isIndexedAccessType=wWe;B.isInferredPredicate=LYe;B.isInterfaceDeclaration=UYe;B.isInterfaceExtends=MYe;B.isInterfaceTypeAnnotation=jYe;B.isInterpreterDirective=MVe;B.isIntersectionTypeAnnotation=qYe;B.isJSX=lze;B.isJSXAttribute=TWe;B.isJSXClosingElement=DWe;B.isJSXClosingFragment=qWe;B.isJSXElement=PWe;B.isJSXEmptyExpression=_We;B.isJSXExpressionContainer=NWe;B.isJSXFragment=UWe;B.isJSXIdentifier=QWe;B.isJSXMemberExpression=RWe;B.isJSXNamespacedName=OWe;B.isJSXOpeningElement=FWe;B.isJSXOpeningFragment=jWe;B.isJSXSpreadAttribute=LWe;B.isJSXSpreadChild=kWe;B.isJSXText=MWe;B.isLVal=UKe;B.isLabeledStatement=iGe;B.isLiteral=qKe;B.isLogicalExpression=pGe;B.isLoop=DKe;B.isMemberExpression=fGe;B.isMetaProperty=JGe;B.isMethod=VKe;B.isMiscellaneous=cze;B.isMixedTypeAnnotation=HYe;B.isModuleDeclaration=yze;B.isModuleExpression=eJe;B.isModuleSpecifier=XKe;B.isNewExpression=dGe;B.isNoop=HWe;B.isNullLiteral=lGe;B.isNullLiteralTypeAnnotation=CYe;B.isNullableTypeAnnotation=VYe;B.isNumberLiteral=hze;B.isNumberLiteralTypeAnnotation=GYe;B.isNumberTypeAnnotation=YYe;B.isNumericLiteral=aGe;B.isObjectExpression=AGe;B.isObjectMember=GKe;B.isObjectMethod=mGe;B.isObjectPattern=zGe;B.isObjectProperty=gGe;B.isObjectTypeAnnotation=WYe;B.isObjectTypeCallProperty=KYe;B.isObjectTypeIndexer=zYe;B.isObjectTypeInternalSlot=JYe;B.isObjectTypeProperty=XYe;B.isObjectTypeSpreadProperty=ZYe;B.isOpaqueType=eWe;B.isOptionalCallExpression=cYe;B.isOptionalIndexedAccessType=BWe;B.isOptionalMemberExpression=lYe;B.isParenthesizedExpression=CGe;B.isPattern=JKe;B.isPatternLike=MKe;B.isPipelineBareFunction=nJe;B.isPipelinePrimaryTopicReference=sJe;B.isPipelineTopicExpression=rJe;B.isPlaceholder=$We;B.isPrivate=eze;B.isPrivateName=hYe;B.isProgram=hGe;B.isProperty=YKe;B.isPureish=OKe;B.isQualifiedTypeIdentifier=tWe;B.isRecordExpression=zWe;B.isRegExpLiteral=uGe;B.isRegexLiteral=Aze;B.isRestElement=yGe;B.isRestProperty=mze;B.isReturnStatement=EGe;B.isScopable=SKe;B.isSequenceExpression=bGe;B.isSpreadElement=XGe;B.isSpreadProperty=gze;B.isStandardized=EKe;B.isStatement=xKe;B.isStaticBlock=AYe;B.isStringLiteral=oGe;B.isStringLiteralTypeAnnotation=rWe;B.isStringTypeAnnotation=nWe;B.isSuper=ZGe;B.isSwitchCase=SGe;B.isSwitchStatement=IGe;B.isSymbolTypeAnnotation=sWe;B.isTSAnyKeyword=AJe;B.isTSArrayType=RJe;B.isTSAsExpression=tKe;B.isTSBaseType=dze;B.isTSBigIntKeyword=gJe;B.isTSBooleanKeyword=mJe;B.isTSCallSignatureDeclaration=uJe;B.isTSConditionalType=qJe;B.isTSConstructSignatureDeclaration=pJe;B.isTSConstructorType=PJe;B.isTSDeclareFunction=aJe;B.isTSDeclareMethod=lJe;B.isTSEntityName=jKe;B.isTSEnumBody=sKe;B.isTSEnumDeclaration=iKe;B.isTSEnumMember=oKe;B.isTSExportAssignment=dKe;B.isTSExpressionWithTypeArguments=KJe;B.isTSExternalModuleReference=pKe;B.isTSFunctionType=DJe;B.isTSImportEqualsDeclaration=uKe;B.isTSImportType=cKe;B.isTSIndexSignature=hJe;B.isTSIndexedAccessType=GJe;B.isTSInferType=HJe;B.isTSInstantiationExpression=eKe;B.isTSInterfaceBody=XJe;B.isTSInterfaceDeclaration=zJe;B.isTSIntersectionType=jJe;B.isTSIntrinsicKeyword=yJe;B.isTSLiteralType=JJe;B.isTSMappedType=YJe;B.isTSMethodSignature=dJe;B.isTSModuleBlock=lKe;B.isTSModuleDeclaration=aKe;B.isTSNamedTupleMember=MJe;B.isTSNamespaceExportDeclaration=hKe;B.isTSNeverKeyword=EJe;B.isTSNonNullExpression=fKe;B.isTSNullKeyword=bJe;B.isTSNumberKeyword=CJe;B.isTSObjectKeyword=SJe;B.isTSOptionalType=FJe;B.isTSParameterProperty=oJe;B.isTSParenthesizedType=$Je;B.isTSPropertySignature=fJe;B.isTSQualifiedName=cJe;B.isTSRestType=LJe;B.isTSSatisfiesExpression=rKe;B.isTSStringKeyword=IJe;B.isTSSymbolKeyword=vJe;B.isTSTemplateLiteralType=WJe;B.isTSThisType=TJe;B.isTSTupleType=OJe;B.isTSType=fze;B.isTSTypeAliasDeclaration=ZJe;B.isTSTypeAnnotation=AKe;B.isTSTypeAssertion=nKe;B.isTSTypeElement=pze;B.isTSTypeLiteral=QJe;B.isTSTypeOperator=VJe;B.isTSTypeParameter=yKe;B.isTSTypeParameterDeclaration=gKe;B.isTSTypeParameterInstantiation=mKe;B.isTSTypePredicate=NJe;B.isTSTypeQuery=kJe;B.isTSTypeReference=_Je;B.isTSUndefinedKeyword=xJe;B.isTSUnionType=UJe;B.isTSUnknownKeyword=wJe;B.isTSVoidKeyword=BJe;B.isTaggedTemplateExpression=eYe;B.isTemplateElement=tYe;B.isTemplateLiteral=rYe;B.isTerminatorless=wKe;B.isThisExpression=vGe;B.isThisTypeAnnotation=iWe;B.isThrowStatement=xGe;B.isTopicReference=tJe;B.isTryStatement=wGe;B.isTupleExpression=XWe;B.isTupleTypeAnnotation=oWe;B.isTypeAlias=lWe;B.isTypeAnnotation=cWe;B.isTypeCastExpression=uWe;B.isTypeParameter=pWe;B.isTypeParameterDeclaration=fWe;B.isTypeParameterInstantiation=dWe;B.isTypeScript=uze;B.isTypeofTypeAnnotation=aWe;B.isUnaryExpression=BGe;B.isUnaryLike=WKe;B.isUnionTypeAnnotation=hWe;B.isUpdateExpression=TGe;B.isUserWhitespacable=$Ke;B.isV8IntrinsicIdentifier=VWe;B.isVariableDeclaration=DGe;B.isVariableDeclarator=PGe;B.isVariance=AWe;B.isVoidPattern=iJe;B.isVoidTypeAnnotation=mWe;B.isWhile=PKe;B.isWhileStatement=_Ge;B.isWithStatement=NGe;B.isYieldExpression=nYe;var P=$S(),ny=bh();function OVe(t,e){return!t||t.type!=="ArrayExpression"?!1:e==null||(0,P.default)(t,e)}function FVe(t,e){return!t||t.type!=="AssignmentExpression"?!1:e==null||(0,P.default)(t,e)}function LVe(t,e){return!t||t.type!=="BinaryExpression"?!1:e==null||(0,P.default)(t,e)}function MVe(t,e){return!t||t.type!=="InterpreterDirective"?!1:e==null||(0,P.default)(t,e)}function UVe(t,e){return!t||t.type!=="Directive"?!1:e==null||(0,P.default)(t,e)}function jVe(t,e){return!t||t.type!=="DirectiveLiteral"?!1:e==null||(0,P.default)(t,e)}function qVe(t,e){return!t||t.type!=="BlockStatement"?!1:e==null||(0,P.default)(t,e)}function HVe(t,e){return!t||t.type!=="BreakStatement"?!1:e==null||(0,P.default)(t,e)}function $Ve(t,e){return!t||t.type!=="CallExpression"?!1:e==null||(0,P.default)(t,e)}function VVe(t,e){return!t||t.type!=="CatchClause"?!1:e==null||(0,P.default)(t,e)}function GVe(t,e){return!t||t.type!=="ConditionalExpression"?!1:e==null||(0,P.default)(t,e)}function YVe(t,e){return!t||t.type!=="ContinueStatement"?!1:e==null||(0,P.default)(t,e)}function WVe(t,e){return!t||t.type!=="DebuggerStatement"?!1:e==null||(0,P.default)(t,e)}function JVe(t,e){return!t||t.type!=="DoWhileStatement"?!1:e==null||(0,P.default)(t,e)}function KVe(t,e){return!t||t.type!=="EmptyStatement"?!1:e==null||(0,P.default)(t,e)}function zVe(t,e){return!t||t.type!=="ExpressionStatement"?!1:e==null||(0,P.default)(t,e)}function XVe(t,e){return!t||t.type!=="File"?!1:e==null||(0,P.default)(t,e)}function ZVe(t,e){return!t||t.type!=="ForInStatement"?!1:e==null||(0,P.default)(t,e)}function eGe(t,e){return!t||t.type!=="ForStatement"?!1:e==null||(0,P.default)(t,e)}function tGe(t,e){return!t||t.type!=="FunctionDeclaration"?!1:e==null||(0,P.default)(t,e)}function rGe(t,e){return!t||t.type!=="FunctionExpression"?!1:e==null||(0,P.default)(t,e)}function nGe(t,e){return!t||t.type!=="Identifier"?!1:e==null||(0,P.default)(t,e)}function sGe(t,e){return!t||t.type!=="IfStatement"?!1:e==null||(0,P.default)(t,e)}function iGe(t,e){return!t||t.type!=="LabeledStatement"?!1:e==null||(0,P.default)(t,e)}function oGe(t,e){return!t||t.type!=="StringLiteral"?!1:e==null||(0,P.default)(t,e)}function aGe(t,e){return!t||t.type!=="NumericLiteral"?!1:e==null||(0,P.default)(t,e)}function lGe(t,e){return!t||t.type!=="NullLiteral"?!1:e==null||(0,P.default)(t,e)}function cGe(t,e){return!t||t.type!=="BooleanLiteral"?!1:e==null||(0,P.default)(t,e)}function uGe(t,e){return!t||t.type!=="RegExpLiteral"?!1:e==null||(0,P.default)(t,e)}function pGe(t,e){return!t||t.type!=="LogicalExpression"?!1:e==null||(0,P.default)(t,e)}function fGe(t,e){return!t||t.type!=="MemberExpression"?!1:e==null||(0,P.default)(t,e)}function dGe(t,e){return!t||t.type!=="NewExpression"?!1:e==null||(0,P.default)(t,e)}function hGe(t,e){return!t||t.type!=="Program"?!1:e==null||(0,P.default)(t,e)}function AGe(t,e){return!t||t.type!=="ObjectExpression"?!1:e==null||(0,P.default)(t,e)}function mGe(t,e){return!t||t.type!=="ObjectMethod"?!1:e==null||(0,P.default)(t,e)}function gGe(t,e){return!t||t.type!=="ObjectProperty"?!1:e==null||(0,P.default)(t,e)}function yGe(t,e){return!t||t.type!=="RestElement"?!1:e==null||(0,P.default)(t,e)}function EGe(t,e){return!t||t.type!=="ReturnStatement"?!1:e==null||(0,P.default)(t,e)}function bGe(t,e){return!t||t.type!=="SequenceExpression"?!1:e==null||(0,P.default)(t,e)}function CGe(t,e){return!t||t.type!=="ParenthesizedExpression"?!1:e==null||(0,P.default)(t,e)}function SGe(t,e){return!t||t.type!=="SwitchCase"?!1:e==null||(0,P.default)(t,e)}function IGe(t,e){return!t||t.type!=="SwitchStatement"?!1:e==null||(0,P.default)(t,e)}function vGe(t,e){return!t||t.type!=="ThisExpression"?!1:e==null||(0,P.default)(t,e)}function xGe(t,e){return!t||t.type!=="ThrowStatement"?!1:e==null||(0,P.default)(t,e)}function wGe(t,e){return!t||t.type!=="TryStatement"?!1:e==null||(0,P.default)(t,e)}function BGe(t,e){return!t||t.type!=="UnaryExpression"?!1:e==null||(0,P.default)(t,e)}function TGe(t,e){return!t||t.type!=="UpdateExpression"?!1:e==null||(0,P.default)(t,e)}function DGe(t,e){return!t||t.type!=="VariableDeclaration"?!1:e==null||(0,P.default)(t,e)}function PGe(t,e){return!t||t.type!=="VariableDeclarator"?!1:e==null||(0,P.default)(t,e)}function _Ge(t,e){return!t||t.type!=="WhileStatement"?!1:e==null||(0,P.default)(t,e)}function NGe(t,e){return!t||t.type!=="WithStatement"?!1:e==null||(0,P.default)(t,e)}function kGe(t,e){return!t||t.type!=="AssignmentPattern"?!1:e==null||(0,P.default)(t,e)}function QGe(t,e){return!t||t.type!=="ArrayPattern"?!1:e==null||(0,P.default)(t,e)}function RGe(t,e){return!t||t.type!=="ArrowFunctionExpression"?!1:e==null||(0,P.default)(t,e)}function OGe(t,e){return!t||t.type!=="ClassBody"?!1:e==null||(0,P.default)(t,e)}function FGe(t,e){return!t||t.type!=="ClassExpression"?!1:e==null||(0,P.default)(t,e)}function LGe(t,e){return!t||t.type!=="ClassDeclaration"?!1:e==null||(0,P.default)(t,e)}function MGe(t,e){return!t||t.type!=="ExportAllDeclaration"?!1:e==null||(0,P.default)(t,e)}function UGe(t,e){return!t||t.type!=="ExportDefaultDeclaration"?!1:e==null||(0,P.default)(t,e)}function jGe(t,e){return!t||t.type!=="ExportNamedDeclaration"?!1:e==null||(0,P.default)(t,e)}function qGe(t,e){return!t||t.type!=="ExportSpecifier"?!1:e==null||(0,P.default)(t,e)}function HGe(t,e){return!t||t.type!=="ForOfStatement"?!1:e==null||(0,P.default)(t,e)}function $Ge(t,e){return!t||t.type!=="ImportDeclaration"?!1:e==null||(0,P.default)(t,e)}function VGe(t,e){return!t||t.type!=="ImportDefaultSpecifier"?!1:e==null||(0,P.default)(t,e)}function GGe(t,e){return!t||t.type!=="ImportNamespaceSpecifier"?!1:e==null||(0,P.default)(t,e)}function YGe(t,e){return!t||t.type!=="ImportSpecifier"?!1:e==null||(0,P.default)(t,e)}function WGe(t,e){return!t||t.type!=="ImportExpression"?!1:e==null||(0,P.default)(t,e)}function JGe(t,e){return!t||t.type!=="MetaProperty"?!1:e==null||(0,P.default)(t,e)}function KGe(t,e){return!t||t.type!=="ClassMethod"?!1:e==null||(0,P.default)(t,e)}function zGe(t,e){return!t||t.type!=="ObjectPattern"?!1:e==null||(0,P.default)(t,e)}function XGe(t,e){return!t||t.type!=="SpreadElement"?!1:e==null||(0,P.default)(t,e)}function ZGe(t,e){return!t||t.type!=="Super"?!1:e==null||(0,P.default)(t,e)}function eYe(t,e){return!t||t.type!=="TaggedTemplateExpression"?!1:e==null||(0,P.default)(t,e)}function tYe(t,e){return!t||t.type!=="TemplateElement"?!1:e==null||(0,P.default)(t,e)}function rYe(t,e){return!t||t.type!=="TemplateLiteral"?!1:e==null||(0,P.default)(t,e)}function nYe(t,e){return!t||t.type!=="YieldExpression"?!1:e==null||(0,P.default)(t,e)}function sYe(t,e){return!t||t.type!=="AwaitExpression"?!1:e==null||(0,P.default)(t,e)}function iYe(t,e){return!t||t.type!=="Import"?!1:e==null||(0,P.default)(t,e)}function oYe(t,e){return!t||t.type!=="BigIntLiteral"?!1:e==null||(0,P.default)(t,e)}function aYe(t,e){return!t||t.type!=="ExportNamespaceSpecifier"?!1:e==null||(0,P.default)(t,e)}function lYe(t,e){return!t||t.type!=="OptionalMemberExpression"?!1:e==null||(0,P.default)(t,e)}function cYe(t,e){return!t||t.type!=="OptionalCallExpression"?!1:e==null||(0,P.default)(t,e)}function uYe(t,e){return!t||t.type!=="ClassProperty"?!1:e==null||(0,P.default)(t,e)}function pYe(t,e){return!t||t.type!=="ClassAccessorProperty"?!1:e==null||(0,P.default)(t,e)}function fYe(t,e){return!t||t.type!=="ClassPrivateProperty"?!1:e==null||(0,P.default)(t,e)}function dYe(t,e){return!t||t.type!=="ClassPrivateMethod"?!1:e==null||(0,P.default)(t,e)}function hYe(t,e){return!t||t.type!=="PrivateName"?!1:e==null||(0,P.default)(t,e)}function AYe(t,e){return!t||t.type!=="StaticBlock"?!1:e==null||(0,P.default)(t,e)}function mYe(t,e){return!t||t.type!=="ImportAttribute"?!1:e==null||(0,P.default)(t,e)}function gYe(t,e){return!t||t.type!=="AnyTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function yYe(t,e){return!t||t.type!=="ArrayTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function EYe(t,e){return!t||t.type!=="BooleanTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function bYe(t,e){return!t||t.type!=="BooleanLiteralTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function CYe(t,e){return!t||t.type!=="NullLiteralTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function SYe(t,e){return!t||t.type!=="ClassImplements"?!1:e==null||(0,P.default)(t,e)}function IYe(t,e){return!t||t.type!=="DeclareClass"?!1:e==null||(0,P.default)(t,e)}function vYe(t,e){return!t||t.type!=="DeclareFunction"?!1:e==null||(0,P.default)(t,e)}function xYe(t,e){return!t||t.type!=="DeclareInterface"?!1:e==null||(0,P.default)(t,e)}function wYe(t,e){return!t||t.type!=="DeclareModule"?!1:e==null||(0,P.default)(t,e)}function BYe(t,e){return!t||t.type!=="DeclareModuleExports"?!1:e==null||(0,P.default)(t,e)}function TYe(t,e){return!t||t.type!=="DeclareTypeAlias"?!1:e==null||(0,P.default)(t,e)}function DYe(t,e){return!t||t.type!=="DeclareOpaqueType"?!1:e==null||(0,P.default)(t,e)}function PYe(t,e){return!t||t.type!=="DeclareVariable"?!1:e==null||(0,P.default)(t,e)}function _Ye(t,e){return!t||t.type!=="DeclareExportDeclaration"?!1:e==null||(0,P.default)(t,e)}function NYe(t,e){return!t||t.type!=="DeclareExportAllDeclaration"?!1:e==null||(0,P.default)(t,e)}function kYe(t,e){return!t||t.type!=="DeclaredPredicate"?!1:e==null||(0,P.default)(t,e)}function QYe(t,e){return!t||t.type!=="ExistsTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function RYe(t,e){return!t||t.type!=="FunctionTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function OYe(t,e){return!t||t.type!=="FunctionTypeParam"?!1:e==null||(0,P.default)(t,e)}function FYe(t,e){return!t||t.type!=="GenericTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function LYe(t,e){return!t||t.type!=="InferredPredicate"?!1:e==null||(0,P.default)(t,e)}function MYe(t,e){return!t||t.type!=="InterfaceExtends"?!1:e==null||(0,P.default)(t,e)}function UYe(t,e){return!t||t.type!=="InterfaceDeclaration"?!1:e==null||(0,P.default)(t,e)}function jYe(t,e){return!t||t.type!=="InterfaceTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function qYe(t,e){return!t||t.type!=="IntersectionTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function HYe(t,e){return!t||t.type!=="MixedTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function $Ye(t,e){return!t||t.type!=="EmptyTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function VYe(t,e){return!t||t.type!=="NullableTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function GYe(t,e){return!t||t.type!=="NumberLiteralTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function YYe(t,e){return!t||t.type!=="NumberTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function WYe(t,e){return!t||t.type!=="ObjectTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function JYe(t,e){return!t||t.type!=="ObjectTypeInternalSlot"?!1:e==null||(0,P.default)(t,e)}function KYe(t,e){return!t||t.type!=="ObjectTypeCallProperty"?!1:e==null||(0,P.default)(t,e)}function zYe(t,e){return!t||t.type!=="ObjectTypeIndexer"?!1:e==null||(0,P.default)(t,e)}function XYe(t,e){return!t||t.type!=="ObjectTypeProperty"?!1:e==null||(0,P.default)(t,e)}function ZYe(t,e){return!t||t.type!=="ObjectTypeSpreadProperty"?!1:e==null||(0,P.default)(t,e)}function eWe(t,e){return!t||t.type!=="OpaqueType"?!1:e==null||(0,P.default)(t,e)}function tWe(t,e){return!t||t.type!=="QualifiedTypeIdentifier"?!1:e==null||(0,P.default)(t,e)}function rWe(t,e){return!t||t.type!=="StringLiteralTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function nWe(t,e){return!t||t.type!=="StringTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function sWe(t,e){return!t||t.type!=="SymbolTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function iWe(t,e){return!t||t.type!=="ThisTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function oWe(t,e){return!t||t.type!=="TupleTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function aWe(t,e){return!t||t.type!=="TypeofTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function lWe(t,e){return!t||t.type!=="TypeAlias"?!1:e==null||(0,P.default)(t,e)}function cWe(t,e){return!t||t.type!=="TypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function uWe(t,e){return!t||t.type!=="TypeCastExpression"?!1:e==null||(0,P.default)(t,e)}function pWe(t,e){return!t||t.type!=="TypeParameter"?!1:e==null||(0,P.default)(t,e)}function fWe(t,e){return!t||t.type!=="TypeParameterDeclaration"?!1:e==null||(0,P.default)(t,e)}function dWe(t,e){return!t||t.type!=="TypeParameterInstantiation"?!1:e==null||(0,P.default)(t,e)}function hWe(t,e){return!t||t.type!=="UnionTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function AWe(t,e){return!t||t.type!=="Variance"?!1:e==null||(0,P.default)(t,e)}function mWe(t,e){return!t||t.type!=="VoidTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function gWe(t,e){return!t||t.type!=="EnumDeclaration"?!1:e==null||(0,P.default)(t,e)}function yWe(t,e){return!t||t.type!=="EnumBooleanBody"?!1:e==null||(0,P.default)(t,e)}function EWe(t,e){return!t||t.type!=="EnumNumberBody"?!1:e==null||(0,P.default)(t,e)}function bWe(t,e){return!t||t.type!=="EnumStringBody"?!1:e==null||(0,P.default)(t,e)}function CWe(t,e){return!t||t.type!=="EnumSymbolBody"?!1:e==null||(0,P.default)(t,e)}function SWe(t,e){return!t||t.type!=="EnumBooleanMember"?!1:e==null||(0,P.default)(t,e)}function IWe(t,e){return!t||t.type!=="EnumNumberMember"?!1:e==null||(0,P.default)(t,e)}function vWe(t,e){return!t||t.type!=="EnumStringMember"?!1:e==null||(0,P.default)(t,e)}function xWe(t,e){return!t||t.type!=="EnumDefaultedMember"?!1:e==null||(0,P.default)(t,e)}function wWe(t,e){return!t||t.type!=="IndexedAccessType"?!1:e==null||(0,P.default)(t,e)}function BWe(t,e){return!t||t.type!=="OptionalIndexedAccessType"?!1:e==null||(0,P.default)(t,e)}function TWe(t,e){return!t||t.type!=="JSXAttribute"?!1:e==null||(0,P.default)(t,e)}function DWe(t,e){return!t||t.type!=="JSXClosingElement"?!1:e==null||(0,P.default)(t,e)}function PWe(t,e){return!t||t.type!=="JSXElement"?!1:e==null||(0,P.default)(t,e)}function _We(t,e){return!t||t.type!=="JSXEmptyExpression"?!1:e==null||(0,P.default)(t,e)}function NWe(t,e){return!t||t.type!=="JSXExpressionContainer"?!1:e==null||(0,P.default)(t,e)}function kWe(t,e){return!t||t.type!=="JSXSpreadChild"?!1:e==null||(0,P.default)(t,e)}function QWe(t,e){return!t||t.type!=="JSXIdentifier"?!1:e==null||(0,P.default)(t,e)}function RWe(t,e){return!t||t.type!=="JSXMemberExpression"?!1:e==null||(0,P.default)(t,e)}function OWe(t,e){return!t||t.type!=="JSXNamespacedName"?!1:e==null||(0,P.default)(t,e)}function FWe(t,e){return!t||t.type!=="JSXOpeningElement"?!1:e==null||(0,P.default)(t,e)}function LWe(t,e){return!t||t.type!=="JSXSpreadAttribute"?!1:e==null||(0,P.default)(t,e)}function MWe(t,e){return!t||t.type!=="JSXText"?!1:e==null||(0,P.default)(t,e)}function UWe(t,e){return!t||t.type!=="JSXFragment"?!1:e==null||(0,P.default)(t,e)}function jWe(t,e){return!t||t.type!=="JSXOpeningFragment"?!1:e==null||(0,P.default)(t,e)}function qWe(t,e){return!t||t.type!=="JSXClosingFragment"?!1:e==null||(0,P.default)(t,e)}function HWe(t,e){return!t||t.type!=="Noop"?!1:e==null||(0,P.default)(t,e)}function $We(t,e){return!t||t.type!=="Placeholder"?!1:e==null||(0,P.default)(t,e)}function VWe(t,e){return!t||t.type!=="V8IntrinsicIdentifier"?!1:e==null||(0,P.default)(t,e)}function GWe(t,e){return!t||t.type!=="ArgumentPlaceholder"?!1:e==null||(0,P.default)(t,e)}function YWe(t,e){return!t||t.type!=="BindExpression"?!1:e==null||(0,P.default)(t,e)}function WWe(t,e){return!t||t.type!=="Decorator"?!1:e==null||(0,P.default)(t,e)}function JWe(t,e){return!t||t.type!=="DoExpression"?!1:e==null||(0,P.default)(t,e)}function KWe(t,e){return!t||t.type!=="ExportDefaultSpecifier"?!1:e==null||(0,P.default)(t,e)}function zWe(t,e){return!t||t.type!=="RecordExpression"?!1:e==null||(0,P.default)(t,e)}function XWe(t,e){return!t||t.type!=="TupleExpression"?!1:e==null||(0,P.default)(t,e)}function ZWe(t,e){return!t||t.type!=="DecimalLiteral"?!1:e==null||(0,P.default)(t,e)}function eJe(t,e){return!t||t.type!=="ModuleExpression"?!1:e==null||(0,P.default)(t,e)}function tJe(t,e){return!t||t.type!=="TopicReference"?!1:e==null||(0,P.default)(t,e)}function rJe(t,e){return!t||t.type!=="PipelineTopicExpression"?!1:e==null||(0,P.default)(t,e)}function nJe(t,e){return!t||t.type!=="PipelineBareFunction"?!1:e==null||(0,P.default)(t,e)}function sJe(t,e){return!t||t.type!=="PipelinePrimaryTopicReference"?!1:e==null||(0,P.default)(t,e)}function iJe(t,e){return!t||t.type!=="VoidPattern"?!1:e==null||(0,P.default)(t,e)}function oJe(t,e){return!t||t.type!=="TSParameterProperty"?!1:e==null||(0,P.default)(t,e)}function aJe(t,e){return!t||t.type!=="TSDeclareFunction"?!1:e==null||(0,P.default)(t,e)}function lJe(t,e){return!t||t.type!=="TSDeclareMethod"?!1:e==null||(0,P.default)(t,e)}function cJe(t,e){return!t||t.type!=="TSQualifiedName"?!1:e==null||(0,P.default)(t,e)}function uJe(t,e){return!t||t.type!=="TSCallSignatureDeclaration"?!1:e==null||(0,P.default)(t,e)}function pJe(t,e){return!t||t.type!=="TSConstructSignatureDeclaration"?!1:e==null||(0,P.default)(t,e)}function fJe(t,e){return!t||t.type!=="TSPropertySignature"?!1:e==null||(0,P.default)(t,e)}function dJe(t,e){return!t||t.type!=="TSMethodSignature"?!1:e==null||(0,P.default)(t,e)}function hJe(t,e){return!t||t.type!=="TSIndexSignature"?!1:e==null||(0,P.default)(t,e)}function AJe(t,e){return!t||t.type!=="TSAnyKeyword"?!1:e==null||(0,P.default)(t,e)}function mJe(t,e){return!t||t.type!=="TSBooleanKeyword"?!1:e==null||(0,P.default)(t,e)}function gJe(t,e){return!t||t.type!=="TSBigIntKeyword"?!1:e==null||(0,P.default)(t,e)}function yJe(t,e){return!t||t.type!=="TSIntrinsicKeyword"?!1:e==null||(0,P.default)(t,e)}function EJe(t,e){return!t||t.type!=="TSNeverKeyword"?!1:e==null||(0,P.default)(t,e)}function bJe(t,e){return!t||t.type!=="TSNullKeyword"?!1:e==null||(0,P.default)(t,e)}function CJe(t,e){return!t||t.type!=="TSNumberKeyword"?!1:e==null||(0,P.default)(t,e)}function SJe(t,e){return!t||t.type!=="TSObjectKeyword"?!1:e==null||(0,P.default)(t,e)}function IJe(t,e){return!t||t.type!=="TSStringKeyword"?!1:e==null||(0,P.default)(t,e)}function vJe(t,e){return!t||t.type!=="TSSymbolKeyword"?!1:e==null||(0,P.default)(t,e)}function xJe(t,e){return!t||t.type!=="TSUndefinedKeyword"?!1:e==null||(0,P.default)(t,e)}function wJe(t,e){return!t||t.type!=="TSUnknownKeyword"?!1:e==null||(0,P.default)(t,e)}function BJe(t,e){return!t||t.type!=="TSVoidKeyword"?!1:e==null||(0,P.default)(t,e)}function TJe(t,e){return!t||t.type!=="TSThisType"?!1:e==null||(0,P.default)(t,e)}function DJe(t,e){return!t||t.type!=="TSFunctionType"?!1:e==null||(0,P.default)(t,e)}function PJe(t,e){return!t||t.type!=="TSConstructorType"?!1:e==null||(0,P.default)(t,e)}function _Je(t,e){return!t||t.type!=="TSTypeReference"?!1:e==null||(0,P.default)(t,e)}function NJe(t,e){return!t||t.type!=="TSTypePredicate"?!1:e==null||(0,P.default)(t,e)}function kJe(t,e){return!t||t.type!=="TSTypeQuery"?!1:e==null||(0,P.default)(t,e)}function QJe(t,e){return!t||t.type!=="TSTypeLiteral"?!1:e==null||(0,P.default)(t,e)}function RJe(t,e){return!t||t.type!=="TSArrayType"?!1:e==null||(0,P.default)(t,e)}function OJe(t,e){return!t||t.type!=="TSTupleType"?!1:e==null||(0,P.default)(t,e)}function FJe(t,e){return!t||t.type!=="TSOptionalType"?!1:e==null||(0,P.default)(t,e)}function LJe(t,e){return!t||t.type!=="TSRestType"?!1:e==null||(0,P.default)(t,e)}function MJe(t,e){return!t||t.type!=="TSNamedTupleMember"?!1:e==null||(0,P.default)(t,e)}function UJe(t,e){return!t||t.type!=="TSUnionType"?!1:e==null||(0,P.default)(t,e)}function jJe(t,e){return!t||t.type!=="TSIntersectionType"?!1:e==null||(0,P.default)(t,e)}function qJe(t,e){return!t||t.type!=="TSConditionalType"?!1:e==null||(0,P.default)(t,e)}function HJe(t,e){return!t||t.type!=="TSInferType"?!1:e==null||(0,P.default)(t,e)}function $Je(t,e){return!t||t.type!=="TSParenthesizedType"?!1:e==null||(0,P.default)(t,e)}function VJe(t,e){return!t||t.type!=="TSTypeOperator"?!1:e==null||(0,P.default)(t,e)}function GJe(t,e){return!t||t.type!=="TSIndexedAccessType"?!1:e==null||(0,P.default)(t,e)}function YJe(t,e){return!t||t.type!=="TSMappedType"?!1:e==null||(0,P.default)(t,e)}function WJe(t,e){return!t||t.type!=="TSTemplateLiteralType"?!1:e==null||(0,P.default)(t,e)}function JJe(t,e){return!t||t.type!=="TSLiteralType"?!1:e==null||(0,P.default)(t,e)}function KJe(t,e){return!t||t.type!=="TSExpressionWithTypeArguments"?!1:e==null||(0,P.default)(t,e)}function zJe(t,e){return!t||t.type!=="TSInterfaceDeclaration"?!1:e==null||(0,P.default)(t,e)}function XJe(t,e){return!t||t.type!=="TSInterfaceBody"?!1:e==null||(0,P.default)(t,e)}function ZJe(t,e){return!t||t.type!=="TSTypeAliasDeclaration"?!1:e==null||(0,P.default)(t,e)}function eKe(t,e){return!t||t.type!=="TSInstantiationExpression"?!1:e==null||(0,P.default)(t,e)}function tKe(t,e){return!t||t.type!=="TSAsExpression"?!1:e==null||(0,P.default)(t,e)}function rKe(t,e){return!t||t.type!=="TSSatisfiesExpression"?!1:e==null||(0,P.default)(t,e)}function nKe(t,e){return!t||t.type!=="TSTypeAssertion"?!1:e==null||(0,P.default)(t,e)}function sKe(t,e){return!t||t.type!=="TSEnumBody"?!1:e==null||(0,P.default)(t,e)}function iKe(t,e){return!t||t.type!=="TSEnumDeclaration"?!1:e==null||(0,P.default)(t,e)}function oKe(t,e){return!t||t.type!=="TSEnumMember"?!1:e==null||(0,P.default)(t,e)}function aKe(t,e){return!t||t.type!=="TSModuleDeclaration"?!1:e==null||(0,P.default)(t,e)}function lKe(t,e){return!t||t.type!=="TSModuleBlock"?!1:e==null||(0,P.default)(t,e)}function cKe(t,e){return!t||t.type!=="TSImportType"?!1:e==null||(0,P.default)(t,e)}function uKe(t,e){return!t||t.type!=="TSImportEqualsDeclaration"?!1:e==null||(0,P.default)(t,e)}function pKe(t,e){return!t||t.type!=="TSExternalModuleReference"?!1:e==null||(0,P.default)(t,e)}function fKe(t,e){return!t||t.type!=="TSNonNullExpression"?!1:e==null||(0,P.default)(t,e)}function dKe(t,e){return!t||t.type!=="TSExportAssignment"?!1:e==null||(0,P.default)(t,e)}function hKe(t,e){return!t||t.type!=="TSNamespaceExportDeclaration"?!1:e==null||(0,P.default)(t,e)}function AKe(t,e){return!t||t.type!=="TSTypeAnnotation"?!1:e==null||(0,P.default)(t,e)}function mKe(t,e){return!t||t.type!=="TSTypeParameterInstantiation"?!1:e==null||(0,P.default)(t,e)}function gKe(t,e){return!t||t.type!=="TSTypeParameterDeclaration"?!1:e==null||(0,P.default)(t,e)}function yKe(t,e){return!t||t.type!=="TSTypeParameter"?!1:e==null||(0,P.default)(t,e)}function EKe(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(t.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return e==null||(0,P.default)(t,e)}function bKe(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return e==null||(0,P.default)(t,e)}function CKe(t,e){if(!t)return!1;switch(t.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return e==null||(0,P.default)(t,e)}function SKe(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,P.default)(t,e)}function IKe(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,P.default)(t,e)}function vKe(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,P.default)(t,e)}function xKe(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(t.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return e==null||(0,P.default)(t,e)}function wKe(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return e==null||(0,P.default)(t,e)}function BKe(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function TKe(t,e){if(!t)return!1;switch(t.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function DKe(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function PKe(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function _Ke(t,e){if(!t)return!1;switch(t.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return e==null||(0,P.default)(t,e)}function NKe(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function kKe(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,P.default)(t,e)}function QKe(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,P.default)(t,e)}function RKe(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return e==null||(0,P.default)(t,e)}function OKe(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,P.default)(t,e)}function FKe(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(t.expectedNode==="Declaration")break;default:return!1}return e==null||(0,P.default)(t,e)}function LKe(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,P.default)(t,e)}function MKe(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,P.default)(t,e)}function UKe(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,P.default)(t,e)}function jKe(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,P.default)(t,e)}function qKe(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,P.default)(t,e)}function HKe(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,P.default)(t,e)}function $Ke(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return e==null||(0,P.default)(t,e)}function VKe(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,P.default)(t,e)}function GKe(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return e==null||(0,P.default)(t,e)}function YKe(t,e){if(!t)return!1;switch(t.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return e==null||(0,P.default)(t,e)}function WKe(t,e){if(!t)return!1;switch(t.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return e==null||(0,P.default)(t,e)}function JKe(t,e){if(!t)return!1;switch(t.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Pattern")break;default:return!1}return e==null||(0,P.default)(t,e)}function KKe(t,e){if(!t)return!1;switch(t.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return e==null||(0,P.default)(t,e)}function aie(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return e==null||(0,P.default)(t,e)}function zKe(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return e==null||(0,P.default)(t,e)}function XKe(t,e){if(!t)return!1;switch(t.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return e==null||(0,P.default)(t,e)}function ZKe(t,e){if(!t)return!1;switch(t.type){case"ClassAccessorProperty":break;default:return!1}return e==null||(0,P.default)(t,e)}function eze(t,e){if(!t)return!1;switch(t.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return e==null||(0,P.default)(t,e)}function tze(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,P.default)(t,e)}function rze(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,P.default)(t,e)}function nze(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return e==null||(0,P.default)(t,e)}function sze(t,e){if(!t)return!1;switch(t.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return e==null||(0,P.default)(t,e)}function ize(t,e){if(!t)return!1;switch(t.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return e==null||(0,P.default)(t,e)}function oze(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return e==null||(0,P.default)(t,e)}function aze(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return e==null||(0,P.default)(t,e)}function lze(t,e){if(!t)return!1;switch(t.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return e==null||(0,P.default)(t,e)}function cze(t,e){if(!t)return!1;switch(t.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return e==null||(0,P.default)(t,e)}function uze(t,e){if(!t)return!1;switch(t.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return e==null||(0,P.default)(t,e)}function pze(t,e){if(!t)return!1;switch(t.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return e==null||(0,P.default)(t,e)}function fze(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return e==null||(0,P.default)(t,e)}function dze(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return e==null||(0,P.default)(t,e)}function hze(t,e){return(0,ny.default)("isNumberLiteral","isNumericLiteral"),!t||t.type!=="NumberLiteral"?!1:e==null||(0,P.default)(t,e)}function Aze(t,e){return(0,ny.default)("isRegexLiteral","isRegExpLiteral"),!t||t.type!=="RegexLiteral"?!1:e==null||(0,P.default)(t,e)}function mze(t,e){return(0,ny.default)("isRestProperty","isRestElement"),!t||t.type!=="RestProperty"?!1:e==null||(0,P.default)(t,e)}function gze(t,e){return(0,ny.default)("isSpreadProperty","isSpreadElement"),!t||t.type!=="SpreadProperty"?!1:e==null||(0,P.default)(t,e)}function yze(t,e){return(0,ny.default)("isModuleDeclaration","isImportOrExportDeclaration"),aie(t,e)}});var DR=y(TR=>{"use strict";Object.defineProperty(TR,"__esModule",{value:!0});TR.default=Eze;var Jp=rn();function lie(t){return(0,Jp.isMemberExpression)(t)||(0,Jp.isMetaProperty)(t)}function Eze(t,e,r){if(!lie(t))return!1;let n=Array.isArray(e)?e:e.split("."),s=[],i;for(i=t;lie(i);i=(o=i.object)!=null?o:i.meta){var o;s.push(i.property)}if(s.push(i),s.length<n.length||!r&&s.length>n.length)return!1;for(let a=0,l=s.length-1;a<n.length;a++,l--){let c=s[l],u;if((0,Jp.isIdentifier)(c))u=c.name;else if((0,Jp.isStringLiteral)(c))u=c.value;else if((0,Jp.isThisExpression)(c))u="this";else if((0,Jp.isSuper)(c))u="super";else if((0,Jp.isPrivateName)(c))u="#"+c.id.name;else return!1;if(n[a]!==u)return!1}return!0}});var _R=y(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.default=Cze;var bze=DR();function Cze(t,e){let r=t.split(".");return n=>(0,bze.default)(n,r,e)}});var cie=y(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.default=void 0;var Sze=_R(),Ize=(0,Sze.default)("React.Component"),zXt=VS.default=Ize});var uie=y(NR=>{"use strict";Object.defineProperty(NR,"__esModule",{value:!0});NR.default=vze;function vze(t){return!!t&&/^[a-z]/.test(t)}});var GS=y(kR=>{"use strict";Object.defineProperty(kR,"__esModule",{value:!0});kR.default=xze;var pie=Zi();function xze(t,e){if(t===e)return!0;if(t==null||pie.ALIAS_KEYS[e])return!1;let r=pie.FLIPPED_ALIAS_KEYS[e];return!!(r!=null&&r.includes(t))}});var RR=y(QR=>{"use strict";Object.defineProperty(QR,"__esModule",{value:!0});QR.default=Bze;var wze=Zi();function Bze(t,e){if(t===e)return!0;let r=wze.PLACEHOLDERS_ALIAS[t];return!!(r!=null&&r.includes(e))}});var Ch=y(OR=>{"use strict";Object.defineProperty(OR,"__esModule",{value:!0});OR.default=Nze;var Tze=$S(),Dze=GS(),Pze=RR(),_ze=Zi();function Nze(t,e,r){return e?(0,Dze.default)(e.type,t)?r===void 0?!0:(0,Tze.default)(e,r):!r&&e.type==="Placeholder"&&t in _ze.FLIPPED_ALIAS_KEYS?(0,Pze.default)(e.expectedNode,t):!1:!1}});var mie=y(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.isIdentifierChar=Aie;sy.isIdentifierName=Oze;sy.isIdentifierStart=hie;var LR="\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\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\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\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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-\u1711\u171F-\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-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\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",fie="\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\u0897-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",kze=new RegExp("["+LR+"]"),Qze=new RegExp("["+LR+fie+"]");LR=fie=null;var die=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,38,6,186,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,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,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,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Rze=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function FR(t,e){let r=65536;for(let n=0,s=e.length;n<s;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function hie(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&kze.test(String.fromCharCode(t)):FR(t,die)}function Aie(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Qze.test(String.fromCharCode(t)):FR(t,die)||FR(t,Rze)}function Oze(t){let e=!0;for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if((n&64512)===55296&&r+1<t.length){let s=t.charCodeAt(++r);(s&64512)===56320&&(n=65536+((n&1023)<<10)+(s&1023))}if(e){if(e=!1,!hie(n))return!1}else if(!Aie(n))return!1}return!e}});var bie=y(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.isKeyword=jze;Kp.isReservedWord=gie;Kp.isStrictBindOnlyReservedWord=Eie;Kp.isStrictBindReservedWord=Uze;Kp.isStrictReservedWord=yie;var MR={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Fze=new Set(MR.keyword),Lze=new Set(MR.strict),Mze=new Set(MR.strictBind);function gie(t,e){return e&&t==="await"||t==="enum"}function yie(t,e){return gie(t,e)||Lze.has(t)}function Eie(t){return Mze.has(t)}function Uze(t,e){return yie(t,e)||Eie(t)}function jze(t){return Fze.has(t)}});var Sh=y(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Object.defineProperty(Pa,"isIdentifierChar",{enumerable:!0,get:function(){return UR.isIdentifierChar}});Object.defineProperty(Pa,"isIdentifierName",{enumerable:!0,get:function(){return UR.isIdentifierName}});Object.defineProperty(Pa,"isIdentifierStart",{enumerable:!0,get:function(){return UR.isIdentifierStart}});Object.defineProperty(Pa,"isKeyword",{enumerable:!0,get:function(){return iy.isKeyword}});Object.defineProperty(Pa,"isReservedWord",{enumerable:!0,get:function(){return iy.isReservedWord}});Object.defineProperty(Pa,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return iy.isStrictBindOnlyReservedWord}});Object.defineProperty(Pa,"isStrictBindReservedWord",{enumerable:!0,get:function(){return iy.isStrictBindReservedWord}});Object.defineProperty(Pa,"isStrictReservedWord",{enumerable:!0,get:function(){return iy.isStrictReservedWord}});var UR=mie(),iy=bie()});var Ih=y(qR=>{"use strict";Object.defineProperty(qR,"__esModule",{value:!0});qR.default=qze;var jR=Sh();function qze(t,e=!0){return typeof t!="string"||e&&((0,jR.isKeyword)(t)||(0,jR.isStrictReservedWord)(t,!0))?!1:(0,jR.isIdentifierName)(t)}});var vie=y(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.readCodePoint=Iie;oy.readInt=Sie;oy.readStringContents=$ze;var Hze=function(e){return e>=48&&e<=57},Cie={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},YS={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function $ze(t,e,r,n,s,i){let o=r,a=n,l=s,c="",u=null,p=r,{length:f}=e;for(;;){if(r>=f){i.unterminated(o,a,l),c+=e.slice(p,r);break}let d=e.charCodeAt(r);if(Vze(t,d,e,r)){c+=e.slice(p,r);break}if(d===92){c+=e.slice(p,r);let A=Gze(e,r,n,s,t==="template",i);A.ch===null&&!u?u={pos:r,lineStart:n,curLine:s}:c+=A.ch,{pos:r,lineStart:n,curLine:s}=A,p=r}else d===8232||d===8233?(++r,++s,n=r):d===10||d===13?t==="template"?(c+=e.slice(p,r)+`
|
|
164
164
|
`,++r,d===13&&e.charCodeAt(r)===10&&++r,++s,p=n=r):i.unterminated(o,a,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:n,curLine:s,containsInvalid:!!u}}function Vze(t,e,r,n){return t==="template"?e===96||e===36&&r.charCodeAt(n+1)===123:e===(t==="double"?34:39)}function Gze(t,e,r,n,s,i){let o=!s;e++;let a=c=>({pos:e,ch:c,lineStart:r,curLine:n}),l=t.charCodeAt(e++);switch(l){case 110:return a(`
|
|
165
|
-
`);case 114:return a("\r");case 120:{let c;return{code:c,pos:e}=HR(t,e,r,n,2,!1,o,i),a(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=Iie(t,e,r,n,o,i),a(c===null?null:String.fromCodePoint(c))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++n;case 8232:case 8233:return a("");case 56:case 57:if(s)return a(null);i.strictNumericEscape(e-1,r,n);default:if(l>=48&&l<=55){let c=e-1,p=/^[0-7]+/.exec(t.slice(c,e+2))[0],f=parseInt(p,8);f>255&&(p=p.slice(0,-1),f=parseInt(p,8)),e+=p.length-1;let d=t.charCodeAt(e);if(p!=="0"||d===56||d===57){if(s)return a(null);i.strictNumericEscape(c,r,n)}return a(String.fromCharCode(f))}return a(String.fromCharCode(l))}}function HR(t,e,r,n,s,i,o,a){let l=e,c;return{n:c,pos:e}=Sie(t,e,r,n,16,s,i,!1,a,!o),c===null&&(o?a.invalidEscapeSequence(l,r,n):e=l-1),{code:c,pos:e}}function Sie(t,e,r,n,s,i,o,a,l,c){let u=e,p=s===16?Cie.hex:Cie.decBinOct,f=s===16?YS.hex:s===10?YS.dec:s===8?YS.oct:YS.bin,d=!1,A=0;for(let h=0,m=i??1/0;h<m;++h){let g=t.charCodeAt(e),E;if(g===95&&a!=="bail"){let b=t.charCodeAt(e-1),I=t.charCodeAt(e+1);if(a){if(Number.isNaN(I)||!f(I)||p.has(b)||p.has(I)){if(c)return{n:null,pos:e};l.unexpectedNumericSeparator(e,r,n)}}else{if(c)return{n:null,pos:e};l.numericSeparatorInEscapeSequence(e,r,n)}++e;continue}if(g>=97?E=g-97+10:g>=65?E=g-65+10:Hze(g)?E=g-48:E=1/0,E>=s){if(E<=9&&c)return{n:null,pos:e};if(E<=9&&l.invalidDigit(e,r,n,s))E=0;else if(o)E=0,d=!0;else break}++e,A=A*s+E}return e===u||i!=null&&e-u!==i||d?{n:null,pos:e}:{n:A,pos:e}}function Iie(t,e,r,n,s,i){let o=t.charCodeAt(e),a;if(o===123){if(++e,{code:a,pos:e}=HR(t,e,r,n,t.indexOf("}",e)-e,!0,s,i),++e,a!==null&&a>1114111)if(s)i.invalidCodePoint(e,r,n);else return{code:null,pos:e}}else({code:a,pos:e}=HR(t,e,r,n,4,!1,s,i));return{code:a,pos:e}}});var vh=y(
|
|
165
|
+
`);case 114:return a("\r");case 120:{let c;return{code:c,pos:e}=HR(t,e,r,n,2,!1,o,i),a(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=Iie(t,e,r,n,o,i),a(c===null?null:String.fromCodePoint(c))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++n;case 8232:case 8233:return a("");case 56:case 57:if(s)return a(null);i.strictNumericEscape(e-1,r,n);default:if(l>=48&&l<=55){let c=e-1,p=/^[0-7]+/.exec(t.slice(c,e+2))[0],f=parseInt(p,8);f>255&&(p=p.slice(0,-1),f=parseInt(p,8)),e+=p.length-1;let d=t.charCodeAt(e);if(p!=="0"||d===56||d===57){if(s)return a(null);i.strictNumericEscape(c,r,n)}return a(String.fromCharCode(f))}return a(String.fromCharCode(l))}}function HR(t,e,r,n,s,i,o,a){let l=e,c;return{n:c,pos:e}=Sie(t,e,r,n,16,s,i,!1,a,!o),c===null&&(o?a.invalidEscapeSequence(l,r,n):e=l-1),{code:c,pos:e}}function Sie(t,e,r,n,s,i,o,a,l,c){let u=e,p=s===16?Cie.hex:Cie.decBinOct,f=s===16?YS.hex:s===10?YS.dec:s===8?YS.oct:YS.bin,d=!1,A=0;for(let h=0,m=i??1/0;h<m;++h){let g=t.charCodeAt(e),E;if(g===95&&a!=="bail"){let b=t.charCodeAt(e-1),I=t.charCodeAt(e+1);if(a){if(Number.isNaN(I)||!f(I)||p.has(b)||p.has(I)){if(c)return{n:null,pos:e};l.unexpectedNumericSeparator(e,r,n)}}else{if(c)return{n:null,pos:e};l.numericSeparatorInEscapeSequence(e,r,n)}++e;continue}if(g>=97?E=g-97+10:g>=65?E=g-65+10:Hze(g)?E=g-48:E=1/0,E>=s){if(E<=9&&c)return{n:null,pos:e};if(E<=9&&l.invalidDigit(e,r,n,s))E=0;else if(o)E=0,d=!0;else break}++e,A=A*s+E}return e===u||i!=null&&e-u!==i||d?{n:null,pos:e}:{n:A,pos:e}}function Iie(t,e,r,n,s,i){let o=t.charCodeAt(e),a;if(o===123){if(++e,{code:a,pos:e}=HR(t,e,r,n,t.indexOf("}",e)-e,!0,s,i),++e,a!==null&&a>1114111)if(s)i.invalidCodePoint(e,r,n);else return{code:null,pos:e}}else({code:a,pos:e}=HR(t,e,r,n,4,!1,s,i));return{code:a,pos:e}}});var vh=y(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.UPDATE_OPERATORS=mt.UNARY_OPERATORS=mt.STRING_UNARY_OPERATORS=mt.STATEMENT_OR_BLOCK_KEYS=mt.NUMBER_UNARY_OPERATORS=mt.NUMBER_BINARY_OPERATORS=mt.LOGICAL_OPERATORS=mt.INHERIT_KEYS=mt.FOR_INIT_KEYS=mt.FLATTENABLE_KEYS=mt.EQUALITY_BINARY_OPERATORS=mt.COMPARISON_BINARY_OPERATORS=mt.COMMENT_KEYS=mt.BOOLEAN_UNARY_OPERATORS=mt.BOOLEAN_NUMBER_BINARY_OPERATORS=mt.BOOLEAN_BINARY_OPERATORS=mt.BINARY_OPERATORS=mt.ASSIGNMENT_OPERATORS=void 0;var lZt=mt.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],cZt=mt.FLATTENABLE_KEYS=["body","expressions"],uZt=mt.FOR_INIT_KEYS=["left","init"],pZt=mt.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],Yze=mt.LOGICAL_OPERATORS=["||","&&","??"],fZt=mt.UPDATE_OPERATORS=["++","--"],Wze=mt.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="],Jze=mt.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],Kze=mt.COMPARISON_BINARY_OPERATORS=[...Jze,"in","instanceof"],zze=mt.BOOLEAN_BINARY_OPERATORS=[...Kze,...Wze],xie=mt.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],dZt=mt.BINARY_OPERATORS=["+",...xie,...zze,"|>"],hZt=mt.ASSIGNMENT_OPERATORS=["=","+=",...xie.map(t=>t+"="),...Yze.map(t=>t+"=")],Xze=mt.BOOLEAN_UNARY_OPERATORS=["delete","!"],Zze=mt.NUMBER_UNARY_OPERATORS=["+","-","~"],eXe=mt.STRING_UNARY_OPERATORS=["typeof"],AZt=mt.UNARY_OPERATORS=["void","throw",...Xze,...Zze,...eXe],mZt=mt.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};mt.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped");mt.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")});var _a=y(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.allExpandedTypes=Bt.VISITOR_KEYS=Bt.NODE_UNION_SHAPES__PRIVATE=Bt.NODE_PARENT_VALIDATIONS=Bt.NODE_FIELDS=Bt.FLIPPED_ALIAS_KEYS=Bt.DEPRECATED_KEYS=Bt.BUILDER_KEYS=Bt.ALIAS_KEYS=void 0;Bt.arrayOf=Bie;Bt.arrayOfType=Tie;Bt.assertEach=Die;Bt.assertNodeOrValueType=hXe;Bt.assertNodeType=JS;Bt.assertOneOf=fXe;Bt.assertOptionalChainStart=mXe;Bt.assertShape=AXe;Bt.assertValueType=YR;Bt.chain=Pie;Bt.default=_ie;Bt.defineAliasedType=EXe;Bt.validate=GR;Bt.validateArrayOfType=pXe;Bt.validateOptional=cXe;Bt.validateOptionalType=uXe;Bt.validateType=lXe;var wie=Ch(),ay=KS(),tXe=Bt.VISITOR_KEYS={},rXe=Bt.ALIAS_KEYS={},$R=Bt.FLIPPED_ALIAS_KEYS={},nXe=Bt.NODE_FIELDS={},sXe=Bt.BUILDER_KEYS={},iXe=Bt.DEPRECATED_KEYS={},oXe=Bt.NODE_PARENT_VALIDATIONS={},aXe=Bt.NODE_UNION_SHAPES__PRIVATE={};function WS(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function GR(t){return{validate:t}}function lXe(...t){return GR(JS(...t))}function cXe(t){return{validate:t,optional:!0}}function uXe(...t){return{validate:JS(...t),optional:!0}}function Bie(t){return Pie(YR("array"),Die(t))}function Tie(...t){return Bie(JS(...t))}function pXe(...t){return GR(Tie(...t))}function Die(t){let e=process.env.BABEL_TYPES_8_BREAKING?ay.validateChild:()=>{};function r(n,s,i){if(!Array.isArray(i))return;let o=0,a={toString(){return`${s}[${o}]`}};for(;o<i.length;o++){let l=i[o];t(n,a,l),e(n,a,l)}}return r.each=t,r}function fXe(...t){function e(r,n,s){if(!t.includes(s))throw new TypeError(`Property ${n} expected value to be one of ${JSON.stringify(t)} but got ${JSON.stringify(s)}`)}return e.oneOf=t,e}var dXe=Bt.allExpandedTypes=[];function JS(...t){let e=new Set;dXe.push({types:t,set:e});function r(n,s,i){let o=i?.type;if(o!=null){if(e.has(o)){(0,ay.validateChild)(n,s,i);return}if(o==="Placeholder"){for(let a of t)if((0,wie.default)(a,i)){(0,ay.validateChild)(n,s,i);return}}}throw new TypeError(`Property ${s} of ${n.type} expected node to be of a type ${JSON.stringify(t)} but instead got ${JSON.stringify(o)}`)}return r.oneOfNodeTypes=t,r}function hXe(...t){function e(r,n,s){let i=WS(s);for(let o of t)if(i===o||(0,wie.default)(o,s)){(0,ay.validateChild)(r,n,s);return}throw new TypeError(`Property ${n} of ${r.type} expected node to be of a type ${JSON.stringify(t)} but instead got ${JSON.stringify(s?.type)}`)}return e.oneOfNodeOrValueTypes=t,e}function YR(t){function e(r,n,s){if(WS(s)!==t)throw new TypeError(`Property ${n} expected type of ${t} but got ${WS(s)}`)}return e.type=t,e}function AXe(t){let e=Object.keys(t);function r(n,s,i){let o=[];for(let a of e)try{(0,ay.validateField)(n,a,i[a],t[a])}catch(l){if(l instanceof TypeError){o.push(l.message);continue}throw l}if(o.length)throw new TypeError(`Property ${s} of ${n.type} expected to have the following:
|
|
166
166
|
${o.join(`
|
|
167
167
|
`)}`)}return r.shapeOf=t,r}function mXe(){function t(e){var r;let n=e;for(;e;){let{type:s}=n;if(s==="OptionalCallExpression"){if(n.optional)return;n=n.callee;continue}if(s==="OptionalMemberExpression"){if(n.optional)return;n=n.object;continue}break}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(r=n)==null?void 0:r.type}`)}return t}function Pie(...t){function e(...r){for(let n of t)n(...r)}if(e.chainOf=t,t.length>=2&&"type"in t[0]&&t[0].type==="array"&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return e}var gXe=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),yXe=new Set(["default","optional","deprecated","validate"]),VR={};function EXe(...t){return(e,r={})=>{let n=r.aliases;if(!n){var s;r.inherits&&(n=(s=VR[r.inherits].aliases)==null?void 0:s.slice()),n??(n=[]),r.aliases=n}let i=t.filter(o=>!n.includes(o));n.unshift(...i),_ie(e,r)}}function _ie(t,e={}){let r=e.inherits&&VR[e.inherits]||{},n=e.fields;if(!n&&(n={},r.fields)){let a=Object.getOwnPropertyNames(r.fields);for(let l of a){let c=r.fields[l],u=c.default;if(Array.isArray(u)?u.length>0:u&&typeof u=="object")throw new Error("field defaults can only be primitives or empty arrays currently");n[l]={default:Array.isArray(u)?[]:u,optional:c.optional,deprecated:c.deprecated,validate:c.validate}}}let s=e.visitor||r.visitor||[],i=e.aliases||r.aliases||[],o=e.builder||r.builder||e.visitor||[];for(let a of Object.keys(e))if(!gXe.has(a))throw new Error(`Unknown type option "${a}" on ${t}`);e.deprecatedAlias&&(iXe[e.deprecatedAlias]=t);for(let a of s.concat(o))n[a]=n[a]||{};for(let a of Object.keys(n)){let l=n[a];l.default!==void 0&&!o.includes(a)&&(l.optional=!0),l.default===void 0?l.default=null:!l.validate&&l.default!=null&&(l.validate=YR(WS(l.default)));for(let c of Object.keys(l))if(!yXe.has(c))throw new Error(`Unknown field key "${c}" on ${t}.${a}`)}tXe[t]=e.visitor=s,sXe[t]=e.builder=o,nXe[t]=e.fields=n,rXe[t]=e.aliases=i,i.forEach(a=>{$R[a]=$R[a]||[],$R[a].push(t)}),e.validate&&(oXe[t]=e.validate),e.unionShape&&(aXe[t]=e.unionShape),VR[t]=e}});var cy=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.patternLikeCommon=Un.importAttributes=Un.functionTypeAnnotationCommon=Un.functionDeclarationCommon=Un.functionCommon=Un.classMethodOrPropertyUnionShapeCommon=Un.classMethodOrPropertyCommon=Un.classMethodOrDeclareMethodCommon=void 0;var Ns=Ch(),bXe=Ih(),Nie=Sh(),CXe=vie(),xh=vh(),_=_a(),ly=(t=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,_.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:t?(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});Un.classMethodOrPropertyUnionShapeCommon=ly;var ue=(0,_.defineAliasedType)("Standardized");ue("ArrayExpression",{fields:{elements:{validate:(0,_.arrayOf)((0,_.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]});ue("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){let t=(0,_.assertOneOf)(...xh.ASSIGNMENT_OPERATORS),e=(0,_.assertOneOf)("=");return function(r,n,s){((0,Ns.default)("Pattern",r.left)?e:t)(r,n,s)}}(),{oneOf:xh.ASSIGNMENT_OPERATORS}):(0,_.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,_.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});ue("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,_.assertOneOf)(...xh.BINARY_OPERATORS)},left:{validate:function(){let t=(0,_.assertNodeType)("Expression"),e=(0,_.assertNodeType)("Expression","PrivateName");return Object.assign(function(n,s,i){(n.operator==="in"?e:t)(n,s,i)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,_.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});ue("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,_.assertValueType)("string")}}});ue("Directive",{visitor:["value"],fields:{value:{validate:(0,_.assertNodeType)("DirectiveLiteral")}}});ue("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,_.assertValueType)("string")}}});ue("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,_.arrayOfType)("Directive"),default:[]},body:(0,_.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]});ue("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,_.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});ue("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,_.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,_.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,_.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,_.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,_.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});ue("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,_.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,_.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});ue("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,_.assertNodeType)("Expression")},consequent:{validate:(0,_.assertNodeType)("Expression")},alternate:{validate:(0,_.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});ue("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,_.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});ue("DebuggerStatement",{aliases:["Statement"]});ue("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,_.assertNodeType)("Expression")},body:{validate:(0,_.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});ue("EmptyStatement",{aliases:["Statement"]});ue("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,_.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});ue("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,_.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertEach)((0,_.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,_.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}});ue("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,_.assertNodeType)("Expression")},body:{validate:(0,_.assertNodeType)("Statement")}}});ue("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,_.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,_.assertNodeType)("Expression"),optional:!0},update:{validate:(0,_.assertNodeType)("Expression"),optional:!0},body:{validate:(0,_.assertNodeType)("Statement")}}});var wh=()=>({params:(0,_.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});Un.functionCommon=wh;var zp=()=>({returnType:{validate:(0,_.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,_.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});Un.functionTypeAnnotationCommon=zp;var kie=()=>Object.assign({},wh(),{declare:{validate:(0,_.assertValueType)("boolean"),optional:!0},id:{validate:(0,_.assertNodeType)("Identifier"),optional:!0}});Un.functionDeclarationCommon=kie;ue("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},kie(),zp(),{body:{validate:(0,_.assertNodeType)("BlockStatement")},predicate:{validate:(0,_.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let t=(0,_.assertNodeType)("Identifier");return function(e,r,n){(0,Ns.default)("ExportDefaultDeclaration",e)||t(n,"id",n.id)}}():void 0});ue("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},wh(),zp(),{id:{validate:(0,_.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,_.assertNodeType)("BlockStatement")},predicate:{validate:(0,_.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});var Bh=()=>({typeAnnotation:{validate:(0,_.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,_.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0}});Un.patternLikeCommon=Bh;ue("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},Bh(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("string"),Object.assign(function(t,e,r){if(!(0,bXe.default)(r,!1))throw new TypeError(`"${r}" is not a valid identifier name`)},{type:"string"})):(0,_.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(t,e,r){let n=/\.(\w+)$/.exec(e.toString());if(!n)return;let[,s]=n,i={computed:!1};if(s==="property"){if((0,Ns.default)("MemberExpression",t,i)||(0,Ns.default)("OptionalMemberExpression",t,i))return}else if(s==="key"){if((0,Ns.default)("Property",t,i)||(0,Ns.default)("Method",t,i))return}else if(s==="exported"){if((0,Ns.default)("ExportSpecifier",t))return}else if(s==="imported"){if((0,Ns.default)("ImportSpecifier",t,{imported:r}))return}else if(s==="meta"&&(0,Ns.default)("MetaProperty",t,{meta:r}))return;if(((0,Nie.isKeyword)(r.name)||(0,Nie.isReservedWord)(r.name,!1))&&r.name!=="this")throw new TypeError(`"${r.name}" is not a valid identifier`)}:void 0});ue("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,_.assertNodeType)("Expression")},consequent:{validate:(0,_.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,_.assertNodeType)("Statement")}}});ue("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,_.assertNodeType)("Identifier")},body:{validate:(0,_.assertNodeType)("Statement")}}});ue("StringLiteral",{builder:["value"],fields:{value:{validate:(0,_.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});ue("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,_.chain)((0,_.assertValueType)("number"),Object.assign(function(t,e,r){if(1/r<0||!Number.isFinite(r)){let n=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${r}) instead.`)}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]});ue("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});ue("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,_.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});ue("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,_.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("string"),Object.assign(function(t,e,r){let n=/[^dgimsuvy]/.exec(r);if(n)throw new TypeError(`"${n[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,_.assertValueType)("string"),default:""}}});ue("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,_.assertOneOf)(...xh.LOGICAL_OPERATORS)},left:{validate:(0,_.assertNodeType)("Expression")},right:{validate:(0,_.assertNodeType)("Expression")}}});ue("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,_.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,_.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,_.assertNodeType)("Expression","Super")},property:{validate:function(){let t=(0,_.assertNodeType)("Identifier","PrivateName"),e=(0,_.assertNodeType)("Expression"),r=function(n,s,i){(n.computed?e:t)(n,s,i)};return r.oneOfNodeTypes=["Expression","Identifier","PrivateName"],r}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,_.assertValueType)("boolean"),optional:!0}})});ue("NewExpression",{inherits:"CallExpression"});ue("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,_.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,_.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,_.arrayOfType)("Directive"),default:[]},body:(0,_.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]});ue("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,_.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}});ue("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},ly(),{fields:Object.assign({},wh(),zp(),{kind:Object.assign({validate:(0,_.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){let t=(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=(0,_.assertNodeType)("Expression"),r=function(n,s,i){(n.computed?e:t)(n,s,i)};return r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],r}()},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,_.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}));ue("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,_.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){let t=(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),e=(0,_.assertNodeType)("Expression");return Object.assign(function(n,s,i){(n.computed?e:t)(n,s,i)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,_.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("boolean"),Object.assign(function(t,e,r){if(r){if(t.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,Ns.default)("Identifier",t.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,_.assertValueType)("boolean"),default:!1},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let t=(0,_.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),e=(0,_.assertNodeType)("Expression");return function(r,n,s){((0,Ns.default)("ObjectPattern",r)?t:e)(s,"value",s.value)}}():void 0});ue("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},Bh(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(t,e){let r=/(\w+)\[(\d+)\]/.exec(e.toString());if(!r)throw new Error("Internal Babel error: malformed key.");let[,n,s]=r;if(t[n].length>+s+1)throw new TypeError(`RestElement must be last element of ${n}`)}:void 0});ue("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_.assertNodeType)("Expression"),optional:!0}}});ue("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,_.validateArrayOfType)("Expression")},aliases:["Expression"]});ue("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,_.assertNodeType)("Expression")}}});ue("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,_.assertNodeType)("Expression"),optional:!0},consequent:(0,_.validateArrayOfType)("Statement")}});ue("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,_.assertNodeType)("Expression")},cases:(0,_.validateArrayOfType)("SwitchCase")}});ue("ThisExpression",{aliases:["Expression"]});ue("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_.assertNodeType)("Expression")}}});ue("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertNodeType)("BlockStatement"),Object.assign(function(t){if(!t.handler&&!t.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,_.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,_.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,_.assertNodeType)("BlockStatement")}}});ue("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,_.assertNodeType)("Expression")},operator:{validate:(0,_.assertOneOf)(...xh.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});ue("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertNodeType)("Identifier","MemberExpression"):(0,_.assertNodeType)("Expression")},operator:{validate:(0,_.assertOneOf)(...xh.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});ue("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,_.assertValueType)("boolean"),optional:!0},kind:{validate:(0,_.assertOneOf)("var","let","const","using","await using")},declarations:(0,_.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{let t=(0,_.assertNodeType)("Identifier","Placeholder"),e=(0,_.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),r=(0,_.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(n,s,i){let{kind:o,declarations:a}=i,l=(0,Ns.default)("ForXStatement",n,{left:i});if(l&&a.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${n.type}`);for(let c of a)o==="const"||o==="let"||o==="var"?!l&&!c.init?t(c,"id",c.id):e(c,"id",c.id):r(c,"id",c.id)}})():void 0});ue("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,_.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,_.assertValueType)("boolean")},init:{optional:!0,validate:(0,_.assertNodeType)("Expression")}}});ue("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,_.assertNodeType)("Expression")},body:{validate:(0,_.assertNodeType)("Statement")}}});ue("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,_.assertNodeType)("Expression")},body:{validate:(0,_.assertNodeType)("Statement")}}});ue("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Bh(),{left:{validate:(0,_.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,_.assertNodeType)("Expression")},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0}})});ue("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Bh(),{elements:{validate:(0,_.chain)((0,_.assertValueType)("array"),(0,_.assertEach)((0,_.assertNodeOrValueType)("null","PatternLike")))}})});ue("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},wh(),zp(),{expression:{validate:(0,_.assertValueType)("boolean")},body:{validate:(0,_.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,_.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});ue("ClassBody",{visitor:["body"],fields:{body:(0,_.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}});ue("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,_.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,_.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,_.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,_.assertNodeType)("Expression")},superTypeParameters:{validate:(0,_.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,_.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,_.assertNodeType)("InterfaceExtends"),optional:!0}}});ue("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,_.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,_.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,_.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,_.assertNodeType)("Expression")},superTypeParameters:{validate:(0,_.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,_.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,_.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,_.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,_.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){let t=(0,_.assertNodeType)("Identifier");return function(e,r,n){(0,Ns.default)("ExportDefaultDeclaration",e)||t(n,"id",n.id)}}():void 0});var zS=Un.importAttributes={attributes:{optional:!0,validate:(0,_.arrayOfType)("ImportAttribute")}};zS.assertions={deprecated:!0,optional:!0,validate:(0,_.arrayOfType)("ImportAttribute")};ue("ExportAllDeclaration",{builder:["source","attributes"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,_.assertNodeType)("StringLiteral")},exportKind:(0,_.validateOptional)((0,_.assertOneOf)("type","value"))},zS)});ue("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,_.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,_.validateOptional)((0,_.assertOneOf)("value"))}});ue("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertNodeType)("Declaration"),Object.assign(function(t,e,r){if(r&&t.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(r&&t.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,_.assertNodeType)("Declaration")}},zS,{specifiers:{default:[],validate:(0,_.arrayOf)(function(){let t=(0,_.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),e=(0,_.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(r,n,s){(r.source?t:e)(r,n,s)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):t}())},source:{validate:(0,_.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,_.validateOptional)((0,_.assertOneOf)("type","value"))})});ue("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_.assertNodeType)("Identifier")},exported:{validate:(0,_.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,_.assertOneOf)("type","value"),optional:!0}}});ue("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,_.assertNodeType)("VariableDeclaration","LVal");let t=(0,_.assertNodeType)("VariableDeclaration"),e=(0,_.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(r,n,s){(0,Ns.default)("VariableDeclaration",s)?t(r,n,s):e(r,n,s)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,_.assertNodeType)("Expression")},body:{validate:(0,_.assertNodeType)("Statement")},await:{default:!1}}});ue("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},zS,{module:{optional:!0,validate:(0,_.assertValueType)("boolean")},phase:{default:null,validate:(0,_.assertOneOf)("source","defer")},specifiers:(0,_.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,_.assertNodeType)("StringLiteral")},importKind:{validate:(0,_.assertOneOf)("type","typeof","value"),optional:!0}})});ue("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_.assertNodeType)("Identifier")}}});ue("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_.assertNodeType)("Identifier")}}});ue("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_.assertNodeType)("Identifier")},imported:{validate:(0,_.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,_.assertOneOf)("type","typeof","value"),optional:!0}}});ue("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,_.assertOneOf)("source","defer")},source:{validate:(0,_.assertNodeType)("Expression")},options:{validate:(0,_.assertNodeType)("Expression"),optional:!0}}});ue("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertNodeType)("Identifier"),Object.assign(function(t,e,r){let n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta";break}if(!(0,Ns.default)("Identifier",t.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,_.assertNodeType)("Identifier")},property:{validate:(0,_.assertNodeType)("Identifier")}}});var XS=()=>({abstract:{validate:(0,_.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,_.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,_.assertValueType)("boolean"),optional:!0},key:{validate:(0,_.chain)(function(){let t=(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=(0,_.assertNodeType)("Expression");return function(r,n,s){(r.computed?e:t)(r,n,s)}}(),(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});Un.classMethodOrPropertyCommon=XS;var WR=()=>Object.assign({},wh(),XS(),{params:(0,_.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,_.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,_.chain)((0,_.assertValueType)("string"),(0,_.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0}});Un.classMethodOrDeclareMethodCommon=WR;ue("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},ly(),{fields:Object.assign({},WR(),zp(),{body:{validate:(0,_.assertNodeType)("BlockStatement")}})}));ue("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Bh(),{properties:(0,_.validateArrayOfType)("RestElement","ObjectProperty")})});ue("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,_.assertNodeType)("Expression")}}});ue("Super",{aliases:["Expression"]});ue("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,_.assertNodeType)("Expression")},quasi:{validate:(0,_.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,_.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});ue("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,_.chain)((0,_.assertShape)({raw:{validate:(0,_.assertValueType)("string")},cooked:{validate:(0,_.assertValueType)("string"),optional:!0}}),function(e){let r=e.value.raw,n=!1,s=()=>{throw new Error("Internal @babel/types error.")},{str:i,firstInvalidLoc:o}=(0,CXe.readStringContents)("template",r,0,0,0,{unterminated(){n=!0},strictNumericEscape:s,invalidEscapeSequence:s,numericSeparatorInEscapeSequence:s,unexpectedNumericSeparator:s,invalidDigit:s,invalidCodePoint:s});if(!n)throw new Error("Invalid raw");e.value.cooked=o?null:i})},tail:{default:!1}}});ue("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,_.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,_.chain)((0,_.assertValueType)("array"),(0,_.assertEach)((0,_.assertNodeType)("Expression","TSType")),function(t,e,r){if(t.quasis.length!==r.length+1)throw new TypeError(`Number of ${t.type} quasis should be exactly one more than the number of expressions.
|
|
168
168
|
Expected ${r.length+1} quasis but got ${t.quasis.length}`)})}}});ue("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("boolean"),Object.assign(function(t,e,r){if(r&&!t.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,_.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,_.assertNodeType)("Expression")}}});ue("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,_.assertNodeType)("Expression")}}});ue("Import",{aliases:["Expression"]});ue("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,_.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});ue("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,_.assertNodeType)("Identifier")}}});ue("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,_.assertNodeType)("Expression")},property:{validate:function(){let t=(0,_.assertNodeType)("Identifier"),e=(0,_.assertNodeType)("Expression");return Object.assign(function(n,s,i){(n.computed?e:t)(n,s,i)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("boolean"),(0,_.assertOptionalChainStart)()):(0,_.assertValueType)("boolean")}}});ue("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,_.assertNodeType)("Expression")},arguments:(0,_.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_.chain)((0,_.assertValueType)("boolean"),(0,_.assertOptionalChainStart)()):(0,_.assertValueType)("boolean")},typeArguments:{validate:(0,_.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,_.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});ue("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},ly(),{fields:Object.assign({},XS(),{value:{validate:(0,_.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,_.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,_.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,_.assertValueType)("boolean"),optional:!0},declare:{validate:(0,_.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_.assertNodeType)("Variance"),optional:!0}})}));ue("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},ly(!0),{fields:Object.assign({},XS(),{key:{validate:(0,_.chain)(function(){let t=(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=(0,_.assertNodeType)("Expression");return function(r,n,s){(r.computed?e:t)(r,n,s)}}(),(0,_.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,_.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,_.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,_.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,_.assertValueType)("boolean"),optional:!0},declare:{validate:(0,_.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_.assertNodeType)("Variance"),optional:!0}})}));ue("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,_.assertNodeType)("PrivateName")},value:{validate:(0,_.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,_.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,_.assertValueType)("boolean"),default:!1},readonly:{validate:(0,_.assertValueType)("boolean"),optional:!0},optional:{validate:(0,_.assertValueType)("boolean"),optional:!0},definite:{validate:(0,_.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_.assertNodeType)("Variance"),optional:!0}}});ue("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},WR(),zp(),{kind:{validate:(0,_.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,_.assertNodeType)("PrivateName")},body:{validate:(0,_.assertNodeType)("BlockStatement")}})});ue("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,_.assertNodeType)("Identifier")}}});ue("StaticBlock",{visitor:["body"],fields:{body:(0,_.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]});ue("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,_.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,_.assertNodeType)("StringLiteral")}}})});var Rie=y(()=>{"use strict";var Qie=cy(),$=_a(),Pe=(0,$.defineAliasedType)("Flow"),JR=t=>{let e=t==="DeclareClass";Pe(t,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...e?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),extends:(0,$.validateOptional)((0,$.arrayOfType)("InterfaceExtends"))},e?{mixins:(0,$.validateOptional)((0,$.arrayOfType)("InterfaceExtends")),implements:(0,$.validateOptional)((0,$.arrayOfType)("ClassImplements"))}:{},{body:(0,$.validateType)("ObjectTypeAnnotation")})})};Pe("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,$.validateType)("FlowType")}});Pe("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterInstantiation")}});JR("DeclareClass");Pe("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier"),predicate:(0,$.validateOptionalType)("DeclaredPredicate")}});JR("DeclareInterface");Pe("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier","StringLiteral"),body:(0,$.validateType)("BlockStatement"),kind:(0,$.validateOptional)((0,$.assertOneOf)("CommonJS","ES"))}});Pe("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,$.validateType)("TypeAnnotation")}});Pe("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),right:(0,$.validateType)("FlowType")}});Pe("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,$.validateOptionalType)("FlowType"),impltype:(0,$.validateOptionalType)("FlowType")}});Pe("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier")}});Pe("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,$.validateOptionalType)("Flow"),specifiers:(0,$.validateOptional)((0,$.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,$.validateOptionalType)("StringLiteral"),default:(0,$.validateOptional)((0,$.assertValueType)("boolean"))},Qie.importAttributes)});Pe("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,$.validateType)("StringLiteral"),exportKind:(0,$.validateOptional)((0,$.assertOneOf)("type","value"))},Qie.importAttributes)});Pe("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,$.validateType)("Flow")}});Pe("ExistsTypeAnnotation",{aliases:["FlowType"]});Pe("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),params:(0,$.validateArrayOfType)("FunctionTypeParam"),rest:(0,$.validateOptionalType)("FunctionTypeParam"),this:(0,$.validateOptionalType)("FunctionTypeParam"),returnType:(0,$.validateType)("FlowType")}});Pe("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,$.validateOptionalType)("Identifier"),typeAnnotation:(0,$.validateType)("FlowType"),optional:(0,$.validateOptional)((0,$.assertValueType)("boolean"))}});Pe("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,$.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterInstantiation")}});Pe("InferredPredicate",{aliases:["FlowPredicate"]});Pe("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,$.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterInstantiation")}});JR("InterfaceDeclaration");Pe("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,$.validateOptional)((0,$.arrayOfType)("InterfaceExtends")),body:(0,$.validateType)("ObjectTypeAnnotation")}});Pe("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,$.validate)((0,$.arrayOfType)("FlowType"))}});Pe("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,$.validateType)("FlowType")}});Pe("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,$.validate)((0,$.assertValueType)("number"))}});Pe("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,$.validate)((0,$.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,$.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,$.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,$.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,$.assertValueType)("boolean"),default:!1},inexact:(0,$.validateOptional)((0,$.assertValueType)("boolean"))}});Pe("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,$.validateType)("Identifier"),value:(0,$.validateType)("FlowType"),optional:(0,$.validate)((0,$.assertValueType)("boolean")),static:(0,$.validate)((0,$.assertValueType)("boolean")),method:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,$.validateType)("FlowType"),static:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,$.validateOptionalType)("Identifier"),key:(0,$.validateType)("FlowType"),value:(0,$.validateType)("FlowType"),static:(0,$.validate)((0,$.assertValueType)("boolean")),variance:(0,$.validateOptionalType)("Variance")}});Pe("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,$.validateType)("Identifier","StringLiteral"),value:(0,$.validateType)("FlowType"),kind:(0,$.validate)((0,$.assertOneOf)("init","get","set")),static:(0,$.validate)((0,$.assertValueType)("boolean")),proto:(0,$.validate)((0,$.assertValueType)("boolean")),optional:(0,$.validate)((0,$.assertValueType)("boolean")),variance:(0,$.validateOptionalType)("Variance"),method:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,$.validateType)("FlowType")}});Pe("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,$.validateOptionalType)("FlowType"),impltype:(0,$.validateType)("FlowType")}});Pe("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,$.validateType)("Identifier"),qualification:(0,$.validateType)("Identifier","QualifiedTypeIdentifier")}});Pe("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,$.validate)((0,$.assertValueType)("string"))}});Pe("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,$.validate)((0,$.arrayOfType)("FlowType"))}});Pe("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,$.validateType)("FlowType")}});Pe("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,$.validateType)("Identifier"),typeParameters:(0,$.validateOptionalType)("TypeParameterDeclaration"),right:(0,$.validateType)("FlowType")}});Pe("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,$.validateType)("FlowType")}});Pe("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,$.validateType)("Expression"),typeAnnotation:(0,$.validateType)("TypeAnnotation")}});Pe("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,$.validate)((0,$.assertValueType)("string")),bound:(0,$.validateOptionalType)("TypeAnnotation"),default:(0,$.validateOptionalType)("FlowType"),variance:(0,$.validateOptionalType)("Variance")}});Pe("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,$.validate)((0,$.arrayOfType)("TypeParameter"))}});Pe("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,$.validate)((0,$.arrayOfType)("FlowType"))}});Pe("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,$.validate)((0,$.arrayOfType)("FlowType"))}});Pe("Variance",{builder:["kind"],fields:{kind:(0,$.validate)((0,$.assertOneOf)("minus","plus"))}});Pe("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});Pe("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,$.validateType)("Identifier"),body:(0,$.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});Pe("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,$.validate)((0,$.assertValueType)("boolean")),members:(0,$.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,$.validate)((0,$.assertValueType)("boolean")),members:(0,$.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,$.validate)((0,$.assertValueType)("boolean")),members:(0,$.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,$.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,$.validate)((0,$.assertValueType)("boolean"))}});Pe("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,$.validateType)("Identifier"),init:(0,$.validateType)("BooleanLiteral")}});Pe("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,$.validateType)("Identifier"),init:(0,$.validateType)("NumericLiteral")}});Pe("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,$.validateType)("Identifier"),init:(0,$.validateType)("StringLiteral")}});Pe("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,$.validateType)("Identifier")}});Pe("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,$.validateType)("FlowType"),indexType:(0,$.validateType)("FlowType")}});Pe("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,$.validateType)("FlowType"),indexType:(0,$.validateType)("FlowType"),optional:(0,$.validate)((0,$.assertValueType)("boolean"))}})});var Oie=y(()=>{"use strict";var qr=_a(),ks=(0,qr.defineAliasedType)("JSX");ks("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,qr.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,qr.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});ks("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,qr.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});ks("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,qr.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,qr.assertNodeType)("JSXClosingElement")},children:(0,qr.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,qr.assertValueType)("boolean"),optional:!0}})});ks("JSXEmptyExpression",{});ks("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,qr.assertNodeType)("Expression","JSXEmptyExpression")}}});ks("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,qr.assertNodeType)("Expression")}}});ks("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,qr.assertValueType)("string")}}});ks("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,qr.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,qr.assertNodeType)("JSXIdentifier")}}});ks("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,qr.assertNodeType)("JSXIdentifier")},name:{validate:(0,qr.assertNodeType)("JSXIdentifier")}}});ks("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,qr.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,qr.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,qr.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,qr.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});ks("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,qr.assertNodeType)("Expression")}}});ks("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,qr.assertValueType)("string")}}});ks("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,qr.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,qr.assertNodeType)("JSXClosingFragment")},children:(0,qr.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});ks("JSXOpeningFragment",{aliases:["Immutable"]});ks("JSXClosingFragment",{aliases:["Immutable"]})});var XR=y(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.PLACEHOLDERS_FLIPPED_ALIAS=qc.PLACEHOLDERS_ALIAS=qc.PLACEHOLDERS=void 0;var SXe=_a(),IXe=qc.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],zR=qc.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(let t of IXe){let e=SXe.ALIAS_KEYS[t];e!=null&&e.length&&(zR[t]=e)}var KR=qc.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(zR).forEach(t=>{zR[t].forEach(e=>{hasOwnProperty.call(KR,e)||(KR[e]=[]),KR[e].push(t)})})});var Fie=y(()=>{"use strict";var ZS=_a(),vXe=XR(),xXe=cy(),ZR=(0,ZS.defineAliasedType)("Miscellaneous");ZR("Noop",{visitor:[]});ZR("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,ZS.assertNodeType)("Identifier")},expectedNode:{validate:(0,ZS.assertOneOf)(...vXe.PLACEHOLDERS)}},(0,xXe.patternLikeCommon)())});ZR("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,ZS.assertValueType)("string")}}})});var Lie=y(()=>{"use strict";var vr=_a();(0,vr.default)("ArgumentPlaceholder",{});(0,vr.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,vr.assertNodeType)("Expression")},callee:{validate:(0,vr.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}});(0,vr.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,vr.assertNodeType)("Expression")}}});(0,vr.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,vr.assertNodeType)("BlockStatement")},async:{validate:(0,vr.assertValueType)("boolean"),default:!1}}});(0,vr.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,vr.assertNodeType)("Identifier")}}});(0,vr.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,vr.validateArrayOfType)("ObjectProperty","SpreadElement")}});(0,vr.default)("TupleExpression",{fields:{elements:{validate:(0,vr.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,vr.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,vr.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,vr.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,vr.assertNodeType)("Program")}},aliases:["Expression"]});(0,vr.default)("TopicReference",{aliases:["Expression"]});(0,vr.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,vr.assertNodeType)("Expression")}},aliases:["Expression"]});(0,vr.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,vr.assertNodeType)("Expression")}},aliases:["Expression"]});(0,vr.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]});(0,vr.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})});var Vie=y(()=>{"use strict";var X=_a(),eO=cy(),wXe=Ch(),Ve=(0,X.defineAliasedType)("TypeScript"),ii=(0,X.assertValueType)("boolean"),Mie=()=>({returnType:{validate:(0,X.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,X.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});Ve("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,X.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,X.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,X.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,X.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,X.arrayOfType)("Decorator"),optional:!0}}});Ve("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,eO.functionDeclarationCommon)(),Mie())});Ve("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,eO.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,eO.classMethodOrDeclareMethodCommon)(),Mie())}));Ve("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,X.validateType)("TSEntityName"),right:(0,X.validateType)("Identifier")}});var eI=()=>({typeParameters:(0,X.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,X.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,X.validateOptionalType)("TSTypeAnnotation")}),Uie={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:eI()};Ve("TSCallSignatureDeclaration",Uie);Ve("TSConstructSignatureDeclaration",Uie);var jie=()=>({key:(0,X.validateType)("Expression"),computed:{default:!1},optional:(0,X.validateOptional)(ii)});Ve("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},jie(),{readonly:(0,X.validateOptional)(ii),typeAnnotation:(0,X.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,X.assertOneOf)("get","set")}})});Ve("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},eI(),jie(),{kind:{validate:(0,X.assertOneOf)("method","get","set")}})});Ve("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,X.validateOptional)(ii),static:(0,X.validateOptional)(ii),parameters:(0,X.validateArrayOfType)("Identifier"),typeAnnotation:(0,X.validateOptionalType)("TSTypeAnnotation")}});var BXe=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(let t of BXe)Ve(t,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});Ve("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var qie={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};Ve("TSFunctionType",Object.assign({},qie,{fields:eI()}));Ve("TSConstructorType",Object.assign({},qie,{fields:Object.assign({},eI(),{abstract:(0,X.validateOptional)(ii)})}));Ve("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,X.validateType)("TSEntityName"),typeParameters:(0,X.validateOptionalType)("TSTypeParameterInstantiation")}});Ve("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,X.validateType)("Identifier","TSThisType"),typeAnnotation:(0,X.validateOptionalType)("TSTypeAnnotation"),asserts:(0,X.validateOptional)(ii)}});Ve("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,X.validateType)("TSEntityName","TSImportType"),typeParameters:(0,X.validateOptionalType)("TSTypeParameterInstantiation")}});Ve("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,X.validateArrayOfType)("TSTypeElement")}});Ve("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,X.validateType)("TSType")}});Ve("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,X.validateArrayOfType)("TSType","TSNamedTupleMember")}});Ve("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,X.validateType)("TSType")}});Ve("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,X.validateType)("TSType")}});Ve("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,X.validateType)("Identifier"),optional:{validate:ii,default:!1},elementType:(0,X.validateType)("TSType")}});var Hie={aliases:["TSType"],visitor:["types"],fields:{types:(0,X.validateArrayOfType)("TSType")}};Ve("TSUnionType",Hie);Ve("TSIntersectionType",Hie);Ve("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,X.validateType)("TSType"),extendsType:(0,X.validateType)("TSType"),trueType:(0,X.validateType)("TSType"),falseType:(0,X.validateType)("TSType")}});Ve("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,X.validateType)("TSTypeParameter")}});Ve("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,X.validateType)("TSType")}});Ve("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,X.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,X.validateType)("TSType")}});Ve("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,X.validateType)("TSType"),indexType:(0,X.validateType)("TSType")}});Ve("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,X.validateType)("TSTypeParameter")},{readonly:(0,X.validateOptional)((0,X.assertOneOf)(!0,!1,"+","-")),optional:(0,X.validateOptional)((0,X.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,X.validateOptionalType)("TSType"),nameType:(0,X.validateOptionalType)("TSType")})});Ve("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,X.validateArrayOfType)("TemplateElement"),types:{validate:(0,X.chain)((0,X.assertValueType)("array"),(0,X.assertEach)((0,X.assertNodeType)("TSType")),function(t,e,r){if(t.quasis.length!==r.length+1)throw new TypeError(`Number of ${t.type} quasis should be exactly one more than the number of types.
|
|
@@ -171,7 +171,7 @@ ${e}`,validate:()=>{},unwrap:e=>t(e.program.body.slice(1))}}var Qor=to.smart=NF(
|
|
|
171
171
|
${t}
|
|
172
172
|
)`,validate:t=>{if(t.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(uft.unwrap(t).start===0)throw new Error("Parse result included parens.")},unwrap:({program:t})=>{let[e]=t.body;return cft(e),e.expression}},For=to.program={code:t=>t,validate:()=>{},unwrap:t=>t.program}});var hI=y(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.merge=dft;gy.normalizeReplacements=Aft;gy.validate=hft;var pft=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"];function fft(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function dft(t,e){let{placeholderWhitelist:r=t.placeholderWhitelist,placeholderPattern:n=t.placeholderPattern,preserveComments:s=t.preserveComments,syntacticPlaceholders:i=t.syntacticPlaceholders}=e;return{parser:Object.assign({},t.parser,e.parser),placeholderWhitelist:r,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}}function hft(t){if(t!=null&&typeof t!="object")throw new Error("Unknown template options.");let e=t||{},{placeholderWhitelist:r,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}=e,o=fft(e,pft);if(r!=null&&!(r instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(n!=null&&!(n instanceof RegExp)&&n!==!1)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(s!=null&&typeof s!="boolean")throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(i!=null&&typeof i!="boolean")throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(i===!0&&(r!=null||n!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:o,placeholderWhitelist:r||void 0,placeholderPattern:n??void 0,preserveComments:s??void 0,syntacticPlaceholders:i??void 0}}function Aft(t){if(Array.isArray(t))return t.reduce((e,r,n)=>(e["$"+n]=r,e),{});if(typeof t=="object"||t==null)return t||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}});var Ty=y(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});function mft(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Oa=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},kh=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function Os(t,e){let{line:r,column:n,index:s}=t;return new Oa(r,n+e,s+e)}var oae="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",gft={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:oae},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:oae}},aae={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},gI=t=>t.type==="UpdateExpression"?aae.UpdateExpression[`${t.prefix}`]:aae[t.type],yft={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` 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:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
173
173
|
- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
|
|
174
|
-
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${gI(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${gI(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${gI(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:t})=>`Unexpected keyword '${t}'.`,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:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",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:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Eft={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' 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."},bft={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:t})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(t)}\`.`},Cft=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Sft=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield 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:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${gI({type:t})}; please wrap it in parentheses.`},{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.'}),Ift=["message"];function lae(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function vft({toMessage:t,code:e,reasonCode:r,syntaxPlugin:n}){let s=r==="MissingPlugin"||r==="MissingOneOfPlugins",i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return i[r]&&(r=i[r]),function o(a,l){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=a,c.pos=a.index,c.syntaxPlugin=n,s&&(c.missingPlugin=l.missingPlugin),lae(c,"clone",function(p={}){var f;let{line:d,column:A,index:h}=(f=p.loc)!=null?f:a;return o(new Oa(d,A,h),Object.assign({},l,p.details))}),lae(c,"details",l),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${t(l)} (${a.line}:${a.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function Qa(t,e){if(Array.isArray(t))return n=>Qa(n,t[0]);let r={};for(let n of Object.keys(t)){let s=t[n],i=typeof s=="string"?{message:()=>s}:typeof s=="function"?{message:s}:s,{message:o}=i,a=mft(i,Ift),l=typeof o=="string"?()=>o:o;r[n]=vft(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:l},e?{syntaxPlugin:e}:{},a))}return r}var O=Object.assign({},Qa(gft),Qa(yft),Qa(Eft),Qa(bft),Qa`pipelineOperator`(Sft));function xft(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function wft(t){let e=xft();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(e))t[r]!=null&&(e[r]=t[r]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(t.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(t.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(t.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:Bft}=Object,cae=(t,e)=>{t&&Bft(t,e,{enumerable:!1,value:t[e]})};function yy(t){return cae(t.loc.start,"index"),cae(t.loc.end,"index"),t}var Tft=t=>class extends t{parse(){let r=yy(super.parse());return this.optionFlags&256&&(r.tokens=r.tokens.map(yy)),r}parseRegExpLiteral({pattern:r,flags:n}){let s=null;try{s=new RegExp(r,n)}catch{}let i=this.estreeParseLiteral(s);return i.regex={pattern:r,flags:n},i}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let s=this.estreeParseLiteral(n);return s.bigint=String(s.value||r),s}parseDecimalLiteral(r){let s=this.estreeParseLiteral(null);return s.decimal=String(s.value||r),s}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}estreeParseChainExpression(r,n){let s=this.startNodeAtNode(r);return s.expression=r,this.finishNodeAt(s,"ChainExpression",n)}directiveToStmt(r){let n=r.value;delete r.value,this.castNodeTo(n,"Literal"),n.raw=n.extra.raw,n.value=n.extra.expressionValue;let s=this.castNodeTo(r,"ExpressionStatement");return s.expression=n,s.directive=n.extra.rawValue,delete n.extra,s}fillOptionalPropertiesForTSESLint(r){}cloneEstreeStringLiteral(r){let{start:n,end:s,loc:i,range:o,raw:a,value:l}=r,c=Object.create(r.constructor.prototype);return c.type="Literal",c.start=n,c.end=s,c.loc=i,c.range=o,c.raw=a,c.value=l,c}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,s,i,o){super.parseBlockBody(r,n,s,i,o);let a=r.directives.map(l=>this.directiveToStmt(l));r.body=a.concat(r.body),delete r.directives}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return delete r.id,r.name=n,this.castNodeTo(r,"PrivateIdentifier")}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let s=super.parseLiteral(r,n);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(r,n,s=!1){super.parseFunctionBody(r,n,s),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,s,i,o,a,l=!1){let c=this.startNode();c.kind=r.kind,c=super.parseMethod(c,n,s,i,o,a,l),delete c.kind;let{typeParameters:u}=r;u&&(delete r.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u));let p=this.castNodeTo(c,"FunctionExpression");return r.value=p,a==="ClassPrivateMethod"&&(r.computed=!1),a==="ObjectMethod"?(r.kind==="method"&&(r.kind="init"),r.shorthand=!1,this.finishNode(r,"Property")):this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(n,"PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(n,"PropertyDefinition"),n.computed=!1),n}parseClassAccessorProperty(r){let n=super.parseClassAccessorProperty(r);return this.getPluginOption("estree","classFeatures")&&(n.abstract&&this.hasPlugin("typescript")?(delete n.abstract,this.castNodeTo(n,"TSAbstractAccessorProperty")):this.castNodeTo(n,"AccessorProperty")),n}parseObjectProperty(r,n,s,i){let o=super.parseObjectProperty(r,n,s,i);return o&&(o.kind="init",this.castNodeTo(o,"Property")),o}finishObjectProperty(r){return r.kind="init",this.finishNode(r,"Property")}isValidLVal(r,n,s,i){return r==="Property"?"value":super.isValidLVal(r,n,s,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:s,value:i}=r;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,s){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(O.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(O.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,s)}finishCallExpression(r,n){let s=super.finishCallExpression(r,n);if(s.callee.type==="Import"){var i,o;this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=(i=s.arguments[1])!=null?i:null,s.attributes=(o=s.arguments[1])!=null?o:null,delete s.arguments,delete s.callee}else s.type==="OptionalCallExpression"?this.castNodeTo(s,"CallExpression"):s.optional=!1;return s}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let s=this.state.lastTokStartLoc,i=super.parseExport(r,n);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=i;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===i.start&&this.resetStartLocation(i,s)}break}return i}stopParseSubscript(r,n){let s=super.stopParseSubscript(r,n);return n.optionalChainMember?this.estreeParseChainExpression(s,r.loc.end):s}parseMember(r,n,s,i,o){let a=super.parseMember(r,n,s,i,o);return a.type==="OptionalMemberExpression"?this.castNodeTo(a,"MemberExpression"):a.optional=!1,a}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}castNodeTo(r,n){let s=super.castNodeTo(r,n);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(r){let n=super.cloneIdentifier(r);return this.fillOptionalPropertiesForTSESLint(n),n}cloneStringLiteral(r){return r.type==="Literal"?this.cloneEstreeStringLiteral(r):super.cloneStringLiteral(r)}finishNodeAt(r,n,s){return yy(super.finishNodeAt(r,n,s))}finishNode(r,n){let s=super.finishNode(r,n);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(r,n){super.resetStartLocation(r,n),yy(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),yy(r)}},rf=class{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}},Yt={brace:new rf("{"),j_oTag:new rf("<tag"),j_cTag:new rf("</tag"),j_expr:new rf("<tag>...</tag>",!0)};Yt.template=new rf("`",!0);var mt=!0,fe=!0,kF=!0,Ey=!0,Gc=!0,Dft=!0,bI=class{constructor(e,r={}){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.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},oL=new Map;function Ft(t,e={}){e.keyword=t;let r=Ue(t,e);return oL.set(t,r),r}function Rs(t,e){return Ue(t,{beforeExpr:mt,binop:e})}var Iy=-1,Il=[],aL=[],lL=[],cL=[],uL=[],pL=[];function Ue(t,e={}){var r,n,s,i;return++Iy,aL.push(t),lL.push((r=e.binop)!=null?r:-1),cL.push((n=e.beforeExpr)!=null?n:!1),uL.push((s=e.startsExpr)!=null?s:!1),pL.push((i=e.prefix)!=null?i:!1),Il.push(new bI(t,e)),Iy}function It(t,e={}){var r,n,s,i;return++Iy,oL.set(t,Iy),aL.push(t),lL.push((r=e.binop)!=null?r:-1),cL.push((n=e.beforeExpr)!=null?n:!1),uL.push((s=e.startsExpr)!=null?s:!1),pL.push((i=e.prefix)!=null?i:!1),Il.push(new bI("name",e)),Iy}var Pft={bracketL:Ue("[",{beforeExpr:mt,startsExpr:fe}),bracketHashL:Ue("#[",{beforeExpr:mt,startsExpr:fe}),bracketBarL:Ue("[|",{beforeExpr:mt,startsExpr:fe}),bracketR:Ue("]"),bracketBarR:Ue("|]"),braceL:Ue("{",{beforeExpr:mt,startsExpr:fe}),braceBarL:Ue("{|",{beforeExpr:mt,startsExpr:fe}),braceHashL:Ue("#{",{beforeExpr:mt,startsExpr:fe}),braceR:Ue("}"),braceBarR:Ue("|}"),parenL:Ue("(",{beforeExpr:mt,startsExpr:fe}),parenR:Ue(")"),comma:Ue(",",{beforeExpr:mt}),semi:Ue(";",{beforeExpr:mt}),colon:Ue(":",{beforeExpr:mt}),doubleColon:Ue("::",{beforeExpr:mt}),dot:Ue("."),question:Ue("?",{beforeExpr:mt}),questionDot:Ue("?."),arrow:Ue("=>",{beforeExpr:mt}),template:Ue("template"),ellipsis:Ue("...",{beforeExpr:mt}),backQuote:Ue("`",{startsExpr:fe}),dollarBraceL:Ue("${",{beforeExpr:mt,startsExpr:fe}),templateTail:Ue("...`",{startsExpr:fe}),templateNonTail:Ue("...${",{beforeExpr:mt,startsExpr:fe}),at:Ue("@"),hash:Ue("#",{startsExpr:fe}),interpreterDirective:Ue("#!..."),eq:Ue("=",{beforeExpr:mt,isAssign:Ey}),assign:Ue("_=",{beforeExpr:mt,isAssign:Ey}),slashAssign:Ue("_=",{beforeExpr:mt,isAssign:Ey}),xorAssign:Ue("_=",{beforeExpr:mt,isAssign:Ey}),moduloAssign:Ue("_=",{beforeExpr:mt,isAssign:Ey}),incDec:Ue("++/--",{prefix:Gc,postfix:Dft,startsExpr:fe}),bang:Ue("!",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),tilde:Ue("~",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),doubleCaret:Ue("^^",{startsExpr:fe}),doubleAt:Ue("@@",{startsExpr:fe}),pipeline:Rs("|>",0),nullishCoalescing:Rs("??",1),logicalOR:Rs("||",1),logicalAND:Rs("&&",2),bitwiseOR:Rs("|",3),bitwiseXOR:Rs("^",4),bitwiseAND:Rs("&",5),equality:Rs("==/!=/===/!==",6),lt:Rs("</>/<=/>=",7),gt:Rs("</>/<=/>=",7),relational:Rs("</>/<=/>=",7),bitShift:Rs("<</>>/>>>",8),bitShiftL:Rs("<</>>/>>>",8),bitShiftR:Rs("<</>>/>>>",8),plusMin:Ue("+/-",{beforeExpr:mt,binop:9,prefix:Gc,startsExpr:fe}),modulo:Ue("%",{binop:10,startsExpr:fe}),star:Ue("*",{binop:10}),slash:Rs("/",10),exponent:Ue("**",{beforeExpr:mt,binop:11,rightAssociative:!0}),_in:Ft("in",{beforeExpr:mt,binop:7}),_instanceof:Ft("instanceof",{beforeExpr:mt,binop:7}),_break:Ft("break"),_case:Ft("case",{beforeExpr:mt}),_catch:Ft("catch"),_continue:Ft("continue"),_debugger:Ft("debugger"),_default:Ft("default",{beforeExpr:mt}),_else:Ft("else",{beforeExpr:mt}),_finally:Ft("finally"),_function:Ft("function",{startsExpr:fe}),_if:Ft("if"),_return:Ft("return",{beforeExpr:mt}),_switch:Ft("switch"),_throw:Ft("throw",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),_try:Ft("try"),_var:Ft("var"),_const:Ft("const"),_with:Ft("with"),_new:Ft("new",{beforeExpr:mt,startsExpr:fe}),_this:Ft("this",{startsExpr:fe}),_super:Ft("super",{startsExpr:fe}),_class:Ft("class",{startsExpr:fe}),_extends:Ft("extends",{beforeExpr:mt}),_export:Ft("export"),_import:Ft("import",{startsExpr:fe}),_null:Ft("null",{startsExpr:fe}),_true:Ft("true",{startsExpr:fe}),_false:Ft("false",{startsExpr:fe}),_typeof:Ft("typeof",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),_void:Ft("void",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),_delete:Ft("delete",{beforeExpr:mt,prefix:Gc,startsExpr:fe}),_do:Ft("do",{isLoop:kF,beforeExpr:mt}),_for:Ft("for",{isLoop:kF}),_while:Ft("while",{isLoop:kF}),_as:It("as",{startsExpr:fe}),_assert:It("assert",{startsExpr:fe}),_async:It("async",{startsExpr:fe}),_await:It("await",{startsExpr:fe}),_defer:It("defer",{startsExpr:fe}),_from:It("from",{startsExpr:fe}),_get:It("get",{startsExpr:fe}),_let:It("let",{startsExpr:fe}),_meta:It("meta",{startsExpr:fe}),_of:It("of",{startsExpr:fe}),_sent:It("sent",{startsExpr:fe}),_set:It("set",{startsExpr:fe}),_source:It("source",{startsExpr:fe}),_static:It("static",{startsExpr:fe}),_using:It("using",{startsExpr:fe}),_yield:It("yield",{startsExpr:fe}),_asserts:It("asserts",{startsExpr:fe}),_checks:It("checks",{startsExpr:fe}),_exports:It("exports",{startsExpr:fe}),_global:It("global",{startsExpr:fe}),_implements:It("implements",{startsExpr:fe}),_intrinsic:It("intrinsic",{startsExpr:fe}),_infer:It("infer",{startsExpr:fe}),_is:It("is",{startsExpr:fe}),_mixins:It("mixins",{startsExpr:fe}),_proto:It("proto",{startsExpr:fe}),_require:It("require",{startsExpr:fe}),_satisfies:It("satisfies",{startsExpr:fe}),_keyof:It("keyof",{startsExpr:fe}),_readonly:It("readonly",{startsExpr:fe}),_unique:It("unique",{startsExpr:fe}),_abstract:It("abstract",{startsExpr:fe}),_declare:It("declare",{startsExpr:fe}),_enum:It("enum",{startsExpr:fe}),_module:It("module",{startsExpr:fe}),_namespace:It("namespace",{startsExpr:fe}),_interface:It("interface",{startsExpr:fe}),_type:It("type",{startsExpr:fe}),_opaque:It("opaque",{startsExpr:fe}),name:Ue("name",{startsExpr:fe}),placeholder:Ue("%%",{startsExpr:fe}),string:Ue("string",{startsExpr:fe}),num:Ue("num",{startsExpr:fe}),bigint:Ue("bigint",{startsExpr:fe}),decimal:Ue("decimal",{startsExpr:fe}),regexp:Ue("regexp",{startsExpr:fe}),privateName:Ue("#name",{startsExpr:fe}),eof:Ue("eof"),jsxName:Ue("jsxName"),jsxText:Ue("jsxText",{beforeExpr:mt}),jsxTagStart:Ue("jsxTagStart",{startsExpr:fe}),jsxTagEnd:Ue("jsxTagEnd")};function Zt(t){return t>=93&&t<=133}function _ft(t){return t<=92}function Mo(t){return t>=58&&t<=133}function Cae(t){return t>=58&&t<=137}function Nft(t){return cL[t]}function Cy(t){return uL[t]}function kft(t){return t>=29&&t<=33}function uae(t){return t>=129&&t<=131}function Qft(t){return t>=90&&t<=92}function fL(t){return t>=58&&t<=92}function Rft(t){return t>=39&&t<=59}function Oft(t){return t===34}function Fft(t){return pL[t]}function Lft(t){return t>=121&&t<=123}function Mft(t){return t>=124&&t<=130}function Wc(t){return aL[t]}function yI(t){return lL[t]}function Uft(t){return t===57}function CI(t){return t>=24&&t<=25}function Sl(t){return Il[t]}Il[8].updateContext=t=>{t.pop()};Il[5].updateContext=Il[7].updateContext=Il[23].updateContext=t=>{t.push(Yt.brace)};Il[22].updateContext=t=>{t[t.length-1]===Yt.template?t.pop():t.push(Yt.template)};Il[143].updateContext=t=>{t.push(Yt.j_expr,Yt.j_oTag)};var dL="\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\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\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\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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-\u1711\u171F-\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-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\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",Sae="\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\u0897-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",jft=new RegExp("["+dL+"]"),qft=new RegExp("["+dL+Sae+"]");dL=Sae=null;var Iae=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,38,6,186,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,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,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,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Hft=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function MF(t,e){let r=65536;for(let n=0,s=e.length;n<s;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function Ra(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&jft.test(String.fromCharCode(t)):MF(t,Iae)}function nf(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&qft.test(String.fromCharCode(t)):MF(t,Iae)||MF(t,Hft)}var hL={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},$ft=new Set(hL.keyword),Vft=new Set(hL.strict),Gft=new Set(hL.strictBind);function vae(t,e){return e&&t==="await"||t==="enum"}function xae(t,e){return vae(t,e)||Vft.has(t)}function wae(t){return Gft.has(t)}function Bae(t,e){return xae(t,e)||wae(t)}function Yft(t){return $ft.has(t)}function Wft(t,e,r){return t===64&&e===64&&Ra(r)}var Jft=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"]);function Kft(t){return Jft.has(t)}var vy=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},xy=class{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new vy(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,n){let s=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(s,e,r,n);let i=s.names.get(e)||0;r&16?i=i|4:(s.firstLexicalName||(s.firstLexicalName=e),i=i|2),s.names.set(e,i),r&8&&this.maybeExportDefined(s,e)}else if(r&4)for(let i=this.scopeStack.length-1;i>=0&&(s=this.scopeStack[i],this.checkRedeclarationInScope(s,e,r,n),s.names.set(e,(s.names.get(e)||0)|1),this.maybeExportDefined(s,e),!(s.flags&1667));--i);this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,n,s){this.isRedeclaredInScope(e,r,n)&&this.parser.raise(O.VarRedeclaration,s,{identifierName:r})}isRedeclaredInScope(e,r,n){if(!(n&1))return!1;if(n&8)return e.names.has(r);let s=e.names.get(r)||0;return n&16?(s&2)>0||!this.treatFunctionsAsVarInScope(e)&&(s&1)>0:(s&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(s&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1667)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1731&&!(r&4))return r}}},UF=class extends vy{constructor(...e){super(...e),this.declareFunctions=new Set}},jF=class extends xy{createScope(e){return new UF(e)}declareName(e,r,n){let s=this.currentScope();if(r&2048){this.checkRedeclarationInScope(s,e,r,n),this.maybeExportDefined(s,e),s.declareFunctions.add(e);return}super.declareName(e,r,n)}isRedeclaredInScope(e,r,n){if(super.isRedeclaredInScope(e,r,n))return!0;if(n&2048&&!e.declareFunctions.has(r)){let s=e.names.get(r);return(s&4)>0||(s&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},zft=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Ge=Qa`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:t})=>`Unexpected reserved type ${t}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Xft(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function pae(t){return t.importKind==="type"||t.importKind==="typeof"}var Zft={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function edt(t,e){let r=[],n=[];for(let s=0;s<t.length;s++)(e(t[s],s,t)?r:n).push(t[s]);return[r,n]}var tdt=/\*?\s*@((?:no)?flow)\b/,rdt=t=>class extends t{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return jF}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,n){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=tdt.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let s=this.flowParseType();return this.state.inType=n,s}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Ge.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,s=null;return this.match(54)?(this.state.inType=r,s=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(s=this.flowParsePredicate())),[n,s]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return s.params=o.params,s.rest=o.rest,s.this=o._this,this.expect(11),[s.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(Ge.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);throw this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),s=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Ge.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(a))):(this.expectContextual(125,Ge.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(a,!0)))}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let i=null,o=!1;return s.forEach(a=>{Xft(a)?(i==="CommonJS"&&this.raise(Ge.AmbiguousDeclareModuleKind,a),i="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(Ge.DuplicateDeclareModuleExports,a),i==="ES"&&this.raise(Ge.AmbiguousDeclareModuleKind,a),i="CommonJS",o=!0)}),r.kind=i||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let s=this.state.value;throw this.raise(Ge.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:Zft[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return this.castNodeTo(n,"DeclareTypeAlias"),n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return this.castNodeTo(n,"DeclareOpaqueType"),n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(Ge.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,s){zft.has(r)&&this.raise(s?Ge.AssignReservedType:Ge.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifierName(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifierName(r)}flowParseRestrictedIdentifier(r,n){let s=this.startNode(),i=this.flowParseRestrictedIdentifierName(r,n);return this.createIdentifier(s,i)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let r=this.startNode();return this.next(),r.typeAnnotation=this.flowParseType(),this.finishNode(r,"TypeAnnotation")}}flowParseTypeParameter(r=!1){let n=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance();return s.name=this.flowParseRestrictedIdentifierName(),s.variance=i,s.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),s.default=this.flowParseType()):r&&this.raise(Ge.MissingTypeParamDefault,n),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);n.params.push(i),i.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==Yt.brace){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=s}),this.state.inType=n,!this.state.inType&&this.curContext()===Yt.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,s){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=s,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let s=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(s),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:s,allowProto:i,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,p=!1;for(n&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let d=!1,A=null,h=null,m=this.startNode();if(i&&this.isContextual(118)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),A=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),d=!0)}let g=this.flowParseVariance();if(this.eat(0))A!=null&&this.unexpected(A),this.eat(0)?(g&&this.unexpected(g.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(m,d))):l.indexers.push(this.flowParseObjectTypeIndexer(m,d,g));else if(this.match(10)||this.match(47))A!=null&&this.unexpected(A),g&&this.unexpected(g.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(m,d));else{let E="init";if(this.isContextual(99)||this.isContextual(104)){let I=this.lookahead();Cae(I.type)&&(E=this.state.value,this.next())}let b=this.flowParseObjectTypeProperty(m,d,A,g,E,s,o??!u);b===null?(p=!0,h=this.state.lastTokStartLoc):l.properties.push(b)}this.flowObjectTypeSemicolon(),h&&!this.match(8)&&!this.match(9)&&this.raise(Ge.UnexpectedExplicitInexactInObject,h)}this.expect(c),s&&(l.inexact=p);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=a,f}flowParseObjectTypeProperty(r,n,s,i,o,a,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?l||this.raise(Ge.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Ge.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Ge.InexactVariance,i),null):(a||this.raise(Ge.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(Ge.SpreadVariance,i),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=s!=null,r.kind=o;let c=!1;return this.match(47)||this.match(10)?(r.method=!0,s!=null&&this.unexpected(s),i&&this.unexpected(i.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(r),!a&&r.key.name==="constructor"&&r.value.this&&this.raise(Ge.ThisParamBannedInConstructor,r.value.this)):(o!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(c=!0),r.value=this.flowParseTypeInitialiser(),r.variance=i),r.optional=c,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,s=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?Ge.GetterMayNotHaveThisParam:Ge.SetterMayNotHaveThisParam,r.value.this),s!==n&&this.raise(r.kind==="get"?O.BadGetterArity:O.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(O.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){r??(r=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(r);i.qualification=s,i.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(i,"QualifiedTypeIdentifier")}return s}flowParseGenericType(r,n){let s=this.startNodeAt(r);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,s=!1,i=null,o=this.startNode(),a=this.lookahead(),l=this.state.type===78;return a.type===14||a.type===17?(l&&!r&&this.raise(Ge.ThisParamMustBeFirst,o),n=this.parseIdentifier(l),this.eat(17)&&(s=!0,l&&this.raise(Ge.ThisParamMayNotBeOptional,o)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),o.name=n,o.optional=s,o.typeAnnotation=i,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:s}}flowIdentToTypeAnnotation(r,n,s){switch(s.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(r,s)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),s,i,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=a,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Zt(this.state.type)||this.match(78)){let c=this.lookahead().type;o=c!==17&&c!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Ge.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(fL(this.state.type)){let l=Wc(this.state.type);return this.next(),super.createIdentifier(n,l)}else if(Zt(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(r),o=this.eat(18);s=s||o,this.expect(0),!o&&this.match(3)?(i.elementType=n,this.next(),n=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=n,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=o,n=this.finishNode(i,"OptionalIndexedAccessType")):n=this.finishNode(i,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let r=this.startNode(),n=this.parseIdentifierName();return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(r,n)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,s=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,s));return}super.parseFunctionBody(r,!1,s)}parseFunctionBodyAndFinish(r,n,s=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,s)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(Mo(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,s){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||Zt(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(Zt(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,s)}shouldParseExportDeclaration(){let{type:r}=this.state;return r===126||uae(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return r===126||uae(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,s){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(s),r}this.expect(17);let i=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,p]=this.getArrowLikeExpressions(l);if(c||p.length>0){let f=[...o];if(p.length>0){this.state=i,this.state.noArrowAt=f;for(let d=0;d<p.length;d++)f.push(p[d].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,p]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(Ge.AmbiguousConditionalArrow,i.startLoc),c&&u.length===1&&(this.state=i,f.push(u[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=o,this.expect(14),a.test=r,a.consequent=l,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let s=[r],i=[];for(;s.length!==0;){let o=s.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):i.push(o),s.push(o.body)):o.type==="ConditionalExpression"&&(s.push(o.consequent),s.push(o.alternate))}return n?(i.forEach(o=>this.finishArrowValidation(o)),[i,[]]):edt(i,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=n(),this.state.noArrowParamsConversionAt.pop()):s=n(),s}parseParenItem(r,n){let s=super.parseParenItem(r,n);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(r)),this.match(14)){let i=this.startNodeAt(n);return i.expression=s,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return s}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,s=super.maybeParseExportNamespaceSpecifier(r);return s&&r.exportKind==="type"&&this.unexpected(n),s}parseClassId(r,n,s){super.parseClassId(r,n,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,s),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Ge.DeclareClassElement,i):n.value&&this.raise(Ge.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(O.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Wft(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,s){for(let i=0;i<r.length;i++){let o=r[i];o?.type==="TypeCastExpression"&&(r[i]=this.typeCastToParameter(o))}super.toAssignableList(r,n,s)}toReferencedList(r,n){for(let i=0;i<r.length;i++){var s;let o=r[i];o&&o.type==="TypeCastExpression"&&!((s=o.extra)!=null&&s.parenthesized)&&(r.length>1||!n)&&this.raise(Ge.TypeCastInPattern,o.typeAnnotation)}return r}parseArrayLike(r,n,s){let i=super.parseArrayLike(r,n,s);return s!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(r,n,s,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,s,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,s,i,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,s,i,o,a),n.params&&o){let l=n.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ge.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let l=n.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ge.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,s,i){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,s,i)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=r.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,n.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let s=n[0];this.isThisParam(s)&&r.kind==="get"?this.raise(Ge.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(Ge.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,s,i,o,a,l){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let c;this.match(47)&&!a&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(r,n,s,i,o,a,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(Ge.PatternIsOptional,r),this.isThisParam(r)&&this.raise(Ge.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(Ge.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(Ge.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let s=super.parseMaybeDefault(r,n);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(Ge.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Ge.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,s){n.local=pae(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,s))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,s,i){if(super.applyImportPhase(r,n,s,i),n){if(!s&&this.match(65))return;r.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),r.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(r,n,s,i,o){let a=r.imported,l=null;a.type==="Identifier"&&(a.name==="type"?l="type":a.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);l!==null&&!Mo(this.state.type)?(r.imported=p,r.importKind=l,r.local=this.cloneIdentifier(p)):(r.imported=a,r.importKind=null,r.local=this.parseIdentifier())}else{if(l!==null&&Mo(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=l;else{if(n)throw this.raise(O.ImportBindingIsString,r,{importName:a.value});r.imported=a,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(c=!0,r.local=this.cloneIdentifier(r.imported))}let u=pae(r);return s&&u&&this.raise(Ge.ImportTypeShorthandOnlyInPureImport,r),(s||u)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),c&&!s&&!u&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let s=r.kind;s!=="get"&&s!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var s;let i=null,o;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(r,n),i),!o.error)return o.node;let{context:c}=this.state,u=c[c.length-1];(u===Yt.j_oTag||u===Yt.j_expr)&&c.pop()}if((s=o)!=null&&s.error||this.match(47)){var a,l;i=i||this.state.clone();let c,u=this.tryParse(f=>{var d;c=this.flowParseTypeParameterDeclaration();let A=this.forwardNoArrowParamsConversionAt(c,()=>{let m=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(m,c),m});(d=A.extra)!=null&&d.parenthesized&&f();let h=this.maybeUnwrapTypeCastExpression(A);return h.type!=="ArrowFunctionExpression"&&f(),h.typeParameters=c,this.resetStartLocationFromNode(h,c),A},i),p=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(Ge.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;p=u.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=u.failState,p;throw(l=o)!=null&&l.thrown?o.error:u.thrown?u.error:this.raise(Ge.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let o=0;o<r.params.length;o++)this.isThisParam(r.params[o])&&o>0&&this.raise(Ge.ThisParamMustBeFirst,r.params[o]);super.checkParams(r,n,s,i)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,n,s){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let i=this.startNodeAt(n);i.callee=r,i.arguments=super.parseCallExpressionArguments(),r=this.finishNode(i,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let i=this.state.clone(),o=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(n)||l(),i);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(r,n,s),i);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(r,n,s)}parseSubscript(r,n,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,r;this.next();let o=this.startNodeAt(n);return o.callee=r,o.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),o.arguments=this.parseCallExpressionArguments(),o.optional=!0,this.finishCallExpression(o,!0)}else if(!s&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let o=this.startNodeAt(n);o.callee=r;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(r,n,s,i)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let s=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(Ge.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Ge.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let s=this.input.charCodeAt(n+r),i=this.input.charCodeAt(n+r+1);return s===58&&i===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:s===58&&i!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(O.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:s}){this.raise(Ge.EnumBooleanMemberNotInitialized,r,{memberName:s,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Ge.EnumInvalidMemberInitializerSymbolType:Ge.EnumInvalidMemberInitializerPrimaryType:Ge.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(Ge.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(Ge.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}case 134:{let s=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:s}}flowEnumCheckExplicitTypeMismatch(r,n,s){let{explicitType:i}=n;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(Ge.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:r}),s.has(u)&&this.raise(Ge.EnumDuplicateMemberName,l,{memberName:u,enumName:r}),s.add(u);let p={enumName:r,explicitType:n,memberName:u};switch(a.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"boolean"),a.init=c.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"number"),a.init=c.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"string"),a.init=c.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,p);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:o}}flowEnumStringMembers(r,n,{enumName:s}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let i of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return n}else{for(let i of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!Zt(this.state.type))throw this.raise(Ge.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Ge.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let s=n.name,i=n.loc.start,o=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:a,hasUnknownMembers:l}=this.flowEnumMembers({enumName:s,explicitType:o});switch(r.hasUnknownMembers=l,o){case"boolean":return r.explicitType=!0,r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=a.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let c=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let u=a.booleanMembers.length,p=a.numberMembers.length,f=a.stringMembers.length,d=a.defaultedMembers.length;if(!u&&!p&&!f&&!d)return c();if(!u&&!p)return r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!p&&!f&&u>=d){for(let A of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(A.loc.start,{enumName:s,memberName:A.id.name});return r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!u&&!f&&p>=d){for(let A of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(A.loc.start,{enumName:s,memberName:A.id.name});return r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(Ge.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},ndt={__proto__:null,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"},sdt=/\r\n|[\r\n\u2028\u2029]/,AI=new RegExp(sdt.source,"g");function _h(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function fae(t,e,r){for(let n=e;n<r;n++)if(_h(t.charCodeAt(n)))return!0;return!1}var QF=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,RF=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function idt(t){switch(t){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}}var tf=Qa`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 <>...</>?"});function Yc(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Ph(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Ph(t.object)+"."+Ph(t.property);throw new Error("Node had unexpected type: "+t.type)}var odt=t=>class extends t{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(tf.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(s);return}r+=this.input.slice(n,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:_h(s)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=r?`
|
|
174
|
+
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${gI(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${gI(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${gI(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:t})=>`Unexpected keyword '${t}'.`,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:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",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:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Eft={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' 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."},bft={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:t})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(t)}\`.`},Cft=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Sft=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield 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:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${gI({type:t})}; please wrap it in parentheses.`},{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.'}),Ift=["message"];function lae(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function vft({toMessage:t,code:e,reasonCode:r,syntaxPlugin:n}){let s=r==="MissingPlugin"||r==="MissingOneOfPlugins",i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return i[r]&&(r=i[r]),function o(a,l){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=a,c.pos=a.index,c.syntaxPlugin=n,s&&(c.missingPlugin=l.missingPlugin),lae(c,"clone",function(p={}){var f;let{line:d,column:A,index:h}=(f=p.loc)!=null?f:a;return o(new Oa(d,A,h),Object.assign({},l,p.details))}),lae(c,"details",l),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${t(l)} (${a.line}:${a.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function Qa(t,e){if(Array.isArray(t))return n=>Qa(n,t[0]);let r={};for(let n of Object.keys(t)){let s=t[n],i=typeof s=="string"?{message:()=>s}:typeof s=="function"?{message:s}:s,{message:o}=i,a=mft(i,Ift),l=typeof o=="string"?()=>o:o;r[n]=vft(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:l},e?{syntaxPlugin:e}:{},a))}return r}var O=Object.assign({},Qa(gft),Qa(yft),Qa(Eft),Qa(bft),Qa`pipelineOperator`(Sft));function xft(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function wft(t){let e=xft();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(e))t[r]!=null&&(e[r]=t[r]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(t.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(t.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(t.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:Bft}=Object,cae=(t,e)=>{t&&Bft(t,e,{enumerable:!1,value:t[e]})};function yy(t){return cae(t.loc.start,"index"),cae(t.loc.end,"index"),t}var Tft=t=>class extends t{parse(){let r=yy(super.parse());return this.optionFlags&256&&(r.tokens=r.tokens.map(yy)),r}parseRegExpLiteral({pattern:r,flags:n}){let s=null;try{s=new RegExp(r,n)}catch{}let i=this.estreeParseLiteral(s);return i.regex={pattern:r,flags:n},i}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let s=this.estreeParseLiteral(n);return s.bigint=String(s.value||r),s}parseDecimalLiteral(r){let s=this.estreeParseLiteral(null);return s.decimal=String(s.value||r),s}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}estreeParseChainExpression(r,n){let s=this.startNodeAtNode(r);return s.expression=r,this.finishNodeAt(s,"ChainExpression",n)}directiveToStmt(r){let n=r.value;delete r.value,this.castNodeTo(n,"Literal"),n.raw=n.extra.raw,n.value=n.extra.expressionValue;let s=this.castNodeTo(r,"ExpressionStatement");return s.expression=n,s.directive=n.extra.rawValue,delete n.extra,s}fillOptionalPropertiesForTSESLint(r){}cloneEstreeStringLiteral(r){let{start:n,end:s,loc:i,range:o,raw:a,value:l}=r,c=Object.create(r.constructor.prototype);return c.type="Literal",c.start=n,c.end=s,c.loc=i,c.range=o,c.raw=a,c.value=l,c}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,s,i,o){super.parseBlockBody(r,n,s,i,o);let a=r.directives.map(l=>this.directiveToStmt(l));r.body=a.concat(r.body),delete r.directives}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return delete r.id,r.name=n,this.castNodeTo(r,"PrivateIdentifier")}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let s=super.parseLiteral(r,n);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(r,n,s=!1){super.parseFunctionBody(r,n,s),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,s,i,o,a,l=!1){let c=this.startNode();c.kind=r.kind,c=super.parseMethod(c,n,s,i,o,a,l),delete c.kind;let{typeParameters:u}=r;u&&(delete r.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u));let p=this.castNodeTo(c,"FunctionExpression");return r.value=p,a==="ClassPrivateMethod"&&(r.computed=!1),a==="ObjectMethod"?(r.kind==="method"&&(r.kind="init"),r.shorthand=!1,this.finishNode(r,"Property")):this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(n,"PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(n,"PropertyDefinition"),n.computed=!1),n}parseClassAccessorProperty(r){let n=super.parseClassAccessorProperty(r);return this.getPluginOption("estree","classFeatures")&&(n.abstract&&this.hasPlugin("typescript")?(delete n.abstract,this.castNodeTo(n,"TSAbstractAccessorProperty")):this.castNodeTo(n,"AccessorProperty")),n}parseObjectProperty(r,n,s,i){let o=super.parseObjectProperty(r,n,s,i);return o&&(o.kind="init",this.castNodeTo(o,"Property")),o}finishObjectProperty(r){return r.kind="init",this.finishNode(r,"Property")}isValidLVal(r,n,s,i){return r==="Property"?"value":super.isValidLVal(r,n,s,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:s,value:i}=r;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,s){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(O.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(O.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,s)}finishCallExpression(r,n){let s=super.finishCallExpression(r,n);if(s.callee.type==="Import"){var i,o;this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=(i=s.arguments[1])!=null?i:null,s.attributes=(o=s.arguments[1])!=null?o:null,delete s.arguments,delete s.callee}else s.type==="OptionalCallExpression"?this.castNodeTo(s,"CallExpression"):s.optional=!1;return s}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let s=this.state.lastTokStartLoc,i=super.parseExport(r,n);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=i;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===i.start&&this.resetStartLocation(i,s)}break}return i}stopParseSubscript(r,n){let s=super.stopParseSubscript(r,n);return n.optionalChainMember?this.estreeParseChainExpression(s,r.loc.end):s}parseMember(r,n,s,i,o){let a=super.parseMember(r,n,s,i,o);return a.type==="OptionalMemberExpression"?this.castNodeTo(a,"MemberExpression"):a.optional=!1,a}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}castNodeTo(r,n){let s=super.castNodeTo(r,n);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(r){let n=super.cloneIdentifier(r);return this.fillOptionalPropertiesForTSESLint(n),n}cloneStringLiteral(r){return r.type==="Literal"?this.cloneEstreeStringLiteral(r):super.cloneStringLiteral(r)}finishNodeAt(r,n,s){return yy(super.finishNodeAt(r,n,s))}finishNode(r,n){let s=super.finishNode(r,n);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(r,n){super.resetStartLocation(r,n),yy(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),yy(r)}},rf=class{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}},Yt={brace:new rf("{"),j_oTag:new rf("<tag"),j_cTag:new rf("</tag"),j_expr:new rf("<tag>...</tag>",!0)};Yt.template=new rf("`",!0);var gt=!0,fe=!0,kF=!0,Ey=!0,Gc=!0,Dft=!0,bI=class{constructor(e,r={}){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.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},oL=new Map;function Ft(t,e={}){e.keyword=t;let r=Ue(t,e);return oL.set(t,r),r}function Rs(t,e){return Ue(t,{beforeExpr:gt,binop:e})}var Iy=-1,Il=[],aL=[],lL=[],cL=[],uL=[],pL=[];function Ue(t,e={}){var r,n,s,i;return++Iy,aL.push(t),lL.push((r=e.binop)!=null?r:-1),cL.push((n=e.beforeExpr)!=null?n:!1),uL.push((s=e.startsExpr)!=null?s:!1),pL.push((i=e.prefix)!=null?i:!1),Il.push(new bI(t,e)),Iy}function It(t,e={}){var r,n,s,i;return++Iy,oL.set(t,Iy),aL.push(t),lL.push((r=e.binop)!=null?r:-1),cL.push((n=e.beforeExpr)!=null?n:!1),uL.push((s=e.startsExpr)!=null?s:!1),pL.push((i=e.prefix)!=null?i:!1),Il.push(new bI("name",e)),Iy}var Pft={bracketL:Ue("[",{beforeExpr:gt,startsExpr:fe}),bracketHashL:Ue("#[",{beforeExpr:gt,startsExpr:fe}),bracketBarL:Ue("[|",{beforeExpr:gt,startsExpr:fe}),bracketR:Ue("]"),bracketBarR:Ue("|]"),braceL:Ue("{",{beforeExpr:gt,startsExpr:fe}),braceBarL:Ue("{|",{beforeExpr:gt,startsExpr:fe}),braceHashL:Ue("#{",{beforeExpr:gt,startsExpr:fe}),braceR:Ue("}"),braceBarR:Ue("|}"),parenL:Ue("(",{beforeExpr:gt,startsExpr:fe}),parenR:Ue(")"),comma:Ue(",",{beforeExpr:gt}),semi:Ue(";",{beforeExpr:gt}),colon:Ue(":",{beforeExpr:gt}),doubleColon:Ue("::",{beforeExpr:gt}),dot:Ue("."),question:Ue("?",{beforeExpr:gt}),questionDot:Ue("?."),arrow:Ue("=>",{beforeExpr:gt}),template:Ue("template"),ellipsis:Ue("...",{beforeExpr:gt}),backQuote:Ue("`",{startsExpr:fe}),dollarBraceL:Ue("${",{beforeExpr:gt,startsExpr:fe}),templateTail:Ue("...`",{startsExpr:fe}),templateNonTail:Ue("...${",{beforeExpr:gt,startsExpr:fe}),at:Ue("@"),hash:Ue("#",{startsExpr:fe}),interpreterDirective:Ue("#!..."),eq:Ue("=",{beforeExpr:gt,isAssign:Ey}),assign:Ue("_=",{beforeExpr:gt,isAssign:Ey}),slashAssign:Ue("_=",{beforeExpr:gt,isAssign:Ey}),xorAssign:Ue("_=",{beforeExpr:gt,isAssign:Ey}),moduloAssign:Ue("_=",{beforeExpr:gt,isAssign:Ey}),incDec:Ue("++/--",{prefix:Gc,postfix:Dft,startsExpr:fe}),bang:Ue("!",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),tilde:Ue("~",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),doubleCaret:Ue("^^",{startsExpr:fe}),doubleAt:Ue("@@",{startsExpr:fe}),pipeline:Rs("|>",0),nullishCoalescing:Rs("??",1),logicalOR:Rs("||",1),logicalAND:Rs("&&",2),bitwiseOR:Rs("|",3),bitwiseXOR:Rs("^",4),bitwiseAND:Rs("&",5),equality:Rs("==/!=/===/!==",6),lt:Rs("</>/<=/>=",7),gt:Rs("</>/<=/>=",7),relational:Rs("</>/<=/>=",7),bitShift:Rs("<</>>/>>>",8),bitShiftL:Rs("<</>>/>>>",8),bitShiftR:Rs("<</>>/>>>",8),plusMin:Ue("+/-",{beforeExpr:gt,binop:9,prefix:Gc,startsExpr:fe}),modulo:Ue("%",{binop:10,startsExpr:fe}),star:Ue("*",{binop:10}),slash:Rs("/",10),exponent:Ue("**",{beforeExpr:gt,binop:11,rightAssociative:!0}),_in:Ft("in",{beforeExpr:gt,binop:7}),_instanceof:Ft("instanceof",{beforeExpr:gt,binop:7}),_break:Ft("break"),_case:Ft("case",{beforeExpr:gt}),_catch:Ft("catch"),_continue:Ft("continue"),_debugger:Ft("debugger"),_default:Ft("default",{beforeExpr:gt}),_else:Ft("else",{beforeExpr:gt}),_finally:Ft("finally"),_function:Ft("function",{startsExpr:fe}),_if:Ft("if"),_return:Ft("return",{beforeExpr:gt}),_switch:Ft("switch"),_throw:Ft("throw",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),_try:Ft("try"),_var:Ft("var"),_const:Ft("const"),_with:Ft("with"),_new:Ft("new",{beforeExpr:gt,startsExpr:fe}),_this:Ft("this",{startsExpr:fe}),_super:Ft("super",{startsExpr:fe}),_class:Ft("class",{startsExpr:fe}),_extends:Ft("extends",{beforeExpr:gt}),_export:Ft("export"),_import:Ft("import",{startsExpr:fe}),_null:Ft("null",{startsExpr:fe}),_true:Ft("true",{startsExpr:fe}),_false:Ft("false",{startsExpr:fe}),_typeof:Ft("typeof",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),_void:Ft("void",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),_delete:Ft("delete",{beforeExpr:gt,prefix:Gc,startsExpr:fe}),_do:Ft("do",{isLoop:kF,beforeExpr:gt}),_for:Ft("for",{isLoop:kF}),_while:Ft("while",{isLoop:kF}),_as:It("as",{startsExpr:fe}),_assert:It("assert",{startsExpr:fe}),_async:It("async",{startsExpr:fe}),_await:It("await",{startsExpr:fe}),_defer:It("defer",{startsExpr:fe}),_from:It("from",{startsExpr:fe}),_get:It("get",{startsExpr:fe}),_let:It("let",{startsExpr:fe}),_meta:It("meta",{startsExpr:fe}),_of:It("of",{startsExpr:fe}),_sent:It("sent",{startsExpr:fe}),_set:It("set",{startsExpr:fe}),_source:It("source",{startsExpr:fe}),_static:It("static",{startsExpr:fe}),_using:It("using",{startsExpr:fe}),_yield:It("yield",{startsExpr:fe}),_asserts:It("asserts",{startsExpr:fe}),_checks:It("checks",{startsExpr:fe}),_exports:It("exports",{startsExpr:fe}),_global:It("global",{startsExpr:fe}),_implements:It("implements",{startsExpr:fe}),_intrinsic:It("intrinsic",{startsExpr:fe}),_infer:It("infer",{startsExpr:fe}),_is:It("is",{startsExpr:fe}),_mixins:It("mixins",{startsExpr:fe}),_proto:It("proto",{startsExpr:fe}),_require:It("require",{startsExpr:fe}),_satisfies:It("satisfies",{startsExpr:fe}),_keyof:It("keyof",{startsExpr:fe}),_readonly:It("readonly",{startsExpr:fe}),_unique:It("unique",{startsExpr:fe}),_abstract:It("abstract",{startsExpr:fe}),_declare:It("declare",{startsExpr:fe}),_enum:It("enum",{startsExpr:fe}),_module:It("module",{startsExpr:fe}),_namespace:It("namespace",{startsExpr:fe}),_interface:It("interface",{startsExpr:fe}),_type:It("type",{startsExpr:fe}),_opaque:It("opaque",{startsExpr:fe}),name:Ue("name",{startsExpr:fe}),placeholder:Ue("%%",{startsExpr:fe}),string:Ue("string",{startsExpr:fe}),num:Ue("num",{startsExpr:fe}),bigint:Ue("bigint",{startsExpr:fe}),decimal:Ue("decimal",{startsExpr:fe}),regexp:Ue("regexp",{startsExpr:fe}),privateName:Ue("#name",{startsExpr:fe}),eof:Ue("eof"),jsxName:Ue("jsxName"),jsxText:Ue("jsxText",{beforeExpr:gt}),jsxTagStart:Ue("jsxTagStart",{startsExpr:fe}),jsxTagEnd:Ue("jsxTagEnd")};function Zt(t){return t>=93&&t<=133}function _ft(t){return t<=92}function Mo(t){return t>=58&&t<=133}function Cae(t){return t>=58&&t<=137}function Nft(t){return cL[t]}function Cy(t){return uL[t]}function kft(t){return t>=29&&t<=33}function uae(t){return t>=129&&t<=131}function Qft(t){return t>=90&&t<=92}function fL(t){return t>=58&&t<=92}function Rft(t){return t>=39&&t<=59}function Oft(t){return t===34}function Fft(t){return pL[t]}function Lft(t){return t>=121&&t<=123}function Mft(t){return t>=124&&t<=130}function Wc(t){return aL[t]}function yI(t){return lL[t]}function Uft(t){return t===57}function CI(t){return t>=24&&t<=25}function Sl(t){return Il[t]}Il[8].updateContext=t=>{t.pop()};Il[5].updateContext=Il[7].updateContext=Il[23].updateContext=t=>{t.push(Yt.brace)};Il[22].updateContext=t=>{t[t.length-1]===Yt.template?t.pop():t.push(Yt.template)};Il[143].updateContext=t=>{t.push(Yt.j_expr,Yt.j_oTag)};var dL="\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\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\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\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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-\u1711\u171F-\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-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\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",Sae="\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\u0897-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",jft=new RegExp("["+dL+"]"),qft=new RegExp("["+dL+Sae+"]");dL=Sae=null;var Iae=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,38,6,186,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,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,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,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Hft=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function MF(t,e){let r=65536;for(let n=0,s=e.length;n<s;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function Ra(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&jft.test(String.fromCharCode(t)):MF(t,Iae)}function nf(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&qft.test(String.fromCharCode(t)):MF(t,Iae)||MF(t,Hft)}var hL={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},$ft=new Set(hL.keyword),Vft=new Set(hL.strict),Gft=new Set(hL.strictBind);function vae(t,e){return e&&t==="await"||t==="enum"}function xae(t,e){return vae(t,e)||Vft.has(t)}function wae(t){return Gft.has(t)}function Bae(t,e){return xae(t,e)||wae(t)}function Yft(t){return $ft.has(t)}function Wft(t,e,r){return t===64&&e===64&&Ra(r)}var Jft=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"]);function Kft(t){return Jft.has(t)}var vy=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},xy=class{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new vy(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,n){let s=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(s,e,r,n);let i=s.names.get(e)||0;r&16?i=i|4:(s.firstLexicalName||(s.firstLexicalName=e),i=i|2),s.names.set(e,i),r&8&&this.maybeExportDefined(s,e)}else if(r&4)for(let i=this.scopeStack.length-1;i>=0&&(s=this.scopeStack[i],this.checkRedeclarationInScope(s,e,r,n),s.names.set(e,(s.names.get(e)||0)|1),this.maybeExportDefined(s,e),!(s.flags&1667));--i);this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,n,s){this.isRedeclaredInScope(e,r,n)&&this.parser.raise(O.VarRedeclaration,s,{identifierName:r})}isRedeclaredInScope(e,r,n){if(!(n&1))return!1;if(n&8)return e.names.has(r);let s=e.names.get(r)||0;return n&16?(s&2)>0||!this.treatFunctionsAsVarInScope(e)&&(s&1)>0:(s&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(s&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1667)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1731&&!(r&4))return r}}},UF=class extends vy{constructor(...e){super(...e),this.declareFunctions=new Set}},jF=class extends xy{createScope(e){return new UF(e)}declareName(e,r,n){let s=this.currentScope();if(r&2048){this.checkRedeclarationInScope(s,e,r,n),this.maybeExportDefined(s,e),s.declareFunctions.add(e);return}super.declareName(e,r,n)}isRedeclaredInScope(e,r,n){if(super.isRedeclaredInScope(e,r,n))return!0;if(n&2048&&!e.declareFunctions.has(r)){let s=e.names.get(r);return(s&4)>0||(s&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},zft=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Ge=Qa`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:t})=>`Unexpected reserved type ${t}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Xft(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function pae(t){return t.importKind==="type"||t.importKind==="typeof"}var Zft={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function edt(t,e){let r=[],n=[];for(let s=0;s<t.length;s++)(e(t[s],s,t)?r:n).push(t[s]);return[r,n]}var tdt=/\*?\s*@((?:no)?flow)\b/,rdt=t=>class extends t{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return jF}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,n){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=tdt.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let s=this.flowParseType();return this.state.inType=n,s}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Ge.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,s=null;return this.match(54)?(this.state.inType=r,s=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(s=this.flowParsePredicate())),[n,s]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return s.params=o.params,s.rest=o.rest,s.this=o._this,this.expect(11),[s.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(Ge.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);throw this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),s=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Ge.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(a))):(this.expectContextual(125,Ge.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(a,!0)))}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let i=null,o=!1;return s.forEach(a=>{Xft(a)?(i==="CommonJS"&&this.raise(Ge.AmbiguousDeclareModuleKind,a),i="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(Ge.DuplicateDeclareModuleExports,a),i==="ES"&&this.raise(Ge.AmbiguousDeclareModuleKind,a),i="CommonJS",o=!0)}),r.kind=i||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let s=this.state.value;throw this.raise(Ge.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:Zft[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return this.castNodeTo(n,"DeclareTypeAlias"),n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return this.castNodeTo(n,"DeclareOpaqueType"),n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(Ge.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,s){zft.has(r)&&this.raise(s?Ge.AssignReservedType:Ge.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifierName(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifierName(r)}flowParseRestrictedIdentifier(r,n){let s=this.startNode(),i=this.flowParseRestrictedIdentifierName(r,n);return this.createIdentifier(s,i)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let r=this.startNode();return this.next(),r.typeAnnotation=this.flowParseType(),this.finishNode(r,"TypeAnnotation")}}flowParseTypeParameter(r=!1){let n=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance();return s.name=this.flowParseRestrictedIdentifierName(),s.variance=i,s.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),s.default=this.flowParseType()):r&&this.raise(Ge.MissingTypeParamDefault,n),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);n.params.push(i),i.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==Yt.brace){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=s}),this.state.inType=n,!this.state.inType&&this.curContext()===Yt.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,s){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=s,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let s=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(s),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:s,allowProto:i,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,p=!1;for(n&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let d=!1,A=null,h=null,m=this.startNode();if(i&&this.isContextual(118)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),A=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let E=this.lookahead();E.type!==14&&E.type!==17&&(this.next(),d=!0)}let g=this.flowParseVariance();if(this.eat(0))A!=null&&this.unexpected(A),this.eat(0)?(g&&this.unexpected(g.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(m,d))):l.indexers.push(this.flowParseObjectTypeIndexer(m,d,g));else if(this.match(10)||this.match(47))A!=null&&this.unexpected(A),g&&this.unexpected(g.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(m,d));else{let E="init";if(this.isContextual(99)||this.isContextual(104)){let I=this.lookahead();Cae(I.type)&&(E=this.state.value,this.next())}let b=this.flowParseObjectTypeProperty(m,d,A,g,E,s,o??!u);b===null?(p=!0,h=this.state.lastTokStartLoc):l.properties.push(b)}this.flowObjectTypeSemicolon(),h&&!this.match(8)&&!this.match(9)&&this.raise(Ge.UnexpectedExplicitInexactInObject,h)}this.expect(c),s&&(l.inexact=p);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=a,f}flowParseObjectTypeProperty(r,n,s,i,o,a,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?l||this.raise(Ge.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Ge.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Ge.InexactVariance,i),null):(a||this.raise(Ge.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(Ge.SpreadVariance,i),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=s!=null,r.kind=o;let c=!1;return this.match(47)||this.match(10)?(r.method=!0,s!=null&&this.unexpected(s),i&&this.unexpected(i.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(r),!a&&r.key.name==="constructor"&&r.value.this&&this.raise(Ge.ThisParamBannedInConstructor,r.value.this)):(o!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(c=!0),r.value=this.flowParseTypeInitialiser(),r.variance=i),r.optional=c,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,s=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?Ge.GetterMayNotHaveThisParam:Ge.SetterMayNotHaveThisParam,r.value.this),s!==n&&this.raise(r.kind==="get"?O.BadGetterArity:O.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(O.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){r??(r=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(r);i.qualification=s,i.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(i,"QualifiedTypeIdentifier")}return s}flowParseGenericType(r,n){let s=this.startNodeAt(r);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,s=!1,i=null,o=this.startNode(),a=this.lookahead(),l=this.state.type===78;return a.type===14||a.type===17?(l&&!r&&this.raise(Ge.ThisParamMustBeFirst,o),n=this.parseIdentifier(l),this.eat(17)&&(s=!0,l&&this.raise(Ge.ThisParamMayNotBeOptional,o)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),o.name=n,o.optional=s,o.typeAnnotation=i,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:s}}flowIdentToTypeAnnotation(r,n,s){switch(s.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(r,s)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),s,i,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=a,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Zt(this.state.type)||this.match(78)){let c=this.lookahead().type;o=c!==17&&c!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):s=this.flowParseFunctionTypeParams(),l.params=s.params,l.rest=s.rest,l.this=s._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Ge.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(fL(this.state.type)){let l=Wc(this.state.type);return this.next(),super.createIdentifier(n,l)}else if(Zt(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(r),o=this.eat(18);s=s||o,this.expect(0),!o&&this.match(3)?(i.elementType=n,this.next(),n=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=n,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=o,n=this.finishNode(i,"OptionalIndexedAccessType")):n=this.finishNode(i,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let r=this.startNode(),n=this.parseIdentifierName();return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(r,n)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,s=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,s));return}super.parseFunctionBody(r,!1,s)}parseFunctionBodyAndFinish(r,n,s=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,s)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(Mo(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,s){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||Zt(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(Zt(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,s)}shouldParseExportDeclaration(){let{type:r}=this.state;return r===126||uae(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return r===126||uae(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,s){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(s),r}this.expect(17);let i=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,p]=this.getArrowLikeExpressions(l);if(c||p.length>0){let f=[...o];if(p.length>0){this.state=i,this.state.noArrowAt=f;for(let d=0;d<p.length;d++)f.push(p[d].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,p]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(Ge.AmbiguousConditionalArrow,i.startLoc),c&&u.length===1&&(this.state=i,f.push(u[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=o,this.expect(14),a.test=r,a.consequent=l,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let s=[r],i=[];for(;s.length!==0;){let o=s.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):i.push(o),s.push(o.body)):o.type==="ConditionalExpression"&&(s.push(o.consequent),s.push(o.alternate))}return n?(i.forEach(o=>this.finishArrowValidation(o)),[i,[]]):edt(i,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=n(),this.state.noArrowParamsConversionAt.pop()):s=n(),s}parseParenItem(r,n){let s=super.parseParenItem(r,n);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(r)),this.match(14)){let i=this.startNodeAt(n);return i.expression=s,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return s}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,s=super.maybeParseExportNamespaceSpecifier(r);return s&&r.exportKind==="type"&&this.unexpected(n),s}parseClassId(r,n,s){super.parseClassId(r,n,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,s),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Ge.DeclareClassElement,i):n.value&&this.raise(Ge.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(O.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Wft(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,s){for(let i=0;i<r.length;i++){let o=r[i];o?.type==="TypeCastExpression"&&(r[i]=this.typeCastToParameter(o))}super.toAssignableList(r,n,s)}toReferencedList(r,n){for(let i=0;i<r.length;i++){var s;let o=r[i];o&&o.type==="TypeCastExpression"&&!((s=o.extra)!=null&&s.parenthesized)&&(r.length>1||!n)&&this.raise(Ge.TypeCastInPattern,o.typeAnnotation)}return r}parseArrayLike(r,n,s){let i=super.parseArrayLike(r,n,s);return s!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(r,n,s,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,s,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,s,i,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,s,i,o,a),n.params&&o){let l=n.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ge.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let l=n.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ge.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,s,i){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,s,i)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=r.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,n.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let s=n[0];this.isThisParam(s)&&r.kind==="get"?this.raise(Ge.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(Ge.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,s,i,o,a,l){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let c;this.match(47)&&!a&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(r,n,s,i,o,a,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(Ge.PatternIsOptional,r),this.isThisParam(r)&&this.raise(Ge.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(Ge.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(Ge.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let s=super.parseMaybeDefault(r,n);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(Ge.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Ge.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,s){n.local=pae(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,s))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,s,i){if(super.applyImportPhase(r,n,s,i),n){if(!s&&this.match(65))return;r.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),r.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(r,n,s,i,o){let a=r.imported,l=null;a.type==="Identifier"&&(a.name==="type"?l="type":a.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);l!==null&&!Mo(this.state.type)?(r.imported=p,r.importKind=l,r.local=this.cloneIdentifier(p)):(r.imported=a,r.importKind=null,r.local=this.parseIdentifier())}else{if(l!==null&&Mo(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=l;else{if(n)throw this.raise(O.ImportBindingIsString,r,{importName:a.value});r.imported=a,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(c=!0,r.local=this.cloneIdentifier(r.imported))}let u=pae(r);return s&&u&&this.raise(Ge.ImportTypeShorthandOnlyInPureImport,r),(s||u)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),c&&!s&&!u&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let s=r.kind;s!=="get"&&s!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var s;let i=null,o;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(r,n),i),!o.error)return o.node;let{context:c}=this.state,u=c[c.length-1];(u===Yt.j_oTag||u===Yt.j_expr)&&c.pop()}if((s=o)!=null&&s.error||this.match(47)){var a,l;i=i||this.state.clone();let c,u=this.tryParse(f=>{var d;c=this.flowParseTypeParameterDeclaration();let A=this.forwardNoArrowParamsConversionAt(c,()=>{let m=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(m,c),m});(d=A.extra)!=null&&d.parenthesized&&f();let h=this.maybeUnwrapTypeCastExpression(A);return h.type!=="ArrowFunctionExpression"&&f(),h.typeParameters=c,this.resetStartLocationFromNode(h,c),A},i),p=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(Ge.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;p=u.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=u.failState,p;throw(l=o)!=null&&l.thrown?o.error:u.thrown?u.error:this.raise(Ge.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let o=0;o<r.params.length;o++)this.isThisParam(r.params[o])&&o>0&&this.raise(Ge.ThisParamMustBeFirst,r.params[o]);super.checkParams(r,n,s,i)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,n,s){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let i=this.startNodeAt(n);i.callee=r,i.arguments=super.parseCallExpressionArguments(),r=this.finishNode(i,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let i=this.state.clone(),o=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(n)||l(),i);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(r,n,s),i);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(r,n,s)}parseSubscript(r,n,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,r;this.next();let o=this.startNodeAt(n);return o.callee=r,o.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),o.arguments=this.parseCallExpressionArguments(),o.optional=!0,this.finishCallExpression(o,!0)}else if(!s&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let o=this.startNodeAt(n);o.callee=r;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(r,n,s,i)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let s=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(Ge.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Ge.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let s=this.input.charCodeAt(n+r),i=this.input.charCodeAt(n+r+1);return s===58&&i===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:s===58&&i!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(O.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:s}){this.raise(Ge.EnumBooleanMemberNotInitialized,r,{memberName:s,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Ge.EnumInvalidMemberInitializerSymbolType:Ge.EnumInvalidMemberInitializerPrimaryType:Ge.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(Ge.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(Ge.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}case 134:{let s=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:s}}flowEnumCheckExplicitTypeMismatch(r,n,s){let{explicitType:i}=n;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(Ge.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:r}),s.has(u)&&this.raise(Ge.EnumDuplicateMemberName,l,{memberName:u,enumName:r}),s.add(u);let p={enumName:r,explicitType:n,memberName:u};switch(a.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"boolean"),a.init=c.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"number"),a.init=c.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,p,"string"),a.init=c.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,p);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:o}}flowEnumStringMembers(r,n,{enumName:s}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let i of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return n}else{for(let i of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!Zt(this.state.type))throw this.raise(Ge.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Ge.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let s=n.name,i=n.loc.start,o=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:a,hasUnknownMembers:l}=this.flowEnumMembers({enumName:s,explicitType:o});switch(r.hasUnknownMembers=l,o){case"boolean":return r.explicitType=!0,r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=a.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let c=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let u=a.booleanMembers.length,p=a.numberMembers.length,f=a.stringMembers.length,d=a.defaultedMembers.length;if(!u&&!p&&!f&&!d)return c();if(!u&&!p)return r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!p&&!f&&u>=d){for(let A of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(A.loc.start,{enumName:s,memberName:A.id.name});return r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!u&&!f&&p>=d){for(let A of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(A.loc.start,{enumName:s,memberName:A.id.name});return r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(Ge.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},ndt={__proto__:null,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"},sdt=/\r\n|[\r\n\u2028\u2029]/,AI=new RegExp(sdt.source,"g");function _h(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function fae(t,e,r){for(let n=e;n<r;n++)if(_h(t.charCodeAt(n)))return!0;return!1}var QF=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,RF=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function idt(t){switch(t){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}}var tf=Qa`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 <>...</>?"});function Yc(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Ph(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Ph(t.object)+"."+Ph(t.property);throw new Error("Node had unexpected type: "+t.type)}var odt=t=>class extends t{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(tf.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(s);return}r+=this.input.slice(n,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:_h(s)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=r?`
|
|
175
175
|
`:`\r
|
|
176
176
|
`):s=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(r){let n="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(O.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===r)break;i===38?(n+=this.input.slice(s,this.state.pos),n+=this.jsxReadEntity(),s=this.state.pos):_h(i)?(n+=this.input.slice(s,this.state.pos),n+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}n+=this.input.slice(s,this.state.pos++),this.finishToken(134,n)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let s=this.readInt(n,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let n=0,s=!1;for(;n++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(s){let i=this.input.slice(r,this.state.pos),o=ndt[i];if(++this.state.pos,o)return o}}return this.state.pos=r,"&"}jsxReadWord(){let r,n=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(nf(r)||r===45);this.finishToken(141,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(141)?r.name=this.state.value:fL(this.state.type)?r.name=Wc(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let s=this.startNodeAt(r);return s.namespace=n,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let s=this.startNodeAt(r);s.object=n,s.property=this.jsxParseIdentifier(),n=this.finishNode(s,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(Yt.brace),this.next(),r=this.jsxParseExpressionContainer(r,Yt.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(tf.AttributeIsEmpty,r),r;case 143:case 134:return this.parseExprAtom();default:throw this.raise(tf.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(Yt.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,n){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();r.expression=s}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(Yt.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(Yt.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let n=this.startNodeAt(r);return this.eat(144)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(r){let n=[];for(;!this.match(56)&&!this.match(144);)n.push(this.jsxParseAttribute());return r.attributes=n,r.selfClosing=this.eat(56),this.expect(144),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let n=this.startNodeAt(r);return this.eat(144)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(144),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(r){let n=this.startNodeAt(r),s=[],i=this.jsxParseOpeningElementAt(r),o=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(r=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(r);break e}s.push(this.jsxParseElementAt(r));break;case 142:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(Yt.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(a)):s.push(this.jsxParseExpressionContainer(a,Yt.j_expr));break}default:this.unexpected()}Yc(i)&&!Yc(o)&&o!==null?this.raise(tf.MissingClosingTagFragment,o):!Yc(i)&&Yc(o)?this.raise(tf.MissingClosingTagElement,o,{openingTagName:Ph(i.name)}):!Yc(i)&&!Yc(o)&&Ph(o.name)!==Ph(i.name)&&this.raise(tf.MissingClosingTagElement,o,{openingTagName:Ph(i.name)})}if(Yc(i)?(n.openingFragment=i,n.closingFragment=o):(n.openingElement=i,n.closingElement=o),n.children=s,this.match(47))throw this.raise(tf.UnwrappedAdjacentJSXElements,this.state.startLoc);return Yc(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:n}=this.state;n[n.length-1]=r}parseExprAtom(r){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let n=this.curContext();if(n===Yt.j_expr){this.jsxReadToken();return}if(n===Yt.j_oTag||n===Yt.j_cTag){if(Ra(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(144);return}if((r===34||r===39)&&n===Yt.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(r)}updateContext(r){let{context:n,type:s}=this.state;if(s===56&&r===143)n.splice(-2,2,Yt.j_cTag),this.state.canStartJSXElement=!1;else if(s===143)n.push(Yt.j_oTag);else if(s===144){let i=n[n.length-1];i===Yt.j_oTag&&r===56||i===Yt.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===Yt.j_expr):(this.setContext(Yt.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Nft(s)}},qF=class extends vy{constructor(...e){super(...e),this.tsNames=new Map}},HF=class extends xy{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new qF(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,r){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!r&&n>1){for(let s=0;s<n-1;s++)if(this.importsStack[s].has(e))return!0}return!1}declareName(e,r,n){if(r&4096){this.hasImport(e,!0)&&this.parser.raise(O.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let s=this.currentScope(),i=s.tsNames.get(e)||0;if(r&1024){this.maybeExportDefined(s,e),s.tsNames.set(e,i|16);return}super.declareName(e,r,n),r&2&&(r&1||(this.checkRedeclarationInScope(s,e,r,n),this.maybeExportDefined(s,e)),i=i|1),r&256&&(i=i|2),r&512&&(i=i|4),r&128&&(i=i|8),i&&s.tsNames.set(e,i)}isRedeclaredInScope(e,r,n){let s=e.tsNames.get(r);if((s&2)>0){if(n&256){let i=!!(n&512),o=(s&4)>0;return i!==o}return!0}return n&128&&(s&8)>0?e.names.get(r)&2?!!(n&1):!1:n&2&&(s&1)>0?!0:super.isRedeclaredInScope(e,r,n)}checkLocalExport(e){let{name:r}=e;if(this.hasImport(r))return;let n=this.scopeStack.length;for(let s=n-1;s>=0;s--){let o=this.scopeStack[s].tsNames.get(r);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(e)}},$F=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function EI(t,e){return(t?2:0)|(e?1:0)}var VF=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[r,n]=e;if(!this.hasPlugin(r))return!1;let s=this.plugins.get(r);for(let i of Object.keys(n))if(s?.[i]!==n[i])return!1;return!0}}getPluginOption(e,r){var n;return(n=this.plugins.get(e))==null?void 0:n[r]}};function Tae(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function adt(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function wy(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Lo(t,e,r){let n=null,s=e.length;for(;n===null&&s>0;)n=e[--s];n===null||n.start>r.start?wy(t,r.comments):Tae(n,r.comments)}var GF=class extends VF{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let s=n-1,i=r[s];i.start===e.end&&(i.leadingNode=e,s--);let{start:o}=e;for(;s>=0;s--){let a=r[s],l=a.end;if(l>o)a.containingNode=e,this.finalizeComment(a),r.splice(s,1);else{l===o&&(a.trailingNode=e);break}}}finalizeComment(e){var r;let{comments:n}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&Tae(e.leadingNode,n),e.trailingNode!==null&&adt(e.trailingNode,n);else{let s=e.containingNode,i=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":Lo(s,s.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":Lo(s,s.arguments,e);break;case"ImportExpression":Lo(s,[s.source,(r=s.options)!=null?r:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":Lo(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":Lo(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Lo(s,s.specifiers,e);break;case"TSEnumDeclaration":Lo(s,s.members,e);break;case"TSEnumBody":Lo(s,s.members,e);break;case"TSInterfaceBody":Lo(s,s.body,e);break;default:{if(s.type==="RecordExpression"){Lo(s,s.properties,e);break}if(s.type==="TupleExpression"){Lo(s,s.elements,e);break}wy(s,n)}}else wy(s,n)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let s=r[n-1];s.leadingNode===e&&(s.leadingNode=null)}takeSurroundingComments(e,r,n){let{commentStack:s}=this.state,i=s.length;if(i===0)return;let o=i-1;for(;o>=0;o--){let a=s[o],l=a.end;if(a.start===n)a.leadingNode=e;else if(l===r)a.trailingNode=e;else if(l<r)break}}},YF=class t{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[Yt.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startIndex:n,startLine:s,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.startIndex=n,this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new Oa(s,i,n)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new Oa(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new t;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},ldt=function(e){return e>=48&&e<=57},dae={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},mI={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function hae(t,e,r,n,s,i){let o=r,a=n,l=s,c="",u=null,p=r,{length:f}=e;for(;;){if(r>=f){i.unterminated(o,a,l),c+=e.slice(p,r);break}let d=e.charCodeAt(r);if(cdt(t,d,e,r)){c+=e.slice(p,r);break}if(d===92){c+=e.slice(p,r);let A=udt(e,r,n,s,t==="template",i);A.ch===null&&!u?u={pos:r,lineStart:n,curLine:s}:c+=A.ch,{pos:r,lineStart:n,curLine:s}=A,p=r}else d===8232||d===8233?(++r,++s,n=r):d===10||d===13?t==="template"?(c+=e.slice(p,r)+`
|
|
177
177
|
`,++r,d===13&&e.charCodeAt(r)===10&&++r,++s,p=n=r):i.unterminated(o,a,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:n,curLine:s,containsInvalid:!!u}}function cdt(t,e,r,n){return t==="template"?e===96||e===36&&r.charCodeAt(n+1)===123:e===(t==="double"?34:39)}function udt(t,e,r,n,s,i){let o=!s;e++;let a=c=>({pos:e,ch:c,lineStart:r,curLine:n}),l=t.charCodeAt(e++);switch(l){case 110:return a(`
|
|
@@ -213,7 +213,7 @@ ${" ".repeat(c)}`)}}}else n?o=`/*${e.value}*/`:o=`//${e.value}`;this.source("sta
|
|
|
213
213
|
|
|
214
214
|
return ${mf(n)};
|
|
215
215
|
})(${Ope(this.node)})
|
|
216
|
-
`;return this.replaceWith(c)[0].get("arguments.0")}function qxt(t){let e=t.params.findIndex(r=>Ext(r)||bxt(r));return e===-1?t.params.length:e}});var Vpe=y(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn._guessExecutionStatusRelativeTo=cwt;nn._resolve=$pe;nn.canHaveVariableDeclarationOrExpression=twt;nn.canSwapBetweenExpressionAndStatement=rwt;nn.getSource=owt;nn.isCompletionRecord=nwt;nn.isConstantExpression=dwt;nn.isInStrictMode=hwt;nn.isNodeType=ewt;nn.isStatementOrBlock=swt;nn.isStatic=Zxt;nn.matchesPattern=Xxt;nn.referencesImport=iwt;nn.resolve=fwt;nn.willIMaybeExecuteBefore=awt;var Hxt=ze(),{STATEMENT_OR_BLOCK_KEYS:$xt,VISITOR_KEYS:Vxt,isBlockStatement:Hpe,isExpression:Gxt,isIdentifier:Yxt,isLiteral:Wxt,isStringLiteral:Jxt,isType:Kxt,matchesPattern:zxt}=Hxt;function Xxt(t,e){return zxt(this.node,t,e)}nn.has=function(e){var r;let n=(r=this.node)==null?void 0:r[e];return n&&Array.isArray(n)?!!n.length:!!n};function Zxt(){return this.scope.isStatic(this.node)}nn.is=nn.has;nn.isnt=function(e){return!this.has(e)};nn.equals=function(e,r){return this.node[e]===r};function ewt(t){return Kxt(this.type,t)}function twt(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function rwt(t){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?Hpe(t):this.isBlockStatement()?Gxt(t):!1}function nwt(t){let e=this,r=!0;do{let{type:n,container:s}=e;if(!r&&(e.isFunction()||n==="StaticBlock"))return!!t;if(r=!1,Array.isArray(s)&&e.key!==s.length-1)return!1}while((e=e.parentPath)&&!e.isProgram()&&!e.isDoExpression());return!0}function swt(){return this.parentPath.isLabeledStatement()||Hpe(this.container)?!1:$xt.includes(this.key)}function iwt(t,e){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===e||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?Jxt(this.node.property,{value:e}):this.node.property.name===e)){let i=this.get("object");return i.isReferencedIdentifier()&&i.referencesImport(t,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(r?.kind!=="module")return!1;let n=r.path,s=n.parentPath;if(!s.isImportDeclaration())return!1;if(s.node.source.value===t){if(!e)return!0}else return!1;return!!(n.isImportDefaultSpecifier()&&e==="default"||n.isImportNamespaceSpecifier()&&e==="*"||n.isImportSpecifier()&&Yxt(n.node.imported,{name:e}))}function owt(){let t=this.node;if(t.end){let e=this.hub.getCode();if(e)return e.slice(t.start,t.end)}return""}function awt(t){return this._guessExecutionStatusRelativeTo(t)!=="after"}function Upe(t){return t.isProgram()?t:(t.parentPath.scope.getFunctionParent()||t.parentPath.scope.getProgramParent()).path}function lwt(t,e){switch(t){case"LogicalExpression":return e==="right";case"ConditionalExpression":case"IfStatement":return e==="consequent"||e==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return e==="body";case"ForStatement":return e==="body"||e==="update";case"SwitchStatement":return e==="cases";case"TryStatement":return e==="handler";case"AssignmentPattern":return e==="right";case"OptionalMemberExpression":return e==="property";case"OptionalCallExpression":return e==="arguments";default:return!1}}function jpe(t,e){for(let r=0;r<e;r++){let n=t[r];if(lwt(n.parent.type,n.parentKey))return!0}return!1}var qpe=Symbol();function cwt(t){return a3(this,t,new Map)}function a3(t,e,r){let n={this:Upe(t),target:Upe(e)};if(n.target.node!==n.this.node)return pwt(t,n.target,r);let s={target:e.getAncestry(),this:t.getAncestry()};if(s.target.includes(t))return"after";if(s.this.includes(e))return"before";let i,o={target:0,this:0};for(;!i&&o.this<s.this.length;){let u=s.this[o.this];o.target=s.target.indexOf(u),o.target>=0?i=u:o.this++}if(!i)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(jpe(s.this,o.this-1)||jpe(s.target,o.target-1))return"unknown";let a={this:s.this[o.this-1],target:s.target[o.target-1]};if(a.target.listKey&&a.this.listKey&&a.target.container===a.this.container)return a.target.key>a.this.key?"before":"after";let l=Vxt[i.type],c={this:l.indexOf(a.this.parentKey),target:l.indexOf(a.target.parentKey)};return c.target>c.this?"before":"after"}function uwt(t,e,r){if(e.isFunctionDeclaration()){if(e.parentPath.isExportDeclaration())return"unknown"}else return a3(t,e,r)==="before"?"before":"unknown";let n=e.scope.getBinding(e.node.id.name);if(!n.references)return"before";let s=n.referencePaths,i;for(let o of s){if(!!o.find(c=>c.node===e.node))continue;if(o.key!=="callee"||!o.parentPath.isCallExpression())return"unknown";let l=a3(t,o,r);if(i&&i!==l)return"unknown";i=l}return i}function pwt(t,e,r){let n=r.get(t.node),s;if(!n)r.set(t.node,n=new Map);else if(s=n.get(e.node))return s===qpe?"unknown":s;n.set(e.node,qpe);let i=uwt(t,e,r);return n.set(e.node,i),i}function fwt(t,e){return $pe.call(this,t,e)||this}function $pe(t,e){var r;if(!((r=e)!=null&&r.includes(this)))if(e=e||[],e.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(t,e)}else if(this.isReferencedIdentifier()){let n=this.scope.getBinding(this.node.name);if(!n||!n.constant||n.kind==="module")return;if(n.path!==this){let s=n.path.resolve(t,e);return this.find(i=>i.node===s.node)?void 0:s}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(t,e);if(t&&this.isMemberExpression()){let n=this.toComputedKey();if(!Wxt(n))return;let s=n.value,i=this.get("object").resolve(t,e);if(i.isObjectExpression()){let o=i.get("properties");for(let a of o){if(!a.isProperty())continue;let l=a.get("key"),c=a.isnt("computed")&&l.isIdentifier({name:s});if(c=c||l.isLiteral({value:s}),c)return a.get("value").resolve(t,e)}}else if(i.isArrayExpression()&&!isNaN(+s)){let a=i.get("elements")[s];if(a)return a.resolve(t,e)}}}}function dwt(){if(this.isIdentifier()){let t=this.scope.getBinding(this.node.name);return t?t.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(t=>t.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:t}=this.node;return t!=="in"&&t!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function hwt(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let n;if(r.isFunction())n=r.node.body;else if(r.isProgram())n=r.node;else return!1;for(let s of n.directives)if(s.value.value==="use strict")return!0;return!1})}});var Kpe=y(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns._getKey=Wpe;ns._getPattern=Jpe;ns.get=_wt;ns.getAllNextSiblings=Dwt;ns.getAllPrevSiblings=Pwt;ns.getAssignmentIdentifiers=Nwt;ns.getBindingIdentifierPaths=Rwt;ns.getBindingIdentifiers=kwt;ns.getCompletionRecords=xwt;ns.getNextSibling=Twt;ns.getOpposite=Swt;ns.getOuterBindingIdentifierPaths=Owt;ns.getOuterBindingIdentifiers=Qwt;ns.getPrevSibling=Bwt;ns.getSibling=wwt;var c3=wl(),Awt=ze(),{getAssignmentIdentifiers:mwt,getBindingIdentifiers:Ype,getOuterBindingIdentifiers:gwt,numericLiteral:ywt,unaryExpression:Ewt}=Awt,u3=0,Ky=1;function bwt(t){return{type:u3,path:t}}function Cwt(t){return{type:Ky,path:t}}function Swt(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function $h(t,e,r){return t&&e.push(...Vh(t,r)),e}function Iwt(t,e,r){let n=[];for(let s=0;s<t.length;s++){let i=t[s],o=Vh(i,r),a=[],l=[];for(let c of o)c.type===u3&&a.push(c),c.type===Ky&&l.push(c);a.length&&(n=a),e.push(...l)}return e.push(...n),e}function vwt(t){t.forEach(e=>{e.type=Ky})}function l3(t,e){t.forEach(r=>{r.path.isBreakStatement({label:null})&&(e?r.path.replaceWith(Ewt("void",ywt(0))):r.path.remove())})}function Gpe(t,e){let r=[];if(e.canHaveBreak){let n=[];for(let s=0;s<t.length;s++){let i=t[s],o=Object.assign({},e,{inCaseClause:!1});i.isBlockStatement()&&(e.inCaseClause||e.shouldPopulateBreak)?o.shouldPopulateBreak=!0:o.shouldPopulateBreak=!1;let a=Vh(i,o);if(a.length>0&&a.every(l=>l.type===Ky)){n.length>0&&a.every(l=>l.path.isBreakStatement({label:null}))?(vwt(n),r.push(...n),n.some(l=>l.path.isDeclaration())&&(r.push(...a),e.shouldPreserveBreak||l3(a,!0)),e.shouldPreserveBreak||l3(a,!1)):(r.push(...a),!e.shouldPopulateBreak&&!e.shouldPreserveBreak&&l3(a,!0));break}if(s===t.length-1)r.push(...a);else{n=[];for(let l=0;l<a.length;l++){let c=a[l];c.type===Ky&&r.push(c),c.type===u3&&n.push(c)}}}}else if(t.length)for(let n=t.length-1;n>=0;n--){let s=Vh(t[n],e);if(s.length>1||s.length===1&&!s[0].path.isVariableDeclaration()&&!s[0].path.isEmptyStatement()){r.push(...s);break}}return r}function Vh(t,e){let r=[];if(t.isIfStatement())r=$h(t.get("consequent"),r,e),r=$h(t.get("alternate"),r,e);else{if(t.isDoExpression()||t.isFor()||t.isWhile()||t.isLabeledStatement())return $h(t.get("body"),r,e);if(t.isProgram()||t.isBlockStatement())return Gpe(t.get("body"),e);if(t.isFunction())return Vh(t.get("body"),e);if(t.isTryStatement())r=$h(t.get("block"),r,e),r=$h(t.get("handler"),r,e);else{if(t.isCatchClause())return $h(t.get("body"),r,e);if(t.isSwitchStatement())return Iwt(t.get("cases"),r,e);if(t.isSwitchCase())return Gpe(t.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:e.shouldPreserveBreak});t.isBreakStatement()?r.push(Cwt(t)):r.push(bwt(t))}}return r}function xwt(t=!1){return Vh(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:t}).map(r=>r.path)}function wwt(t){return c3.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:t}).setContext(this.context)}function Bwt(){return this.getSibling(this.key-1)}function Twt(){return this.getSibling(this.key+1)}function Dwt(){let t=this.key,e=this.getSibling(++t),r=[];for(;e.node;)r.push(e),e=this.getSibling(++t);return r}function Pwt(){let t=this.key,e=this.getSibling(--t),r=[];for(;e.node;)r.push(e),e=this.getSibling(--t);return r}function _wt(t,e=!0){e===!0&&(e=this.context);let r=t.split(".");return r.length===1?Wpe.call(this,t,e):Jpe.call(this,r,e)}function Wpe(t,e){let r=this.node,n=r[t];return Array.isArray(n)?n.map((s,i)=>c3.default.get({listKey:t,parentPath:this,parent:r,container:n,key:i}).setContext(e)):c3.default.get({parentPath:this,parent:r,container:r,key:t}).setContext(e)}function Jpe(t,e){let r=this;for(let n of t)n==="."?r=r.parentPath:Array.isArray(r)?r=r[n]:r=r.get(n,e);return r}function Nwt(){return mwt(this.node)}function kwt(t){return Ype(this.node,t)}function Qwt(t){return gwt(this.node,t)}function Rwt(t=!1,e=!1){let n=[this],s=Object.create(null);for(;n.length;){let i=n.shift();if(!i||!i.node)continue;let o=Ype.keys[i.node.type];if(i.isIdentifier()){t?(s[i.node.name]=s[i.node.name]||[]).push(i):s[i.node.name]=i;continue}if(i.isExportDeclaration()){let a=i.get("declaration");a.isDeclaration()&&n.push(a);continue}if(e){if(i.isFunctionDeclaration()){n.push(i.get("id"));continue}if(i.isFunctionExpression())continue}if(o)for(let a=0;a<o.length;a++){let l=o[a],c=i.get(l);Array.isArray(c)?n.push(...c):c.node&&n.push(c)}}return s}function Owt(t=!1){return this.getBindingIdentifierPaths(t,!0)}});var Xpe=y(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.addComment=jwt;zy.addComments=qwt;zy.shareCommentsWithSiblings=Uwt;var Fwt=ze(),{addComment:Lwt,addComments:Mwt}=Fwt;function Uwt(){if(typeof this.key=="string")return;let t=this.node;if(!t)return;let e=t.trailingComments,r=t.leadingComments;if(!e&&!r)return;let n=this.getSibling(this.key-1),s=this.getSibling(this.key+1),i=!!n.node,o=!!s.node;i&&(r&&n.addComments("trailing",zpe(r,n.node.trailingComments)),e&&!o&&n.addComments("trailing",e)),o&&(e&&s.addComments("leading",zpe(e,s.node.leadingComments)),r&&!i&&s.addComments("leading",r))}function zpe(t,e){if(!(e!=null&&e.length))return t;let r=new Set(e);return t.filter(n=>!r.has(n))}function jwt(t,e,r){Lwt(this.node,t,e,r)}function qwt(t,e){Mwt(this.node,t,e)}});var wl=y(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=Ua.SHOULD_STOP=Ua.SHOULD_SKIP=Ua.REMOVED=void 0;var Hwt=PL(),$wt=Jc(),Vwt=xn(),Gwt=jL(),tfe=ze(),Tv=tfe,Ywt=af(),Wwt=yv(),La=Mue(),Gh=ipe(),Yh=VM(),Zpe=_pe(),gf=Mpe(),mn=Vpe(),rfe=no(),sn=rfe,Wh=Sv(),Ma=Iv(),Ms=Kpe(),p3=Xpe(),Jwt=QL(),{validate:Kwt}=tfe,efe=$wt("babel"),Llr=Ua.REMOVED=1,Mlr=Ua.SHOULD_STOP=2,Ulr=Ua.SHOULD_SKIP=4,Tl=Ua.default=class nfe{constructor(e,r){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=r,this.hub=e,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:e,parentPath:r,parent:n,container:s,listKey:i,key:o}){if(!e&&r&&(e=r.hub),!n)throw new Error("To get a node path the parent needs to exist");let a=s[o],l=Ywt.getOrCreateCachedPaths(n,r),c=l.get(a);return c||(c=new nfe(e,n),a&&l.set(a,c)),rfe.setup.call(c,r,s,i,o),c}getScope(e){return this.isScope()?new Gwt.default(this):e}setData(e,r){return this.data==null&&(this.data=Object.create(null)),this.data[e]=r}getData(e,r){this.data==null&&(this.data=Object.create(null));let n=this.data[e];return n===void 0&&r!==void 0&&(n=this.data[e]=r),n}hasNode(){return this.node!=null}buildCodeFrameError(e,r=SyntaxError){return this.hub.buildError(this.node,e,r)}traverse(e,r){(0,Vwt.default)(this.node,e,this.scope,r,this)}set(e,r){Kwt(this.node,e,r),this.node[e]=r}getPathLocation(){let e=[],r=this;do{let n=r.key;r.inList&&(n=`${r.listKey}[${n}]`),e.unshift(n)}while(r=r.parentPath);return e.join(".")}debug(e){efe.enabled&&efe(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,Wwt.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},zwt={findParent:La.findParent,find:La.find,getFunctionParent:La.getFunctionParent,getStatementParent:La.getStatementParent,getEarliestCommonAncestorFrom:La.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:La.getDeepestCommonAncestorFrom,getAncestry:La.getAncestry,isAncestor:La.isAncestor,isDescendant:La.isDescendant,inType:La.inType,getTypeAnnotation:Gh.getTypeAnnotation,isBaseType:Gh.isBaseType,couldBeBaseType:Gh.couldBeBaseType,baseTypeStrictlyMatches:Gh.baseTypeStrictlyMatches,isGenericType:Gh.isGenericType,replaceWithMultiple:Yh.replaceWithMultiple,replaceWithSourceString:Yh.replaceWithSourceString,replaceWith:Yh.replaceWith,replaceExpressionWithStatements:Yh.replaceExpressionWithStatements,replaceInline:Yh.replaceInline,evaluateTruthy:Zpe.evaluateTruthy,evaluate:Zpe.evaluate,toComputedKey:gf.toComputedKey,ensureBlock:gf.ensureBlock,unwrapFunctionEnvironment:gf.unwrapFunctionEnvironment,arrowFunctionToExpression:gf.arrowFunctionToExpression,splitExportDeclaration:gf.splitExportDeclaration,ensureFunctionName:gf.ensureFunctionName,matchesPattern:mn.matchesPattern,isStatic:mn.isStatic,isNodeType:mn.isNodeType,canHaveVariableDeclarationOrExpression:mn.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:mn.canSwapBetweenExpressionAndStatement,isCompletionRecord:mn.isCompletionRecord,isStatementOrBlock:mn.isStatementOrBlock,referencesImport:mn.referencesImport,getSource:mn.getSource,willIMaybeExecuteBefore:mn.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:mn._guessExecutionStatusRelativeTo,resolve:mn.resolve,isConstantExpression:mn.isConstantExpression,isInStrictMode:mn.isInStrictMode,isDenylisted:sn.isDenylisted,visit:sn.visit,skip:sn.skip,skipKey:sn.skipKey,stop:sn.stop,setContext:sn.setContext,requeue:sn.requeue,requeueComputedKeyAndDecorators:sn.requeueComputedKeyAndDecorators,remove:Wh.remove,insertBefore:Ma.insertBefore,insertAfter:Ma.insertAfter,unshiftContainer:Ma.unshiftContainer,pushContainer:Ma.pushContainer,getOpposite:Ms.getOpposite,getCompletionRecords:Ms.getCompletionRecords,getSibling:Ms.getSibling,getPrevSibling:Ms.getPrevSibling,getNextSibling:Ms.getNextSibling,getAllNextSiblings:Ms.getAllNextSiblings,getAllPrevSiblings:Ms.getAllPrevSiblings,get:Ms.get,getAssignmentIdentifiers:Ms.getAssignmentIdentifiers,getBindingIdentifiers:Ms.getBindingIdentifiers,getOuterBindingIdentifiers:Ms.getOuterBindingIdentifiers,getBindingIdentifierPaths:Ms.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:Ms.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:p3.shareCommentsWithSiblings,addComment:p3.addComment,addComments:p3.addComments};Object.assign(Tl.prototype,zwt);Tl.prototype.arrowFunctionToShadowed=gf.arrowFunctionToShadowed;Object.assign(Tl.prototype,{has:mn.has,is:mn.is,isnt:mn.isnt,equals:mn.equals,hoist:Ma.hoist,updateSiblingKeys:Ma.updateSiblingKeys,call:sn.call,isBlacklisted:sn.isBlacklisted,setScope:sn.setScope,resync:sn.resync,popContext:sn.popContext,pushContext:sn.pushContext,setup:sn.setup,setKey:sn.setKey});Tl.prototype._guessExecutionStatusRelativeToDifferentFunctions=mn._guessExecutionStatusRelativeTo;Tl.prototype._guessExecutionStatusRelativeToDifferentFunctions=mn._guessExecutionStatusRelativeTo;Object.assign(Tl.prototype,{_getTypeAnnotation:Gh._getTypeAnnotation,_replaceWith:Yh._replaceWith,_resolve:mn._resolve,_call:sn._call,_resyncParent:sn._resyncParent,_resyncKey:sn._resyncKey,_resyncList:sn._resyncList,_resyncRemoved:sn._resyncRemoved,_getQueueContexts:sn._getQueueContexts,_removeFromScope:Wh._removeFromScope,_callRemovalHooks:Wh._callRemovalHooks,_remove:Wh._remove,_markRemoved:Wh._markRemoved,_assertUnremoved:Wh._assertUnremoved,_containerInsert:Ma._containerInsert,_containerInsertBefore:Ma._containerInsertBefore,_containerInsertAfter:Ma._containerInsertAfter,_verifyNodeList:Ma._verifyNodeList,_getKey:Ms._getKey,_getPattern:Ms._getPattern});for(let t of Tv.TYPES){let e=`is${t}`,r=Tv[e];Tl.prototype[e]=function(n){return r(this.node,n)},Tl.prototype[`assert${t}`]=function(n){if(!r(this.node,n))throw new TypeError(`Expected node path of type ${t}`)}}Object.assign(Tl.prototype,Jwt);for(let t of Object.keys(Hwt))t.startsWith("_")||Tv.TYPES.includes(t)||Tv.TYPES.push(t)});var d3=y(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});Dv.default=void 0;var f3=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,r,n=TypeError){return new n(r)}};Dv.default=f3});var sfe=y(Pv=>{"use strict";Object.defineProperty(Pv,"__esModule",{value:!0});Pv.default=void 0;var Xwt=wl(),Zwt=ze(),h3=no(),eBt=d3(),{VISITOR_KEYS:tBt}=Zwt,A3=class{constructor(e,r,n,s){this.queue=null,this.priorityQueue=null,this.parentPath=s,this.scope=e,this.state=n,this.opts=r}shouldVisit(e){let r=this.opts;if(r.enter||r.exit||r[e.type])return!0;let n=tBt[e.type];if(!(n!=null&&n.length))return!1;for(let s of n)if(e[s])return!0;return!1}create(e,r,n,s){let{parentPath:i}=this,o=i==null?e.type==="Program"||e.type==="File"?new eBt.default:void 0:i.hub;return Xwt.default.get({parentPath:i,parent:e,container:r,key:n,listKey:s,hub:o})}maybeQueue(e,r){this.queue&&(r?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,r,n){if(e.length===0)return!1;let s=[];for(let i=0;i<e.length;i++){let o=e[i];o&&this.shouldVisit(o)&&s.push(this.create(r,e,i,n))}return this.visitQueue(s)}visitSingle(e,r){return this.shouldVisit(e[r])?this.visitQueue([this.create(e,e,r)]):!1}visitQueue(e){this.queue=e,this.priorityQueue=[];let r=new WeakSet,n=!1,s=0;for(;s<e.length;){let i=e[s];if(s++,h3.resync.call(i),(i.contexts.length===0||i.contexts[i.contexts.length-1]!==this)&&h3.pushContext.call(i,this),i.key===null)continue;let{node:o}=i;if(!r.has(o)){if(o&&r.add(o),i.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}}for(let i=0;i<s;i++)h3.popContext.call(e[i]);return this.queue=null,n}visit(e,r){let n=e[r];return n?Array.isArray(n)?this.visitMultiple(n,e,r):this.visitSingle(e,r):!1}};Pv.default=A3});var jI=y(m3=>{"use strict";Object.defineProperty(m3,"__esModule",{value:!0});m3.traverseNode=iBt;var rBt=sfe(),$lr=wl(),nBt=ze(),Vlr=no(),{VISITOR_KEYS:sBt}=nBt;function iBt(t,e,r,n,s,i,o){let a=sBt[t.type];if(!a)return!1;let l=new rBt.default(r,e,n,s);if(o)return i!=null&&i[s.parentKey]?!1:l.visitQueue([s]);for(let c of a)if(!(i!=null&&i[c])&&l.visit(t,c))return!0;return!1}});var no=y(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr._call=y3;Qr._forceSetScope=dBt;Qr._getQueueContexts=SBt;Qr._resyncKey=ufe;Qr._resyncList=pfe;Qr._resyncParent=cfe;Qr._resyncRemoved=mBt;Qr.call=g3;Qr.isDenylisted=afe;Qr.popContext=gBt;Qr.pushContext=yBt;Qr.requeue=bBt;Qr.requeueComputedKeyAndDecorators=CBt;Qr.resync=ABt;Qr.setContext=hBt;Qr.setKey=_v;Qr.setScope=lfe;Qr.setup=EBt;Qr.skip=uBt;Qr.skipKey=pBt;Qr.stop=fBt;Qr.visit=cBt;var oBt=jI(),ife=wl(),aBt=Sv(),lBt=ze();function g3(t){let e=this.opts;if(this.debug(t),this.node&&y3.call(this,e[t]))return!0;if(this.node){var r;return y3.call(this,(r=e[this.node.type])==null?void 0:r[t])}return!1}function y3(t){if(!t)return!1;for(let e of t){if(!e)continue;let r=this.node;if(!r)return!0;let n=e.call(this.state,this,this.state);if(n&&typeof n=="object"&&typeof n.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error(`Unexpected return value from visitor method ${e}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function afe(){var t;let e=(t=this.opts.denylist)!=null?t:this.opts.blacklist;return e?.includes(this.node.type)}Qr.isBlacklisted=afe;function ofe(t,e){t.context!==e&&(t.context=e,t.state=e.state,t.opts=e.opts)}function cBt(){var t,e;if(!this.node||this.isDenylisted()||(t=(e=this.opts).shouldSkip)!=null&&t.call(e,this))return!1;let r=this.context;return this.shouldSkip||g3.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(ofe(this,r),this.debug("Recursing into..."),this.shouldStop=(0,oBt.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),ofe(this,r),g3.call(this,"exit"),this.shouldStop)}function uBt(){this.shouldSkip=!0}function pBt(t){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[t]=!0}function fBt(){this._traverseFlags|=ife.SHOULD_SKIP|ife.SHOULD_STOP}function dBt(){var t;let e=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&e.isMethod()||this.key==="discriminant"&&e.isSwitchStatement())&&(e=e.parentPath);let r;for(;e&&!r;)r=e.scope,e=e.parentPath;this.scope=this.getScope(r),(t=this.scope)==null||t.init()}function lfe(){var t,e;if((t=this.opts)!=null&&t.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let n;for(;r&&!n;){var s;if((s=r.opts)!=null&&s.noScope)return;n=r.scope,r=r.parentPath}this.scope=this.getScope(n),(e=this.scope)==null||e.init()}function hBt(t){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,t&&(this.context=t,this.state=t.state,this.opts=t.opts),lfe.call(this),this}function ABt(){this.removed||(cfe.call(this),pfe.call(this),ufe.call(this))}function cfe(){this.parentPath&&(this.parent=this.parentPath.node)}function ufe(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let t=0;t<this.container.length;t++)if(this.container[t]===this.node){_v.call(this,t);return}}else for(let t of Object.keys(this.container))if(this.container[t]===this.node){_v.call(this,t);return}this.key=null}}function pfe(){if(!this.parent||!this.inList)return;let t=this.parent[this.listKey];this.container!==t&&(this.container=t||null)}function mBt(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&aBt._markRemoved.call(this)}function gBt(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function yBt(t){this.contexts.push(t),this.setContext(t)}function EBt(t,e,r,n){this.listKey=r,this.container=e,this.parentPath=t||this.parentPath,_v.call(this,n)}function _v(t){var e;this.key=t,this.node=this.container[this.key],this.type=(e=this.node)==null?void 0:e.type}function bBt(t=this){if(t.removed)return;let e=this.contexts;for(let r of e)r.maybeQueue(t)}function CBt(){let{context:t,node:e}=this;if(!lBt.isPrivate(e)&&e.computed&&t.maybeQueue(this.get("key")),e.decorators)for(let r of this.get("decorators"))t.maybeQueue(r)}function SBt(){let t=this,e=this.contexts;for(;!e.length&&(t=t.parentPath,!!t);)e=t.contexts;return e}});var xn=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Object.defineProperty(Dl,"Hub",{enumerable:!0,get:function(){return BBt.default}});Object.defineProperty(Dl,"NodePath",{enumerable:!0,get:function(){return xBt.default}});Object.defineProperty(Dl,"Scope",{enumerable:!0,get:function(){return wBt.default}});Dl.visitors=Dl.default=void 0;no();var Zy=Ry();Dl.visitors=Zy;var IBt=ze(),vBt=af(),ffe=jI(),xBt=wl(),wBt=jL(),BBt=d3(),{VISITOR_KEYS:TBt,removeProperties:DBt,traverseFast:Xy}=IBt;function Vo(t,e={},r,n,s,i){if(t){if(!e.noScope&&!r&&t.type!=="Program"&&t.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${t.type} node without passing scope and parentPath.`);if(!s&&i)throw new Error("visitSelf can only be used when providing a NodePath.");TBt[t.type]&&(Zy.explode(e),(0,ffe.traverseNode)(t,e,r,n,s,void 0,i))}}var Wlr=Dl.default=Vo;Vo.visitors=Zy;Vo.verify=Zy.verify;Vo.explode=Zy.explode;Vo.cheap=function(t,e){Xy(t,e)};Vo.node=function(t,e,r,n,s,i){(0,ffe.traverseNode)(t,e,r,n,s,i)};Vo.clearNode=function(t,e){DBt(t,e)};Vo.removeProperties=function(t,e){return Xy(t,Vo.clearNode,e),t};Vo.hasType=function(t,e,r){return r!=null&&r.includes(t.type)?!1:t.type===e?!0:Xy(t,function(n){if(r!=null&&r.includes(n.type))return Xy.skip;if(n.type===e)return Xy.stop})};Vo.cache=vBt});var _l=y((it,gfe)=>{it=gfe.exports=gt;var ar;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?ar=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:ar=function(){};it.SEMVER_SPEC_VERSION="2.0.0";var e0=256,Nv=Number.MAX_SAFE_INTEGER||9007199254740991,E3=16,PBt=e0-6,Jh=it.re=[],or=it.safeRe=[],se=it.src=[],Y=it.tokens={},Afe=0;function xt(t){Y[t]=Afe++}var C3="[a-zA-Z0-9-]",b3=[["\\s",1],["\\d",e0],[C3,PBt]];function r0(t){for(var e=0;e<b3.length;e++){var r=b3[e][0],n=b3[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}xt("NUMERICIDENTIFIER");se[Y.NUMERICIDENTIFIER]="0|[1-9]\\d*";xt("NUMERICIDENTIFIERLOOSE");se[Y.NUMERICIDENTIFIERLOOSE]="\\d+";xt("NONNUMERICIDENTIFIER");se[Y.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+C3+"*";xt("MAINVERSION");se[Y.MAINVERSION]="("+se[Y.NUMERICIDENTIFIER]+")\\.("+se[Y.NUMERICIDENTIFIER]+")\\.("+se[Y.NUMERICIDENTIFIER]+")";xt("MAINVERSIONLOOSE");se[Y.MAINVERSIONLOOSE]="("+se[Y.NUMERICIDENTIFIERLOOSE]+")\\.("+se[Y.NUMERICIDENTIFIERLOOSE]+")\\.("+se[Y.NUMERICIDENTIFIERLOOSE]+")";xt("PRERELEASEIDENTIFIER");se[Y.PRERELEASEIDENTIFIER]="(?:"+se[Y.NUMERICIDENTIFIER]+"|"+se[Y.NONNUMERICIDENTIFIER]+")";xt("PRERELEASEIDENTIFIERLOOSE");se[Y.PRERELEASEIDENTIFIERLOOSE]="(?:"+se[Y.NUMERICIDENTIFIERLOOSE]+"|"+se[Y.NONNUMERICIDENTIFIER]+")";xt("PRERELEASE");se[Y.PRERELEASE]="(?:-("+se[Y.PRERELEASEIDENTIFIER]+"(?:\\."+se[Y.PRERELEASEIDENTIFIER]+")*))";xt("PRERELEASELOOSE");se[Y.PRERELEASELOOSE]="(?:-?("+se[Y.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+se[Y.PRERELEASEIDENTIFIERLOOSE]+")*))";xt("BUILDIDENTIFIER");se[Y.BUILDIDENTIFIER]=C3+"+";xt("BUILD");se[Y.BUILD]="(?:\\+("+se[Y.BUILDIDENTIFIER]+"(?:\\."+se[Y.BUILDIDENTIFIER]+")*))";xt("FULL");xt("FULLPLAIN");se[Y.FULLPLAIN]="v?"+se[Y.MAINVERSION]+se[Y.PRERELEASE]+"?"+se[Y.BUILD]+"?";se[Y.FULL]="^"+se[Y.FULLPLAIN]+"$";xt("LOOSEPLAIN");se[Y.LOOSEPLAIN]="[v=\\s]*"+se[Y.MAINVERSIONLOOSE]+se[Y.PRERELEASELOOSE]+"?"+se[Y.BUILD]+"?";xt("LOOSE");se[Y.LOOSE]="^"+se[Y.LOOSEPLAIN]+"$";xt("GTLT");se[Y.GTLT]="((?:<|>)?=?)";xt("XRANGEIDENTIFIERLOOSE");se[Y.XRANGEIDENTIFIERLOOSE]=se[Y.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";xt("XRANGEIDENTIFIER");se[Y.XRANGEIDENTIFIER]=se[Y.NUMERICIDENTIFIER]+"|x|X|\\*";xt("XRANGEPLAIN");se[Y.XRANGEPLAIN]="[v=\\s]*("+se[Y.XRANGEIDENTIFIER]+")(?:\\.("+se[Y.XRANGEIDENTIFIER]+")(?:\\.("+se[Y.XRANGEIDENTIFIER]+")(?:"+se[Y.PRERELEASE]+")?"+se[Y.BUILD]+"?)?)?";xt("XRANGEPLAINLOOSE");se[Y.XRANGEPLAINLOOSE]="[v=\\s]*("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:"+se[Y.PRERELEASELOOSE]+")?"+se[Y.BUILD]+"?)?)?";xt("XRANGE");se[Y.XRANGE]="^"+se[Y.GTLT]+"\\s*"+se[Y.XRANGEPLAIN]+"$";xt("XRANGELOOSE");se[Y.XRANGELOOSE]="^"+se[Y.GTLT]+"\\s*"+se[Y.XRANGEPLAINLOOSE]+"$";xt("COERCE");se[Y.COERCE]="(^|[^\\d])(\\d{1,"+E3+"})(?:\\.(\\d{1,"+E3+"}))?(?:\\.(\\d{1,"+E3+"}))?(?:$|[^\\d])";xt("COERCERTL");Jh[Y.COERCERTL]=new RegExp(se[Y.COERCE],"g");or[Y.COERCERTL]=new RegExp(r0(se[Y.COERCE]),"g");xt("LONETILDE");se[Y.LONETILDE]="(?:~>?)";xt("TILDETRIM");se[Y.TILDETRIM]="(\\s*)"+se[Y.LONETILDE]+"\\s+";Jh[Y.TILDETRIM]=new RegExp(se[Y.TILDETRIM],"g");or[Y.TILDETRIM]=new RegExp(r0(se[Y.TILDETRIM]),"g");var _Bt="$1~";xt("TILDE");se[Y.TILDE]="^"+se[Y.LONETILDE]+se[Y.XRANGEPLAIN]+"$";xt("TILDELOOSE");se[Y.TILDELOOSE]="^"+se[Y.LONETILDE]+se[Y.XRANGEPLAINLOOSE]+"$";xt("LONECARET");se[Y.LONECARET]="(?:\\^)";xt("CARETTRIM");se[Y.CARETTRIM]="(\\s*)"+se[Y.LONECARET]+"\\s+";Jh[Y.CARETTRIM]=new RegExp(se[Y.CARETTRIM],"g");or[Y.CARETTRIM]=new RegExp(r0(se[Y.CARETTRIM]),"g");var NBt="$1^";xt("CARET");se[Y.CARET]="^"+se[Y.LONECARET]+se[Y.XRANGEPLAIN]+"$";xt("CARETLOOSE");se[Y.CARETLOOSE]="^"+se[Y.LONECARET]+se[Y.XRANGEPLAINLOOSE]+"$";xt("COMPARATORLOOSE");se[Y.COMPARATORLOOSE]="^"+se[Y.GTLT]+"\\s*("+se[Y.LOOSEPLAIN]+")$|^$";xt("COMPARATOR");se[Y.COMPARATOR]="^"+se[Y.GTLT]+"\\s*("+se[Y.FULLPLAIN]+")$|^$";xt("COMPARATORTRIM");se[Y.COMPARATORTRIM]="(\\s*)"+se[Y.GTLT]+"\\s*("+se[Y.LOOSEPLAIN]+"|"+se[Y.XRANGEPLAIN]+")";Jh[Y.COMPARATORTRIM]=new RegExp(se[Y.COMPARATORTRIM],"g");or[Y.COMPARATORTRIM]=new RegExp(r0(se[Y.COMPARATORTRIM]),"g");var kBt="$1$2$3";xt("HYPHENRANGE");se[Y.HYPHENRANGE]="^\\s*("+se[Y.XRANGEPLAIN]+")\\s+-\\s+("+se[Y.XRANGEPLAIN]+")\\s*$";xt("HYPHENRANGELOOSE");se[Y.HYPHENRANGELOOSE]="^\\s*("+se[Y.XRANGEPLAINLOOSE]+")\\s+-\\s+("+se[Y.XRANGEPLAINLOOSE]+")\\s*$";xt("STAR");se[Y.STAR]="(<|>)?=?\\s*\\*";for(ja=0;ja<Afe;ja++)ar(ja,se[ja]),Jh[ja]||(Jh[ja]=new RegExp(se[ja]),or[ja]=new RegExp(r0(se[ja])));var ja;it.parse=Ef;function Ef(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof gt)return t;if(typeof t!="string"||t.length>e0)return null;var r=e.loose?or[Y.LOOSE]:or[Y.FULL];if(!r.test(t))return null;try{return new gt(t,e)}catch{return null}}it.valid=QBt;function QBt(t,e){var r=Ef(t,e);return r?r.version:null}it.clean=RBt;function RBt(t,e){var r=Ef(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}it.SemVer=gt;function gt(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof gt){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>e0)throw new TypeError("version is longer than "+e0+" characters");if(!(this instanceof gt))return new gt(t,e);ar("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?or[Y.LOOSE]:or[Y.FULL]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Nv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nv||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var s=+n;if(s>=0&&s<Nv)return s}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}gt.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};gt.prototype.toString=function(){return this.version};gt.prototype.compare=function(t){return ar("SemVer.compare",this.version,this.options,t),t instanceof gt||(t=new gt(t,this.options)),this.compareMain(t)||this.comparePre(t)};gt.prototype.compareMain=function(t){return t instanceof gt||(t=new gt(t,this.options)),yf(this.major,t.major)||yf(this.minor,t.minor)||yf(this.patch,t.patch)};gt.prototype.comparePre=function(t){if(t instanceof gt||(t=new gt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],n=t.prerelease[e];if(ar("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return yf(r,n)}while(++e)};gt.prototype.compareBuild=function(t){t instanceof gt||(t=new gt(t,this.options));var e=0;do{var r=this.build[e],n=t.build[e];if(ar("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return yf(r,n)}while(++e)};gt.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};it.inc=OBt;function OBt(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new gt(t,r).inc(e,n).version}catch{return null}}it.diff=FBt;function FBt(t,e){if(S3(t,e))return null;var r=Ef(t),n=Ef(e),s="";if(r.prerelease.length||n.prerelease.length){s="pre";var i="prerelease"}for(var o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return s+o;return i}it.compareIdentifiers=yf;var dfe=/^[0-9]+$/;function yf(t,e){var r=dfe.test(t),n=dfe.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1}it.rcompareIdentifiers=LBt;function LBt(t,e){return yf(e,t)}it.major=MBt;function MBt(t,e){return new gt(t,e).major}it.minor=UBt;function UBt(t,e){return new gt(t,e).minor}it.patch=jBt;function jBt(t,e){return new gt(t,e).patch}it.compare=Pl;function Pl(t,e,r){return new gt(t,r).compare(new gt(e,r))}it.compareLoose=qBt;function qBt(t,e){return Pl(t,e,!0)}it.compareBuild=HBt;function HBt(t,e,r){var n=new gt(t,r),s=new gt(e,r);return n.compare(s)||n.compareBuild(s)}it.rcompare=$Bt;function $Bt(t,e,r){return Pl(e,t,r)}it.sort=VBt;function VBt(t,e){return t.sort(function(r,n){return it.compareBuild(r,n,e)})}it.rsort=GBt;function GBt(t,e){return t.sort(function(r,n){return it.compareBuild(n,r,e)})}it.gt=t0;function t0(t,e,r){return Pl(t,e,r)>0}it.lt=kv;function kv(t,e,r){return Pl(t,e,r)<0}it.eq=S3;function S3(t,e,r){return Pl(t,e,r)===0}it.neq=mfe;function mfe(t,e,r){return Pl(t,e,r)!==0}it.gte=I3;function I3(t,e,r){return Pl(t,e,r)>=0}it.lte=v3;function v3(t,e,r){return Pl(t,e,r)<=0}it.cmp=Qv;function Qv(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return S3(t,r,n);case"!=":return mfe(t,r,n);case">":return t0(t,r,n);case">=":return I3(t,r,n);case"<":return kv(t,r,n);case"<=":return v3(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}it.Comparator=co;function co(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof co){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof co))return new co(t,e);t=t.trim().split(/\s+/).join(" "),ar("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===Kh?this.value="":this.value=this.operator+this.semver.version,ar("comp",this)}var Kh={};co.prototype.parse=function(t){var e=this.options.loose?or[Y.COMPARATORLOOSE]:or[Y.COMPARATOR],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new gt(r[2],this.options.loose):this.semver=Kh};co.prototype.toString=function(){return this.value};co.prototype.test=function(t){if(ar("Comparator.test",t,this.options.loose),this.semver===Kh||t===Kh)return!0;if(typeof t=="string")try{t=new gt(t,this.options)}catch{return!1}return Qv(t,this.operator,this.semver,this.options)};co.prototype.intersects=function(t,e){if(!(t instanceof co))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return this.value===""?!0:(r=new Wr(t.value,e),Rv(this.value,r,e));if(t.operator==="")return t.value===""?!0:(r=new Wr(this.value,e),Rv(t.semver,r,e));var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),i=this.semver.version===t.semver.version,o=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),a=Qv(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),l=Qv(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||s||i&&o||a||l};it.Range=Wr;function Wr(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Wr)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new Wr(t.raw,e);if(t instanceof co)return new Wr(t.value,e);if(!(this instanceof Wr))return new Wr(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}Wr.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};Wr.prototype.toString=function(){return this.range};Wr.prototype.parseRange=function(t){var e=this.options.loose,r=e?or[Y.HYPHENRANGELOOSE]:or[Y.HYPHENRANGE];t=t.replace(r,rTt),ar("hyphen replace",t),t=t.replace(or[Y.COMPARATORTRIM],kBt),ar("comparator trim",t,or[Y.COMPARATORTRIM]),t=t.replace(or[Y.TILDETRIM],_Bt),t=t.replace(or[Y.CARETTRIM],NBt),t=t.split(/\s+/).join(" ");var n=e?or[Y.COMPARATORLOOSE]:or[Y.COMPARATOR],s=t.split(" ").map(function(i){return WBt(i,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(i){return!!i.match(n)})),s=s.map(function(i){return new co(i,this.options)},this),s};Wr.prototype.intersects=function(t,e){if(!(t instanceof Wr))throw new TypeError("a Range is required");return this.set.some(function(r){return hfe(r,e)&&t.set.some(function(n){return hfe(n,e)&&r.every(function(s){return n.every(function(i){return s.intersects(i,e)})})})})};function hfe(t,e){for(var r=!0,n=t.slice(),s=n.pop();r&&n.length;)r=n.every(function(i){return s.intersects(i,e)}),s=n.pop();return r}it.toComparators=YBt;function YBt(t,e){return new Wr(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}function WBt(t,e){return ar("comp",t,e),t=zBt(t,e),ar("caret",t),t=JBt(t,e),ar("tildes",t),t=ZBt(t,e),ar("xrange",t),t=tTt(t,e),ar("stars",t),t}function Us(t){return!t||t.toLowerCase()==="x"||t==="*"}function JBt(t,e){return t.trim().split(/\s+/).map(function(r){return KBt(r,e)}).join(" ")}function KBt(t,e){var r=e.loose?or[Y.TILDELOOSE]:or[Y.TILDE];return t.replace(r,function(n,s,i,o,a){ar("tilde",t,n,s,i,o,a);var l;return Us(s)?l="":Us(i)?l=">="+s+".0.0 <"+(+s+1)+".0.0":Us(o)?l=">="+s+"."+i+".0 <"+s+"."+(+i+1)+".0":a?(ar("replaceTilde pr",a),l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+(+i+1)+".0"):l=">="+s+"."+i+"."+o+" <"+s+"."+(+i+1)+".0",ar("tilde return",l),l})}function zBt(t,e){return t.trim().split(/\s+/).map(function(r){return XBt(r,e)}).join(" ")}function XBt(t,e){ar("caret",t,e);var r=e.loose?or[Y.CARETLOOSE]:or[Y.CARET];return t.replace(r,function(n,s,i,o,a){ar("caret",t,n,s,i,o,a);var l;return Us(s)?l="":Us(i)?l=">="+s+".0.0 <"+(+s+1)+".0.0":Us(o)?s==="0"?l=">="+s+"."+i+".0 <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+".0 <"+(+s+1)+".0.0":a?(ar("replaceCaret pr",a),s==="0"?i==="0"?l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+i+"."+(+o+1):l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+"."+o+"-"+a+" <"+(+s+1)+".0.0"):(ar("no pr"),s==="0"?i==="0"?l=">="+s+"."+i+"."+o+" <"+s+"."+i+"."+(+o+1):l=">="+s+"."+i+"."+o+" <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+"."+o+" <"+(+s+1)+".0.0"),ar("caret return",l),l})}function ZBt(t,e){return ar("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return eTt(r,e)}).join(" ")}function eTt(t,e){t=t.trim();var r=e.loose?or[Y.XRANGELOOSE]:or[Y.XRANGE];return t.replace(r,function(n,s,i,o,a,l){ar("xRange",t,n,s,i,o,a,l);var c=Us(i),u=c||Us(o),p=u||Us(a),f=p;return s==="="&&f&&(s=""),l=e.includePrerelease?"-0":"",c?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&f?(u&&(o=0),a=0,s===">"?(s=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):s==="<="&&(s="<",u?i=+i+1:o=+o+1),n=s+i+"."+o+"."+a+l):u?n=">="+i+".0.0"+l+" <"+(+i+1)+".0.0"+l:p&&(n=">="+i+"."+o+".0"+l+" <"+i+"."+(+o+1)+".0"+l),ar("xRange return",n),n})}function tTt(t,e){return ar("replaceStars",t,e),t.trim().replace(or[Y.STAR],"")}function rTt(t,e,r,n,s,i,o,a,l,c,u,p,f){return Us(r)?e="":Us(n)?e=">="+r+".0.0":Us(s)?e=">="+r+"."+n+".0":e=">="+e,Us(l)?a="":Us(c)?a="<"+(+l+1)+".0.0":Us(u)?a="<"+l+"."+(+c+1)+".0":p?a="<="+l+"."+c+"."+u+"-"+p:a="<="+a,(e+" "+a).trim()}Wr.prototype.test=function(t){if(!t)return!1;if(typeof t=="string")try{t=new gt(t,this.options)}catch{return!1}for(var e=0;e<this.set.length;e++)if(nTt(this.set[e],t,this.options))return!0;return!1};function nTt(t,e,r){for(var n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(n=0;n<t.length;n++)if(ar(t[n].semver),t[n].semver!==Kh&&t[n].semver.prerelease.length>0){var s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}it.satisfies=Rv;function Rv(t,e,r){try{e=new Wr(e,r)}catch{return!1}return e.test(t)}it.maxSatisfying=sTt;function sTt(t,e,r){var n=null,s=null;try{var i=new Wr(e,r)}catch{return null}return t.forEach(function(o){i.test(o)&&(!n||s.compare(o)===-1)&&(n=o,s=new gt(n,r))}),n}it.minSatisfying=iTt;function iTt(t,e,r){var n=null,s=null;try{var i=new Wr(e,r)}catch{return null}return t.forEach(function(o){i.test(o)&&(!n||s.compare(o)===1)&&(n=o,s=new gt(n,r))}),n}it.minVersion=oTt;function oTt(t,e){t=new Wr(t,e);var r=new gt("0.0.0");if(t.test(r)||(r=new gt("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n<t.set.length;++n){var s=t.set[n];s.forEach(function(i){var o=new gt(i.semver.version);switch(i.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!r||t0(r,o))&&(r=o);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+i.operator)}})}return r&&t.test(r)?r:null}it.validRange=aTt;function aTt(t,e){try{return new Wr(t,e).range||"*"}catch{return null}}it.ltr=lTt;function lTt(t,e,r){return x3(t,e,"<",r)}it.gtr=cTt;function cTt(t,e,r){return x3(t,e,">",r)}it.outside=x3;function x3(t,e,r,n){t=new gt(t,n),e=new Wr(e,n);var s,i,o,a,l;switch(r){case">":s=t0,i=v3,o=kv,a=">",l=">=";break;case"<":s=kv,i=I3,o=t0,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Rv(t,e,n))return!1;for(var c=0;c<e.set.length;++c){var u=e.set[c],p=null,f=null;if(u.forEach(function(d){d.semver===Kh&&(d=new co(">=0.0.0")),p=p||d,f=f||d,s(d.semver,p.semver,n)?p=d:o(d.semver,f.semver,n)&&(f=d)}),p.operator===a||p.operator===l||(!f.operator||f.operator===a)&&i(t,f.semver))return!1;if(f.operator===l&&o(t,f.semver))return!1}return!0}it.prerelease=uTt;function uTt(t,e){var r=Ef(t,e);return r&&r.prerelease.length?r.prerelease:null}it.intersects=pTt;function pTt(t,e,r){return t=new Wr(t,r),e=new Wr(e,r),t.intersects(e)}it.coerce=fTt;function fTt(t,e){if(t instanceof gt)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};var r=null;if(!e.rtl)r=t.match(or[Y.COERCE]);else{for(var n;(n=or[Y.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),or[Y.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;or[Y.COERCERTL].lastIndex=-1}return r===null?null:Ef(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),e)}});var bfe=y(Fv=>{"use strict";Object.defineProperty(Fv,"__esModule",{value:!0});Fv.default=void 0;var Go=require("assert"),dTt=ze(),{callExpression:w3,cloneNode:Ov,expressionStatement:yfe,identifier:n0,importDeclaration:hTt,importDefaultSpecifier:ATt,importNamespaceSpecifier:mTt,importSpecifier:gTt,memberExpression:B3,stringLiteral:Efe,variableDeclaration:yTt,variableDeclarator:ETt}=dTt,T3=class{constructor(e,r,n){this._statements=[],this._resultName=null,this._importedSource=void 0,this._scope=r,this._hub=n,this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){return this._statements.push(hTt([],Efe(this._importedSource))),this}require(){return this._statements.push(yfe(w3(n0("require"),[Efe(this._importedSource)]))),this}namespace(e="namespace"){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return Go(n.type==="ImportDeclaration"),Go(n.specifiers.length===0),n.specifiers=[mTt(r)],this._resultName=Ov(r),this}default(e){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return Go(n.type==="ImportDeclaration"),Go(n.specifiers.length===0),n.specifiers=[ATt(r)],this._resultName=Ov(r),this}named(e,r){if(r==="default")return this.default(e);let n=this._scope.generateUidIdentifier(e),s=this._statements[this._statements.length-1];return Go(s.type==="ImportDeclaration"),Go(s.specifiers.length===0),s.specifiers=[gTt(n,n0(r))],this._resultName=Ov(n),this}var(e){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return n.type!=="ExpressionStatement"&&(Go(this._resultName),n=yfe(this._resultName),this._statements.push(n)),this._statements[this._statements.length-1]=yTt("var",[ETt(r,n.expression)]),this._resultName=Ov(r),this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){let r=this._statements[this._statements.length-1];return r.type==="ExpressionStatement"?r.expression=w3(e,[r.expression]):r.type==="VariableDeclaration"?(Go(r.declarations.length===1),r.declarations[0].init=w3(e,[r.declarations[0].init])):Go.fail("Unexpected type."),this}prop(e){let r=this._statements[this._statements.length-1];return r.type==="ExpressionStatement"?r.expression=B3(r.expression,n0(e)):r.type==="VariableDeclaration"?(Go(r.declarations.length===1),r.declarations[0].init=B3(r.declarations[0].init,n0(e))):Go.fail("Unexpected type:"+r.type),this}read(e){this._resultName=B3(this._resultName,n0(e))}};Fv.default=T3});var P3=y(D3=>{"use strict";Object.defineProperty(D3,"__esModule",{value:!0});D3.default=bTt;function bTt(t){return t.node.sourceType==="module"}});var wfe=y(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});Mv.default=void 0;var Cfe=require("assert"),CTt=ze(),STt=bfe(),ITt=P3(),{identifier:vTt,importSpecifier:xTt,numericLiteral:wTt,sequenceExpression:BTt,isImportDeclaration:Sfe}=CTt,_3=class{constructor(e,r,n){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:!1,ensureNoContext:!1,importPosition:"before"};let s=e.find(i=>i.isProgram());this._programPath=s,this._programScope=s.scope,this._hub=s.hub,this._defaultOpts=this._applyDefaults(r,n,!0)}addDefault(e,r){return this.addNamed("default",e,r)}addNamed(e,r,n){return Cfe(typeof e=="string"),this._generateImport(this._applyDefaults(r,n),e)}addNamespace(e,r){return this._generateImport(this._applyDefaults(e,r),null)}addSideEffect(e,r){return this._generateImport(this._applyDefaults(e,r),void 0)}_applyDefaults(e,r,n=!1){let s;return typeof e=="string"?s=Object.assign({},this._defaultOpts,{importedSource:e},r):(Cfe(!r,"Unexpected secondary arguments."),s=Object.assign({},this._defaultOpts,e)),!n&&r&&(r.nameHint!==void 0&&(s.nameHint=r.nameHint),r.blockHoist!==void 0&&(s.blockHoist=r.blockHoist)),s}_generateImport(e,r){let n=r==="default",s=!!r&&!n,i=r===null,{importedSource:o,importedType:a,importedInterop:l,importingInterop:c,ensureLiveReference:u,ensureNoContext:p,nameHint:f,importPosition:d,blockHoist:A}=e,h=f||r,m=(0,ITt.default)(this._programPath),g=m&&c==="node",E=m&&c==="babel";if(d==="after"&&!m)throw new Error('"importPosition": "after" is only supported in modules');let b=new STt.default(o,this._programScope,this._hub);if(a==="es6"){if(!g&&!E)throw new Error("Cannot import an ES6 module from CommonJS");b.import(),i?b.namespace(f||o):(n||s)&&b.named(h,r)}else{if(a!=="commonjs")throw new Error(`Unexpected interopType "${a}"`);if(l==="babel")if(g){h=h!=="default"?h:o;let L=`${o}$es6Default`;b.import(),i?b.default(L).var(h||o).wildcardInterop():n?u?b.default(L).var(h||o).defaultInterop().read("default"):b.default(L).var(h).defaultInterop().prop(r):s&&b.default(L).read(r)}else E?(b.import(),i?b.namespace(h||o):(n||s)&&b.named(h,r)):(b.require(),i?b.var(h||o).wildcardInterop():(n||s)&&u?n?(h=h!=="default"?h:o,b.var(h).read(r),b.defaultInterop()):b.var(o).read(r):n?b.var(h).defaultInterop().prop(r):s&&b.var(h).prop(r));else if(l==="compiled")g?(b.import(),i?b.default(h||o):(n||s)&&b.default(o).read(h)):E?(b.import(),i?b.namespace(h||o):(n||s)&&b.named(h,r)):(b.require(),i?b.var(h||o):(n||s)&&(u?b.var(o).read(h):b.prop(r).var(h)));else if(l==="uncompiled"){if(n&&u)throw new Error("No live reference for commonjs default");g?(b.import(),i?b.default(h||o):n?b.default(h):s&&b.default(o).read(h)):E?(b.import(),i?b.default(h||o):n?b.default(h):s&&b.named(h,r)):(b.require(),i?b.var(h||o):n?b.var(h):s&&(u?b.var(o).read(h):b.var(h).prop(r)))}else throw new Error(`Unknown importedInterop "${l}".`)}let{statements:I,resultName:w}=b.done();return this._insertStatements(I,d,A),(n||s)&&p&&w.type!=="Identifier"?BTt([wTt(0),w]):w}_insertStatements(e,r="before",n=3){if(r==="after"){if(this._insertStatementsAfter(e))return}else if(this._insertStatementsBefore(e,n))return;this._programPath.unshiftContainer("body",e)}_insertStatementsBefore(e,r){if(e.length===1&&Sfe(e[0])&&Lv(e[0])){let s=this._programPath.get("body").find(i=>i.isImportDeclaration()&&Lv(i.node));if(s?.node.source.value===e[0].source.value&&xfe(s.node,e[0]))return!0}e.forEach(s=>{s._blockHoist=r});let n=this._programPath.get("body").find(s=>{let i=s.node._blockHoist;return Number.isFinite(i)&&i<4});return n?(n.insertBefore(e),!0):!1}_insertStatementsAfter(e){let r=new Set(e),n=new Map;for(let i of e)if(Sfe(i)&&Lv(i)){let o=i.source.value;n.has(o)||n.set(o,[]),n.get(o).push(i)}let s=null;for(let i of this._programPath.get("body"))if(i.isImportDeclaration()&&Lv(i.node)){s=i;let o=i.node.source.value,a=n.get(o);if(!a)continue;for(let l of a)r.has(l)&&xfe(i.node,l)&&r.delete(l)}return r.size===0?!0:(s&&s.insertAfter(Array.from(r)),!!s)}};Mv.default=_3;function Lv(t){return t.importKind!=="type"&&t.importKind!=="typeof"}function Ife(t){return t.specifiers.length===1&&t.specifiers[0].type==="ImportNamespaceSpecifier"||t.specifiers.length===2&&t.specifiers[1].type==="ImportNamespaceSpecifier"}function vfe(t){return t.specifiers.length>0&&t.specifiers[0].type==="ImportDefaultSpecifier"}function xfe(t,e){return t.specifiers.length?e.specifiers.length?Ife(t)||Ife(e)?!1:(vfe(e)&&(vfe(t)?e.specifiers[0]=xTt(e.specifiers[0].local,vTt("default")):t.specifiers.unshift(e.specifiers.shift())),t.specifiers.push(...e.specifiers),!0):!0:(t.specifiers=e.specifiers,!0)}});var N3=y(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});Object.defineProperty(su,"ImportInjector",{enumerable:!0,get:function(){return s0.default}});su.addDefault=DTt;su.addNamed=PTt;su.addNamespace=_Tt;su.addSideEffect=NTt;Object.defineProperty(su,"isModule",{enumerable:!0,get:function(){return TTt.default}});var s0=wfe(),TTt=P3();function DTt(t,e,r){return new s0.default(t).addDefault(e,r)}function PTt(t,e,r,n){return new s0.default(t).addNamed(e,r,n)}function _Tt(t,e,r){return new s0.default(t).addNamespace(e,r)}function NTt(t,e,r){return new s0.default(t).addSideEffect(e,r)}});var Dfe=y(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0});k3.default=kTt;var Bfe=wn(),Tfe=xn(),Uv;function kTt(t){Uv||(Uv=Tfe.visitors.environmentVisitor({ThisExpression(e){e.replaceWith(Bfe.types.unaryExpression("void",Bfe.types.numericLiteral(0),!0))}}),Uv.noScope=!0),(0,Tfe.default)(t.node,Uv)}});var Pfe=y(Q3=>{"use strict";Object.defineProperty(Q3,"__esModule",{value:!0});Q3.default=RTt;var Xe=wn();function QTt(t){do switch(t.parent.type){case"TSTypeAnnotation":case"TSTypeAliasDeclaration":case"TSTypeReference":case"TypeAnnotation":case"TypeAlias":return!0;case"ExportSpecifier":return t.parentPath.parent.exportKind==="type";default:if(t.parentPath.isStatement()||t.parentPath.isExpression())return!1}while(t=t.parentPath)}function RTt(t,e,r){let n=new Map,s=new Map,i=l=>{t.requeue(l)};for(let[l,c]of e.source){for(let[u,p]of c.imports)n.set(u,[l,p,null]);for(let u of c.importsNamespace)n.set(u,[l,null,u])}for(let[l,c]of e.local){let u=s.get(l);u||(u=[],s.set(l,u)),u.push(...c.names)}let o={metadata:e,requeueInParent:i,scope:t.scope,exported:s};t.traverse(OTt,o);let a={seen:new WeakSet,metadata:e,requeueInParent:i,scope:t.scope,imported:n,exported:s,buildImportReference([l,c,u],p){let f=e.source.get(l);if(f.referenced=!0,u){if(f.wrap){var d;p=(d=r(p,f.wrap))!=null?d:p}return p}let A=Xe.types.identifier(f.name);if(f.wrap){var h;A=(h=r(A,f.wrap))!=null?h:A}if(c==="default"&&f.interop==="node-default")return A;let m=e.stringSpecifiers.has(c);return Xe.types.memberExpression(A,m?Xe.types.stringLiteral(c):Xe.types.identifier(c),m)}};t.traverse(FTt,a)}var OTt={Scope(t){t.skip()},ClassDeclaration(t){let{requeueInParent:e,exported:r,metadata:n}=this,{id:s}=t.node;if(!s)throw new Error("Expected class to have a name");let i=s.name,o=r.get(i)||[];if(o.length>0){let a=Xe.types.expressionStatement(bf(n,o,Xe.types.identifier(i),t.scope));a._blockHoist=t.node._blockHoist,e(t.insertAfter(a)[0])}},VariableDeclaration(t){let{requeueInParent:e,exported:r,metadata:n}=this,s=t.node.kind==="var";for(let i of t.get("declarations")){let{id:o}=i.node,{init:a}=i.node;if(Xe.types.isIdentifier(o)&&r.has(o.name)&&!Xe.types.isArrowFunctionExpression(a)&&(!Xe.types.isFunctionExpression(a)||a.id)&&(!Xe.types.isClassExpression(a)||a.id)){if(!a){if(s)continue;a=t.scope.buildUndefinedNode()}i.node.init=bf(n,r.get(o.name),a,t.scope),e(i.get("init"))}else for(let l of Object.keys(i.getOuterBindingIdentifiers()))if(r.has(l)){let c=Xe.types.expressionStatement(bf(n,r.get(l),Xe.types.identifier(l),t.scope));c._blockHoist=t.node._blockHoist,e(t.insertAfter(c)[0])}}}},bf=(t,e,r,n)=>{let s=t.exportName;for(let i=n;i!=null;i=i.parent)i.hasOwnBinding(s)&&i.rename(s);return(e||[]).reduce((i,o)=>{let{stringSpecifiers:a}=t,l=a.has(o);return Xe.types.assignmentExpression("=",Xe.types.memberExpression(Xe.types.identifier(s),l?Xe.types.stringLiteral(o):Xe.types.identifier(o),l),i)},r)},jv=t=>Xe.template.expression.ast`
|
|
216
|
+
`;return this.replaceWith(c)[0].get("arguments.0")}function qxt(t){let e=t.params.findIndex(r=>Ext(r)||bxt(r));return e===-1?t.params.length:e}});var Vpe=y(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn._guessExecutionStatusRelativeTo=cwt;nn._resolve=$pe;nn.canHaveVariableDeclarationOrExpression=twt;nn.canSwapBetweenExpressionAndStatement=rwt;nn.getSource=owt;nn.isCompletionRecord=nwt;nn.isConstantExpression=dwt;nn.isInStrictMode=hwt;nn.isNodeType=ewt;nn.isStatementOrBlock=swt;nn.isStatic=Zxt;nn.matchesPattern=Xxt;nn.referencesImport=iwt;nn.resolve=fwt;nn.willIMaybeExecuteBefore=awt;var Hxt=ze(),{STATEMENT_OR_BLOCK_KEYS:$xt,VISITOR_KEYS:Vxt,isBlockStatement:Hpe,isExpression:Gxt,isIdentifier:Yxt,isLiteral:Wxt,isStringLiteral:Jxt,isType:Kxt,matchesPattern:zxt}=Hxt;function Xxt(t,e){return zxt(this.node,t,e)}nn.has=function(e){var r;let n=(r=this.node)==null?void 0:r[e];return n&&Array.isArray(n)?!!n.length:!!n};function Zxt(){return this.scope.isStatic(this.node)}nn.is=nn.has;nn.isnt=function(e){return!this.has(e)};nn.equals=function(e,r){return this.node[e]===r};function ewt(t){return Kxt(this.type,t)}function twt(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function rwt(t){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?Hpe(t):this.isBlockStatement()?Gxt(t):!1}function nwt(t){let e=this,r=!0;do{let{type:n,container:s}=e;if(!r&&(e.isFunction()||n==="StaticBlock"))return!!t;if(r=!1,Array.isArray(s)&&e.key!==s.length-1)return!1}while((e=e.parentPath)&&!e.isProgram()&&!e.isDoExpression());return!0}function swt(){return this.parentPath.isLabeledStatement()||Hpe(this.container)?!1:$xt.includes(this.key)}function iwt(t,e){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===e||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?Jxt(this.node.property,{value:e}):this.node.property.name===e)){let i=this.get("object");return i.isReferencedIdentifier()&&i.referencesImport(t,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(r?.kind!=="module")return!1;let n=r.path,s=n.parentPath;if(!s.isImportDeclaration())return!1;if(s.node.source.value===t){if(!e)return!0}else return!1;return!!(n.isImportDefaultSpecifier()&&e==="default"||n.isImportNamespaceSpecifier()&&e==="*"||n.isImportSpecifier()&&Yxt(n.node.imported,{name:e}))}function owt(){let t=this.node;if(t.end){let e=this.hub.getCode();if(e)return e.slice(t.start,t.end)}return""}function awt(t){return this._guessExecutionStatusRelativeTo(t)!=="after"}function Upe(t){return t.isProgram()?t:(t.parentPath.scope.getFunctionParent()||t.parentPath.scope.getProgramParent()).path}function lwt(t,e){switch(t){case"LogicalExpression":return e==="right";case"ConditionalExpression":case"IfStatement":return e==="consequent"||e==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return e==="body";case"ForStatement":return e==="body"||e==="update";case"SwitchStatement":return e==="cases";case"TryStatement":return e==="handler";case"AssignmentPattern":return e==="right";case"OptionalMemberExpression":return e==="property";case"OptionalCallExpression":return e==="arguments";default:return!1}}function jpe(t,e){for(let r=0;r<e;r++){let n=t[r];if(lwt(n.parent.type,n.parentKey))return!0}return!1}var qpe=Symbol();function cwt(t){return a3(this,t,new Map)}function a3(t,e,r){let n={this:Upe(t),target:Upe(e)};if(n.target.node!==n.this.node)return pwt(t,n.target,r);let s={target:e.getAncestry(),this:t.getAncestry()};if(s.target.includes(t))return"after";if(s.this.includes(e))return"before";let i,o={target:0,this:0};for(;!i&&o.this<s.this.length;){let u=s.this[o.this];o.target=s.target.indexOf(u),o.target>=0?i=u:o.this++}if(!i)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(jpe(s.this,o.this-1)||jpe(s.target,o.target-1))return"unknown";let a={this:s.this[o.this-1],target:s.target[o.target-1]};if(a.target.listKey&&a.this.listKey&&a.target.container===a.this.container)return a.target.key>a.this.key?"before":"after";let l=Vxt[i.type],c={this:l.indexOf(a.this.parentKey),target:l.indexOf(a.target.parentKey)};return c.target>c.this?"before":"after"}function uwt(t,e,r){if(e.isFunctionDeclaration()){if(e.parentPath.isExportDeclaration())return"unknown"}else return a3(t,e,r)==="before"?"before":"unknown";let n=e.scope.getBinding(e.node.id.name);if(!n.references)return"before";let s=n.referencePaths,i;for(let o of s){if(!!o.find(c=>c.node===e.node))continue;if(o.key!=="callee"||!o.parentPath.isCallExpression())return"unknown";let l=a3(t,o,r);if(i&&i!==l)return"unknown";i=l}return i}function pwt(t,e,r){let n=r.get(t.node),s;if(!n)r.set(t.node,n=new Map);else if(s=n.get(e.node))return s===qpe?"unknown":s;n.set(e.node,qpe);let i=uwt(t,e,r);return n.set(e.node,i),i}function fwt(t,e){return $pe.call(this,t,e)||this}function $pe(t,e){var r;if(!((r=e)!=null&&r.includes(this)))if(e=e||[],e.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(t,e)}else if(this.isReferencedIdentifier()){let n=this.scope.getBinding(this.node.name);if(!n||!n.constant||n.kind==="module")return;if(n.path!==this){let s=n.path.resolve(t,e);return this.find(i=>i.node===s.node)?void 0:s}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(t,e);if(t&&this.isMemberExpression()){let n=this.toComputedKey();if(!Wxt(n))return;let s=n.value,i=this.get("object").resolve(t,e);if(i.isObjectExpression()){let o=i.get("properties");for(let a of o){if(!a.isProperty())continue;let l=a.get("key"),c=a.isnt("computed")&&l.isIdentifier({name:s});if(c=c||l.isLiteral({value:s}),c)return a.get("value").resolve(t,e)}}else if(i.isArrayExpression()&&!isNaN(+s)){let a=i.get("elements")[s];if(a)return a.resolve(t,e)}}}}function dwt(){if(this.isIdentifier()){let t=this.scope.getBinding(this.node.name);return t?t.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(t=>t.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:t}=this.node;return t!=="in"&&t!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function hwt(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let n;if(r.isFunction())n=r.node.body;else if(r.isProgram())n=r.node;else return!1;for(let s of n.directives)if(s.value.value==="use strict")return!0;return!1})}});var Kpe=y(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns._getKey=Wpe;ns._getPattern=Jpe;ns.get=_wt;ns.getAllNextSiblings=Dwt;ns.getAllPrevSiblings=Pwt;ns.getAssignmentIdentifiers=Nwt;ns.getBindingIdentifierPaths=Rwt;ns.getBindingIdentifiers=kwt;ns.getCompletionRecords=xwt;ns.getNextSibling=Twt;ns.getOpposite=Swt;ns.getOuterBindingIdentifierPaths=Owt;ns.getOuterBindingIdentifiers=Qwt;ns.getPrevSibling=Bwt;ns.getSibling=wwt;var c3=wl(),Awt=ze(),{getAssignmentIdentifiers:mwt,getBindingIdentifiers:Ype,getOuterBindingIdentifiers:gwt,numericLiteral:ywt,unaryExpression:Ewt}=Awt,u3=0,Ky=1;function bwt(t){return{type:u3,path:t}}function Cwt(t){return{type:Ky,path:t}}function Swt(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function $h(t,e,r){return t&&e.push(...Vh(t,r)),e}function Iwt(t,e,r){let n=[];for(let s=0;s<t.length;s++){let i=t[s],o=Vh(i,r),a=[],l=[];for(let c of o)c.type===u3&&a.push(c),c.type===Ky&&l.push(c);a.length&&(n=a),e.push(...l)}return e.push(...n),e}function vwt(t){t.forEach(e=>{e.type=Ky})}function l3(t,e){t.forEach(r=>{r.path.isBreakStatement({label:null})&&(e?r.path.replaceWith(Ewt("void",ywt(0))):r.path.remove())})}function Gpe(t,e){let r=[];if(e.canHaveBreak){let n=[];for(let s=0;s<t.length;s++){let i=t[s],o=Object.assign({},e,{inCaseClause:!1});i.isBlockStatement()&&(e.inCaseClause||e.shouldPopulateBreak)?o.shouldPopulateBreak=!0:o.shouldPopulateBreak=!1;let a=Vh(i,o);if(a.length>0&&a.every(l=>l.type===Ky)){n.length>0&&a.every(l=>l.path.isBreakStatement({label:null}))?(vwt(n),r.push(...n),n.some(l=>l.path.isDeclaration())&&(r.push(...a),e.shouldPreserveBreak||l3(a,!0)),e.shouldPreserveBreak||l3(a,!1)):(r.push(...a),!e.shouldPopulateBreak&&!e.shouldPreserveBreak&&l3(a,!0));break}if(s===t.length-1)r.push(...a);else{n=[];for(let l=0;l<a.length;l++){let c=a[l];c.type===Ky&&r.push(c),c.type===u3&&n.push(c)}}}}else if(t.length)for(let n=t.length-1;n>=0;n--){let s=Vh(t[n],e);if(s.length>1||s.length===1&&!s[0].path.isVariableDeclaration()&&!s[0].path.isEmptyStatement()){r.push(...s);break}}return r}function Vh(t,e){let r=[];if(t.isIfStatement())r=$h(t.get("consequent"),r,e),r=$h(t.get("alternate"),r,e);else{if(t.isDoExpression()||t.isFor()||t.isWhile()||t.isLabeledStatement())return $h(t.get("body"),r,e);if(t.isProgram()||t.isBlockStatement())return Gpe(t.get("body"),e);if(t.isFunction())return Vh(t.get("body"),e);if(t.isTryStatement())r=$h(t.get("block"),r,e),r=$h(t.get("handler"),r,e);else{if(t.isCatchClause())return $h(t.get("body"),r,e);if(t.isSwitchStatement())return Iwt(t.get("cases"),r,e);if(t.isSwitchCase())return Gpe(t.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:e.shouldPreserveBreak});t.isBreakStatement()?r.push(Cwt(t)):r.push(bwt(t))}}return r}function xwt(t=!1){return Vh(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:t}).map(r=>r.path)}function wwt(t){return c3.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:t}).setContext(this.context)}function Bwt(){return this.getSibling(this.key-1)}function Twt(){return this.getSibling(this.key+1)}function Dwt(){let t=this.key,e=this.getSibling(++t),r=[];for(;e.node;)r.push(e),e=this.getSibling(++t);return r}function Pwt(){let t=this.key,e=this.getSibling(--t),r=[];for(;e.node;)r.push(e),e=this.getSibling(--t);return r}function _wt(t,e=!0){e===!0&&(e=this.context);let r=t.split(".");return r.length===1?Wpe.call(this,t,e):Jpe.call(this,r,e)}function Wpe(t,e){let r=this.node,n=r[t];return Array.isArray(n)?n.map((s,i)=>c3.default.get({listKey:t,parentPath:this,parent:r,container:n,key:i}).setContext(e)):c3.default.get({parentPath:this,parent:r,container:r,key:t}).setContext(e)}function Jpe(t,e){let r=this;for(let n of t)n==="."?r=r.parentPath:Array.isArray(r)?r=r[n]:r=r.get(n,e);return r}function Nwt(){return mwt(this.node)}function kwt(t){return Ype(this.node,t)}function Qwt(t){return gwt(this.node,t)}function Rwt(t=!1,e=!1){let n=[this],s=Object.create(null);for(;n.length;){let i=n.shift();if(!i||!i.node)continue;let o=Ype.keys[i.node.type];if(i.isIdentifier()){t?(s[i.node.name]=s[i.node.name]||[]).push(i):s[i.node.name]=i;continue}if(i.isExportDeclaration()){let a=i.get("declaration");a.isDeclaration()&&n.push(a);continue}if(e){if(i.isFunctionDeclaration()){n.push(i.get("id"));continue}if(i.isFunctionExpression())continue}if(o)for(let a=0;a<o.length;a++){let l=o[a],c=i.get(l);Array.isArray(c)?n.push(...c):c.node&&n.push(c)}}return s}function Owt(t=!1){return this.getBindingIdentifierPaths(t,!0)}});var Xpe=y(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.addComment=jwt;zy.addComments=qwt;zy.shareCommentsWithSiblings=Uwt;var Fwt=ze(),{addComment:Lwt,addComments:Mwt}=Fwt;function Uwt(){if(typeof this.key=="string")return;let t=this.node;if(!t)return;let e=t.trailingComments,r=t.leadingComments;if(!e&&!r)return;let n=this.getSibling(this.key-1),s=this.getSibling(this.key+1),i=!!n.node,o=!!s.node;i&&(r&&n.addComments("trailing",zpe(r,n.node.trailingComments)),e&&!o&&n.addComments("trailing",e)),o&&(e&&s.addComments("leading",zpe(e,s.node.leadingComments)),r&&!i&&s.addComments("leading",r))}function zpe(t,e){if(!(e!=null&&e.length))return t;let r=new Set(e);return t.filter(n=>!r.has(n))}function jwt(t,e,r){Lwt(this.node,t,e,r)}function qwt(t,e){Mwt(this.node,t,e)}});var wl=y(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.default=Ua.SHOULD_STOP=Ua.SHOULD_SKIP=Ua.REMOVED=void 0;var Hwt=PL(),$wt=Jc(),Vwt=xn(),Gwt=jL(),tfe=ze(),Tv=tfe,Ywt=af(),Wwt=yv(),La=Mue(),Gh=ipe(),Yh=VM(),Zpe=_pe(),gf=Mpe(),mn=Vpe(),rfe=no(),sn=rfe,Wh=Sv(),Ma=Iv(),Ms=Kpe(),p3=Xpe(),Jwt=QL(),{validate:Kwt}=tfe,efe=$wt("babel"),Llr=Ua.REMOVED=1,Mlr=Ua.SHOULD_STOP=2,Ulr=Ua.SHOULD_SKIP=4,Tl=Ua.default=class nfe{constructor(e,r){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=r,this.hub=e,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:e,parentPath:r,parent:n,container:s,listKey:i,key:o}){if(!e&&r&&(e=r.hub),!n)throw new Error("To get a node path the parent needs to exist");let a=s[o],l=Ywt.getOrCreateCachedPaths(n,r),c=l.get(a);return c||(c=new nfe(e,n),a&&l.set(a,c)),rfe.setup.call(c,r,s,i,o),c}getScope(e){return this.isScope()?new Gwt.default(this):e}setData(e,r){return this.data==null&&(this.data=Object.create(null)),this.data[e]=r}getData(e,r){this.data==null&&(this.data=Object.create(null));let n=this.data[e];return n===void 0&&r!==void 0&&(n=this.data[e]=r),n}hasNode(){return this.node!=null}buildCodeFrameError(e,r=SyntaxError){return this.hub.buildError(this.node,e,r)}traverse(e,r){(0,Vwt.default)(this.node,e,this.scope,r,this)}set(e,r){Kwt(this.node,e,r),this.node[e]=r}getPathLocation(){let e=[],r=this;do{let n=r.key;r.inList&&(n=`${r.listKey}[${n}]`),e.unshift(n)}while(r=r.parentPath);return e.join(".")}debug(e){efe.enabled&&efe(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,Wwt.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},zwt={findParent:La.findParent,find:La.find,getFunctionParent:La.getFunctionParent,getStatementParent:La.getStatementParent,getEarliestCommonAncestorFrom:La.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:La.getDeepestCommonAncestorFrom,getAncestry:La.getAncestry,isAncestor:La.isAncestor,isDescendant:La.isDescendant,inType:La.inType,getTypeAnnotation:Gh.getTypeAnnotation,isBaseType:Gh.isBaseType,couldBeBaseType:Gh.couldBeBaseType,baseTypeStrictlyMatches:Gh.baseTypeStrictlyMatches,isGenericType:Gh.isGenericType,replaceWithMultiple:Yh.replaceWithMultiple,replaceWithSourceString:Yh.replaceWithSourceString,replaceWith:Yh.replaceWith,replaceExpressionWithStatements:Yh.replaceExpressionWithStatements,replaceInline:Yh.replaceInline,evaluateTruthy:Zpe.evaluateTruthy,evaluate:Zpe.evaluate,toComputedKey:gf.toComputedKey,ensureBlock:gf.ensureBlock,unwrapFunctionEnvironment:gf.unwrapFunctionEnvironment,arrowFunctionToExpression:gf.arrowFunctionToExpression,splitExportDeclaration:gf.splitExportDeclaration,ensureFunctionName:gf.ensureFunctionName,matchesPattern:mn.matchesPattern,isStatic:mn.isStatic,isNodeType:mn.isNodeType,canHaveVariableDeclarationOrExpression:mn.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:mn.canSwapBetweenExpressionAndStatement,isCompletionRecord:mn.isCompletionRecord,isStatementOrBlock:mn.isStatementOrBlock,referencesImport:mn.referencesImport,getSource:mn.getSource,willIMaybeExecuteBefore:mn.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:mn._guessExecutionStatusRelativeTo,resolve:mn.resolve,isConstantExpression:mn.isConstantExpression,isInStrictMode:mn.isInStrictMode,isDenylisted:sn.isDenylisted,visit:sn.visit,skip:sn.skip,skipKey:sn.skipKey,stop:sn.stop,setContext:sn.setContext,requeue:sn.requeue,requeueComputedKeyAndDecorators:sn.requeueComputedKeyAndDecorators,remove:Wh.remove,insertBefore:Ma.insertBefore,insertAfter:Ma.insertAfter,unshiftContainer:Ma.unshiftContainer,pushContainer:Ma.pushContainer,getOpposite:Ms.getOpposite,getCompletionRecords:Ms.getCompletionRecords,getSibling:Ms.getSibling,getPrevSibling:Ms.getPrevSibling,getNextSibling:Ms.getNextSibling,getAllNextSiblings:Ms.getAllNextSiblings,getAllPrevSiblings:Ms.getAllPrevSiblings,get:Ms.get,getAssignmentIdentifiers:Ms.getAssignmentIdentifiers,getBindingIdentifiers:Ms.getBindingIdentifiers,getOuterBindingIdentifiers:Ms.getOuterBindingIdentifiers,getBindingIdentifierPaths:Ms.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:Ms.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:p3.shareCommentsWithSiblings,addComment:p3.addComment,addComments:p3.addComments};Object.assign(Tl.prototype,zwt);Tl.prototype.arrowFunctionToShadowed=gf.arrowFunctionToShadowed;Object.assign(Tl.prototype,{has:mn.has,is:mn.is,isnt:mn.isnt,equals:mn.equals,hoist:Ma.hoist,updateSiblingKeys:Ma.updateSiblingKeys,call:sn.call,isBlacklisted:sn.isBlacklisted,setScope:sn.setScope,resync:sn.resync,popContext:sn.popContext,pushContext:sn.pushContext,setup:sn.setup,setKey:sn.setKey});Tl.prototype._guessExecutionStatusRelativeToDifferentFunctions=mn._guessExecutionStatusRelativeTo;Tl.prototype._guessExecutionStatusRelativeToDifferentFunctions=mn._guessExecutionStatusRelativeTo;Object.assign(Tl.prototype,{_getTypeAnnotation:Gh._getTypeAnnotation,_replaceWith:Yh._replaceWith,_resolve:mn._resolve,_call:sn._call,_resyncParent:sn._resyncParent,_resyncKey:sn._resyncKey,_resyncList:sn._resyncList,_resyncRemoved:sn._resyncRemoved,_getQueueContexts:sn._getQueueContexts,_removeFromScope:Wh._removeFromScope,_callRemovalHooks:Wh._callRemovalHooks,_remove:Wh._remove,_markRemoved:Wh._markRemoved,_assertUnremoved:Wh._assertUnremoved,_containerInsert:Ma._containerInsert,_containerInsertBefore:Ma._containerInsertBefore,_containerInsertAfter:Ma._containerInsertAfter,_verifyNodeList:Ma._verifyNodeList,_getKey:Ms._getKey,_getPattern:Ms._getPattern});for(let t of Tv.TYPES){let e=`is${t}`,r=Tv[e];Tl.prototype[e]=function(n){return r(this.node,n)},Tl.prototype[`assert${t}`]=function(n){if(!r(this.node,n))throw new TypeError(`Expected node path of type ${t}`)}}Object.assign(Tl.prototype,Jwt);for(let t of Object.keys(Hwt))t.startsWith("_")||Tv.TYPES.includes(t)||Tv.TYPES.push(t)});var d3=y(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});Dv.default=void 0;var f3=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,r,n=TypeError){return new n(r)}};Dv.default=f3});var sfe=y(Pv=>{"use strict";Object.defineProperty(Pv,"__esModule",{value:!0});Pv.default=void 0;var Xwt=wl(),Zwt=ze(),h3=no(),eBt=d3(),{VISITOR_KEYS:tBt}=Zwt,A3=class{constructor(e,r,n,s){this.queue=null,this.priorityQueue=null,this.parentPath=s,this.scope=e,this.state=n,this.opts=r}shouldVisit(e){let r=this.opts;if(r.enter||r.exit||r[e.type])return!0;let n=tBt[e.type];if(!(n!=null&&n.length))return!1;for(let s of n)if(e[s])return!0;return!1}create(e,r,n,s){let{parentPath:i}=this,o=i==null?e.type==="Program"||e.type==="File"?new eBt.default:void 0:i.hub;return Xwt.default.get({parentPath:i,parent:e,container:r,key:n,listKey:s,hub:o})}maybeQueue(e,r){this.queue&&(r?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,r,n){if(e.length===0)return!1;let s=[];for(let i=0;i<e.length;i++){let o=e[i];o&&this.shouldVisit(o)&&s.push(this.create(r,e,i,n))}return this.visitQueue(s)}visitSingle(e,r){return this.shouldVisit(e[r])?this.visitQueue([this.create(e,e,r)]):!1}visitQueue(e){this.queue=e,this.priorityQueue=[];let r=new WeakSet,n=!1,s=0;for(;s<e.length;){let i=e[s];if(s++,h3.resync.call(i),(i.contexts.length===0||i.contexts[i.contexts.length-1]!==this)&&h3.pushContext.call(i,this),i.key===null)continue;let{node:o}=i;if(!r.has(o)){if(o&&r.add(o),i.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}}for(let i=0;i<s;i++)h3.popContext.call(e[i]);return this.queue=null,n}visit(e,r){let n=e[r];return n?Array.isArray(n)?this.visitMultiple(n,e,r):this.visitSingle(e,r):!1}};Pv.default=A3});var jI=y(m3=>{"use strict";Object.defineProperty(m3,"__esModule",{value:!0});m3.traverseNode=iBt;var rBt=sfe(),$lr=wl(),nBt=ze(),Vlr=no(),{VISITOR_KEYS:sBt}=nBt;function iBt(t,e,r,n,s,i,o){let a=sBt[t.type];if(!a)return!1;let l=new rBt.default(r,e,n,s);if(o)return i!=null&&i[s.parentKey]?!1:l.visitQueue([s]);for(let c of a)if(!(i!=null&&i[c])&&l.visit(t,c))return!0;return!1}});var no=y(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr._call=y3;Qr._forceSetScope=dBt;Qr._getQueueContexts=SBt;Qr._resyncKey=ufe;Qr._resyncList=pfe;Qr._resyncParent=cfe;Qr._resyncRemoved=mBt;Qr.call=g3;Qr.isDenylisted=afe;Qr.popContext=gBt;Qr.pushContext=yBt;Qr.requeue=bBt;Qr.requeueComputedKeyAndDecorators=CBt;Qr.resync=ABt;Qr.setContext=hBt;Qr.setKey=_v;Qr.setScope=lfe;Qr.setup=EBt;Qr.skip=uBt;Qr.skipKey=pBt;Qr.stop=fBt;Qr.visit=cBt;var oBt=jI(),ife=wl(),aBt=Sv(),lBt=ze();function g3(t){let e=this.opts;if(this.debug(t),this.node&&y3.call(this,e[t]))return!0;if(this.node){var r;return y3.call(this,(r=e[this.node.type])==null?void 0:r[t])}return!1}function y3(t){if(!t)return!1;for(let e of t){if(!e)continue;let r=this.node;if(!r)return!0;let n=e.call(this.state,this,this.state);if(n&&typeof n=="object"&&typeof n.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error(`Unexpected return value from visitor method ${e}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function afe(){var t;let e=(t=this.opts.denylist)!=null?t:this.opts.blacklist;return e?.includes(this.node.type)}Qr.isBlacklisted=afe;function ofe(t,e){t.context!==e&&(t.context=e,t.state=e.state,t.opts=e.opts)}function cBt(){var t,e;if(!this.node||this.isDenylisted()||(t=(e=this.opts).shouldSkip)!=null&&t.call(e,this))return!1;let r=this.context;return this.shouldSkip||g3.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(ofe(this,r),this.debug("Recursing into..."),this.shouldStop=(0,oBt.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),ofe(this,r),g3.call(this,"exit"),this.shouldStop)}function uBt(){this.shouldSkip=!0}function pBt(t){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[t]=!0}function fBt(){this._traverseFlags|=ife.SHOULD_SKIP|ife.SHOULD_STOP}function dBt(){var t;let e=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&e.isMethod()||this.key==="discriminant"&&e.isSwitchStatement())&&(e=e.parentPath);let r;for(;e&&!r;)r=e.scope,e=e.parentPath;this.scope=this.getScope(r),(t=this.scope)==null||t.init()}function lfe(){var t,e;if((t=this.opts)!=null&&t.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let n;for(;r&&!n;){var s;if((s=r.opts)!=null&&s.noScope)return;n=r.scope,r=r.parentPath}this.scope=this.getScope(n),(e=this.scope)==null||e.init()}function hBt(t){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,t&&(this.context=t,this.state=t.state,this.opts=t.opts),lfe.call(this),this}function ABt(){this.removed||(cfe.call(this),pfe.call(this),ufe.call(this))}function cfe(){this.parentPath&&(this.parent=this.parentPath.node)}function ufe(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let t=0;t<this.container.length;t++)if(this.container[t]===this.node){_v.call(this,t);return}}else for(let t of Object.keys(this.container))if(this.container[t]===this.node){_v.call(this,t);return}this.key=null}}function pfe(){if(!this.parent||!this.inList)return;let t=this.parent[this.listKey];this.container!==t&&(this.container=t||null)}function mBt(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&aBt._markRemoved.call(this)}function gBt(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function yBt(t){this.contexts.push(t),this.setContext(t)}function EBt(t,e,r,n){this.listKey=r,this.container=e,this.parentPath=t||this.parentPath,_v.call(this,n)}function _v(t){var e;this.key=t,this.node=this.container[this.key],this.type=(e=this.node)==null?void 0:e.type}function bBt(t=this){if(t.removed)return;let e=this.contexts;for(let r of e)r.maybeQueue(t)}function CBt(){let{context:t,node:e}=this;if(!lBt.isPrivate(e)&&e.computed&&t.maybeQueue(this.get("key")),e.decorators)for(let r of this.get("decorators"))t.maybeQueue(r)}function SBt(){let t=this,e=this.contexts;for(;!e.length&&(t=t.parentPath,!!t);)e=t.contexts;return e}});var xn=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Object.defineProperty(Dl,"Hub",{enumerable:!0,get:function(){return BBt.default}});Object.defineProperty(Dl,"NodePath",{enumerable:!0,get:function(){return xBt.default}});Object.defineProperty(Dl,"Scope",{enumerable:!0,get:function(){return wBt.default}});Dl.visitors=Dl.default=void 0;no();var Zy=Ry();Dl.visitors=Zy;var IBt=ze(),vBt=af(),ffe=jI(),xBt=wl(),wBt=jL(),BBt=d3(),{VISITOR_KEYS:TBt,removeProperties:DBt,traverseFast:Xy}=IBt;function Vo(t,e={},r,n,s,i){if(t){if(!e.noScope&&!r&&t.type!=="Program"&&t.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${t.type} node without passing scope and parentPath.`);if(!s&&i)throw new Error("visitSelf can only be used when providing a NodePath.");TBt[t.type]&&(Zy.explode(e),(0,ffe.traverseNode)(t,e,r,n,s,void 0,i))}}var Wlr=Dl.default=Vo;Vo.visitors=Zy;Vo.verify=Zy.verify;Vo.explode=Zy.explode;Vo.cheap=function(t,e){Xy(t,e)};Vo.node=function(t,e,r,n,s,i){(0,ffe.traverseNode)(t,e,r,n,s,i)};Vo.clearNode=function(t,e){DBt(t,e)};Vo.removeProperties=function(t,e){return Xy(t,Vo.clearNode,e),t};Vo.hasType=function(t,e,r){return r!=null&&r.includes(t.type)?!1:t.type===e?!0:Xy(t,function(n){if(r!=null&&r.includes(n.type))return Xy.skip;if(n.type===e)return Xy.stop})};Vo.cache=vBt});var _l=y((it,gfe)=>{it=gfe.exports=yt;var ar;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?ar=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:ar=function(){};it.SEMVER_SPEC_VERSION="2.0.0";var e0=256,Nv=Number.MAX_SAFE_INTEGER||9007199254740991,E3=16,PBt=e0-6,Jh=it.re=[],or=it.safeRe=[],se=it.src=[],Y=it.tokens={},Afe=0;function xt(t){Y[t]=Afe++}var C3="[a-zA-Z0-9-]",b3=[["\\s",1],["\\d",e0],[C3,PBt]];function r0(t){for(var e=0;e<b3.length;e++){var r=b3[e][0],n=b3[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}xt("NUMERICIDENTIFIER");se[Y.NUMERICIDENTIFIER]="0|[1-9]\\d*";xt("NUMERICIDENTIFIERLOOSE");se[Y.NUMERICIDENTIFIERLOOSE]="\\d+";xt("NONNUMERICIDENTIFIER");se[Y.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+C3+"*";xt("MAINVERSION");se[Y.MAINVERSION]="("+se[Y.NUMERICIDENTIFIER]+")\\.("+se[Y.NUMERICIDENTIFIER]+")\\.("+se[Y.NUMERICIDENTIFIER]+")";xt("MAINVERSIONLOOSE");se[Y.MAINVERSIONLOOSE]="("+se[Y.NUMERICIDENTIFIERLOOSE]+")\\.("+se[Y.NUMERICIDENTIFIERLOOSE]+")\\.("+se[Y.NUMERICIDENTIFIERLOOSE]+")";xt("PRERELEASEIDENTIFIER");se[Y.PRERELEASEIDENTIFIER]="(?:"+se[Y.NUMERICIDENTIFIER]+"|"+se[Y.NONNUMERICIDENTIFIER]+")";xt("PRERELEASEIDENTIFIERLOOSE");se[Y.PRERELEASEIDENTIFIERLOOSE]="(?:"+se[Y.NUMERICIDENTIFIERLOOSE]+"|"+se[Y.NONNUMERICIDENTIFIER]+")";xt("PRERELEASE");se[Y.PRERELEASE]="(?:-("+se[Y.PRERELEASEIDENTIFIER]+"(?:\\."+se[Y.PRERELEASEIDENTIFIER]+")*))";xt("PRERELEASELOOSE");se[Y.PRERELEASELOOSE]="(?:-?("+se[Y.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+se[Y.PRERELEASEIDENTIFIERLOOSE]+")*))";xt("BUILDIDENTIFIER");se[Y.BUILDIDENTIFIER]=C3+"+";xt("BUILD");se[Y.BUILD]="(?:\\+("+se[Y.BUILDIDENTIFIER]+"(?:\\."+se[Y.BUILDIDENTIFIER]+")*))";xt("FULL");xt("FULLPLAIN");se[Y.FULLPLAIN]="v?"+se[Y.MAINVERSION]+se[Y.PRERELEASE]+"?"+se[Y.BUILD]+"?";se[Y.FULL]="^"+se[Y.FULLPLAIN]+"$";xt("LOOSEPLAIN");se[Y.LOOSEPLAIN]="[v=\\s]*"+se[Y.MAINVERSIONLOOSE]+se[Y.PRERELEASELOOSE]+"?"+se[Y.BUILD]+"?";xt("LOOSE");se[Y.LOOSE]="^"+se[Y.LOOSEPLAIN]+"$";xt("GTLT");se[Y.GTLT]="((?:<|>)?=?)";xt("XRANGEIDENTIFIERLOOSE");se[Y.XRANGEIDENTIFIERLOOSE]=se[Y.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";xt("XRANGEIDENTIFIER");se[Y.XRANGEIDENTIFIER]=se[Y.NUMERICIDENTIFIER]+"|x|X|\\*";xt("XRANGEPLAIN");se[Y.XRANGEPLAIN]="[v=\\s]*("+se[Y.XRANGEIDENTIFIER]+")(?:\\.("+se[Y.XRANGEIDENTIFIER]+")(?:\\.("+se[Y.XRANGEIDENTIFIER]+")(?:"+se[Y.PRERELEASE]+")?"+se[Y.BUILD]+"?)?)?";xt("XRANGEPLAINLOOSE");se[Y.XRANGEPLAINLOOSE]="[v=\\s]*("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+se[Y.XRANGEIDENTIFIERLOOSE]+")(?:"+se[Y.PRERELEASELOOSE]+")?"+se[Y.BUILD]+"?)?)?";xt("XRANGE");se[Y.XRANGE]="^"+se[Y.GTLT]+"\\s*"+se[Y.XRANGEPLAIN]+"$";xt("XRANGELOOSE");se[Y.XRANGELOOSE]="^"+se[Y.GTLT]+"\\s*"+se[Y.XRANGEPLAINLOOSE]+"$";xt("COERCE");se[Y.COERCE]="(^|[^\\d])(\\d{1,"+E3+"})(?:\\.(\\d{1,"+E3+"}))?(?:\\.(\\d{1,"+E3+"}))?(?:$|[^\\d])";xt("COERCERTL");Jh[Y.COERCERTL]=new RegExp(se[Y.COERCE],"g");or[Y.COERCERTL]=new RegExp(r0(se[Y.COERCE]),"g");xt("LONETILDE");se[Y.LONETILDE]="(?:~>?)";xt("TILDETRIM");se[Y.TILDETRIM]="(\\s*)"+se[Y.LONETILDE]+"\\s+";Jh[Y.TILDETRIM]=new RegExp(se[Y.TILDETRIM],"g");or[Y.TILDETRIM]=new RegExp(r0(se[Y.TILDETRIM]),"g");var _Bt="$1~";xt("TILDE");se[Y.TILDE]="^"+se[Y.LONETILDE]+se[Y.XRANGEPLAIN]+"$";xt("TILDELOOSE");se[Y.TILDELOOSE]="^"+se[Y.LONETILDE]+se[Y.XRANGEPLAINLOOSE]+"$";xt("LONECARET");se[Y.LONECARET]="(?:\\^)";xt("CARETTRIM");se[Y.CARETTRIM]="(\\s*)"+se[Y.LONECARET]+"\\s+";Jh[Y.CARETTRIM]=new RegExp(se[Y.CARETTRIM],"g");or[Y.CARETTRIM]=new RegExp(r0(se[Y.CARETTRIM]),"g");var NBt="$1^";xt("CARET");se[Y.CARET]="^"+se[Y.LONECARET]+se[Y.XRANGEPLAIN]+"$";xt("CARETLOOSE");se[Y.CARETLOOSE]="^"+se[Y.LONECARET]+se[Y.XRANGEPLAINLOOSE]+"$";xt("COMPARATORLOOSE");se[Y.COMPARATORLOOSE]="^"+se[Y.GTLT]+"\\s*("+se[Y.LOOSEPLAIN]+")$|^$";xt("COMPARATOR");se[Y.COMPARATOR]="^"+se[Y.GTLT]+"\\s*("+se[Y.FULLPLAIN]+")$|^$";xt("COMPARATORTRIM");se[Y.COMPARATORTRIM]="(\\s*)"+se[Y.GTLT]+"\\s*("+se[Y.LOOSEPLAIN]+"|"+se[Y.XRANGEPLAIN]+")";Jh[Y.COMPARATORTRIM]=new RegExp(se[Y.COMPARATORTRIM],"g");or[Y.COMPARATORTRIM]=new RegExp(r0(se[Y.COMPARATORTRIM]),"g");var kBt="$1$2$3";xt("HYPHENRANGE");se[Y.HYPHENRANGE]="^\\s*("+se[Y.XRANGEPLAIN]+")\\s+-\\s+("+se[Y.XRANGEPLAIN]+")\\s*$";xt("HYPHENRANGELOOSE");se[Y.HYPHENRANGELOOSE]="^\\s*("+se[Y.XRANGEPLAINLOOSE]+")\\s+-\\s+("+se[Y.XRANGEPLAINLOOSE]+")\\s*$";xt("STAR");se[Y.STAR]="(<|>)?=?\\s*\\*";for(ja=0;ja<Afe;ja++)ar(ja,se[ja]),Jh[ja]||(Jh[ja]=new RegExp(se[ja]),or[ja]=new RegExp(r0(se[ja])));var ja;it.parse=Ef;function Ef(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof yt)return t;if(typeof t!="string"||t.length>e0)return null;var r=e.loose?or[Y.LOOSE]:or[Y.FULL];if(!r.test(t))return null;try{return new yt(t,e)}catch{return null}}it.valid=QBt;function QBt(t,e){var r=Ef(t,e);return r?r.version:null}it.clean=RBt;function RBt(t,e){var r=Ef(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}it.SemVer=yt;function yt(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof yt){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>e0)throw new TypeError("version is longer than "+e0+" characters");if(!(this instanceof yt))return new yt(t,e);ar("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?or[Y.LOOSE]:or[Y.FULL]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Nv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nv||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var s=+n;if(s>=0&&s<Nv)return s}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}yt.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};yt.prototype.toString=function(){return this.version};yt.prototype.compare=function(t){return ar("SemVer.compare",this.version,this.options,t),t instanceof yt||(t=new yt(t,this.options)),this.compareMain(t)||this.comparePre(t)};yt.prototype.compareMain=function(t){return t instanceof yt||(t=new yt(t,this.options)),yf(this.major,t.major)||yf(this.minor,t.minor)||yf(this.patch,t.patch)};yt.prototype.comparePre=function(t){if(t instanceof yt||(t=new yt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],n=t.prerelease[e];if(ar("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return yf(r,n)}while(++e)};yt.prototype.compareBuild=function(t){t instanceof yt||(t=new yt(t,this.options));var e=0;do{var r=this.build[e],n=t.build[e];if(ar("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return yf(r,n)}while(++e)};yt.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};it.inc=OBt;function OBt(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new yt(t,r).inc(e,n).version}catch{return null}}it.diff=FBt;function FBt(t,e){if(S3(t,e))return null;var r=Ef(t),n=Ef(e),s="";if(r.prerelease.length||n.prerelease.length){s="pre";var i="prerelease"}for(var o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return s+o;return i}it.compareIdentifiers=yf;var dfe=/^[0-9]+$/;function yf(t,e){var r=dfe.test(t),n=dfe.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1}it.rcompareIdentifiers=LBt;function LBt(t,e){return yf(e,t)}it.major=MBt;function MBt(t,e){return new yt(t,e).major}it.minor=UBt;function UBt(t,e){return new yt(t,e).minor}it.patch=jBt;function jBt(t,e){return new yt(t,e).patch}it.compare=Pl;function Pl(t,e,r){return new yt(t,r).compare(new yt(e,r))}it.compareLoose=qBt;function qBt(t,e){return Pl(t,e,!0)}it.compareBuild=HBt;function HBt(t,e,r){var n=new yt(t,r),s=new yt(e,r);return n.compare(s)||n.compareBuild(s)}it.rcompare=$Bt;function $Bt(t,e,r){return Pl(e,t,r)}it.sort=VBt;function VBt(t,e){return t.sort(function(r,n){return it.compareBuild(r,n,e)})}it.rsort=GBt;function GBt(t,e){return t.sort(function(r,n){return it.compareBuild(n,r,e)})}it.gt=t0;function t0(t,e,r){return Pl(t,e,r)>0}it.lt=kv;function kv(t,e,r){return Pl(t,e,r)<0}it.eq=S3;function S3(t,e,r){return Pl(t,e,r)===0}it.neq=mfe;function mfe(t,e,r){return Pl(t,e,r)!==0}it.gte=I3;function I3(t,e,r){return Pl(t,e,r)>=0}it.lte=v3;function v3(t,e,r){return Pl(t,e,r)<=0}it.cmp=Qv;function Qv(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return S3(t,r,n);case"!=":return mfe(t,r,n);case">":return t0(t,r,n);case">=":return I3(t,r,n);case"<":return kv(t,r,n);case"<=":return v3(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}it.Comparator=co;function co(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof co){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof co))return new co(t,e);t=t.trim().split(/\s+/).join(" "),ar("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===Kh?this.value="":this.value=this.operator+this.semver.version,ar("comp",this)}var Kh={};co.prototype.parse=function(t){var e=this.options.loose?or[Y.COMPARATORLOOSE]:or[Y.COMPARATOR],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new yt(r[2],this.options.loose):this.semver=Kh};co.prototype.toString=function(){return this.value};co.prototype.test=function(t){if(ar("Comparator.test",t,this.options.loose),this.semver===Kh||t===Kh)return!0;if(typeof t=="string")try{t=new yt(t,this.options)}catch{return!1}return Qv(t,this.operator,this.semver,this.options)};co.prototype.intersects=function(t,e){if(!(t instanceof co))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return this.value===""?!0:(r=new Wr(t.value,e),Rv(this.value,r,e));if(t.operator==="")return t.value===""?!0:(r=new Wr(this.value,e),Rv(t.semver,r,e));var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),i=this.semver.version===t.semver.version,o=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),a=Qv(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),l=Qv(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||s||i&&o||a||l};it.Range=Wr;function Wr(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Wr)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new Wr(t.raw,e);if(t instanceof co)return new Wr(t.value,e);if(!(this instanceof Wr))return new Wr(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}Wr.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};Wr.prototype.toString=function(){return this.range};Wr.prototype.parseRange=function(t){var e=this.options.loose,r=e?or[Y.HYPHENRANGELOOSE]:or[Y.HYPHENRANGE];t=t.replace(r,rTt),ar("hyphen replace",t),t=t.replace(or[Y.COMPARATORTRIM],kBt),ar("comparator trim",t,or[Y.COMPARATORTRIM]),t=t.replace(or[Y.TILDETRIM],_Bt),t=t.replace(or[Y.CARETTRIM],NBt),t=t.split(/\s+/).join(" ");var n=e?or[Y.COMPARATORLOOSE]:or[Y.COMPARATOR],s=t.split(" ").map(function(i){return WBt(i,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(i){return!!i.match(n)})),s=s.map(function(i){return new co(i,this.options)},this),s};Wr.prototype.intersects=function(t,e){if(!(t instanceof Wr))throw new TypeError("a Range is required");return this.set.some(function(r){return hfe(r,e)&&t.set.some(function(n){return hfe(n,e)&&r.every(function(s){return n.every(function(i){return s.intersects(i,e)})})})})};function hfe(t,e){for(var r=!0,n=t.slice(),s=n.pop();r&&n.length;)r=n.every(function(i){return s.intersects(i,e)}),s=n.pop();return r}it.toComparators=YBt;function YBt(t,e){return new Wr(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}function WBt(t,e){return ar("comp",t,e),t=zBt(t,e),ar("caret",t),t=JBt(t,e),ar("tildes",t),t=ZBt(t,e),ar("xrange",t),t=tTt(t,e),ar("stars",t),t}function Us(t){return!t||t.toLowerCase()==="x"||t==="*"}function JBt(t,e){return t.trim().split(/\s+/).map(function(r){return KBt(r,e)}).join(" ")}function KBt(t,e){var r=e.loose?or[Y.TILDELOOSE]:or[Y.TILDE];return t.replace(r,function(n,s,i,o,a){ar("tilde",t,n,s,i,o,a);var l;return Us(s)?l="":Us(i)?l=">="+s+".0.0 <"+(+s+1)+".0.0":Us(o)?l=">="+s+"."+i+".0 <"+s+"."+(+i+1)+".0":a?(ar("replaceTilde pr",a),l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+(+i+1)+".0"):l=">="+s+"."+i+"."+o+" <"+s+"."+(+i+1)+".0",ar("tilde return",l),l})}function zBt(t,e){return t.trim().split(/\s+/).map(function(r){return XBt(r,e)}).join(" ")}function XBt(t,e){ar("caret",t,e);var r=e.loose?or[Y.CARETLOOSE]:or[Y.CARET];return t.replace(r,function(n,s,i,o,a){ar("caret",t,n,s,i,o,a);var l;return Us(s)?l="":Us(i)?l=">="+s+".0.0 <"+(+s+1)+".0.0":Us(o)?s==="0"?l=">="+s+"."+i+".0 <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+".0 <"+(+s+1)+".0.0":a?(ar("replaceCaret pr",a),s==="0"?i==="0"?l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+i+"."+(+o+1):l=">="+s+"."+i+"."+o+"-"+a+" <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+"."+o+"-"+a+" <"+(+s+1)+".0.0"):(ar("no pr"),s==="0"?i==="0"?l=">="+s+"."+i+"."+o+" <"+s+"."+i+"."+(+o+1):l=">="+s+"."+i+"."+o+" <"+s+"."+(+i+1)+".0":l=">="+s+"."+i+"."+o+" <"+(+s+1)+".0.0"),ar("caret return",l),l})}function ZBt(t,e){return ar("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return eTt(r,e)}).join(" ")}function eTt(t,e){t=t.trim();var r=e.loose?or[Y.XRANGELOOSE]:or[Y.XRANGE];return t.replace(r,function(n,s,i,o,a,l){ar("xRange",t,n,s,i,o,a,l);var c=Us(i),u=c||Us(o),p=u||Us(a),f=p;return s==="="&&f&&(s=""),l=e.includePrerelease?"-0":"",c?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&f?(u&&(o=0),a=0,s===">"?(s=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):s==="<="&&(s="<",u?i=+i+1:o=+o+1),n=s+i+"."+o+"."+a+l):u?n=">="+i+".0.0"+l+" <"+(+i+1)+".0.0"+l:p&&(n=">="+i+"."+o+".0"+l+" <"+i+"."+(+o+1)+".0"+l),ar("xRange return",n),n})}function tTt(t,e){return ar("replaceStars",t,e),t.trim().replace(or[Y.STAR],"")}function rTt(t,e,r,n,s,i,o,a,l,c,u,p,f){return Us(r)?e="":Us(n)?e=">="+r+".0.0":Us(s)?e=">="+r+"."+n+".0":e=">="+e,Us(l)?a="":Us(c)?a="<"+(+l+1)+".0.0":Us(u)?a="<"+l+"."+(+c+1)+".0":p?a="<="+l+"."+c+"."+u+"-"+p:a="<="+a,(e+" "+a).trim()}Wr.prototype.test=function(t){if(!t)return!1;if(typeof t=="string")try{t=new yt(t,this.options)}catch{return!1}for(var e=0;e<this.set.length;e++)if(nTt(this.set[e],t,this.options))return!0;return!1};function nTt(t,e,r){for(var n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(n=0;n<t.length;n++)if(ar(t[n].semver),t[n].semver!==Kh&&t[n].semver.prerelease.length>0){var s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}it.satisfies=Rv;function Rv(t,e,r){try{e=new Wr(e,r)}catch{return!1}return e.test(t)}it.maxSatisfying=sTt;function sTt(t,e,r){var n=null,s=null;try{var i=new Wr(e,r)}catch{return null}return t.forEach(function(o){i.test(o)&&(!n||s.compare(o)===-1)&&(n=o,s=new yt(n,r))}),n}it.minSatisfying=iTt;function iTt(t,e,r){var n=null,s=null;try{var i=new Wr(e,r)}catch{return null}return t.forEach(function(o){i.test(o)&&(!n||s.compare(o)===1)&&(n=o,s=new yt(n,r))}),n}it.minVersion=oTt;function oTt(t,e){t=new Wr(t,e);var r=new yt("0.0.0");if(t.test(r)||(r=new yt("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n<t.set.length;++n){var s=t.set[n];s.forEach(function(i){var o=new yt(i.semver.version);switch(i.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!r||t0(r,o))&&(r=o);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+i.operator)}})}return r&&t.test(r)?r:null}it.validRange=aTt;function aTt(t,e){try{return new Wr(t,e).range||"*"}catch{return null}}it.ltr=lTt;function lTt(t,e,r){return x3(t,e,"<",r)}it.gtr=cTt;function cTt(t,e,r){return x3(t,e,">",r)}it.outside=x3;function x3(t,e,r,n){t=new yt(t,n),e=new Wr(e,n);var s,i,o,a,l;switch(r){case">":s=t0,i=v3,o=kv,a=">",l=">=";break;case"<":s=kv,i=I3,o=t0,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Rv(t,e,n))return!1;for(var c=0;c<e.set.length;++c){var u=e.set[c],p=null,f=null;if(u.forEach(function(d){d.semver===Kh&&(d=new co(">=0.0.0")),p=p||d,f=f||d,s(d.semver,p.semver,n)?p=d:o(d.semver,f.semver,n)&&(f=d)}),p.operator===a||p.operator===l||(!f.operator||f.operator===a)&&i(t,f.semver))return!1;if(f.operator===l&&o(t,f.semver))return!1}return!0}it.prerelease=uTt;function uTt(t,e){var r=Ef(t,e);return r&&r.prerelease.length?r.prerelease:null}it.intersects=pTt;function pTt(t,e,r){return t=new Wr(t,r),e=new Wr(e,r),t.intersects(e)}it.coerce=fTt;function fTt(t,e){if(t instanceof yt)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};var r=null;if(!e.rtl)r=t.match(or[Y.COERCE]);else{for(var n;(n=or[Y.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),or[Y.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;or[Y.COERCERTL].lastIndex=-1}return r===null?null:Ef(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),e)}});var bfe=y(Fv=>{"use strict";Object.defineProperty(Fv,"__esModule",{value:!0});Fv.default=void 0;var Go=require("assert"),dTt=ze(),{callExpression:w3,cloneNode:Ov,expressionStatement:yfe,identifier:n0,importDeclaration:hTt,importDefaultSpecifier:ATt,importNamespaceSpecifier:mTt,importSpecifier:gTt,memberExpression:B3,stringLiteral:Efe,variableDeclaration:yTt,variableDeclarator:ETt}=dTt,T3=class{constructor(e,r,n){this._statements=[],this._resultName=null,this._importedSource=void 0,this._scope=r,this._hub=n,this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){return this._statements.push(hTt([],Efe(this._importedSource))),this}require(){return this._statements.push(yfe(w3(n0("require"),[Efe(this._importedSource)]))),this}namespace(e="namespace"){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return Go(n.type==="ImportDeclaration"),Go(n.specifiers.length===0),n.specifiers=[mTt(r)],this._resultName=Ov(r),this}default(e){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return Go(n.type==="ImportDeclaration"),Go(n.specifiers.length===0),n.specifiers=[ATt(r)],this._resultName=Ov(r),this}named(e,r){if(r==="default")return this.default(e);let n=this._scope.generateUidIdentifier(e),s=this._statements[this._statements.length-1];return Go(s.type==="ImportDeclaration"),Go(s.specifiers.length===0),s.specifiers=[gTt(n,n0(r))],this._resultName=Ov(n),this}var(e){let r=this._scope.generateUidIdentifier(e),n=this._statements[this._statements.length-1];return n.type!=="ExpressionStatement"&&(Go(this._resultName),n=yfe(this._resultName),this._statements.push(n)),this._statements[this._statements.length-1]=yTt("var",[ETt(r,n.expression)]),this._resultName=Ov(r),this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){let r=this._statements[this._statements.length-1];return r.type==="ExpressionStatement"?r.expression=w3(e,[r.expression]):r.type==="VariableDeclaration"?(Go(r.declarations.length===1),r.declarations[0].init=w3(e,[r.declarations[0].init])):Go.fail("Unexpected type."),this}prop(e){let r=this._statements[this._statements.length-1];return r.type==="ExpressionStatement"?r.expression=B3(r.expression,n0(e)):r.type==="VariableDeclaration"?(Go(r.declarations.length===1),r.declarations[0].init=B3(r.declarations[0].init,n0(e))):Go.fail("Unexpected type:"+r.type),this}read(e){this._resultName=B3(this._resultName,n0(e))}};Fv.default=T3});var P3=y(D3=>{"use strict";Object.defineProperty(D3,"__esModule",{value:!0});D3.default=bTt;function bTt(t){return t.node.sourceType==="module"}});var wfe=y(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});Mv.default=void 0;var Cfe=require("assert"),CTt=ze(),STt=bfe(),ITt=P3(),{identifier:vTt,importSpecifier:xTt,numericLiteral:wTt,sequenceExpression:BTt,isImportDeclaration:Sfe}=CTt,_3=class{constructor(e,r,n){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:!1,ensureNoContext:!1,importPosition:"before"};let s=e.find(i=>i.isProgram());this._programPath=s,this._programScope=s.scope,this._hub=s.hub,this._defaultOpts=this._applyDefaults(r,n,!0)}addDefault(e,r){return this.addNamed("default",e,r)}addNamed(e,r,n){return Cfe(typeof e=="string"),this._generateImport(this._applyDefaults(r,n),e)}addNamespace(e,r){return this._generateImport(this._applyDefaults(e,r),null)}addSideEffect(e,r){return this._generateImport(this._applyDefaults(e,r),void 0)}_applyDefaults(e,r,n=!1){let s;return typeof e=="string"?s=Object.assign({},this._defaultOpts,{importedSource:e},r):(Cfe(!r,"Unexpected secondary arguments."),s=Object.assign({},this._defaultOpts,e)),!n&&r&&(r.nameHint!==void 0&&(s.nameHint=r.nameHint),r.blockHoist!==void 0&&(s.blockHoist=r.blockHoist)),s}_generateImport(e,r){let n=r==="default",s=!!r&&!n,i=r===null,{importedSource:o,importedType:a,importedInterop:l,importingInterop:c,ensureLiveReference:u,ensureNoContext:p,nameHint:f,importPosition:d,blockHoist:A}=e,h=f||r,m=(0,ITt.default)(this._programPath),g=m&&c==="node",E=m&&c==="babel";if(d==="after"&&!m)throw new Error('"importPosition": "after" is only supported in modules');let b=new STt.default(o,this._programScope,this._hub);if(a==="es6"){if(!g&&!E)throw new Error("Cannot import an ES6 module from CommonJS");b.import(),i?b.namespace(f||o):(n||s)&&b.named(h,r)}else{if(a!=="commonjs")throw new Error(`Unexpected interopType "${a}"`);if(l==="babel")if(g){h=h!=="default"?h:o;let L=`${o}$es6Default`;b.import(),i?b.default(L).var(h||o).wildcardInterop():n?u?b.default(L).var(h||o).defaultInterop().read("default"):b.default(L).var(h).defaultInterop().prop(r):s&&b.default(L).read(r)}else E?(b.import(),i?b.namespace(h||o):(n||s)&&b.named(h,r)):(b.require(),i?b.var(h||o).wildcardInterop():(n||s)&&u?n?(h=h!=="default"?h:o,b.var(h).read(r),b.defaultInterop()):b.var(o).read(r):n?b.var(h).defaultInterop().prop(r):s&&b.var(h).prop(r));else if(l==="compiled")g?(b.import(),i?b.default(h||o):(n||s)&&b.default(o).read(h)):E?(b.import(),i?b.namespace(h||o):(n||s)&&b.named(h,r)):(b.require(),i?b.var(h||o):(n||s)&&(u?b.var(o).read(h):b.prop(r).var(h)));else if(l==="uncompiled"){if(n&&u)throw new Error("No live reference for commonjs default");g?(b.import(),i?b.default(h||o):n?b.default(h):s&&b.default(o).read(h)):E?(b.import(),i?b.default(h||o):n?b.default(h):s&&b.named(h,r)):(b.require(),i?b.var(h||o):n?b.var(h):s&&(u?b.var(o).read(h):b.var(h).prop(r)))}else throw new Error(`Unknown importedInterop "${l}".`)}let{statements:I,resultName:w}=b.done();return this._insertStatements(I,d,A),(n||s)&&p&&w.type!=="Identifier"?BTt([wTt(0),w]):w}_insertStatements(e,r="before",n=3){if(r==="after"){if(this._insertStatementsAfter(e))return}else if(this._insertStatementsBefore(e,n))return;this._programPath.unshiftContainer("body",e)}_insertStatementsBefore(e,r){if(e.length===1&&Sfe(e[0])&&Lv(e[0])){let s=this._programPath.get("body").find(i=>i.isImportDeclaration()&&Lv(i.node));if(s?.node.source.value===e[0].source.value&&xfe(s.node,e[0]))return!0}e.forEach(s=>{s._blockHoist=r});let n=this._programPath.get("body").find(s=>{let i=s.node._blockHoist;return Number.isFinite(i)&&i<4});return n?(n.insertBefore(e),!0):!1}_insertStatementsAfter(e){let r=new Set(e),n=new Map;for(let i of e)if(Sfe(i)&&Lv(i)){let o=i.source.value;n.has(o)||n.set(o,[]),n.get(o).push(i)}let s=null;for(let i of this._programPath.get("body"))if(i.isImportDeclaration()&&Lv(i.node)){s=i;let o=i.node.source.value,a=n.get(o);if(!a)continue;for(let l of a)r.has(l)&&xfe(i.node,l)&&r.delete(l)}return r.size===0?!0:(s&&s.insertAfter(Array.from(r)),!!s)}};Mv.default=_3;function Lv(t){return t.importKind!=="type"&&t.importKind!=="typeof"}function Ife(t){return t.specifiers.length===1&&t.specifiers[0].type==="ImportNamespaceSpecifier"||t.specifiers.length===2&&t.specifiers[1].type==="ImportNamespaceSpecifier"}function vfe(t){return t.specifiers.length>0&&t.specifiers[0].type==="ImportDefaultSpecifier"}function xfe(t,e){return t.specifiers.length?e.specifiers.length?Ife(t)||Ife(e)?!1:(vfe(e)&&(vfe(t)?e.specifiers[0]=xTt(e.specifiers[0].local,vTt("default")):t.specifiers.unshift(e.specifiers.shift())),t.specifiers.push(...e.specifiers),!0):!0:(t.specifiers=e.specifiers,!0)}});var N3=y(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});Object.defineProperty(su,"ImportInjector",{enumerable:!0,get:function(){return s0.default}});su.addDefault=DTt;su.addNamed=PTt;su.addNamespace=_Tt;su.addSideEffect=NTt;Object.defineProperty(su,"isModule",{enumerable:!0,get:function(){return TTt.default}});var s0=wfe(),TTt=P3();function DTt(t,e,r){return new s0.default(t).addDefault(e,r)}function PTt(t,e,r,n){return new s0.default(t).addNamed(e,r,n)}function _Tt(t,e,r){return new s0.default(t).addNamespace(e,r)}function NTt(t,e,r){return new s0.default(t).addSideEffect(e,r)}});var Dfe=y(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0});k3.default=kTt;var Bfe=wn(),Tfe=xn(),Uv;function kTt(t){Uv||(Uv=Tfe.visitors.environmentVisitor({ThisExpression(e){e.replaceWith(Bfe.types.unaryExpression("void",Bfe.types.numericLiteral(0),!0))}}),Uv.noScope=!0),(0,Tfe.default)(t.node,Uv)}});var Pfe=y(Q3=>{"use strict";Object.defineProperty(Q3,"__esModule",{value:!0});Q3.default=RTt;var Xe=wn();function QTt(t){do switch(t.parent.type){case"TSTypeAnnotation":case"TSTypeAliasDeclaration":case"TSTypeReference":case"TypeAnnotation":case"TypeAlias":return!0;case"ExportSpecifier":return t.parentPath.parent.exportKind==="type";default:if(t.parentPath.isStatement()||t.parentPath.isExpression())return!1}while(t=t.parentPath)}function RTt(t,e,r){let n=new Map,s=new Map,i=l=>{t.requeue(l)};for(let[l,c]of e.source){for(let[u,p]of c.imports)n.set(u,[l,p,null]);for(let u of c.importsNamespace)n.set(u,[l,null,u])}for(let[l,c]of e.local){let u=s.get(l);u||(u=[],s.set(l,u)),u.push(...c.names)}let o={metadata:e,requeueInParent:i,scope:t.scope,exported:s};t.traverse(OTt,o);let a={seen:new WeakSet,metadata:e,requeueInParent:i,scope:t.scope,imported:n,exported:s,buildImportReference([l,c,u],p){let f=e.source.get(l);if(f.referenced=!0,u){if(f.wrap){var d;p=(d=r(p,f.wrap))!=null?d:p}return p}let A=Xe.types.identifier(f.name);if(f.wrap){var h;A=(h=r(A,f.wrap))!=null?h:A}if(c==="default"&&f.interop==="node-default")return A;let m=e.stringSpecifiers.has(c);return Xe.types.memberExpression(A,m?Xe.types.stringLiteral(c):Xe.types.identifier(c),m)}};t.traverse(FTt,a)}var OTt={Scope(t){t.skip()},ClassDeclaration(t){let{requeueInParent:e,exported:r,metadata:n}=this,{id:s}=t.node;if(!s)throw new Error("Expected class to have a name");let i=s.name,o=r.get(i)||[];if(o.length>0){let a=Xe.types.expressionStatement(bf(n,o,Xe.types.identifier(i),t.scope));a._blockHoist=t.node._blockHoist,e(t.insertAfter(a)[0])}},VariableDeclaration(t){let{requeueInParent:e,exported:r,metadata:n}=this,s=t.node.kind==="var";for(let i of t.get("declarations")){let{id:o}=i.node,{init:a}=i.node;if(Xe.types.isIdentifier(o)&&r.has(o.name)&&!Xe.types.isArrowFunctionExpression(a)&&(!Xe.types.isFunctionExpression(a)||a.id)&&(!Xe.types.isClassExpression(a)||a.id)){if(!a){if(s)continue;a=t.scope.buildUndefinedNode()}i.node.init=bf(n,r.get(o.name),a,t.scope),e(i.get("init"))}else for(let l of Object.keys(i.getOuterBindingIdentifiers()))if(r.has(l)){let c=Xe.types.expressionStatement(bf(n,r.get(l),Xe.types.identifier(l),t.scope));c._blockHoist=t.node._blockHoist,e(t.insertAfter(c)[0])}}}},bf=(t,e,r,n)=>{let s=t.exportName;for(let i=n;i!=null;i=i.parent)i.hasOwnBinding(s)&&i.rename(s);return(e||[]).reduce((i,o)=>{let{stringSpecifiers:a}=t,l=a.has(o);return Xe.types.assignmentExpression("=",Xe.types.memberExpression(Xe.types.identifier(s),l?Xe.types.stringLiteral(o):Xe.types.identifier(o),l),i)},r)},jv=t=>Xe.template.expression.ast`
|
|
217
217
|
(function() {
|
|
218
218
|
throw new Error('"' + '${t}' + '" is read-only.');
|
|
219
219
|
})()
|
|
@@ -297,14 +297,14 @@ ${" ".repeat(c)}`)}}}else n?o=`/*${e.value}*/`:o=`//${e.value}`;this.source("sta
|
|
|
297
297
|
});
|
|
298
298
|
`(t);function x2t(t){let e=is("babelHelpers"),r=[],n=S2t(null,[is("global")],m2t(r)),s=Jv([$3(g2t(n,[E2t(A2t("===",I2t("typeof",is("global")),Wfe("undefined")),is("self"),is("global"))]))]);return r.push(Y3("var",[W3(e,Wv("=",V3(is("global"),e),G3([])))])),Kv(r,e,t),s}function w2t(t){let e=[],r=Kv(e,null,t);return e.unshift(b2t(null,Object.keys(r).map(n=>C2t(y2t(r[n]),is(n))))),Jv(e,[],"module")}function B2t(t){let e=is("babelHelpers"),r=[];return r.push(Y3("var",[W3(e,is("global"))])),Kv(r,e,t),Jv([v2t({FACTORY_PARAMETERS:is("global"),BROWSER_ARGUMENTS:Wv("=",V3(is("root"),e),G3([])),COMMON_ARGUMENTS:is("exports"),AMD_ARGUMENTS:h2t([Wfe("exports")]),FACTORY_BODY:r,UMD_ROOT:is("this")})])}function T2t(t){let e=is("babelHelpers"),r=[];r.push(Y3("var",[W3(e,G3([]))]));let n=Jv(r);return Kv(r,e,t),r.push($3(e)),n}function Kv(t,e,r){let n=i=>e?V3(e,is(i)):is(`_${i}`),s={};return H3().list.forEach(function(i){if(r&&!r.includes(i))return;let o=s[i]=n(i),{nodes:a}=H3().get(i,n,e?null:`_${i}`,[],e?(l,c,u)=>{u(p=>Wv("=",o,p)),l.body.push($3(Wv("=",o,is(c))))}:null);t.push(...a)}),s}function D2t(t,e="global"){let r,n={global:x2t,module:w2t,umd:B2t,var:T2t}[e];if(n)r=n(t);else throw new Error(`Unsupported output type ${e}`);return(0,Vfe().default)(r).code}});var Di=y((ucr,nde)=>{"use strict";var zfe=Symbol.for("gensync:v1:start"),Xfe=Symbol.for("gensync:v1:suspend"),P2t="GENSYNC_EXPECTED_START",_2t="GENSYNC_EXPECTED_SUSPEND",Zfe="GENSYNC_OPTIONS_ERROR",Kfe="GENSYNC_RACE_NONEMPTY",N2t="GENSYNC_ERRBACK_NO_CALLBACK";nde.exports=Object.assign(function(e){let r=e;return typeof e!="function"?r=Q2t(e):r=R2t(e),Object.assign(r,k2t(r))},{all:K3({name:"all",arity:1,sync:function(t){return Array.from(t[0]).map(r=>z3(r))},async:function(t,e,r){let n=Array.from(t[0]);if(n.length===0){Promise.resolve().then(()=>e([]));return}let s=0,i=n.map(()=>{});n.forEach((o,a)=>{zv(o,l=>{i[a]=l,s+=1,s===i.length&&e(i)},r)})}}),race:K3({name:"race",arity:1,sync:function(t){let e=Array.from(t[0]);if(e.length===0)throw Sf("Must race at least 1 item",Kfe);return z3(e[0])},async:function(t,e,r){let n=Array.from(t[0]);if(n.length===0)throw Sf("Must race at least 1 item",Kfe);for(let s of n)zv(s,e,r)}})});function k2t(t){return{sync:function(...r){return z3(t.apply(this,r))},async:function(...r){return new Promise((n,s)=>{zv(t.apply(this,r),n,s)})},errback:function(...r){let n=r.pop();if(typeof n!="function")throw Sf("Asynchronous function called without callback",N2t);let s;try{s=t.apply(this,r)}catch(i){n(i);return}zv(s,i=>n(void 0,i),i=>n(i))}}}function a0(t,e,r,n){if(typeof r===t||n&&typeof r>"u")return;let s;throw n?s=`Expected opts.${e} to be either a ${t}, or undefined.`:s=`Expected opts.${e} to be a ${t}.`,Sf(s,Zfe)}function Sf(t,e){return Object.assign(new Error(t),{code:e})}function Q2t({name:t,arity:e,sync:r,async:n,errback:s}){if(a0("string","name",t,!0),a0("number","arity",e,!0),a0("function","sync",r),a0("function","async",n,!0),a0("function","errback",s,!0),n&&s)throw Sf("Expected one of either opts.async or opts.errback, but got _both_.",Zfe);if(typeof t!="string"){let i;s&&s.name&&s.name!=="errback"&&(i=s.name),n&&n.name&&n.name!=="async"&&(i=n.name.replace(/Async$/,"")),r&&r.name&&r.name!=="sync"&&(i=r.name.replace(/Sync$/,"")),typeof i=="string"&&(t=i)}return typeof e!="number"&&(e=r.length),K3({name:t,arity:e,sync:function(i){return r.apply(this,i)},async:function(i,o,a){n?n.apply(this,i).then(o,a):s?s.call(this,...i,(l,c)=>{l==null?o(c):a(l)}):o(r.apply(this,i))}})}function R2t(t){return rde(t.name,t.length,function(...e){return t.apply(this,e)})}function K3({name:t,arity:e,sync:r,async:n}){return rde(t,e,function*(...s){let i=yield zfe;if(!i)return r.call(this,s);let o;try{n.call(this,s,a=>{o||(o={value:a},i())},a=>{o||(o={err:a},i())})}catch(a){o={err:a},i()}if(yield Xfe,o.hasOwnProperty("err"))throw o.err;return o.value})}function z3(t){let e;for(;!({value:e}=t.next()).done;)ede(e,t);return e}function zv(t,e,r){(function n(){try{let s;for(;!({value:s}=t.next()).done;){ede(s,t);let i=!0,o=!1,a=t.next(()=>{i?o=!0:n()});if(i=!1,O2t(a,t),!o)return}return e(s)}catch(s){return r(s)}})()}function ede(t,e){t!==zfe&&tde(e,Sf(`Got unexpected yielded value in gensync generator: ${JSON.stringify(t)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,P2t))}function O2t({value:t,done:e},r){!e&&t===Xfe||tde(r,Sf(e?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(t)}. If you get this, it is probably a gensync bug.`,_2t))}function tde(t,e){throw t.throw&&t.throw(e),e}function rde(t,e,r){if(typeof t=="string"){let n=Object.getOwnPropertyDescriptor(r,"name");(!n||n.configurable)&&Object.defineProperty(r,"name",Object.assign(n||{},{configurable:!0,value:t}))}if(typeof e=="number"){let n=Object.getOwnPropertyDescriptor(r,"length");(!n||n.configurable)&&Object.defineProperty(r,"length",Object.assign(n||{},{configurable:!0,value:e}))}return r}});var ou=y(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.forwardAsync=M2t;Yo.isAsync=void 0;Yo.isThenable=ade;Yo.maybeAsync=F2t;Yo.waitFor=Yo.onFirstPause=void 0;function iu(){let t=Di();return iu=function(){return t},t}function sde(t,e,r,n,s,i,o){try{var a=t[i](o),l=a.value}catch(c){return void r(c)}a.done?e(l):Promise.resolve(l).then(n,s)}function ode(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function o(l){sde(i,n,s,o,a,"next",l)}function a(l){sde(i,n,s,o,a,"throw",l)}o(void 0)})}}var ide=iu()(function*(t){return yield*t}),pcr=Yo.isAsync=iu()({sync:()=>!1,errback:t=>t(null,!0)});function F2t(t,e){return iu()({sync(...r){let n=t.apply(this,r);if(ade(n))throw new Error(e);return n},async(...r){return Promise.resolve(t.apply(this,r))}})}var L2t=iu()({sync:t=>t("sync"),async:function(){var t=ode(function*(e){return e("async")});return function(r){return t.apply(this,arguments)}}()});function M2t(t,e){let r=iu()(t);return L2t(n=>{let s=r[n];return e(s)})}var fcr=Yo.onFirstPause=iu()({name:"onFirstPause",arity:2,sync:function(t){return ide.sync(t)},errback:function(t,e,r){let n=!1;ide.errback(t,(s,i)=>{n=!0,r(s,i)}),n||e()}}),dcr=Yo.waitFor=iu()({sync:t=>t,async:function(){var t=ode(function*(e){return e});return function(r){return t.apply(this,arguments)}}()});function ade(t){return!!t&&(typeof t=="object"||typeof t=="function")&&!!t.then&&typeof t.then=="function"}});var Zv=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});Xv.isIterableIterator=q2t;Xv.mergeOptions=U2t;function U2t(t,e){for(let r of Object.keys(e))if((r==="parserOpts"||r==="generatorOpts"||r==="assumptions")&&e[r]){let n=e[r],s=t[r]||(t[r]={});j2t(s,n)}else{let n=e[r];n!==void 0&&(t[r]=n)}}function j2t(t,e){for(let r of Object.keys(e)){let n=e[r];n!==void 0&&(t[r]=n)}}function q2t(t){return!!t&&typeof t.next=="function"&&typeof t[Symbol.iterator]=="function"}});var vf=y(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.assertSimpleType=ex;If.makeStrongCache=fde;If.makeStrongCacheSync=G2t;If.makeWeakCache=pde;If.makeWeakCacheSync=V2t;function cde(){let t=Di();return cde=function(){return t},t}var Zh=ou(),H2t=Zv(),ude=t=>cde()(t).sync;function*$2t(){return!0}function pde(t){return dde(WeakMap,t)}function V2t(t){return ude(pde(t))}function fde(t){return dde(Map,t)}function G2t(t){return ude(fde(t))}function dde(t,e){let r=new t,n=new t,s=new t;return function*(o,a){let l=yield*(0,Zh.isAsync)(),c=l?n:r,u=yield*Y2t(l,c,s,o,a);if(u.valid)return u.value;let p=new X3(a),f=e(o,p),d,A;return(0,H2t.isIterableIterator)(f)?A=yield*(0,Zh.onFirstPause)(f,()=>{d=W2t(p,s,o)}):A=f,hde(c,p,o,A),d&&(s.delete(o),d.release(A)),A}}function*lde(t,e,r){let n=t.get(e);if(n){for(let{value:s,valid:i}of n)if(yield*i(r))return{valid:!0,value:s}}return{valid:!1,value:null}}function*Y2t(t,e,r,n,s){let i=yield*lde(e,n,s);if(i.valid)return i;if(t){let o=yield*lde(r,n,s);if(o.valid)return{valid:!0,value:yield*(0,Zh.waitFor)(o.value.promise)}}return{valid:!1,value:null}}function W2t(t,e,r){let n=new Z3;return hde(e,t,r,n),n}function hde(t,e,r,n){e.configured()||e.forever();let s=t.get(r);switch(e.deactivate(),e.mode()){case"forever":s=[{value:n,valid:$2t}],t.set(r,s);break;case"invalidate":s=[{value:n,valid:e.validator()}],t.set(r,s);break;case"valid":s?s.push({value:n,valid:e.validator()}):(s=[{value:n,valid:e.validator()}],t.set(r,s))}}var X3=class{constructor(e){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=void 0,this._data=e}simple(){return J2t(this)}mode(){return this._never?"never":this._forever?"forever":this._invalidate?"invalidate":"valid"}forever(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never)throw new Error("Caching has already been configured with .never()");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._forever)throw new Error("Caching has already been configured with .forever()");this._never=!0,this._configured=!0}using(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._configured=!0;let r=e(this._data),n=(0,Zh.maybeAsync)(e,"You appear to be using an async cache handler, but Babel has been called synchronously");return(0,Zh.isThenable)(r)?r.then(s=>(this._pairs.push([s,n]),s)):(this._pairs.push([r,n]),r)}invalidate(e){return this._invalidate=!0,this.using(e)}validator(){let e=this._pairs;return function*(r){for(let[n,s]of e)if(n!==(yield*s(r)))return!1;return!0}}deactivate(){this._active=!1}configured(){return this._configured}};function J2t(t){function e(r){if(typeof r=="boolean"){r?t.forever():t.never();return}return t.using(()=>ex(r()))}return e.forever=()=>t.forever(),e.never=()=>t.never(),e.using=r=>t.using(()=>ex(r())),e.invalidate=r=>t.invalidate(()=>ex(r())),e}function ex(t){if((0,Zh.isThenable)(t))throw new Error("You appear to be using an async cache handler, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously handle your caching logic.");if(t!=null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number")throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");return t}var Z3=class{constructor(){this.released=!1,this.promise=void 0,this._resolve=void 0,this.promise=new Promise(e=>{this._resolve=e})}release(e){this.released=!0,this._resolve(e)}}});var tx=y(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.stat=eA.readFile=void 0;function l0(){let t=require("fs");return l0=function(){return t},t}function e4(){let t=Di();return e4=function(){return t},t}var gcr=eA.readFile=e4()({sync:l0().readFileSync,errback:l0().readFile}),ycr=eA.stat=e4()({sync:l0().statSync,errback:l0().stat})});var n4=y(r4=>{"use strict";Object.defineProperty(r4,"__esModule",{value:!0});r4.makeStaticFileCache=X2t;var K2t=vf(),z2t=tx();function t4(){let t=require("fs");return t4=function(){return t},t}function X2t(t){return(0,K2t.makeStrongCache)(function*(e,r){return r.invalidate(()=>Z2t(e))===null?null:t(e,yield*z2t.readFile(e,"utf8"))})}function Z2t(t){if(!t4().existsSync(t))return null;try{return+t4().statSync(t).mtime}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTDIR")throw e}return null}});var Nl=y(tA=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.beginHiddenCallStack=nDt;tA.endHiddenCallStack=sDt;tA.expectedError=rDt;tA.injectVirtualStackFrame=tDt;var Ade,mde=Function.call.bind(Error.prototype.toString),nx=!!Error.captureStackTrace&&((Ade=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit"))==null?void 0:Ade.writable)===!0,gde="startHiding - secret - don't use this - v1",yde="stopHiding - secret - don't use this - v1",Ede=new WeakSet,rx=new WeakMap;function eDt(t){return Object.create({isNative:()=>!1,isConstructor:()=>!1,isToplevel:()=>!0,getFileName:()=>t,getLineNumber:()=>{},getColumnNumber:()=>{},getFunctionName:()=>{},getMethodName:()=>{},getTypeName:()=>{},toString:()=>t})}function tDt(t,e){if(!nx)return;let r=rx.get(t);return r||rx.set(t,r=[]),r.push(eDt(e)),t}function rDt(t){if(nx)return Ede.add(t),t}function nDt(t){return nx?Object.defineProperty(function(...e){return bde(),t(...e)},"name",{value:yde}):t}function sDt(t){return nx?Object.defineProperty(function(...e){return t(...e)},"name",{value:gde}):t}function bde(){bde=()=>{};let{prepareStackTrace:t=iDt}=Error,e=50;Error.stackTraceLimit&&(Error.stackTraceLimit=Math.max(Error.stackTraceLimit,e)),Error.prepareStackTrace=function(n,s){let i=[],a=Ede.has(n)?"hiding":"unknown";for(let l=0;l<s.length;l++){let c=s[l].getFunctionName();if(c===gde)a="hiding";else if(c===yde){if(a==="hiding")a="showing",rx.has(n)&&i.unshift(...rx.get(n));else if(a==="unknown"){i=s;break}}else a!=="hiding"&&i.push(s[l])}return t(n,i)}}function iDt(t,e){return e.length===0?mde(t):`${mde(t)}
|
|
299
299
|
at ${e.join(`
|
|
300
|
-
at `)}`}});var xf=y(sx=>{"use strict";Object.defineProperty(sx,"__esModule",{value:!0});sx.default=void 0;var Cde=Nl(),s4=class extends Error{constructor(e,r){super(e),(0,Cde.expectedError)(this),r&&(0,Cde.injectVirtualStackFrame)(this,r)}};sx.default=s4});var Sde=y(o4=>{"use strict";Object.defineProperty(o4,"__esModule",{value:!0});o4.findPackageData=cDt;function rA(){let t=require("path");return rA=function(){return t},t}var oDt=n4(),i4=xf(),aDt="package.json",lDt=(0,oDt.makeStaticFileCache)((t,e)=>{let r;try{r=JSON.parse(e)}catch(n){throw new i4.default(`Error while parsing JSON - ${n.message}`,t)}if(!r)throw new Error(`${t}: No config detected`);if(typeof r!="object")throw new i4.default(`Config returned typeof ${typeof r}`,t);if(Array.isArray(r))throw new i4.default("Expected config object but found array",t);return{filepath:t,dirname:rA().dirname(t),options:r}});function*cDt(t){let e=null,r=[],n=!0,s=rA().dirname(t);for(;!e&&rA().basename(s)!=="node_modules";){r.push(s),e=yield*lDt(rA().join(s,aDt));let i=rA().dirname(s);if(s===i){n=!1;break}s=i}return{filepath:t,directories:r,pkg:e,isPackage:n}}});var wde={};Wu(wde,{default:()=>SDt});function u4(t,e,r){let n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let s=0;s<n.length;s++){let i=String(s),o=u4(n,i,r);o===void 0?delete n[i]:Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(let s in n){let i=u4(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}function hDt(){for(
|
|
300
|
+
at `)}`}});var xf=y(sx=>{"use strict";Object.defineProperty(sx,"__esModule",{value:!0});sx.default=void 0;var Cde=Nl(),s4=class extends Error{constructor(e,r){super(e),(0,Cde.expectedError)(this),r&&(0,Cde.injectVirtualStackFrame)(this,r)}};sx.default=s4});var Sde=y(o4=>{"use strict";Object.defineProperty(o4,"__esModule",{value:!0});o4.findPackageData=cDt;function rA(){let t=require("path");return rA=function(){return t},t}var oDt=n4(),i4=xf(),aDt="package.json",lDt=(0,oDt.makeStaticFileCache)((t,e)=>{let r;try{r=JSON.parse(e)}catch(n){throw new i4.default(`Error while parsing JSON - ${n.message}`,t)}if(!r)throw new Error(`${t}: No config detected`);if(typeof r!="object")throw new i4.default(`Config returned typeof ${typeof r}`,t);if(Array.isArray(r))throw new i4.default("Expected config object but found array",t);return{filepath:t,dirname:rA().dirname(t),options:r}});function*cDt(t){let e=null,r=[],n=!0,s=rA().dirname(t);for(;!e&&rA().basename(s)!=="node_modules";){r.push(s),e=yield*lDt(rA().join(s,aDt));let i=rA().dirname(s);if(s===i){n=!1;break}s=i}return{filepath:t,directories:r,pkg:e,isPackage:n}}});var wde={};Wu(wde,{default:()=>SDt});function u4(t,e,r){let n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let s=0;s<n.length;s++){let i=String(s),o=u4(n,i,r);o===void 0?delete n[i]:Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(let s in n){let i=u4(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}function hDt(){for(Et="default",ut="",c0=!1,kl=1;;){_t=Rl();let t=vde[Et]();if(t)return t}}function Rl(){if(c4[ox])return String.fromCodePoint(c4.codePointAt(ox))}function ne(){let t=Rl();return t===`
|
|
301
301
|
`?(au++,Wo=0):t?Wo+=t.length:Wo++,t&&(ox+=t.length),t}function Rr(t,e){return{type:t,value:e,line:au,column:Wo}}function wf(t){for(let e of t){if(Rl()!==e)throw Or(ne());ne()}}function ADt(){switch(Rl()){case"b":return ne(),"\b";case"f":return ne(),"\f";case"n":return ne(),`
|
|
302
302
|
`;case"r":return ne(),"\r";case"t":return ne()," ";case"v":return ne(),"\v";case"0":if(ne(),gn.isDigit(Rl()))throw Or(ne());return"\0";case"x":return ne(),mDt();case"u":return ne(),p4();case`
|
|
303
303
|
`:case"\u2028":case"\u2029":return ne(),"";case"\r":return ne(),Rl()===`
|
|
304
|
-
`&&ne(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Or(ne());case void 0:throw Or(ne())}return ne()}function mDt(){let t="",e=Rl();if(!gn.isHexDigit(e)||(t+=ne(),e=Rl(),!gn.isHexDigit(e)))throw Or(ne());return t+=ne(),String.fromCodePoint(parseInt(t,16))}function p4(){let t="",e=4;for(;e-- >0;){let r=Rl();if(!gn.isHexDigit(r))throw Or(ne());t+=ne()}return String.fromCodePoint(parseInt(t,16))}function l4(){let t;switch(Hn.type){case"punctuator":switch(Hn.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Hn.value;break}if(u0===void 0)u0=t;else{let e=Ql[Ql.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,f4,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Ql.push(t),Array.isArray(t)?js="beforeArrayValue":js="beforePropertyName";else{let e=Ql[Ql.length-1];e==null?js="end":Array.isArray(e)?js="afterArrayValue":js="afterPropertyValue"}}function ix(){Ql.pop();let t=Ql[Ql.length-1];t==null?js="end":Array.isArray(t)?js="afterArrayValue":js="afterPropertyValue"}function Or(t){return ax(t===void 0?`JSON5: invalid end of input at ${au}:${Wo}`:`JSON5: invalid character '${xde(t)}' at ${au}:${Wo}`)}function Bf(){return ax(`JSON5: invalid end of input at ${au}:${Wo}`)}function Ide(){return Wo-=5,ax(`JSON5: invalid identifier character at ${au}:${Wo}`)}function yDt(t){console.warn(`JSON5: '${xde(t)}' in strings is not valid ECMAScript; consider escaping`)}function xde(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let r=t.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return t}function ax(t){let e=new SyntaxError(t);return e.lineNumber=au,e.columnNumber=Wo,e}var uDt,pDt,fDt,a4,gn,c4,js,Ql,ox,au,Wo,Hn,f4,u0,dDt,yt,ut,c0,kl,_t,vde,gDt,EDt,bDt,CDt,SDt,Bde=Yu(()=>{uDt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,pDt=/[\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\u0860-\u086A\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\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,fDt=/[\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\u0860-\u086A\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\u09FC\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-\u0AFF\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\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\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-\u1CF9\u1D00-\u1DF9\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,a4={Space_Separator:uDt,ID_Start:pDt,ID_Continue:fDt},gn={isSpaceSeparator(t){return typeof t=="string"&&a4.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||a4.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||a4.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},dDt=function(e,r){c4=String(e),js="start",Ql=[],ox=0,au=1,Wo=0,Hn=void 0,f4=void 0,u0=void 0;do Hn=hDt(),gDt[js]();while(Hn.type!=="eof");return typeof r=="function"?u4({"":u0},"",r):u0};vde={default(){switch(_t){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
305
|
-
`:case"\r":case"\u2028":case"\u2029":ne();return;case"/":ne(),
|
|
306
|
-
`:case"\r":case"\u2028":case"\u2029":ne(),
|
|
307
|
-
`:case"\r":throw Or(ne());case"\u2028":case"\u2029":yDt(_t);break;case void 0:throw Or(ne())}ut+=ne()},start(){switch(_t){case"{":case"[":return Rr("punctuator",ne())}
|
|
304
|
+
`&&ne(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Or(ne());case void 0:throw Or(ne())}return ne()}function mDt(){let t="",e=Rl();if(!gn.isHexDigit(e)||(t+=ne(),e=Rl(),!gn.isHexDigit(e)))throw Or(ne());return t+=ne(),String.fromCodePoint(parseInt(t,16))}function p4(){let t="",e=4;for(;e-- >0;){let r=Rl();if(!gn.isHexDigit(r))throw Or(ne());t+=ne()}return String.fromCodePoint(parseInt(t,16))}function l4(){let t;switch(Hn.type){case"punctuator":switch(Hn.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Hn.value;break}if(u0===void 0)u0=t;else{let e=Ql[Ql.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,f4,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Ql.push(t),Array.isArray(t)?js="beforeArrayValue":js="beforePropertyName";else{let e=Ql[Ql.length-1];e==null?js="end":Array.isArray(e)?js="afterArrayValue":js="afterPropertyValue"}}function ix(){Ql.pop();let t=Ql[Ql.length-1];t==null?js="end":Array.isArray(t)?js="afterArrayValue":js="afterPropertyValue"}function Or(t){return ax(t===void 0?`JSON5: invalid end of input at ${au}:${Wo}`:`JSON5: invalid character '${xde(t)}' at ${au}:${Wo}`)}function Bf(){return ax(`JSON5: invalid end of input at ${au}:${Wo}`)}function Ide(){return Wo-=5,ax(`JSON5: invalid identifier character at ${au}:${Wo}`)}function yDt(t){console.warn(`JSON5: '${xde(t)}' in strings is not valid ECMAScript; consider escaping`)}function xde(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let r=t.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return t}function ax(t){let e=new SyntaxError(t);return e.lineNumber=au,e.columnNumber=Wo,e}var uDt,pDt,fDt,a4,gn,c4,js,Ql,ox,au,Wo,Hn,f4,u0,dDt,Et,ut,c0,kl,_t,vde,gDt,EDt,bDt,CDt,SDt,Bde=Yu(()=>{uDt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,pDt=/[\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\u0860-\u086A\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\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,fDt=/[\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\u0860-\u086A\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\u09FC\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-\u0AFF\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\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\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-\u1CF9\u1D00-\u1DF9\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,a4={Space_Separator:uDt,ID_Start:pDt,ID_Continue:fDt},gn={isSpaceSeparator(t){return typeof t=="string"&&a4.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||a4.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||a4.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},dDt=function(e,r){c4=String(e),js="start",Ql=[],ox=0,au=1,Wo=0,Hn=void 0,f4=void 0,u0=void 0;do Hn=hDt(),gDt[js]();while(Hn.type!=="eof");return typeof r=="function"?u4({"":u0},"",r):u0};vde={default(){switch(_t){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
305
|
+
`:case"\r":case"\u2028":case"\u2029":ne();return;case"/":ne(),Et="comment";return;case void 0:return ne(),Rr("eof")}if(gn.isSpaceSeparator(_t)){ne();return}return vde[js]()},comment(){switch(_t){case"*":ne(),Et="multiLineComment";return;case"/":ne(),Et="singleLineComment";return}throw Or(ne())},multiLineComment(){switch(_t){case"*":ne(),Et="multiLineCommentAsterisk";return;case void 0:throw Or(ne())}ne()},multiLineCommentAsterisk(){switch(_t){case"*":ne();return;case"/":ne(),Et="default";return;case void 0:throw Or(ne())}ne(),Et="multiLineComment"},singleLineComment(){switch(_t){case`
|
|
306
|
+
`:case"\r":case"\u2028":case"\u2029":ne(),Et="default";return;case void 0:return ne(),Rr("eof")}ne()},value(){switch(_t){case"{":case"[":return Rr("punctuator",ne());case"n":return ne(),wf("ull"),Rr("null",null);case"t":return ne(),wf("rue"),Rr("boolean",!0);case"f":return ne(),wf("alse"),Rr("boolean",!1);case"-":case"+":ne()==="-"&&(kl=-1),Et="sign";return;case".":ut=ne(),Et="decimalPointLeading";return;case"0":ut=ne(),Et="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":ut=ne(),Et="decimalInteger";return;case"I":return ne(),wf("nfinity"),Rr("numeric",1/0);case"N":return ne(),wf("aN"),Rr("numeric",NaN);case'"':case"'":c0=ne()==='"',ut="",Et="string";return}throw Or(ne())},identifierNameStartEscape(){if(_t!=="u")throw Or(ne());ne();let t=p4();switch(t){case"$":case"_":break;default:if(!gn.isIdStartChar(t))throw Ide();break}ut+=t,Et="identifierName"},identifierName(){switch(_t){case"$":case"_":case"\u200C":case"\u200D":ut+=ne();return;case"\\":ne(),Et="identifierNameEscape";return}if(gn.isIdContinueChar(_t)){ut+=ne();return}return Rr("identifier",ut)},identifierNameEscape(){if(_t!=="u")throw Or(ne());ne();let t=p4();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!gn.isIdContinueChar(t))throw Ide();break}ut+=t,Et="identifierName"},sign(){switch(_t){case".":ut=ne(),Et="decimalPointLeading";return;case"0":ut=ne(),Et="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":ut=ne(),Et="decimalInteger";return;case"I":return ne(),wf("nfinity"),Rr("numeric",kl*(1/0));case"N":return ne(),wf("aN"),Rr("numeric",NaN)}throw Or(ne())},zero(){switch(_t){case".":ut+=ne(),Et="decimalPoint";return;case"e":case"E":ut+=ne(),Et="decimalExponent";return;case"x":case"X":ut+=ne(),Et="hexadecimal";return}return Rr("numeric",kl*0)},decimalInteger(){switch(_t){case".":ut+=ne(),Et="decimalPoint";return;case"e":case"E":ut+=ne(),Et="decimalExponent";return}if(gn.isDigit(_t)){ut+=ne();return}return Rr("numeric",kl*Number(ut))},decimalPointLeading(){if(gn.isDigit(_t)){ut+=ne(),Et="decimalFraction";return}throw Or(ne())},decimalPoint(){switch(_t){case"e":case"E":ut+=ne(),Et="decimalExponent";return}if(gn.isDigit(_t)){ut+=ne(),Et="decimalFraction";return}return Rr("numeric",kl*Number(ut))},decimalFraction(){switch(_t){case"e":case"E":ut+=ne(),Et="decimalExponent";return}if(gn.isDigit(_t)){ut+=ne();return}return Rr("numeric",kl*Number(ut))},decimalExponent(){switch(_t){case"+":case"-":ut+=ne(),Et="decimalExponentSign";return}if(gn.isDigit(_t)){ut+=ne(),Et="decimalExponentInteger";return}throw Or(ne())},decimalExponentSign(){if(gn.isDigit(_t)){ut+=ne(),Et="decimalExponentInteger";return}throw Or(ne())},decimalExponentInteger(){if(gn.isDigit(_t)){ut+=ne();return}return Rr("numeric",kl*Number(ut))},hexadecimal(){if(gn.isHexDigit(_t)){ut+=ne(),Et="hexadecimalInteger";return}throw Or(ne())},hexadecimalInteger(){if(gn.isHexDigit(_t)){ut+=ne();return}return Rr("numeric",kl*Number(ut))},string(){switch(_t){case"\\":ne(),ut+=ADt();return;case'"':if(c0)return ne(),Rr("string",ut);ut+=ne();return;case"'":if(!c0)return ne(),Rr("string",ut);ut+=ne();return;case`
|
|
307
|
+
`:case"\r":throw Or(ne());case"\u2028":case"\u2029":yDt(_t);break;case void 0:throw Or(ne())}ut+=ne()},start(){switch(_t){case"{":case"[":return Rr("punctuator",ne())}Et="value"},beforePropertyName(){switch(_t){case"$":case"_":ut=ne(),Et="identifierName";return;case"\\":ne(),Et="identifierNameStartEscape";return;case"}":return Rr("punctuator",ne());case'"':case"'":c0=ne()==='"',Et="string";return}if(gn.isIdStartChar(_t)){ut+=ne(),Et="identifierName";return}throw Or(ne())},afterPropertyName(){if(_t===":")return Rr("punctuator",ne());throw Or(ne())},beforePropertyValue(){Et="value"},afterPropertyValue(){switch(_t){case",":case"}":return Rr("punctuator",ne())}throw Or(ne())},beforeArrayValue(){if(_t==="]")return Rr("punctuator",ne());Et="value"},afterArrayValue(){switch(_t){case",":case"]":return Rr("punctuator",ne())}throw Or(ne())},end(){throw Or(ne())}};gDt={start(){if(Hn.type==="eof")throw Bf();l4()},beforePropertyName(){switch(Hn.type){case"identifier":case"string":f4=Hn.value,js="afterPropertyName";return;case"punctuator":ix();return;case"eof":throw Bf()}},afterPropertyName(){if(Hn.type==="eof")throw Bf();js="beforePropertyValue"},beforePropertyValue(){if(Hn.type==="eof")throw Bf();l4()},beforeArrayValue(){if(Hn.type==="eof")throw Bf();if(Hn.type==="punctuator"&&Hn.value==="]"){ix();return}l4()},afterPropertyValue(){if(Hn.type==="eof")throw Bf();switch(Hn.value){case",":js="beforePropertyName";return;case"}":ix()}},afterArrayValue(){if(Hn.type==="eof")throw Bf();switch(Hn.value){case",":js="beforeArrayValue";return;case"]":ix()}},end(){}};EDt=function(e,r,n){let s=[],i="",o,a,l="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(let h of r){let m;typeof h=="string"?m=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(m=String(h)),m!==void 0&&o.indexOf(m)<0&&o.push(m)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),l=" ".substr(0,n)):typeof n=="string"&&(l=n.substr(0,10)),u("",{"":e});function u(h,m){let g=m[h];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(h):typeof g.toJSON=="function"&&(g=g.toJSON(h))),a&&(g=a.call(m,h,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return p(g,!1);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?A(g):f(g)}function p(h){let m={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},E="";for(let I=0;I<h.length;I++){let w=h[I];switch(w){case"'":case'"':m[w]++,E+=w;continue;case"\0":if(gn.isDigit(h[I+1])){E+="\\x00";continue}}if(g[w]){E+=g[w];continue}if(w<" "){let L=w.charCodeAt(0).toString(16);E+="\\x"+("00"+L).substring(L.length);continue}E+=w}let b=c||Object.keys(m).reduce((I,w)=>m[I]<m[w]?I:w);return E=E.replace(new RegExp(b,"g"),g[b]),b+E+b}function f(h){if(s.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");s.push(h);let m=i;i=i+l;let g=o||Object.keys(h),E=[];for(let I of g){let w=u(I,h);if(w!==void 0){let L=d(I)+":";l!==""&&(L+=" "),L+=w,E.push(L)}}let b;if(E.length===0)b="{}";else{let I;if(l==="")I=E.join(","),b="{"+I+"}";else{let w=`,
|
|
308
308
|
`+i;I=E.join(w),b=`{
|
|
309
309
|
`+i+I+`,
|
|
310
310
|
`+m+"}"}}return s.pop(),i=m,b}function d(h){if(h.length===0)return p(h,!0);let m=String.fromCodePoint(h.codePointAt(0));if(!gn.isIdStartChar(m))return p(h,!0);for(let g=m.length;g<h.length;g++)if(!gn.isIdContinueChar(String.fromCodePoint(h.codePointAt(g))))return p(h,!0);return h}function A(h){if(s.indexOf(h)>=0)throw TypeError("Converting circular structure to JSON5");s.push(h);let m=i;i=i+l;let g=[];for(let b=0;b<h.length;b++){let I=u(String(b),h);g.push(I!==void 0?I:"null")}let E;if(g.length===0)E="[]";else if(l==="")E="["+g.join(",")+"]";else{let b=`,
|
|
@@ -2592,7 +2592,7 @@ If you have already enabled that plugin (or '@babel/preset-typescript'), make su
|
|
|
2592
2592
|
o => o.${N.types.cloneNode(t)}
|
|
2593
2593
|
`,N.template.expression.ast`
|
|
2594
2594
|
(o, v) => o.${N.types.cloneNode(t)} = v
|
|
2595
|
-
`]}function B8(t){if(t=(0,hu.skipTransparentExprWrappers)(t),t.isSequenceExpression()){let e=t.get("expressions");return B8(e[e.length-1])}return t}function mRt(t){let e=B8(t);if(e.isConstantExpression())return N.types.cloneNode(t.node);if(e.isIdentifier()&&t.scope.hasUid(e.node.name))return N.types.cloneNode(t.node);if(e.isAssignmentExpression()&&e.get("left").isIdentifier())return N.types.cloneNode(e.node.left);throw new Error(`Internal Error: the computed key ${t.toString()} has not yet been memoised.`)}function Q0(t,e){let r=e.get("key");r.isSequenceExpression()?t.push(...r.node.expressions):t.push(r.node),r.replaceWith(mu(t))}function gRt(t,e){let r=e.get("key"),n=B8(r);if(n.isConstantExpression())Q0(t,e);else{let s=r.scope.parent,i=(0,gw.memoiseComputedKey)(n.node,s,s.generateUid("computedKey"));if(!i)Q0(t,e);else{let o=[...t,N.types.cloneNode(i.left)],a=n.parentPath;a.isSequenceExpression()?a.pushContainer("expressions",o):n.replaceWith(mu([N.types.cloneNode(i),...o]))}}}function S8(t,e){let r=e.get("value");r.node?t.push(r.node):t.length>0&&(t[t.length-1]=N.types.unaryExpression("void",t[t.length-1])),r.replaceWith(mu(t))}function yRt(t,e){e.unshiftContainer("body",N.types.expressionStatement(mu(t)))}function ERt(t,e){e.node.body.body.unshift(N.types.expressionStatement(mu(t)))}function Gge(t,e){return N.types.isCallExpression(t)&&N.types.isIdentifier(t.callee,{name:e.name})}function bRt(t,e){if(e){if(t.length>=2&&Gge(t[1],e)){let r=N.types.callExpression(N.types.cloneNode(e),[t[0]]);t.splice(0,2,r)}t.length>=2&&N.types.isThisExpression(t[t.length-1])&&Gge(t[t.length-2],e)&&t.splice(t.length-1,1)}return mu(t)}function CRt(t,e,r){e.traverse({CallExpression:{exit(n){if(!n.get("callee").isSuper())return;let s=[n.node,...t.map(i=>N.types.cloneNode(i))];n.isCompletionRecord()&&s.push(N.types.thisExpression()),n.replaceWith(bRt(s,r)),n.skip()}},ClassMethod(n){n.node.kind==="constructor"&&n.skip()}})}function Yge(t,e){let r=[N.types.expressionStatement(mu(t))];return e&&r.unshift(N.types.expressionStatement(N.types.callExpression(N.types.super(),[N.types.spreadElement(N.types.identifier("args"))]))),N.types.classMethod("constructor",N.types.identifier("constructor"),e?[N.types.restElement(N.types.identifier("args"))]:[],N.types.blockStatement(r))}function Wge(t){return N.types.staticBlock([N.types.expressionStatement(mu(t))])}var Ff=0,Au=1,SRt=2,eye=3,yw=4,IRt=5,vRt=8,xRt=16;function wRt(t){switch(t.node.type){case"ClassProperty":case"ClassPrivateProperty":return Ff;case"ClassAccessorProperty":return Au;case"ClassMethod":case"ClassPrivateMethod":return t.node.kind==="get"?eye:t.node.kind==="set"?yw:SRt}}function BRt(t){return[...t.filter(e=>e.isStatic&&e.kind>=Au&&e.kind<=yw),...t.filter(e=>!e.isStatic&&e.kind>=Au&&e.kind<=yw),...t.filter(e=>e.isStatic&&e.kind===Ff),...t.filter(e=>!e.isStatic&&e.kind===Ff)]}function Jge(t,e,r){let n=t.length,s=e.some(Boolean),i=[];for(let o=0;o<n;o++)(r==="2023-11"||r==="2023-05")&&s&&i.push(e[o]||N.types.unaryExpression("void",N.types.numericLiteral(0))),i.push(t[o].expression);return{haveThis:s,decs:i}}function TRt(t,e){return N.types.arrayExpression(t.map(r=>{let n=r.kind;return r.isStatic&&(n+=e==="2023-11"||e==="2023-05"?vRt:IRt),r.decoratorsHaveThis&&(n+=xRt),N.types.arrayExpression([r.decoratorsArray,N.types.numericLiteral(n),r.name,...r.privateMethods||[]])}))}function DRt(t){let e=[];for(let r of t){let{locals:n}=r;Array.isArray(n)?e.push(...n):n!==void 0&&e.push(n)}return e}function PRt(t,e,r,n,s,i){e.insertAfter(N.types.classPrivateMethod("get",N.types.cloneNode(r),[],N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.cloneNode(n),t==="2023-11"&&i?[]:[N.types.thisExpression()]))]),i)),e.insertAfter(N.types.classPrivateMethod("set",N.types.cloneNode(r),[N.types.identifier("v")],N.types.blockStatement([N.types.expressionStatement(N.types.callExpression(N.types.cloneNode(s),t==="2023-11"&&i?[N.types.identifier("v")]:[N.types.thisExpression(),N.types.identifier("v")]))]),i))}function _Rt(t,e,r,n){let s,i;t.node.kind==="set"?(s=[N.types.identifier("v")],i=[N.types.expressionStatement(N.types.callExpression(r,[N.types.thisExpression(),N.types.identifier("v")]))]):(s=[],i=[N.types.returnStatement(N.types.callExpression(r,[N.types.thisExpression()]))]),t.replaceWith(N.types.classPrivateMethod(t.node.kind,N.types.cloneNode(e),s,N.types.blockStatement(i),n))}function Kge(t){let{type:e}=t;return e!=="TSDeclareMethod"&&e!=="TSIndexSignature"&&e!=="StaticBlock"}function NRt(t){return N.types.callExpression(N.types.arrowFunctionExpression([],N.types.blockStatement(t.body)),[])}function kRt(t){return N.types.functionExpression(null,[],N.types.blockStatement(t.body))}function QRt(t){return N.types.functionExpression(null,[],N.types.blockStatement([N.types.returnStatement(t)]))}function mu(t){return t.length===0?N.types.unaryExpression("void",N.types.numericLiteral(0)):t.length===1?t[0]:N.types.sequenceExpression(t)}function zge(t){let{params:e,body:r,generator:n,async:s}=t;return N.types.functionExpression(void 0,e,r,n,s)}function tye(t,e){return N.types.callExpression(t.addHelper("setFunctionName"),[N.types.thisExpression(),e])}function w8(t,e){return N.types.callExpression(t.addHelper("toPropertyKey"),[e])}function I8(t){return N.types.arrowFunctionExpression([N.types.identifier("_")],N.types.binaryExpression("in",N.types.cloneNode(t),N.types.identifier("_")))}function RRt(t){try{return N.types.traverseFast(t,e=>{if(N.types.isPrivateName(e))throw null}),!1}catch{return!0}}function ORt(t){let{node:e}=t;e.computed=!0,N.types.isIdentifier(e.key)&&(e.key=N.types.stringLiteral(e.key.name))}function v8(t,e){let r=!1;if(e.length>0){let n=(0,Xge.privateNameVisitorFactory)({PrivateName(i,o){o.privateNamesMap.has(i.node.id.name)&&(r=!0,i.stop())}}),s=new Map;for(let i of e)s.set(i,null);t.traverse(n,{privateNamesMap:s})}return r}function FRt(t,e){let r=(0,Xge.privateNameVisitorFactory)({PrivateName(s,i){if(!i.privateNamesMap.has(s.node.id.name))return;let o=s.parentPath,a=o.parentPath;if(a.node.type==="AssignmentExpression"&&a.node.left===o.node||a.node.type==="UpdateExpression"||a.node.type==="RestElement"||a.node.type==="ArrayPattern"||a.node.type==="ObjectProperty"&&a.node.value===o.node&&a.parentPath.type==="ObjectPattern"||a.node.type==="ForOfStatement"&&a.node.left===o.node)throw s.buildCodeFrameError(`Decorated private methods are read-only, but "#${s.node.id.name}" is updated via this expression.`)}}),n=new Map;for(let s of e)n.set(s,null);t.traverse(r,{privateNamesMap:n})}function LRt(t,e,r,n,s,i,o){var a;let l=t.get("body.body"),c=t.node.decorators,u=!1,p=!1,f=!1,d=hRt(t),A=[],h=t.scope.parent,m=(me,K,Qe)=>{let $t=_i(h,K);return Qe.push(N.types.assignmentExpression("=",$t,me)),N.types.cloneNode($t)},g,E,b=(a=t.node.id)==null?void 0:a.name,I=typeof s=="object"?s:void 0,w=me=>{try{return N.types.traverseFast(me,K=>{if(N.types.isThisExpression(K)||N.types.isSuper(K)||N.types.isYieldExpression(K)||N.types.isAwaitExpression(K)||N.types.isIdentifier(K,{name:"arguments"})||b&&N.types.isIdentifier(K,{name:b})||N.types.isMetaProperty(K)&&K.meta.name!=="import")throw null}),!1}catch{return!0}},L=[];for(let me of l){if(!Kge(me))continue;let K=me.node;if(!K.static&&N.types.isPrivateName(K.key)&&L.push(K.key.id.name),R0(K)){switch(K.type){case"ClassProperty":i.ClassProperty(me,e);break;case"ClassPrivateProperty":i.ClassPrivateProperty(me,e);break;case"ClassAccessorProperty":if(i.ClassAccessorProperty(me,e),o==="2023-11")break;default:K.static?E??(E=_i(h,"initStatic")):g??(g=_i(h,"initProto"));break}u=!0,f||(f=K.decorators.some(w))}else if(K.type==="ClassAccessorProperty"){i.ClassAccessorProperty(me,e);let{key:Qe,value:$t,static:Ar,computed:Cr}=K,un=d(),St=Hge(un,$t,Ar),Rt=me.get("key"),[pt]=me.replaceWith(St),pn,ir;Cr&&!Rt.isConstantExpression()?(pn=(0,gw.memoiseComputedKey)(w8(e,Qe),h,h.generateUid("computedKey")),ir=N.types.cloneNode(pn.left)):(pn=N.types.cloneNode(Qe),ir=N.types.cloneNode(Qe)),C8(t,s),$ge(t.node.id,pt,pn,ir,un,Cr,Ar,o)}"computed"in me.node&&me.node.computed&&(p||(p=!h.isStatic(me.node.key)))}if(!c&&!u){!t.node.id&&typeof s=="string"&&(t.node.id=N.types.identifier(s)),I&&t.node.body.body.unshift(Wge([tye(e,I)]));return}let U=[],q,V=new Set,ie,re,Ie=null;function Ze(me){let K=!1,Qe=!1,$t=[];for(let Ar of me){let{expression:Cr}=Ar,un;(o==="2023-11"||o==="2023-05")&&N.types.isMemberExpression(Cr)&&(N.types.isSuper(Cr.object)?un=N.types.thisExpression():h.isStatic(Cr.object)?un=N.types.cloneNode(Cr.object):(Ie??(Ie=_i(h,"obj")),un=N.types.assignmentExpression("=",N.types.cloneNode(Ie),Cr.object),Cr.object=N.types.cloneNode(Ie))),$t.push(un),K||(K=!h.isStatic(Cr)),Qe||(Qe=w(Ar))}return{hasSideEffects:K,usesFnContext:Qe,decoratorsThis:$t}}let je=p||f||o!=="2023-11",Ct=!1,Mt=0,qt=[],Ht,sr=[];if(c){ie=_i(h,"initClass"),Ct=t.isClassDeclaration(),{id:re,path:t}=ARt(t,s),t.node.decorators=null;let me=c.some(RRt),{hasSideEffects:K,usesFnContext:Qe,decoratorsThis:$t}=Ze(c),{haveThis:Ar,decs:Cr}=Jge(c,$t,o);if(Mt=Ar?1:0,qt=Cr,(Qe||K&&je||me)&&(Ht=m(N.types.arrayExpression(qt),"classDecs",A)),!u)for(let un of t.get("body.body")){let{node:St}=un;if("computed"in St&&St.computed)if(un.isClassProperty({static:!0})){if(!un.get("key").isConstantExpression()){let pt=St.key,pn=(0,gw.memoiseComputedKey)(pt,h,h.generateUid("computedKey"));pn!=null&&(St.key=N.types.cloneNode(pn.left),sr.push(pn))}}else sr.length>0&&(Q0(sr,un),sr=[])}}else C8(t,s),re=N.types.cloneNode(t.node.id);let Jn,Kn=!1,cn=[],Ut=[];if(u){if(g){let me=N.types.callExpression(N.types.cloneNode(g),[N.types.thisExpression()]);cn.push(me)}for(let me of l){if(!Kge(me)){Ut.length>0&&me.isStaticBlock()&&(yRt(Ut,me),Ut=[]);continue}let{node:K}=me,Qe=K.decorators,$t=!!(Qe!=null&&Qe.length),Ar="computed"in K&&K.computed,Cr="computedKey";K.key.type==="PrivateName"?Cr=K.key.id.name:!Ar&&K.key.type==="Identifier"&&(Cr=K.key.name);let un,St;if($t){let{hasSideEffects:Vt,usesFnContext:fn,decoratorsThis:dn}=Ze(Qe),{decs:Dn,haveThis:Mr}=Jge(Qe,dn,o);St=Mr,un=Dn.length===1?Dn[0]:N.types.arrayExpression(Dn),(fn||Vt&&je)&&(un=m(un,Cr+"Decs",sr))}if(Ar&&!me.get("key").isConstantExpression()){let Vt=K.key,fn=(0,gw.memoiseComputedKey)($t?w8(e,Vt):Vt,h,h.generateUid("computedKey"));fn!=null&&(c&&me.isClassProperty({static:!0})?(K.key=N.types.cloneNode(fn.left),sr.push(fn)):K.key=fn)}let{key:Rt,static:pt}=K,pn=Rt.type==="PrivateName",ir=wRt(me);pn&&!pt&&($t&&(Kn=!0),(N.types.isClassPrivateProperty(K)||!Jn)&&(Jn=Rt)),me.isClassMethod({kind:"constructor"})&&(q=me);let fs;if($t){let Vt,fn;if(Ar?fn=mRt(me.get("key")):Rt.type==="PrivateName"?fn=N.types.stringLiteral(Rt.id.name):Rt.type==="Identifier"?fn=N.types.stringLiteral(Rt.name):fn=N.types.cloneNode(Rt),ir===Au){let{value:dn}=me.node,Dn=o==="2023-11"&&pt?[]:[N.types.thisExpression()];dn&&Dn.push(N.types.cloneNode(dn));let Mr=d(),u2=_i(h,`init_${Cr}`),Bve=N.types.callExpression(N.types.cloneNode(u2),Dn),Tve=Hge(Mr,Bve,pt),[Z7]=me.replaceWith(Tve);if(pn){Vt=Vge(Mr,o);let eq=_i(h,`get_${Cr}`),tq=_i(h,`set_${Cr}`);PRt(o,Z7,Rt,eq,tq,pt),fs=[u2,eq,tq]}else C8(t,s),$ge(t.node.id,Z7,N.types.cloneNode(Rt),N.types.isAssignmentExpression(Rt)?N.types.cloneNode(Rt.left):N.types.cloneNode(Rt),Mr,Ar,pt,o),fs=[u2]}else if(ir===Ff){let dn=_i(h,`init_${Cr}`),Dn=me.get("value"),Mr=o==="2023-11"&&pt?[]:[N.types.thisExpression()];Dn.node&&Mr.push(Dn.node),Dn.replaceWith(N.types.callExpression(N.types.cloneNode(dn),Mr)),fs=[dn],pn&&(Vt=Vge(Rt,o))}else if(pn){let dn=_i(h,`call_${Cr}`);if(fs=[dn],new qge.default({constantSuper:r,methodPath:me,objectRef:re,superRef:t.node.superClass,file:e.file,refToPreserve:re}).replace(),Vt=[zge(me.node)],ir===eye||ir===yw)_Rt(me,N.types.cloneNode(Rt),N.types.cloneNode(dn),pt);else{let Mr=me.node;t.node.body.body.unshift(N.types.classPrivateProperty(Rt,N.types.cloneNode(dn),[],Mr.static)),V.add(Rt.id.name),me.remove()}}U.push({kind:ir,decoratorsArray:un,decoratorsHaveThis:St,name:fn,isStatic:pt,privateMethods:Vt,locals:fs}),me.node&&(me.node.decorators=null)}if(Ar&&sr.length>0&&(c&&me.isClassProperty({static:!0})||(Q0(sr,ir===Au?me.getNextSibling():me),sr=[])),cn.length>0&&!pt&&(ir===Ff||ir===Au)&&(S8(cn,me),cn=[]),Ut.length>0&&pt&&(ir===Ff||ir===Au)&&(S8(Ut,me),Ut=[]),$t&&o==="2023-11"&&(ir===Ff||ir===Au)){let Vt=_i(h,`init_extra_${Cr}`);fs.push(Vt);let fn=N.types.callExpression(N.types.cloneNode(Vt),pt?[]:[N.types.thisExpression()]);pt?Ut.push(fn):cn.push(fn)}}}if(sr.length>0){let me=t.get("body.body"),K;for(let Qe=me.length-1;Qe>=0;Qe--){let $t=me[Qe],Ar=$t.node;if(Ar.computed){if(c&&N.types.isClassProperty(Ar,{static:!0}))continue;K=$t;break}}K!=null&&(gRt(sr,K),sr=[])}if(cn.length>0){let me=!!t.node.superClass;q?me?CRt(cn,q,g):ERt(cn,q):t.node.body.body.unshift(Yge(cn,me)),cn=[]}Ut.length>0&&(t.node.body.body.push(Wge(Ut)),Ut=[]);let tt=BRt(U),J=TRt(o==="2023-11"?U:tt,o),ee=DRt(tt);g&&ee.push(g),E&&ee.push(E);let Z=[],G=!1,de=ie&&N.types.callExpression(N.types.cloneNode(ie),[]),R=t,Kr=t.node,F=[];if(c){Z.push(re,ie);let me=[];if(t.get("body.body").forEach(K=>{if((K.isStaticBlock()||!K.isClassMethod()&&K.node.static)&&new qge.default({constantSuper:r,methodPath:K,objectRef:re,superRef:t.node.superClass,file:e.file,refToPreserve:re}).replace(),K.isStaticBlock()){if(v8(K,L)){let Qe=m(kRt(K.node),"staticBlock",F);Ut.push(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("call")),[N.types.thisExpression()]))}else Ut.push(NRt(K.node));K.remove();return}if((K.isClassProperty()||K.isClassPrivateProperty())&&K.node.static){let Qe=K.get("value");if(v8(Qe,L)){let $t=m(QRt(Qe.node),"fieldValue",F);Qe.replaceWith(N.types.callExpression(N.types.memberExpression($t,N.types.identifier("call")),[N.types.thisExpression()]))}Ut.length>0&&(S8(Ut,K),Ut=[]),K.node.static=!1,me.push(K.node),K.remove()}else if(K.isClassPrivateMethod({static:!0})){if(v8(K,L)){let Qe=m(zge(K.node),K.get("key.id").node.name,F);n?(K.node.params=[N.types.restElement(N.types.identifier("arg"))],K.node.body=N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("apply")),[N.types.thisExpression(),N.types.identifier("arg")]))])):(K.node.params=K.node.params.map(($t,Ar)=>N.types.isRestElement($t)?N.types.restElement(N.types.identifier("arg")):N.types.identifier("_"+Ar)),K.node.body=N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("apply")),[N.types.thisExpression(),N.types.identifier("arguments")]))]))}K.node.static=!1,me.push(K.node),K.remove()}}),me.length>0||Ut.length>0){let K=N.template.expression.ast`
|
|
2595
|
+
`]}function B8(t){if(t=(0,hu.skipTransparentExprWrappers)(t),t.isSequenceExpression()){let e=t.get("expressions");return B8(e[e.length-1])}return t}function mRt(t){let e=B8(t);if(e.isConstantExpression())return N.types.cloneNode(t.node);if(e.isIdentifier()&&t.scope.hasUid(e.node.name))return N.types.cloneNode(t.node);if(e.isAssignmentExpression()&&e.get("left").isIdentifier())return N.types.cloneNode(e.node.left);throw new Error(`Internal Error: the computed key ${t.toString()} has not yet been memoised.`)}function Q0(t,e){let r=e.get("key");r.isSequenceExpression()?t.push(...r.node.expressions):t.push(r.node),r.replaceWith(mu(t))}function gRt(t,e){let r=e.get("key"),n=B8(r);if(n.isConstantExpression())Q0(t,e);else{let s=r.scope.parent,i=(0,gw.memoiseComputedKey)(n.node,s,s.generateUid("computedKey"));if(!i)Q0(t,e);else{let o=[...t,N.types.cloneNode(i.left)],a=n.parentPath;a.isSequenceExpression()?a.pushContainer("expressions",o):n.replaceWith(mu([N.types.cloneNode(i),...o]))}}}function S8(t,e){let r=e.get("value");r.node?t.push(r.node):t.length>0&&(t[t.length-1]=N.types.unaryExpression("void",t[t.length-1])),r.replaceWith(mu(t))}function yRt(t,e){e.unshiftContainer("body",N.types.expressionStatement(mu(t)))}function ERt(t,e){e.node.body.body.unshift(N.types.expressionStatement(mu(t)))}function Gge(t,e){return N.types.isCallExpression(t)&&N.types.isIdentifier(t.callee,{name:e.name})}function bRt(t,e){if(e){if(t.length>=2&&Gge(t[1],e)){let r=N.types.callExpression(N.types.cloneNode(e),[t[0]]);t.splice(0,2,r)}t.length>=2&&N.types.isThisExpression(t[t.length-1])&&Gge(t[t.length-2],e)&&t.splice(t.length-1,1)}return mu(t)}function CRt(t,e,r){e.traverse({CallExpression:{exit(n){if(!n.get("callee").isSuper())return;let s=[n.node,...t.map(i=>N.types.cloneNode(i))];n.isCompletionRecord()&&s.push(N.types.thisExpression()),n.replaceWith(bRt(s,r)),n.skip()}},ClassMethod(n){n.node.kind==="constructor"&&n.skip()}})}function Yge(t,e){let r=[N.types.expressionStatement(mu(t))];return e&&r.unshift(N.types.expressionStatement(N.types.callExpression(N.types.super(),[N.types.spreadElement(N.types.identifier("args"))]))),N.types.classMethod("constructor",N.types.identifier("constructor"),e?[N.types.restElement(N.types.identifier("args"))]:[],N.types.blockStatement(r))}function Wge(t){return N.types.staticBlock([N.types.expressionStatement(mu(t))])}var Ff=0,Au=1,SRt=2,eye=3,yw=4,IRt=5,vRt=8,xRt=16;function wRt(t){switch(t.node.type){case"ClassProperty":case"ClassPrivateProperty":return Ff;case"ClassAccessorProperty":return Au;case"ClassMethod":case"ClassPrivateMethod":return t.node.kind==="get"?eye:t.node.kind==="set"?yw:SRt}}function BRt(t){return[...t.filter(e=>e.isStatic&&e.kind>=Au&&e.kind<=yw),...t.filter(e=>!e.isStatic&&e.kind>=Au&&e.kind<=yw),...t.filter(e=>e.isStatic&&e.kind===Ff),...t.filter(e=>!e.isStatic&&e.kind===Ff)]}function Jge(t,e,r){let n=t.length,s=e.some(Boolean),i=[];for(let o=0;o<n;o++)(r==="2023-11"||r==="2023-05")&&s&&i.push(e[o]||N.types.unaryExpression("void",N.types.numericLiteral(0))),i.push(t[o].expression);return{haveThis:s,decs:i}}function TRt(t,e){return N.types.arrayExpression(t.map(r=>{let n=r.kind;return r.isStatic&&(n+=e==="2023-11"||e==="2023-05"?vRt:IRt),r.decoratorsHaveThis&&(n+=xRt),N.types.arrayExpression([r.decoratorsArray,N.types.numericLiteral(n),r.name,...r.privateMethods||[]])}))}function DRt(t){let e=[];for(let r of t){let{locals:n}=r;Array.isArray(n)?e.push(...n):n!==void 0&&e.push(n)}return e}function PRt(t,e,r,n,s,i){e.insertAfter(N.types.classPrivateMethod("get",N.types.cloneNode(r),[],N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.cloneNode(n),t==="2023-11"&&i?[]:[N.types.thisExpression()]))]),i)),e.insertAfter(N.types.classPrivateMethod("set",N.types.cloneNode(r),[N.types.identifier("v")],N.types.blockStatement([N.types.expressionStatement(N.types.callExpression(N.types.cloneNode(s),t==="2023-11"&&i?[N.types.identifier("v")]:[N.types.thisExpression(),N.types.identifier("v")]))]),i))}function _Rt(t,e,r,n){let s,i;t.node.kind==="set"?(s=[N.types.identifier("v")],i=[N.types.expressionStatement(N.types.callExpression(r,[N.types.thisExpression(),N.types.identifier("v")]))]):(s=[],i=[N.types.returnStatement(N.types.callExpression(r,[N.types.thisExpression()]))]),t.replaceWith(N.types.classPrivateMethod(t.node.kind,N.types.cloneNode(e),s,N.types.blockStatement(i),n))}function Kge(t){let{type:e}=t;return e!=="TSDeclareMethod"&&e!=="TSIndexSignature"&&e!=="StaticBlock"}function NRt(t){return N.types.callExpression(N.types.arrowFunctionExpression([],N.types.blockStatement(t.body)),[])}function kRt(t){return N.types.functionExpression(null,[],N.types.blockStatement(t.body))}function QRt(t){return N.types.functionExpression(null,[],N.types.blockStatement([N.types.returnStatement(t)]))}function mu(t){return t.length===0?N.types.unaryExpression("void",N.types.numericLiteral(0)):t.length===1?t[0]:N.types.sequenceExpression(t)}function zge(t){let{params:e,body:r,generator:n,async:s}=t;return N.types.functionExpression(void 0,e,r,n,s)}function tye(t,e){return N.types.callExpression(t.addHelper("setFunctionName"),[N.types.thisExpression(),e])}function w8(t,e){return N.types.callExpression(t.addHelper("toPropertyKey"),[e])}function I8(t){return N.types.arrowFunctionExpression([N.types.identifier("_")],N.types.binaryExpression("in",N.types.cloneNode(t),N.types.identifier("_")))}function RRt(t){try{return N.types.traverseFast(t,e=>{if(N.types.isPrivateName(e))throw null}),!1}catch{return!0}}function ORt(t){let{node:e}=t;e.computed=!0,N.types.isIdentifier(e.key)&&(e.key=N.types.stringLiteral(e.key.name))}function v8(t,e){let r=!1;if(e.length>0){let n=(0,Xge.privateNameVisitorFactory)({PrivateName(i,o){o.privateNamesMap.has(i.node.id.name)&&(r=!0,i.stop())}}),s=new Map;for(let i of e)s.set(i,null);t.traverse(n,{privateNamesMap:s})}return r}function FRt(t,e){let r=(0,Xge.privateNameVisitorFactory)({PrivateName(s,i){if(!i.privateNamesMap.has(s.node.id.name))return;let o=s.parentPath,a=o.parentPath;if(a.node.type==="AssignmentExpression"&&a.node.left===o.node||a.node.type==="UpdateExpression"||a.node.type==="RestElement"||a.node.type==="ArrayPattern"||a.node.type==="ObjectProperty"&&a.node.value===o.node&&a.parentPath.type==="ObjectPattern"||a.node.type==="ForOfStatement"&&a.node.left===o.node)throw s.buildCodeFrameError(`Decorated private methods are read-only, but "#${s.node.id.name}" is updated via this expression.`)}}),n=new Map;for(let s of e)n.set(s,null);t.traverse(r,{privateNamesMap:n})}function LRt(t,e,r,n,s,i,o){var a;let l=t.get("body.body"),c=t.node.decorators,u=!1,p=!1,f=!1,d=hRt(t),A=[],h=t.scope.parent,m=(me,K,Qe)=>{let $t=_i(h,K);return Qe.push(N.types.assignmentExpression("=",$t,me)),N.types.cloneNode($t)},g,E,b=(a=t.node.id)==null?void 0:a.name,I=typeof s=="object"?s:void 0,w=me=>{try{return N.types.traverseFast(me,K=>{if(N.types.isThisExpression(K)||N.types.isSuper(K)||N.types.isYieldExpression(K)||N.types.isAwaitExpression(K)||N.types.isIdentifier(K,{name:"arguments"})||b&&N.types.isIdentifier(K,{name:b})||N.types.isMetaProperty(K)&&K.meta.name!=="import")throw null}),!1}catch{return!0}},L=[];for(let me of l){if(!Kge(me))continue;let K=me.node;if(!K.static&&N.types.isPrivateName(K.key)&&L.push(K.key.id.name),R0(K)){switch(K.type){case"ClassProperty":i.ClassProperty(me,e);break;case"ClassPrivateProperty":i.ClassPrivateProperty(me,e);break;case"ClassAccessorProperty":if(i.ClassAccessorProperty(me,e),o==="2023-11")break;default:K.static?E??(E=_i(h,"initStatic")):g??(g=_i(h,"initProto"));break}u=!0,f||(f=K.decorators.some(w))}else if(K.type==="ClassAccessorProperty"){i.ClassAccessorProperty(me,e);let{key:Qe,value:$t,static:Ar,computed:Cr}=K,un=d(),St=Hge(un,$t,Ar),Rt=me.get("key"),[ft]=me.replaceWith(St),pn,ir;Cr&&!Rt.isConstantExpression()?(pn=(0,gw.memoiseComputedKey)(w8(e,Qe),h,h.generateUid("computedKey")),ir=N.types.cloneNode(pn.left)):(pn=N.types.cloneNode(Qe),ir=N.types.cloneNode(Qe)),C8(t,s),$ge(t.node.id,ft,pn,ir,un,Cr,Ar,o)}"computed"in me.node&&me.node.computed&&(p||(p=!h.isStatic(me.node.key)))}if(!c&&!u){!t.node.id&&typeof s=="string"&&(t.node.id=N.types.identifier(s)),I&&t.node.body.body.unshift(Wge([tye(e,I)]));return}let U=[],q,V=new Set,ie,re,Ie=null;function Ze(me){let K=!1,Qe=!1,$t=[];for(let Ar of me){let{expression:Cr}=Ar,un;(o==="2023-11"||o==="2023-05")&&N.types.isMemberExpression(Cr)&&(N.types.isSuper(Cr.object)?un=N.types.thisExpression():h.isStatic(Cr.object)?un=N.types.cloneNode(Cr.object):(Ie??(Ie=_i(h,"obj")),un=N.types.assignmentExpression("=",N.types.cloneNode(Ie),Cr.object),Cr.object=N.types.cloneNode(Ie))),$t.push(un),K||(K=!h.isStatic(Cr)),Qe||(Qe=w(Ar))}return{hasSideEffects:K,usesFnContext:Qe,decoratorsThis:$t}}let je=p||f||o!=="2023-11",Ct=!1,Mt=0,qt=[],Ht,sr=[];if(c){ie=_i(h,"initClass"),Ct=t.isClassDeclaration(),{id:re,path:t}=ARt(t,s),t.node.decorators=null;let me=c.some(RRt),{hasSideEffects:K,usesFnContext:Qe,decoratorsThis:$t}=Ze(c),{haveThis:Ar,decs:Cr}=Jge(c,$t,o);if(Mt=Ar?1:0,qt=Cr,(Qe||K&&je||me)&&(Ht=m(N.types.arrayExpression(qt),"classDecs",A)),!u)for(let un of t.get("body.body")){let{node:St}=un;if("computed"in St&&St.computed)if(un.isClassProperty({static:!0})){if(!un.get("key").isConstantExpression()){let ft=St.key,pn=(0,gw.memoiseComputedKey)(ft,h,h.generateUid("computedKey"));pn!=null&&(St.key=N.types.cloneNode(pn.left),sr.push(pn))}}else sr.length>0&&(Q0(sr,un),sr=[])}}else C8(t,s),re=N.types.cloneNode(t.node.id);let Jn,Kn=!1,cn=[],Ut=[];if(u){if(g){let me=N.types.callExpression(N.types.cloneNode(g),[N.types.thisExpression()]);cn.push(me)}for(let me of l){if(!Kge(me)){Ut.length>0&&me.isStaticBlock()&&(yRt(Ut,me),Ut=[]);continue}let{node:K}=me,Qe=K.decorators,$t=!!(Qe!=null&&Qe.length),Ar="computed"in K&&K.computed,Cr="computedKey";K.key.type==="PrivateName"?Cr=K.key.id.name:!Ar&&K.key.type==="Identifier"&&(Cr=K.key.name);let un,St;if($t){let{hasSideEffects:Vt,usesFnContext:fn,decoratorsThis:dn}=Ze(Qe),{decs:Dn,haveThis:Mr}=Jge(Qe,dn,o);St=Mr,un=Dn.length===1?Dn[0]:N.types.arrayExpression(Dn),(fn||Vt&&je)&&(un=m(un,Cr+"Decs",sr))}if(Ar&&!me.get("key").isConstantExpression()){let Vt=K.key,fn=(0,gw.memoiseComputedKey)($t?w8(e,Vt):Vt,h,h.generateUid("computedKey"));fn!=null&&(c&&me.isClassProperty({static:!0})?(K.key=N.types.cloneNode(fn.left),sr.push(fn)):K.key=fn)}let{key:Rt,static:ft}=K,pn=Rt.type==="PrivateName",ir=wRt(me);pn&&!ft&&($t&&(Kn=!0),(N.types.isClassPrivateProperty(K)||!Jn)&&(Jn=Rt)),me.isClassMethod({kind:"constructor"})&&(q=me);let fs;if($t){let Vt,fn;if(Ar?fn=mRt(me.get("key")):Rt.type==="PrivateName"?fn=N.types.stringLiteral(Rt.id.name):Rt.type==="Identifier"?fn=N.types.stringLiteral(Rt.name):fn=N.types.cloneNode(Rt),ir===Au){let{value:dn}=me.node,Dn=o==="2023-11"&&ft?[]:[N.types.thisExpression()];dn&&Dn.push(N.types.cloneNode(dn));let Mr=d(),u2=_i(h,`init_${Cr}`),Bve=N.types.callExpression(N.types.cloneNode(u2),Dn),Tve=Hge(Mr,Bve,ft),[Z7]=me.replaceWith(Tve);if(pn){Vt=Vge(Mr,o);let eq=_i(h,`get_${Cr}`),tq=_i(h,`set_${Cr}`);PRt(o,Z7,Rt,eq,tq,ft),fs=[u2,eq,tq]}else C8(t,s),$ge(t.node.id,Z7,N.types.cloneNode(Rt),N.types.isAssignmentExpression(Rt)?N.types.cloneNode(Rt.left):N.types.cloneNode(Rt),Mr,Ar,ft,o),fs=[u2]}else if(ir===Ff){let dn=_i(h,`init_${Cr}`),Dn=me.get("value"),Mr=o==="2023-11"&&ft?[]:[N.types.thisExpression()];Dn.node&&Mr.push(Dn.node),Dn.replaceWith(N.types.callExpression(N.types.cloneNode(dn),Mr)),fs=[dn],pn&&(Vt=Vge(Rt,o))}else if(pn){let dn=_i(h,`call_${Cr}`);if(fs=[dn],new qge.default({constantSuper:r,methodPath:me,objectRef:re,superRef:t.node.superClass,file:e.file,refToPreserve:re}).replace(),Vt=[zge(me.node)],ir===eye||ir===yw)_Rt(me,N.types.cloneNode(Rt),N.types.cloneNode(dn),ft);else{let Mr=me.node;t.node.body.body.unshift(N.types.classPrivateProperty(Rt,N.types.cloneNode(dn),[],Mr.static)),V.add(Rt.id.name),me.remove()}}U.push({kind:ir,decoratorsArray:un,decoratorsHaveThis:St,name:fn,isStatic:ft,privateMethods:Vt,locals:fs}),me.node&&(me.node.decorators=null)}if(Ar&&sr.length>0&&(c&&me.isClassProperty({static:!0})||(Q0(sr,ir===Au?me.getNextSibling():me),sr=[])),cn.length>0&&!ft&&(ir===Ff||ir===Au)&&(S8(cn,me),cn=[]),Ut.length>0&&ft&&(ir===Ff||ir===Au)&&(S8(Ut,me),Ut=[]),$t&&o==="2023-11"&&(ir===Ff||ir===Au)){let Vt=_i(h,`init_extra_${Cr}`);fs.push(Vt);let fn=N.types.callExpression(N.types.cloneNode(Vt),ft?[]:[N.types.thisExpression()]);ft?Ut.push(fn):cn.push(fn)}}}if(sr.length>0){let me=t.get("body.body"),K;for(let Qe=me.length-1;Qe>=0;Qe--){let $t=me[Qe],Ar=$t.node;if(Ar.computed){if(c&&N.types.isClassProperty(Ar,{static:!0}))continue;K=$t;break}}K!=null&&(gRt(sr,K),sr=[])}if(cn.length>0){let me=!!t.node.superClass;q?me?CRt(cn,q,g):ERt(cn,q):t.node.body.body.unshift(Yge(cn,me)),cn=[]}Ut.length>0&&(t.node.body.body.push(Wge(Ut)),Ut=[]);let tt=BRt(U),J=TRt(o==="2023-11"?U:tt,o),ee=DRt(tt);g&&ee.push(g),E&&ee.push(E);let Z=[],G=!1,de=ie&&N.types.callExpression(N.types.cloneNode(ie),[]),R=t,Kr=t.node,F=[];if(c){Z.push(re,ie);let me=[];if(t.get("body.body").forEach(K=>{if((K.isStaticBlock()||!K.isClassMethod()&&K.node.static)&&new qge.default({constantSuper:r,methodPath:K,objectRef:re,superRef:t.node.superClass,file:e.file,refToPreserve:re}).replace(),K.isStaticBlock()){if(v8(K,L)){let Qe=m(kRt(K.node),"staticBlock",F);Ut.push(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("call")),[N.types.thisExpression()]))}else Ut.push(NRt(K.node));K.remove();return}if((K.isClassProperty()||K.isClassPrivateProperty())&&K.node.static){let Qe=K.get("value");if(v8(Qe,L)){let $t=m(QRt(Qe.node),"fieldValue",F);Qe.replaceWith(N.types.callExpression(N.types.memberExpression($t,N.types.identifier("call")),[N.types.thisExpression()]))}Ut.length>0&&(S8(Ut,K),Ut=[]),K.node.static=!1,me.push(K.node),K.remove()}else if(K.isClassPrivateMethod({static:!0})){if(v8(K,L)){let Qe=m(zge(K.node),K.get("key.id").node.name,F);n?(K.node.params=[N.types.restElement(N.types.identifier("arg"))],K.node.body=N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("apply")),[N.types.thisExpression(),N.types.identifier("arg")]))])):(K.node.params=K.node.params.map(($t,Ar)=>N.types.isRestElement($t)?N.types.restElement(N.types.identifier("arg")):N.types.identifier("_"+Ar)),K.node.body=N.types.blockStatement([N.types.returnStatement(N.types.callExpression(N.types.memberExpression(Qe,N.types.identifier("apply")),[N.types.thisExpression(),N.types.identifier("arguments")]))]))}K.node.static=!1,me.push(K.node),K.remove()}}),me.length>0||Ut.length>0){let K=N.template.expression.ast`
|
|
2596
2596
|
class extends ${e.addHelper("identity")} {}
|
|
2597
2597
|
`;K.body.body=[N.types.classProperty(N.types.toExpression(Kr),void 0,void 0,void 0,!0,!0),...me];let Qe=[],$t=N.types.newExpression(K,[]);Ut.length>0&&Qe.push(...Ut),de&&(G=!0,Qe.push(de)),Qe.length>0?(Qe.unshift(N.types.callExpression(N.types.super(),[N.types.cloneNode(re)])),K.body.body.push(Yge(Qe,!1))):$t.arguments.push(N.types.cloneNode(re));let[Ar]=t.replaceWith($t);R=Ar.get("callee").get("body").get("body.0.key")}}!G&&de&&t.node.body.body.push(N.types.staticBlock([N.types.expressionStatement(de)]));let{superClass:Qn}=Kr;if(Qn&&(o==="2023-11"||o==="2023-05")){let me=t.scope.maybeGenerateMemoised(Qn);me&&(Kr.superClass=N.types.assignmentExpression("=",me,Qn),Qn=me)}let ws=N.types.staticBlock([]);Kr.body.body.unshift(ws);let ua=ws.body;if(sr.length>0){let me=R.get("body.body"),K;for(let Qe of me)if((Qe.isClassProperty()||Qe.isClassMethod())&&Qe.node.kind!=="constructor"){K=Qe;break}K!=null?(ORt(K),Q0(sr,K)):(Kr.body.body.unshift(N.types.classProperty(N.types.sequenceExpression([...sr,N.types.stringLiteral("_")]),void 0,void 0,void 0,!0,!0)),ua.push(N.types.expressionStatement(N.types.unaryExpression("delete",N.types.memberExpression(N.types.thisExpression(),N.types.identifier("_")))))),sr=[]}if(ua.push(N.types.expressionStatement(MRt(ee,Z,J,Ht??N.types.arrayExpression(qt),N.types.numericLiteral(Mt),Kn?Jn:null,I,N.types.cloneNode(Qn),e,o))),E&&ua.push(N.types.expressionStatement(N.types.callExpression(N.types.cloneNode(E),[N.types.thisExpression()]))),F.length>0&&ua.push(...F.map(me=>N.types.expressionStatement(me))),t.insertBefore(A.map(me=>N.types.expressionStatement(me))),Ct)if(!h.getBinding(re.name).constantViolations.length)t.insertBefore(N.types.variableDeclaration("let",[N.types.variableDeclarator(N.types.cloneNode(re))]));else{let K=h.generateUidIdentifier("t"+re.name),Qe=re;t.replaceWithMultiple([N.types.variableDeclaration("let",[N.types.variableDeclarator(N.types.cloneNode(Qe)),N.types.variableDeclarator(K)]),N.types.blockStatement([N.types.variableDeclaration("let",[N.types.variableDeclarator(N.types.cloneNode(re))]),t.node,N.types.expressionStatement(N.types.assignmentExpression("=",N.types.cloneNode(K),N.types.cloneNode(re)))]),N.types.expressionStatement(N.types.assignmentExpression("=",N.types.cloneNode(Qe),N.types.cloneNode(K)))])}return V.size>0&&FRt(t,V),t.scope.crawl(),t}function MRt(t,e,r,n,s,i,o,a,l,c){let u,p,f=[o?tye(l,o):N.types.thisExpression(),n,r];return c!=="2023-11"&&f.splice(1,2,r,n),c==="2021-12"||c==="2022-03"&&!l.availableHelper("applyDecs2203R")?(u=N.types.arrayPattern([...t,...e]),p=N.types.callExpression(l.addHelper(c==="2021-12"?"applyDecs":"applyDecs2203"),f),N.types.assignmentExpression("=",u,p)):(c==="2022-03"?p=N.types.callExpression(l.addHelper("applyDecs2203R"),f):c==="2023-01"?(i&&f.push(I8(i)),p=N.types.callExpression(l.addHelper("applyDecs2301"),f)):c==="2023-05"&&((i||a||s.value!==0)&&f.push(s),i?f.push(I8(i)):a&&f.push(N.types.unaryExpression("void",N.types.numericLiteral(0))),a&&f.push(a),p=N.types.callExpression(l.addHelper("applyDecs2305"),f)),c==="2023-11"&&((i||a||s.value!==0)&&f.push(s),i?f.push(I8(i)):a&&f.push(N.types.unaryExpression("void",N.types.numericLiteral(0))),a&&f.push(a),p=N.types.callExpression(l.addHelper("applyDecs2311"),f)),t.length>0?e.length>0?u=N.types.objectPattern([N.types.objectProperty(N.types.identifier("e"),N.types.arrayPattern(t)),N.types.objectProperty(N.types.identifier("c"),N.types.arrayPattern(e))]):(u=N.types.arrayPattern(t),p=N.types.memberExpression(p,N.types.identifier("e"),!1,!1)):(u=N.types.arrayPattern(e),p=N.types.memberExpression(p,N.types.identifier("c"),!1,!1)),N.types.assignmentExpression("=",u,p))}function URt(t){return t.type==="Identifier"?t.name==="__proto__":t.value==="__proto__"}function R0(t){return t.decorators&&t.decorators.length>0}function jRt(t){switch(t.type){case"ClassAccessorProperty":return!0;case"ClassMethod":case"ClassProperty":case"ClassPrivateMethod":case"ClassPrivateProperty":return R0(t);default:return!1}}function qRt(t){return R0(t)||t.body.body.some(jRt)}function rye(t,e){function r(n,s,i){switch(s.type){case"StringLiteral":return N.types.stringLiteral(s.value);case"NumericLiteral":case"BigIntLiteral":{let o=s.value+"";return n.get("key").replaceWith(N.types.stringLiteral(o)),N.types.stringLiteral(o)}default:{let o=n.scope.maybeGenerateMemoised(s);return n.get("key").replaceWith(N.types.assignmentExpression("=",o,w8(i,s))),N.types.cloneNode(o)}}}return{VariableDeclarator(n,s){let i=n.node.id;if(i.type==="Identifier"){let o=(0,hu.skipTransparentExprWrappers)(n.get("init"));if(t(o)){let a=i.name;e(o,s,a)}}},AssignmentExpression(n,s){let i=n.node.left;if(i.type==="Identifier"){let o=(0,hu.skipTransparentExprWrappers)(n.get("right"));if(t(o))switch(n.node.operator){case"=":case"&&=":case"||=":case"??=":e(o,s,i.name)}}},AssignmentPattern(n,s){let i=n.node.left;if(i.type==="Identifier"){let o=(0,hu.skipTransparentExprWrappers)(n.get("right"));if(t(o)){let a=i.name;e(o,s,a)}}},ObjectExpression(n,s){for(let i of n.get("properties")){if(!i.isObjectProperty())continue;let{node:o}=i,a=o.key,l=(0,hu.skipTransparentExprWrappers)(i.get("value"));if(t(l)){if(o.computed){let c=r(i,a,s);e(l,s,c)}else if(!URt(a))if(a.type==="Identifier")e(l,s,a.name);else{let c=N.types.stringLiteral(a.value+"");e(l,s,c)}}}},ClassPrivateProperty(n,s){let{node:i}=n,o=(0,hu.skipTransparentExprWrappers)(n.get("value"));if(t(o)){let a=N.types.stringLiteral("#"+i.key.id.name);e(o,s,a)}},ClassAccessorProperty(n,s){let{node:i}=n,o=i.key,a=(0,hu.skipTransparentExprWrappers)(n.get("value"));if(t(a))if(i.computed){let l=r(n,o,s);e(a,s,l)}else if(o.type==="Identifier")e(a,s,o.name);else if(o.type==="PrivateName"){let l=N.types.stringLiteral("#"+o.id.name);e(a,s,l)}else{let l=N.types.stringLiteral(o.value+"");e(a,s,l)}},ClassProperty(n,s){let{node:i}=n,o=i.key,a=(0,hu.skipTransparentExprWrappers)(n.get("value"));if(t(a))if(i.computed){let l=r(n,o,s);e(a,s,l)}else if(o.type==="Identifier")e(a,s,o.name);else{let l=N.types.stringLiteral(o.value+"");e(a,s,l)}}}}function HRt(t){return t.isClassExpression({id:null})&&qRt(t.node)}function _i(t,e){let r=t.generateUidIdentifier(e);return t.push({id:r,kind:"let"}),N.types.cloneNode(r)}function $Rt({assertVersion:t,assumption:e},{loose:r},n,s){var i,o;t(n==="2023-11"||n==="2023-05"||n==="2023-01"?"^7.21.0":n==="2021-12"?"^7.16.0":"^7.19.0");let a=new WeakSet,l=(i=e("constantSuper"))!=null?i:r,c=(o=e("ignoreFunctionLength"))!=null?o:r,u=rye(HRt,p);function p(f,d,A){var h;if(a.has(f))return;let{node:m}=f;A??(A=(h=m.id)==null?void 0:h.name);let g=LRt(f,d,l,c,A,u,n);if(g){a.add(g);return}a.add(f)}return{name:"proposal-decorators",inherits:s,visitor:Object.assign({ExportDefaultDeclaration(f,d){let{declaration:A}=f.node;if(A?.type==="ClassDeclaration"&&R0(A)){var h;let m=!A.id;(h=f.splitExportDeclaration)!=null||(f.splitExportDeclaration=xn().NodePath.prototype.splitExportDeclaration);let g=f.splitExportDeclaration();m&&p(g,d,N.types.stringLiteral("default"))}},ExportNamedDeclaration(f){let{declaration:d}=f.node;if(d?.type==="ClassDeclaration"&&R0(d)){var A;(A=f.splitExportDeclaration)!=null||(f.splitExportDeclaration=xn().NodePath.prototype.splitExportDeclaration),f.splitExportDeclaration()}},Class(f,d){p(f,d,void 0)}},u)}}});var sye=y(D8=>{"use strict";Object.defineProperty(D8,"__esModule",{value:!0});D8.buildDecoratedClass=KRt;var Er=wn(),VRt=fw();function EA(t,e){return e?Er.types.objectProperty(Er.types.identifier(t),e):null}function GRt(t,e){return Er.types.objectMethod("method",Er.types.identifier(t),[],Er.types.blockStatement(e))}function nye(t){let e;return t.decorators&&t.decorators.length>0&&(e=Er.types.arrayExpression(t.decorators.map(r=>r.expression))),t.decorators=void 0,e}function YRt(t){return t.computed?t.key:Er.types.isIdentifier(t.key)?Er.types.stringLiteral(t.key.name):Er.types.stringLiteral(String(t.key.value))}function WRt(t,e,r,n){let s=n.isClassMethod();if(n.isPrivate())throw n.buildCodeFrameError(`Private ${s?"methods":"fields"} in decorated classes are not supported yet.`);if(n.node.type==="ClassAccessorProperty")throw n.buildCodeFrameError('Accessor properties are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.');if(n.node.type==="StaticBlock")throw n.buildCodeFrameError('Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.');let{node:i,scope:o}=n;n.isTSDeclareMethod()||new VRt.default({methodPath:n,objectRef:e,superRef:r,file:t,refToPreserve:e}).replace();let a=[EA("kind",Er.types.stringLiteral(Er.types.isClassMethod(i)?i.kind:"field")),EA("decorators",nye(i)),EA("static",i.static&&Er.types.booleanLiteral(!0)),EA("key",YRt(i))].filter(Boolean);if(s){var l;(l=n.ensureFunctionName)!=null||(n.ensureFunctionName=xn().NodePath.prototype.ensureFunctionName),n.ensureFunctionName(!1),a.push(EA("value",Er.types.toExpression(n.node)))}else Er.types.isClassProperty(i)&&i.value?a.push(GRt("value",Er.template.statements.ast`return ${i.value}`)):a.push(EA("value",o.buildUndefinedNode()));return n.remove(),Er.types.objectExpression(a)}function JRt(t){return t.addHelper("decorate")}function KRt(t,e,r,n){let{node:s,scope:i}=e,o=i.generateUidIdentifier("initialize"),a=s.id&&e.isDeclaration(),l=e.isInStrictMode(),{superClass:c}=s;s.type="ClassDeclaration",s.id||(s.id=Er.types.cloneNode(t));let u;c&&(u=i.generateUidIdentifierBasedOnNode(s.superClass,"super"),s.superClass=u);let p=nye(s),f=Er.types.arrayExpression(r.filter(m=>!m.node.abstract&&m.node.type!=="TSIndexSignature").map(m=>WRt(n,s.id,u,m))),d=Er.template.expression.ast`
|
|
2598
2598
|
${JRt(n)}(
|
|
@@ -2724,10 +2724,10 @@ file. It's possible that the missing plugin is loaded by a preset
|
|
|
2724
2724
|
you are using that forgot to add the plugin to its dependencies: you
|
|
2725
2725
|
can workaround this problem by explicitly adding the missing package
|
|
2726
2726
|
to your top-level package.json.
|
|
2727
|
-
`,n}function CLt(t,e){try{return e?{error:null,value:(((r,n)=>(r=r.split("."),n=n.split("."),+r[0]>+n[0]||r[0]==n[0]&&+r[1]>=+n[1]))(process.versions.node,"8.9")?require.resolve:(r,{paths:[n]},s=require("module"))=>{let i=s._findPath(r,s._nodeModulePaths(n).concat(n));if(i)return i;throw i=new Error(`Cannot resolve module '${r}'`),i.code="MODULE_NOT_FOUND",i})(t,{paths:[e]})}:{error:null,value:require.resolve(t)}}catch(r){return{error:r,value:null}}}function SLt(t,e){try{return{error:null,value:(0,lLt.resolve)(t,e)}}catch(r){return{error:r,value:null}}}function C0e(t,e,r){let n=w0e(t,e),s=n.next();for(;!s.done;)s=n.next(CLt(s.value,r));return{loader:"require",filepath:s.value}}function ILt(t,e,r){let n=(0,d6().pathToFileURL)(h6().join(r,"./babel-virtual-resolve-base.js")).href,s=w0e(t,e),i=s.next();for(;!i.done;)i=s.next(SLt(i.value,n));return{loader:"auto",filepath:(0,d6().fileURLToPath)(i.value)}}function B0e(t,e,r,n){if(!I0e.supportsESM||!n)return C0e(t,e,r);try{let s=ILt(t,e,r);if(!(0,v0e().existsSync)(s.filepath))throw Object.assign(new Error(`Could not resolve "${e}" in file ${r}.`),{type:"MODULE_NOT_FOUND"});return s}catch(s){try{return C0e(t,e,r)}catch(i){throw s.type==="MODULE_NOT_FOUND"?s:i.type==="MODULE_NOT_FOUND"?i:s}}}var f6=new Set;function*T0e(t,e,r){if(!(yield*(0,A6.isAsync)())&&f6.has(r))throw new Error(`Reentrant ${t} detected trying to load "${r}". This module is not ignored and is trying to load itself while compiling itself, leading to a dependency cycle. We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.`);try{return f6.add(r),yield*(0,I0e.default)(r,e,`You appear to be using a native ECMAScript module ${t}, which is only supported when running Babel asynchronously or when using the Node.js \`--experimental-require-module\` flag.`,`You appear to be using a ${t} that contains top-level await, which is only supported when running Babel asynchronously.`,!0)}catch(n){throw n.message=`[BABEL]: ${n.message} (While processing: ${r})`,n}finally{f6.delete(r)}}});var S0=y(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});Object.defineProperty(ki,"ROOT_CONFIG_FILENAMES",{enumerable:!0,get:function(){return xA.ROOT_CONFIG_FILENAMES}});Object.defineProperty(ki,"findConfigUpwards",{enumerable:!0,get:function(){return xA.findConfigUpwards}});Object.defineProperty(ki,"findPackageData",{enumerable:!0,get:function(){return vLt.findPackageData}});Object.defineProperty(ki,"findRelativeConfig",{enumerable:!0,get:function(){return xA.findRelativeConfig}});Object.defineProperty(ki,"findRootConfig",{enumerable:!0,get:function(){return xA.findRootConfig}});Object.defineProperty(ki,"loadConfig",{enumerable:!0,get:function(){return xA.loadConfig}});Object.defineProperty(ki,"loadPlugin",{enumerable:!0,get:function(){return Rw.loadPlugin}});Object.defineProperty(ki,"loadPreset",{enumerable:!0,get:function(){return Rw.loadPreset}});Object.defineProperty(ki,"resolvePlugin",{enumerable:!0,get:function(){return Rw.resolvePlugin}});Object.defineProperty(ki,"resolvePreset",{enumerable:!0,get:function(){return Rw.resolvePreset}});Object.defineProperty(ki,"resolveShowConfigPath",{enumerable:!0,get:function(){return xA.resolveShowConfigPath}});var vLt=Sde(),xA=Jye(),Rw=D0e()});var _0e=y(wA=>{"use strict";Object.defineProperty(wA,"__esModule",{value:!0});wA.transform=void 0;wA.transformAsync=TLt;wA.transformSync=BLt;function P0e(){let t=Di();return P0e=function(){return t},t}var xLt=hA(),wLt=iw(),Ow=Nl(),Fw=P0e()(function*(e,r){let n=yield*(0,xLt.default)(r);return n===null?null:yield*(0,wLt.run)(n,e)}),kpr=wA.transform=function(e,r,n){let s,i;if(typeof r=="function"?(i=r,s=void 0):(s=r,i=n),i===void 0)return(0,Ow.beginHiddenCallStack)(Fw.sync)(e,s);(0,Ow.beginHiddenCallStack)(Fw.errback)(e,s,i)};function BLt(...t){return(0,Ow.beginHiddenCallStack)(Fw.sync)(...t)}function TLt(...t){return(0,Ow.beginHiddenCallStack)(Fw.async)(...t)}});var k0e=y(BA=>{"use strict";Object.defineProperty(BA,"__esModule",{value:!0});BA.transformFromAst=void 0;BA.transformFromAstAsync=NLt;BA.transformFromAstSync=_Lt;function N0e(){let t=Di();return N0e=function(){return t},t}var DLt=hA(),PLt=iw(),Lw=Nl(),Mw=N0e()(function*(t,e,r){let n=yield*(0,DLt.default)(r);if(n===null)return null;if(!t)throw new Error("No AST given");return yield*(0,PLt.run)(n,e,t)}),Rpr=BA.transformFromAst=function(e,r,n,s){let i,o;if(typeof n=="function"?(o=n,i=void 0):(i=n,o=s),o===void 0)return(0,Lw.beginHiddenCallStack)(Mw.sync)(e,r,i);(0,Lw.beginHiddenCallStack)(Mw.errback)(e,r,i,o)};function _Lt(...t){return(0,Lw.beginHiddenCallStack)(Mw.sync)(...t)}function NLt(...t){return(0,Lw.beginHiddenCallStack)(Mw.async)(...t)}});var R0e=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});TA.parse=void 0;TA.parseAsync=FLt;TA.parseSync=OLt;function Q0e(){let t=Di();return Q0e=function(){return t},t}var kLt=hA(),QLt=MU(),RLt=kU(),Uw=Nl(),jw=Q0e()(function*(e,r){let n=yield*(0,kLt.default)(r);return n===null?null:yield*(0,QLt.default)(n.passes,(0,RLt.default)(n),e)}),Fpr=TA.parse=function(e,r,n){if(typeof r=="function"&&(n=r,r=void 0),n===void 0)return(0,Uw.beginHiddenCallStack)(jw.sync)(e,r);(0,Uw.beginHiddenCallStack)(jw.errback)(e,r,n)};function OLt(...t){return(0,Uw.beginHiddenCallStack)(jw.sync)(...t)}function FLt(...t){return(0,Uw.beginHiddenCallStack)(jw.async)(...t)}});var wn=y(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.DEFAULT_EXTENSIONS=void 0;Object.defineProperty(dt,"File",{enumerable:!0,get:function(){return LLt.default}});Object.defineProperty(dt,"buildExternalHelpers",{enumerable:!0,get:function(){return MLt.default}});Object.defineProperty(dt,"createConfigItem",{enumerable:!0,get:function(){return $a.createConfigItem}});Object.defineProperty(dt,"createConfigItemAsync",{enumerable:!0,get:function(){return $a.createConfigItemAsync}});Object.defineProperty(dt,"createConfigItemSync",{enumerable:!0,get:function(){return $a.createConfigItemSync}});Object.defineProperty(dt,"getEnv",{enumerable:!0,get:function(){return ULt.getEnv}});Object.defineProperty(dt,"loadOptions",{enumerable:!0,get:function(){return $a.loadOptions}});Object.defineProperty(dt,"loadOptionsAsync",{enumerable:!0,get:function(){return $a.loadOptionsAsync}});Object.defineProperty(dt,"loadOptionsSync",{enumerable:!0,get:function(){return $a.loadOptionsSync}});Object.defineProperty(dt,"loadPartialConfig",{enumerable:!0,get:function(){return $a.loadPartialConfig}});Object.defineProperty(dt,"loadPartialConfigAsync",{enumerable:!0,get:function(){return $a.loadPartialConfigAsync}});Object.defineProperty(dt,"loadPartialConfigSync",{enumerable:!0,get:function(){return $a.loadPartialConfigSync}});Object.defineProperty(dt,"parse",{enumerable:!0,get:function(){return E6.parse}});Object.defineProperty(dt,"parseAsync",{enumerable:!0,get:function(){return E6.parseAsync}});Object.defineProperty(dt,"parseSync",{enumerable:!0,get:function(){return E6.parseSync}});dt.resolvePreset=dt.resolvePlugin=void 0;Object.defineProperty(dt,"template",{enumerable:!0,get:function(){return U0e().default}});Object.defineProperty(dt,"tokTypes",{enumerable:!0,get:function(){return L0e().tokTypes}});Object.defineProperty(dt,"transform",{enumerable:!0,get:function(){return m6.transform}});Object.defineProperty(dt,"transformAsync",{enumerable:!0,get:function(){return m6.transformAsync}});Object.defineProperty(dt,"transformFile",{enumerable:!0,get:function(){return g6.transformFile}});Object.defineProperty(dt,"transformFileAsync",{enumerable:!0,get:function(){return g6.transformFileAsync}});Object.defineProperty(dt,"transformFileSync",{enumerable:!0,get:function(){return g6.transformFileSync}});Object.defineProperty(dt,"transformFromAst",{enumerable:!0,get:function(){return y6.transformFromAst}});Object.defineProperty(dt,"transformFromAstAsync",{enumerable:!0,get:function(){return y6.transformFromAstAsync}});Object.defineProperty(dt,"transformFromAstSync",{enumerable:!0,get:function(){return y6.transformFromAstSync}});Object.defineProperty(dt,"transformSync",{enumerable:!0,get:function(){return m6.transformSync}});Object.defineProperty(dt,"traverse",{enumerable:!0,get:function(){return M0e().default}});dt.version=dt.types=void 0;var LLt=q3(),MLt=Jfe(),O0e=S0(),ULt=CU();function F0e(){let t=ze();return F0e=function(){return t},t}Object.defineProperty(dt,"types",{enumerable:!0,get:function(){return F0e()}});function L0e(){let t=Ty();return L0e=function(){return t},t}function M0e(){let t=xn();return M0e=function(){return t},t}function U0e(){let t=ky();return U0e=function(){return t},t}var $a=hA(),m6=_0e(),g6=e8(),y6=k0e(),E6=R0e(),Mpr=dt.version="7.29.7",jLt=(t,e)=>O0e.resolvePlugin(t,e,!1).filepath;dt.resolvePlugin=jLt;var qLt=(t,e)=>O0e.resolvePreset(t,e,!1).filepath;dt.resolvePreset=qLt;var Upr=dt.DEFAULT_EXTENSIONS=Object.freeze([".js",".jsx",".es6",".es",".mjs",".cjs"]);dt.OptionManager=class{init(e){return(0,$a.loadOptionsSync)(e)}};dt.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)}});var q0e=y(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.sanitize=void 0;function HLt(t){let e=t.replace(new RegExp(`(?<!^)(?:${j0e.source})([a-z])`,"g"),(r,n)=>n.toUpperCase());return e=e.replace(new RegExp(j0e.source,"g"),""),e}qw.sanitize=HLt;var j0e=/^[^a-zA-Z_$]|(?<=.)[^a-zA-Z_$0-9]/});var G0e=y($w=>{"use strict";Object.defineProperty($w,"__esModule",{value:!0});$w.ImportUtil=void 0;var $Lt=q0e(),b6=class{constructor(e,r){this.babel=e,this.program=r,this.t=e.types}removeImport(e,r){for(let n of this.program.get("body")){if(!V0e(n,e))continue;let s=n.get("specifiers").find(i=>$0e(i,r));s&&(n.node.specifiers.length===1?n.remove():s.remove())}}removeAllImports(e){for(let r of this.program.get("body"))V0e(r,e)&&r.remove()}import(e,r,n,s){return this.unreferencedImport(e,r,n,H0e(s,n,Hw(e)))}unreferencedImport(e,r,n,s){var i;let o=n==="*",l=!(n==="default")&&!o,c=this.findImportFrom(r),u=c?.node.specifiers.find(d=>d.type==="ImportNamespaceSpecifier");if(!(c?.node.specifiers.find(d=>d.type==="ImportSpecifier")&&o||u&&l||u&&o)&&c){let d=c.get("specifiers").find(A=>$0e(A,n));return d&&((i=e.scope.getBinding(d.node.local.name))===null||i===void 0?void 0:i.kind)==="module"?this.t.identifier(d.node.local.name):this.addSpecifier(e,c,n,s)}else{let d=this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(r)));return this.addSpecifier(e,d,n,s)}}importForSideEffect(e){this.findImportFrom(e)||this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(e)))}replaceWith(e,r){return this.mutate(n=>(e.replaceWith(r(n)),e),Hw(e))}insertAfter(e,r){return this.mutate(n=>e.insertAfter(r(n))[0],Hw(e))}insertBefore(e,r){return this.mutate(n=>e.insertBefore(r(n))[0],Hw(e))}mutate(e,r){let n=new Map,s={import:(a,l,c)=>{let u=this.t.identifier("__babel_import_util_placeholder__");return n.set(u,{moduleSpecifier:a,exportedName:l,nameHint:c}),u}},i=a=>{if(!a.isIdentifier())return;let l=n.get(a.node);if(l){let c=this.unreferencedImport(a,l.moduleSpecifier,l.exportedName,H0e(l.nameHint,l.exportedName,r));a.replaceWith(c);let u=a.scope.getBinding(c.name);if(!u)throw new Error("bug: this is supposed to never happen");u.reference(a)}},o=e(s);return i(o),this.babel.traverse(o.node,{ReferencedIdentifier:a=>{i(a)}},o.scope,{},o),o}addSpecifier(e,r,n,s){let i=this.t.identifier(VLt(e,s)),o=this.buildSpecifier(n,i),a;return o.type==="ImportDefaultSpecifier"?(r.node.specifiers.unshift(o),a=r.get("specifiers.0")):(r.node.specifiers.push(o),a=r.get(`specifiers.${r.node.specifiers.length-1}`)),r.scope.registerBinding("module",a),i}buildSpecifier(e,r){switch(e){case"default":return this.t.importDefaultSpecifier(r);case"*":return this.t.importNamespaceSpecifier(r);default:return this.t.importSpecifier(r,this.t.identifier(e))}}findImportFrom(e){for(let r of this.program.get("body"))if(r.isImportDeclaration()&&r.node.source.value===e&&r.node.importKind!=="type")return r}insertAfterExistingImports(e){let r;for(let[n,s]of this.program.node.body.entries())s.type==="ImportDeclaration"&&(r=n);return r==null?(this.program.node.body.unshift(e),this.program.get("body.0")):(this.program.node.body.splice(r+1,0,e),this.program.get(`body.${r+1}`))}};$w.ImportUtil=b6;function VLt(t,e){let r=e,n=0;for(;t.scope.hasBinding(r);)r=`${e}${n++}`;return r}function GLt(t){return t.type==="StringLiteral"?t.value:t.name}function H0e(t,e,r){return t?(0,$Lt.sanitize)(t):e==="default"||e==="*"?r??"a":e}function Hw(t){return t?.isIdentifier()?t.node.name:t?t.scope.generateUidIdentifierBasedOnNode(t.node).name:void 0}function $0e(t,e){switch(e){case"default":return t.isImportDefaultSpecifier();case"*":return t.isImportNamespaceSpecifier();default:return t.isImportSpecifier()&&GLt(t.node.imported)===e}}function V0e(t,e){return t.isImportDeclaration()&&t.get("source").node.value===e}});var S6=y(C6=>{"use strict";Object.defineProperty(C6,"__esModule",{value:!0});C6.astNodeHasBinding=YLt;function YLt(t,e){var r;let n=t;for(;n;){let s=(r=n.parent)===null||r===void 0?void 0:r.node;if(s?.type==="ElementNode"&&s.blockParams.includes(e)&&s.children.includes(n.node)||s?.type==="Block"&&s.blockParams.includes(e)&&s.body.includes(n.node))return!0;n=n.parent}return!1}});var Y0e=y(I6=>{"use strict";Object.defineProperty(I6,"__esModule",{value:!0});I6.readOnlyArray=JLt;var WLt=["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"];function JLt(t,e="Forbidden array mutation"){return new Proxy(t,{get(r,n){return typeof n=="string"&&WLt.includes(n)?()=>{throw new Error(e)}:Reflect.get(r,n)},set(r,n){throw new Error(e)},deleteProperty(){throw new Error(e)}})}});var B6=y(ta=>{"use strict";var KLt=ta&&ta.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},ls=ta&&ta.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},x6,Jl,bu,DA,W0e;Object.defineProperty(ta,"__esModule",{value:!0});ta.ScopeLocals=ta.ALLOWED_GLOBALS=void 0;var v6=S6(),zLt=Y0e();ta.ALLOWED_GLOBALS=new Set(["globalThis","Atomics","JSON","Math","Reflect","localStorage","sessionStorage","isNaN","isFinite","parseInt","parseFloat","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","postMessage","structuredClone","Array","BigInt","Boolean","Date","Number","Object","String","Infinity","NaN","isSecureContext"]);var w6=class{constructor(e){x6.add(this),Jl.set(this,{}),bu.set(this,[]),DA.set(this,void 0),KLt(this,DA,e,"f")}get locals(){return(0,zLt.readOnlyArray)(ls(this,bu,"f"),`The only supported way to manipulate locals is via the jsutils API
|
|
2728
|
-
https://github.com/emberjs/babel-plugin-ember-template-compilation#jsutils-manipulating-javascript-from-within-ast-transforms`)}has(e){return e in ls(this,Jl,"f")}get(e){return ls(this,Jl,"f")[e]}isEmpty(){return ls(this,bu,"f").length===0}entries(){return Object.entries(ls(this,Jl,"f"))}add(e,r){ls(this,Jl,"f")[e]=r??e,ls(this,bu,"f").includes(e)||ls(this,bu,"f").push(e)}crawl(){return e=>{let r;return{name:"scope-locals-crawl",visitor:{Template:{enter:()=>{r=new Set},exit:(n,s)=>{if(ls(this,DA,"f").mode==="implicit")for(let i of r)i==="this"?ls(this,DA,"f").mayUseLexicalThis&&this.add(i):ls(this,x6,"m",W0e).call(this,i,ls(this,DA,"f").jsPath)&&this.add(i);else for(let i of Object.keys(ls(this,Jl,"f")))r.has(i)||(ls(this,bu,"f").splice(ls(this,bu,"f").indexOf(i),1),delete ls(this,Jl,"f")[i])}},PathExpression:(n,s)=>{switch(n.head.type){case"ThisHead":(0,v6.astNodeHasBinding)(s,"this")||r.add("this");break;case"VarHead":{let i=n.head.name;(0,v6.astNodeHasBinding)(s,i)||r.add(i)}}},ElementNode:(n,s)=>{let i=n.tag.split(".")[0];(0,v6.astNodeHasBinding)(s,i)||r.add(i)}}}}}};ta.ScopeLocals=w6;Jl=new WeakMap,bu=new WeakMap,DA=new WeakMap,x6=new WeakSet,W0e=function(e,r){var n;let s=(n=ls(this,Jl,"f")[e])!==null&&n!==void 0?n:e;return ta.ALLOWED_GLOBALS.has(s)||r.scope.getBinding(s)}});var K0e=y(Vw=>{"use strict";Object.defineProperty(Vw,"__esModule",{value:!0});Vw.ExpressionParser=void 0;var XLt=B6(),T6=class{constructor(e){this.babel=e}parseExpression(e,r){switch(r.node.type){case"ObjectExpression":return this.parseObjectExpression(e,r);case"ArrayExpression":return this.parseArrayExpression(e,r);case"StringLiteral":case"BooleanLiteral":case"NumericLiteral":return r.node.value;default:throw r.buildCodeFrameError(`${e} can only accept static options but you passed ${JSON.stringify(r.node)}`)}}parseArrayExpression(e,r){return r.get("elements").map(n=>{if(n.isSpreadElement())throw n.buildCodeFrameError("spread element is not allowed here");return n.isExpression()?this.parseExpression(e,n):null})}parseScope(e,r){let n;if(r.node.type==="ObjectMethod")n=r.node.body;else{let{value:i}=r.node;if(this.t.isObjectExpression(i))throw r.buildCodeFrameError("Passing an object as the `scope` property to inline templates is no longer supported. Please pass a function that returns an object expression instead.");(this.t.isFunctionExpression(i)||this.t.isArrowFunctionExpression(i))&&(n=i.body)}let s;if(n?.type==="ObjectExpression")s=n;else if(n?.type==="BlockStatement"){let i=n.body.filter(o=>o.type==="ReturnStatement");if(i.length!==1)throw new Error("Scope functions must have a single return statement which returns an object expression containing references to in-scope values");s=i[0].argument}if(s?.type!=="ObjectExpression")throw r.buildCodeFrameError(`Scope objects for \`${e}\` must be an object expression containing only references to in-scope values, or a function that returns an object expression containing only references to in-scope values`);return s.properties.reduce((i,o)=>{if(this.t.isSpreadElement(o))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may not contain spread elements`);if(this.t.isObjectMethod(o))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may not contain methods`);let{key:a,value:l}=o;if(!this.t.isStringLiteral(a)&&!this.t.isIdentifier(a))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may only contain static property names`);let c=J0e(a);switch(l.type){case"Identifier":i.add(c,l.name);break;case"ThisExpression":i.add(c,"this");break;default:throw r.buildCodeFrameError(`Scope objects for \`${e}\` may only contain direct references to in-scope values, e.g. { ${c} } or { ${c}: ${c} }. Found ${l.type}`)}return i},new XLt.ScopeLocals({mode:"explicit"}))}parseEval(e,r){let n;if(r.isObjectMethod())n=r.get("body");else if(r.isObjectProperty()){let p=r.get("value");if(p.isFunctionExpression())n=p.get("body");else throw r.buildCodeFrameError(`unsupported syntax for \`eval\` parameter to \`${e}\`. It must be an object method or a function.`)}else throw r.buildCodeFrameError(`unsupported syntax for \`eval\` parameter to \`${e}\`. It must be an object method or a function.`);let s=n.get("body").filter(p=>p.isReturnStatement());if(s.length!==1)throw n.buildCodeFrameError("eval function must have a single return statement");let i=s[0].get("argument");if(!i.isCallExpression())throw s[0].buildCodeFrameError("eval function must return `eval(arguments[0])`. Found non-CallExpression.");let o=i.get("callee");if(!o.isIdentifier()||o.node.name!=="eval")throw i.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found callee is not eval.");let a=i.get("arguments");if(a.length!==1)throw i.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found incorrect number of arguments.");let l=a[0];if(!l.isMemberExpression())throw l.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found argument is non-MemberExpression.");let c=l.get("object");if(!c.isIdentifier()||c.node.name!=="arguments")throw c.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found wrong argument to eval.");let u=l.get("property");if(!u.isNumericLiteral()||u.node.value!==0)throw u.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found wrong property.");return{isEval:!0}}parseObjectExpression(e,r,n=!1,s=!1){let i={};return r.get("properties").forEach(o=>{let{node:a}=o;if(this.t.isSpreadElement(a))throw o.buildCodeFrameError(`${e} does not allow spread element`);if(a.computed)throw o.buildCodeFrameError(`${e} can only accept static property names`);let{key:l}=a;if(!this.t.isIdentifier(l)&&!this.t.isStringLiteral(l))throw o.buildCodeFrameError(`${e} can only accept static property names`);let c=J0e(l);if(n&&c==="scope")i.scope=this.parseScope(e,o);else if(s&&c==="eval")i.eval=this.parseEval(e,o);else if(s&&c==="component")i.component=o.get("value");else{if(this.t.isObjectMethod(a))throw o.buildCodeFrameError(`${e} does not accept a method for ${c}`);let u=o.get("value");if(!u.isExpression())throw u.buildCodeFrameError("must be an expression");i[c]=this.parseExpression(e,u)}}),i}get t(){return this.babel.types}};Vw.ExpressionParser=T6;function J0e(t){return t.type==="StringLiteral"?t.value:t.name}});var X0e=y(Cu=>{"use strict";var Hf=Cu&&Cu.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},tr=Cu&&Cu.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qf,$f,ui,PA,_A,NA,Gw,P6,Yw,Ww;Object.defineProperty(Cu,"__esModule",{value:!0});Cu.JSUtils=void 0;var D6=S6(),_6=class{constructor(e,r,n,s,i){if(qf.add(this),$f.set(this,void 0),ui.set(this,void 0),PA.set(this,void 0),_A.set(this,void 0),NA.set(this,void 0),Hf(this,$f,e,"f"),Hf(this,ui,r,"f"),Hf(this,PA,n,"f"),Hf(this,_A,s,"f"),Hf(this,NA,i,"f"),!tr(this,ui,"f").lastInsertedPath){let o;for(let a of tr(this,ui,"f").program.get("body")){if(!a.isImportDeclaration())break;o=a}o&&(tr(this,ui,"f").lastInsertedPath=o)}}bindExpression(e,r,n){var s;let i=z0e((s=n?.nameHint)!==null&&s!==void 0?s:"a",l=>tr(this,PA,"f").scope.hasBinding(l)||(0,D6.astNodeHasBinding)(r,l)),o=tr(this,$f,"f").types,a=tr(this,qf,"m",Gw).call(this,o.variableDeclaration("let",[o.variableDeclarator(o.identifier(i),tr(this,qf,"m",P6).call(this,tr(this,ui,"f").program,e))]));return a.scope.registerBinding("let",a.get("declarations.0")),tr(this,_A,"f").call(this,i),i}bindImport(e,r,n,s){let i=tr(this,NA,"f").import(tr(this,PA,"f"),e,r,s?.nameHint);if(!(0,D6.astNodeHasBinding)(n,i.name))return tr(this,_A,"f").call(this,i.name),i.name;let o=z0e(i.name,c=>tr(this,PA,"f").scope.hasBinding(c)||(0,D6.astNodeHasBinding)(n,c)),a=tr(this,$f,"f").types,l=tr(this,qf,"m",Gw).call(this,a.variableDeclaration("let",[a.variableDeclarator(a.identifier(o),i)]));return l.scope.registerBinding("let",l.get("declarations.0")),tr(this,_A,"f").call(this,o),o}importForSideEffect(e){tr(this,NA,"f").importForSideEffect(e)}emitExpression(e){let r=tr(this,$f,"f").types;tr(this,qf,"m",Gw).call(this,r.expressionStatement(tr(this,qf,"m",P6).call(this,tr(this,ui,"f").program,e)))}};Cu.JSUtils=_6;$f=new WeakMap,ui=new WeakMap,PA=new WeakMap,_A=new WeakMap,NA=new WeakMap,qf=new WeakSet,Gw=function(e){return tr(this,ui,"f").lastInsertedPath?tr(this,ui,"f").lastInsertedPath=tr(this,ui,"f").lastInsertedPath.insertAfter(e)[0]:tr(this,ui,"f").lastInsertedPath=tr(this,ui,"f").program.unshiftContainer("body",e)[0],tr(this,ui,"f").lastInsertedPath},P6=function(e,r){let n;typeof r=="string"?n=r:n=r(new N6(tr(this,NA,"f"),e));let s=tr(this,$f,"f").parse(n);if(!s)throw new Error(`JSUtils.bindExpression could not understand the expression: ${n}`);let i=ZLt(s);if(i.length!==1)throw new Error(`JSUtils.bindExpression expected to find exactly one expression but found ${i.length} in: ${n}`);let o=i[0];if(o.type!=="ExpressionStatement")throw new Error(`JSUtils.bindExpression expected to find an expression but found ${o.type} in: ${n}`);return o.expression};function z0e(t,e){let r=t,n=0;for(;e(r);)r=`${t}${n++}`;return r}function ZLt(t){return t.type==="File"?t.program.body:t.body}var N6=class{constructor(e,r){Yw.set(this,void 0),Ww.set(this,void 0),Hf(this,Yw,e,"f"),Hf(this,Ww,r,"f")}import(e,r,n){return tr(this,Yw,"f").import(tr(this,Ww,"f"),e,r,n).name}};Yw=new WeakMap,Ww=new WeakMap});var FEe=y(lr=>{"use strict";var Vf={NBSP:160,QUOT:34,LT:60,GT:62,AMP:38},pEe=/["\x26\xa0]/u,eMt=new RegExp(pEe.source,"gu"),fEe=/[&<>\xa0]/u,tMt=new RegExp(fEe.source,"gu");function rMt(t){switch(t.charCodeAt(0)){case Vf.NBSP:return" ";case Vf.QUOT:return""";case Vf.AMP:return"&";default:return t}}function nMt(t){switch(t.charCodeAt(0)){case Vf.NBSP:return" ";case Vf.AMP:return"&";case Vf.LT:return"<";case Vf.GT:return">";default:return t}}function Z0e(t){return pEe.test(t)?t.replace(eMt,rMt):t}function sMt(t){return fEe.test(t)?t.replace(tMt,nMt):t}function dEe(t,e){return t.loc.isInvisible||e.loc.isInvisible?0:t.loc.startPosition.line<e.loc.startPosition.line||t.loc.startPosition.line===e.loc.startPosition.line&&t.loc.startPosition.column<e.loc.startPosition.column?-1:t.loc.startPosition.line===e.loc.startPosition.line&&t.loc.startPosition.column===e.loc.startPosition.column?0:1}var tB=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function iMt(){return[...tB]}var oMt=/^\S/u;function a5(t){return tB.has(t.toLowerCase())&&t[0]?.toLowerCase()===t[0]}var Y0=class{constructor(e){this.buffer="",this.options=e}handledByOverride(e,r=!1){if(this.options.override!==void 0){let n=this.options.override(e,this.options);if(typeof n=="string")return r&&oMt.test(n)&&(n=` ${n}`),this.buffer+=n,!0}return!1}Node(e){switch(e.type){case"MustacheStatement":case"BlockStatement":case"MustacheCommentStatement":case"CommentStatement":case"TextNode":case"ElementNode":case"AttrNode":case"Block":case"Template":return this.TopLevelStatement(e);case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":case"PathExpression":case"SubExpression":return this.Expression(e);case"ConcatStatement":return this.ConcatStatement(e);case"Hash":return this.Hash(e);case"HashPair":return this.HashPair(e);case"ElementModifierStatement":return this.ElementModifierStatement(e)}}Expression(e){switch(e.type){case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":return this.Literal(e);case"PathExpression":return this.PathExpression(e);case"SubExpression":return this.SubExpression(e)}}Literal(e){switch(e.type){case"StringLiteral":return this.StringLiteral(e);case"BooleanLiteral":return this.BooleanLiteral(e);case"NumberLiteral":return this.NumberLiteral(e);case"UndefinedLiteral":return this.UndefinedLiteral(e);case"NullLiteral":return this.NullLiteral(e)}}TopLevelStatement(e){switch(e.type){case"MustacheStatement":return this.MustacheStatement(e);case"BlockStatement":return this.BlockStatement(e);case"MustacheCommentStatement":return this.MustacheCommentStatement(e);case"CommentStatement":return this.CommentStatement(e);case"TextNode":return this.TextNode(e);case"ElementNode":return this.ElementNode(e);case"Block":return this.Block(e);case"Template":return this.Template(e);case"AttrNode":return this.AttrNode(e)}}Template(e){this.TopLevelStatements(e.body)}Block(e){if(e.chained){let r=e.body[0];r.chained=!0}this.handledByOverride(e)||this.TopLevelStatements(e.body)}TopLevelStatements(e){e.forEach(r=>this.TopLevelStatement(r))}ElementNode(e){this.handledByOverride(e)||(this.OpenElementNode(e),this.TopLevelStatements(e.children),this.CloseElementNode(e))}OpenElementNode(e){this.buffer+=`<${e.tag}`;let r=[...e.attributes,...e.modifiers,...e.comments].sort(dEe);for(let n of r)switch(this.buffer+=" ",n.type){case"AttrNode":this.AttrNode(n);break;case"ElementModifierStatement":this.ElementModifierStatement(n);break;case"MustacheCommentStatement":this.MustacheCommentStatement(n);break}e.blockParams.length&&this.BlockParams(e.blockParams),e.selfClosing&&(this.buffer+=" /"),this.buffer+=">"}CloseElementNode(e){e.selfClosing||a5(e.tag)||(this.buffer+=`</${e.tag}>`)}AttrNode(e){if(this.handledByOverride(e))return;let{name:r,value:n}=e;this.buffer+=r,!r.startsWith("@")&&n.type=="TextNode"&&n.chars.length===0||(this.buffer+="=",this.AttrNodeValue(n))}AttrNodeValue(e){if(e.type==="TextNode"){let r='"';this.options.entityEncoding==="raw"&&e.chars.includes('"')&&!e.chars.includes("'")&&(r="'"),this.buffer+=r,this.TextNode(e,r),this.buffer+=r}else this.Node(e)}TextNode(e,r){this.handledByOverride(e)||(this.options.entityEncoding==="raw"?r&&e.chars.includes(r)?this.buffer+=Z0e(e.chars):this.buffer+=e.chars:r?this.buffer+=Z0e(e.chars):this.buffer+=sMt(e.chars))}MustacheStatement(e){this.handledByOverride(e)||(this.buffer+=e.trusting?"{{{":"{{",e.strip.open&&(this.buffer+="~"),this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),e.strip.close&&(this.buffer+="~"),this.buffer+=e.trusting?"}}}":"}}")}BlockStatement(e){this.handledByOverride(e)||(e.chained?(this.buffer+=e.inverseStrip.open?"{{~":"{{",this.buffer+="else "):this.buffer+=e.openStrip.open?"{{~#":"{{#",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),e.program.blockParams.length&&this.BlockParams(e.program.blockParams),e.chained?this.buffer+=e.inverseStrip.close?"~}}":"}}":this.buffer+=e.openStrip.close?"~}}":"}}",this.Block(e.program),e.inverse&&(e.inverse.chained||(this.buffer+=e.inverseStrip.open?"{{~":"{{",this.buffer+="else",this.buffer+=e.inverseStrip.close?"~}}":"}}"),this.Block(e.inverse)),e.chained||(this.buffer+=e.closeStrip.open?"{{~/":"{{/",this.Expression(e.path),this.buffer+=e.closeStrip.close?"~}}":"}}"))}BlockParams(e){this.buffer+=` as |${e.join(" ")}|`}ConcatStatement(e){this.handledByOverride(e)||(this.buffer+='"',e.parts.forEach(r=>{r.type==="TextNode"?this.TextNode(r,'"'):this.Node(r)}),this.buffer+='"')}MustacheCommentStatement(e){this.handledByOverride(e)||(this.buffer+=`{{!--${e.value}--}}`)}ElementModifierStatement(e){this.handledByOverride(e)||(this.buffer+="{{",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),this.buffer+="}}")}CommentStatement(e){this.handledByOverride(e)||(this.buffer+=`<!--${e.value}-->`)}PathExpression(e){this.handledByOverride(e)||(this.buffer+=e.original)}SubExpression(e){this.handledByOverride(e)||(this.buffer+="(",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),this.buffer+=")")}Params(e){e.length&&e.forEach(r=>{this.buffer+=" ",this.Expression(r)})}Hash(e){this.handledByOverride(e,!0)||e.pairs.forEach(r=>{this.buffer+=" ",this.HashPair(r)})}HashPair(e){this.handledByOverride(e)||(this.buffer+=e.key,this.buffer+="=",this.Node(e.value))}StringLiteral(e){this.handledByOverride(e)||(this.buffer+=JSON.stringify(e.value))}BooleanLiteral(e){this.handledByOverride(e)||(this.buffer+=String(e.value))}NumberLiteral(e){this.handledByOverride(e)||(this.buffer+=String(e.value))}UndefinedLiteral(e){this.handledByOverride(e)||(this.buffer+="undefined")}NullLiteral(e){this.handledByOverride(e)||(this.buffer+="null")}print(e){let{options:r}=this;if(r.override){let n=r.override(e,r);if(n!==void 0)return n}return this.buffer="",this.Node(e),this.buffer}};function hEe(t,e={entityEncoding:"transformed"}){return t?new Y0(e).print(t):""}function AEe(t,e){return t in j6?e===void 0?!0:j6[t].includes(e):!1}var j6={action:["Call","Modifier"],component:["Call","Append","Block"],debugger:["Append"],"each-in":["Block"],each:["Block"],"has-block-params":["Call","Append"],"has-block":["Call","Append"],helper:["Call","Append"],if:["Call","Append","Block"],"in-element":["Block"],let:["Block"],log:["Call","Append"],modifier:["Call","Modifier"],mount:["Append"],mut:["Call","Append"],outlet:["Append"],readonly:["Call","Append"],unbound:["Call","Append"],unless:["Call","Append","Block"],yield:["Append"]};function l5(t,...e){}function aMt(t,e){return t}function yo(t){return t?t.length>0:!1}function FA(t,e="unexpected empty list"){return t}function aE(t){return t.length===0?void 0:t[t.length-1]}function c5(t){return t.length===0?void 0:t[0]}function k6(){return Object.create(null)}var Ga=Object.assign,eEe=console;function lMt(t,e="unexpected unreachable branch"){throw eEe.log("unreachable",t),eEe.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var Q6=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function vu(t,e){var r=e&&e.loc,n,s,i,o;r&&(n=r.start.line,s=r.end.line,i=r.start.column,o=r.end.column,t+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,t),l=0;l<Q6.length;l++)this[Q6[l]]=a[Q6[l]];Error.captureStackTrace&&Error.captureStackTrace(this,vu);try{r&&(this.lineNumber=n,this.endLineNumber=s,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=i,this.endColumn=o))}catch{}}vu.prototype=new Error;function G0(){this.parents=[]}G0.prototype={constructor:G0,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!G0.prototype[r.type])throw new vu('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new vu(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new vu("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||e)return e;if(e!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:Xw,Decorator:Xw,BlockStatement:tEe,DecoratorBlock:tEe,PartialStatement:rEe,PartialBlockStatement:function(t){rEe.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Xw,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function Xw(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function tEe(t){Xw.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function rEe(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Ya(t){t===void 0&&(t={}),this.options=t}Ya.prototype=new G0;Ya.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,s=0,i=n.length;s<i;s++){var o=n[s],a=this.accept(o);if(a){var l=q6(n,s,r),c=H6(n,s,r),u=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Gf(n,s,!0),a.open&&Su(n,s,!0),e&&f&&(Gf(n,s),Su(n,s)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[s-1].original)[1])),e&&u&&(Gf((o.program||o.inverse).body),Su(n,s)),e&&p&&(Gf(n,s),Su((o.inverse||o.program).body))}}return t};Ya.prototype.BlockStatement=Ya.prototype.DecoratorBlock=Ya.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,s=r;if(r&&r.chained)for(n=r.body[0].program;s.chained;)s=s.body[s.body.length-1].program;var i={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:H6(e.body),closeStandalone:q6((n||e).body)};if(t.openStrip.close&&Gf(e.body,null,!0),r){var o=t.inverseStrip;o.open&&Su(e.body,null,!0),o.close&&Gf(n.body,null,!0),t.closeStrip.open&&Su(s.body,null,!0),!this.options.ignoreStandalone&&q6(e.body)&&H6(n.body)&&(Su(e.body),Gf(n.body))}else t.closeStrip.open&&Su(e.body,null,!0);return i};Ya.prototype.Decorator=Ya.prototype.MustacheStatement=function(t){return t.strip};Ya.prototype.PartialStatement=Ya.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function q6(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],s=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function H6(t,e,r){e===void 0&&(e=-1);var n=t[e+1],s=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Gf(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var s=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function Su(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var s=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}var Jw=function(){var t=function(tt,J,ee,Z){for(ee=ee||{},Z=tt.length;Z--;ee[tt[Z]]=J);return ee},e=[2,52],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,53,57,61],s=[1,44],i=[1,40],o=[1,43],a=[1,33],l=[1,34],c=[1,35],u=[1,36],p=[1,37],f=[1,42],d=[1,46],A=[14,15,19,29,34,39,44,47,48,53,57,61],h=[14,15,19,29,34,44,47,48,53,57,61],m=[15,18],g=[14,15,19,29,34,47,48,53,57,61],E=[33,67,73,75,84,85,86,87,88,89],b=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],I=[1,62],w=[1,63],L=[23,33,56,68,73,79],U=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],q=[2,51],V=[1,64],ie=[67,73,75,77,84,85,86,87,88,89],re=[56,67,73,75,84,85,86,87,88,89],Ie=[1,75],Ze=[1,76],je=[1,83],Ct=[33,67,73,75,79,84,85,86,87,88,89],Mt=[23,67,73,75,84,85,86,87,88,89],qt=[67,68,73,75,84,85,86,87,88,89],Ht=[33,79],sr=[1,134],Jn=[73,81],Kn={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,2],[76,0],[76,2],[80,1],[80,2]],performAction:function(J,ee,Z,G,de,R,Kr){var F=R.length-1;switch(de){case 1:return R[F-1];case 2:this.$=G.prepareProgram(R[F]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 28:case 29:case 30:case 31:case 38:case 39:case 46:case 47:this.$=R[F];break;case 9:this.$={type:"CommentStatement",value:G.stripComment(R[F]),strip:G.stripFlags(R[F],R[F]),loc:G.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:R[F],value:R[F],loc:G.locInfo(this._$)};break;case 11:this.$=G.prepareRawBlock(R[F-2],R[F-1],R[F],this._$);break;case 12:this.$={path:R[F-3],params:R[F-2],hash:R[F-1]};break;case 13:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!1,this._$);break;case 14:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!0,this._$);break;case 15:this.$={open:R[F-5],path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 16:case 17:this.$={path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 18:this.$={strip:G.stripFlags(R[F-1],R[F-1]),program:R[F]};break;case 19:var Qn=G.prepareBlock(R[F-2],R[F-1],R[F],R[F],!1,this._$),ws=G.prepareProgram([Qn],R[F-1].loc);ws.chained=!0,this.$={strip:R[F-2].strip,program:ws,chain:!0};break;case 21:this.$={path:R[F-1],strip:G.stripFlags(R[F-2],R[F])};break;case 22:this.$=G.prepareMustache(G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"}),[],void 0,R[F-2],G.stripFlags(R[F-2],R[F]),this._$);break;case 23:case 24:this.$=G.prepareMustache(R[F-3],R[F-2],R[F-1],R[F-4],G.stripFlags(R[F-4],R[F]),this._$);break;case 25:this.$={type:"PartialStatement",name:R[F-3],params:R[F-2],hash:R[F-1],indent:"",strip:G.stripFlags(R[F-4],R[F]),loc:G.locInfo(this._$)};break;case 26:this.$=G.preparePartialBlock(R[F-2],R[F-1],R[F],this._$);break;case 27:this.$={path:R[F-3],params:R[F-2],hash:R[F-1],strip:G.stripFlags(R[F-4],R[F])};break;case 32:this.$=G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 33:this.$={type:"SubExpression",path:R[F-3],params:R[F-2],hash:R[F-1],loc:G.locInfo(this._$)};break;case 34:this.$={type:"Hash",pairs:R[F],loc:G.locInfo(this._$)};break;case 35:this.$={type:"HashPair",key:G.id(R[F-2]),value:R[F],loc:G.locInfo(this._$)};break;case 36:this.$=G.syntax.square(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 37:this.$=G.id(R[F-1]);break;case 40:this.$={type:"StringLiteral",value:R[F],original:R[F],loc:G.locInfo(this._$)};break;case 41:this.$={type:"NumberLiteral",value:Number(R[F]),original:Number(R[F]),loc:G.locInfo(this._$)};break;case 42:this.$={type:"BooleanLiteral",value:R[F]==="true",original:R[F]==="true",loc:G.locInfo(this._$)};break;case 43:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:G.locInfo(this._$)};break;case 44:this.$={type:"NullLiteral",original:null,value:null,loc:G.locInfo(this._$)};break;case 45:this.$=G.preparePath(!0,!1,R[F],this._$);break;case 48:this.$=G.preparePath(!1,R[F-2],R[F],this._$);break;case 49:this.$=G.preparePath(!1,!1,R[F],this._$);break;case 50:R[F-2].push({part:G.id(R[F]),original:R[F],separator:R[F-1]}),this.$=R[F-2];break;case 51:this.$=[{part:G.id(R[F]),original:R[F]}];break;case 52:case 54:case 56:case 64:case 70:case 76:case 84:case 88:case 92:case 96:case 100:case 106:this.$=[];break;case 53:case 55:case 57:case 65:case 71:case 77:case 85:case 89:case 93:case 97:case 101:case 105:case 107:case 109:R[F-1].push(R[F]);break;case 104:case 108:this.$=[R[F]];break}},table:[t([5,14,15,19,29,34,48,53,57,61],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,60:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],53:[1,14],57:[1,18],61:[1,24]}),{1:[2,1]},t(n,[2,53]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:28,49:25,50:26,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:45,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(A,e,{6:3,4:47}),t(h,e,{6:3,4:48}),t(m,[2,54],{17:49}),{20:28,50:50,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:51}),t([5,14,15,18,19,29,34,39,44,47,48,53,57,61],[2,10]),{20:52,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:54,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:55,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:56,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,57]},t(E,[2,84],{51:58}),t([23,33,56,68,79],[2,34],{72:59,73:[1,60]}),t(b,[2,28]),t(b,[2,29],{91:61,92:I,93:w}),t(L,[2,104]),t(b,[2,38]),t(b,[2,39]),t(b,[2,40]),t(b,[2,41]),t(b,[2,42]),t(b,[2,43]),t(b,[2,44]),t(U,[2,30]),t(U,[2,31]),t([23,33,56,67,68,73,75,79,84,85,86,87,88,89,92,93],q,{74:V}),t(b,[2,49],{91:65,92:I,93:w}),{73:d,90:66},t(ie,[2,106],{76:67}),{20:28,49:68,50:69,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(re,[2,88],{54:70}),t(U,q),{25:71,38:73,39:Ie,43:74,44:Ze,45:72,47:[2,60]},{28:77,43:78,44:Ze,47:[2,62]},{13:80,15:r,18:[1,79]},t(E,[2,92],{58:81}),{26:82,47:je},t(Ct,[2,64],{30:84}),{91:61,92:I,93:w},t(Ct,[2,70],{35:85}),t(Mt,[2,56],{21:86}),t(E,[2,96],{62:87}),t(n,[2,22]),{20:28,33:[2,86],49:90,50:89,52:88,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(L,[2,105]),{74:V},{73:d,90:91},{73:[2,46]},{73:[2,47]},{20:28,50:92,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{73:[1,93]},t(b,[2,45],{91:65,92:I,93:w}),{20:28,50:95,64:29,65:38,66:39,67:s,73:d,75:o,77:[1,94],82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{68:[1,96]},t(qt,[2,100],{69:97}),{20:28,49:100,50:99,55:98,56:[2,90],64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{26:101,47:je},{47:[2,61]},t(A,e,{6:3,4:102}),{47:[2,20]},{20:103,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:104}),{26:105,47:je},{47:[2,63]},t(n,[2,11]),t(m,[2,55]),{20:28,33:[2,94],49:108,50:107,59:106,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(n,[2,26]),{20:109,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(Ht,[2,66],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,31:110,50:111,49:112,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(Ht,[2,72],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,36:113,50:114,49:115,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),{20:28,22:116,23:[2,58],49:118,50:117,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,33:[2,98],49:121,50:120,63:119,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,122]},t(E,[2,85]),{33:[2,87]},t(b,[2,48],{91:65,92:I,93:w}),t(L,[2,35]),t(U,[2,50]),t(U,[2,36]),t(ie,[2,107]),t(U,[2,32]),{20:28,49:125,50:124,64:29,65:38,66:39,67:s,68:[2,102],70:123,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{56:[1,126]},t(re,[2,89]),{56:[2,91]},t(n,[2,13]),{38:73,39:Ie,43:74,44:Ze,45:128,46:127,47:[2,82]},t(Ct,[2,76],{40:129}),{47:[2,18]},t(n,[2,14]),{33:[1,130]},t(E,[2,93]),{33:[2,95]},{33:[1,131]},{32:132,33:[2,68],78:133,79:sr},t(Ct,[2,65]),t(Ht,[2,67]),{33:[2,74],37:135,78:136,79:sr},t(Ct,[2,71]),t(Ht,[2,73]),{23:[1,137]},t(Mt,[2,57]),{23:[2,59]},{33:[1,138]},t(E,[2,97]),{33:[2,99]},t(n,[2,23]),{68:[1,139]},t(qt,[2,101]),{68:[2,103]},t(n,[2,24]),{47:[2,19]},{47:[2,83]},t(Ht,[2,78],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,41:140,50:141,49:142,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(n,[2,25]),t(n,[2,21]),{33:[1,143]},{33:[2,69]},{73:[1,145],80:144},{33:[1,146]},{33:[2,75]},t(m,[2,12]),t(g,[2,27]),t(U,[2,33]),{33:[2,80],42:147,78:148,79:sr},t(Ct,[2,77]),t(Ht,[2,79]),t(A,[2,15]),{73:[1,150],81:[1,149]},t(Jn,[2,108]),t(h,[2,16]),{33:[1,151]},{33:[2,81]},{33:[2,37]},t(Jn,[2,109]),t(A,[2,17])],defaultActions:{4:[2,1],62:[2,46],63:[2,47],72:[2,61],74:[2,20],78:[2,63],90:[2,87],100:[2,91],104:[2,18],108:[2,95],118:[2,59],121:[2,99],125:[2,103],127:[2,19],128:[2,83],133:[2,69],136:[2,75],148:[2,81],149:[2,37]},parseError:function(J,ee){if(ee.recoverable)this.trace(J);else{var Z=new Error(J);throw Z.hash=ee,Z}},parse:function(J){var ee=this,Z=[0],G=[null],de=[],R=this.table,Kr="",F=0,Qn=0,ws=2,ua=1,me=de.slice.call(arguments,1),K=Object.create(this.lexer),Qe={yy:{}};for(var $t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$t)&&(Qe.yy[$t]=this.yy[$t]);K.setInput(J,Qe.yy),Qe.yy.lexer=K,Qe.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var Ar=K.yylloc;de.push(Ar);var Cr=K.options&&K.options.ranges;typeof Qe.yy.parseError=="function"?this.parseError=Qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var un=function(){var Mr;return Mr=K.lex()||ua,typeof Mr!="number"&&(Mr=ee.symbols_[Mr]||Mr),Mr},St,Rt,pt,pn,ir={},fs,Vt,fn,dn;;){if(Rt=Z[Z.length-1],this.defaultActions[Rt]?pt=this.defaultActions[Rt]:((St===null||typeof St>"u")&&(St=un()),pt=R[Rt]&&R[Rt][St]),typeof pt>"u"||!pt.length||!pt[0]){var Dn="";dn=[];for(fs in R[Rt])this.terminals_[fs]&&fs>ws&&dn.push("'"+this.terminals_[fs]+"'");K.showPosition?Dn="Parse error on line "+(F+1)+`:
|
|
2727
|
+
`,n}function CLt(t,e){try{return e?{error:null,value:(((r,n)=>(r=r.split("."),n=n.split("."),+r[0]>+n[0]||r[0]==n[0]&&+r[1]>=+n[1]))(process.versions.node,"8.9")?require.resolve:(r,{paths:[n]},s=require("module"))=>{let i=s._findPath(r,s._nodeModulePaths(n).concat(n));if(i)return i;throw i=new Error(`Cannot resolve module '${r}'`),i.code="MODULE_NOT_FOUND",i})(t,{paths:[e]})}:{error:null,value:require.resolve(t)}}catch(r){return{error:r,value:null}}}function SLt(t,e){try{return{error:null,value:(0,lLt.resolve)(t,e)}}catch(r){return{error:r,value:null}}}function C0e(t,e,r){let n=w0e(t,e),s=n.next();for(;!s.done;)s=n.next(CLt(s.value,r));return{loader:"require",filepath:s.value}}function ILt(t,e,r){let n=(0,d6().pathToFileURL)(h6().join(r,"./babel-virtual-resolve-base.js")).href,s=w0e(t,e),i=s.next();for(;!i.done;)i=s.next(SLt(i.value,n));return{loader:"auto",filepath:(0,d6().fileURLToPath)(i.value)}}function B0e(t,e,r,n){if(!I0e.supportsESM||!n)return C0e(t,e,r);try{let s=ILt(t,e,r);if(!(0,v0e().existsSync)(s.filepath))throw Object.assign(new Error(`Could not resolve "${e}" in file ${r}.`),{type:"MODULE_NOT_FOUND"});return s}catch(s){try{return C0e(t,e,r)}catch(i){throw s.type==="MODULE_NOT_FOUND"?s:i.type==="MODULE_NOT_FOUND"?i:s}}}var f6=new Set;function*T0e(t,e,r){if(!(yield*(0,A6.isAsync)())&&f6.has(r))throw new Error(`Reentrant ${t} detected trying to load "${r}". This module is not ignored and is trying to load itself while compiling itself, leading to a dependency cycle. We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.`);try{return f6.add(r),yield*(0,I0e.default)(r,e,`You appear to be using a native ECMAScript module ${t}, which is only supported when running Babel asynchronously or when using the Node.js \`--experimental-require-module\` flag.`,`You appear to be using a ${t} that contains top-level await, which is only supported when running Babel asynchronously.`,!0)}catch(n){throw n.message=`[BABEL]: ${n.message} (While processing: ${r})`,n}finally{f6.delete(r)}}});var S0=y(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});Object.defineProperty(ki,"ROOT_CONFIG_FILENAMES",{enumerable:!0,get:function(){return xA.ROOT_CONFIG_FILENAMES}});Object.defineProperty(ki,"findConfigUpwards",{enumerable:!0,get:function(){return xA.findConfigUpwards}});Object.defineProperty(ki,"findPackageData",{enumerable:!0,get:function(){return vLt.findPackageData}});Object.defineProperty(ki,"findRelativeConfig",{enumerable:!0,get:function(){return xA.findRelativeConfig}});Object.defineProperty(ki,"findRootConfig",{enumerable:!0,get:function(){return xA.findRootConfig}});Object.defineProperty(ki,"loadConfig",{enumerable:!0,get:function(){return xA.loadConfig}});Object.defineProperty(ki,"loadPlugin",{enumerable:!0,get:function(){return Rw.loadPlugin}});Object.defineProperty(ki,"loadPreset",{enumerable:!0,get:function(){return Rw.loadPreset}});Object.defineProperty(ki,"resolvePlugin",{enumerable:!0,get:function(){return Rw.resolvePlugin}});Object.defineProperty(ki,"resolvePreset",{enumerable:!0,get:function(){return Rw.resolvePreset}});Object.defineProperty(ki,"resolveShowConfigPath",{enumerable:!0,get:function(){return xA.resolveShowConfigPath}});var vLt=Sde(),xA=Jye(),Rw=D0e()});var _0e=y(wA=>{"use strict";Object.defineProperty(wA,"__esModule",{value:!0});wA.transform=void 0;wA.transformAsync=TLt;wA.transformSync=BLt;function P0e(){let t=Di();return P0e=function(){return t},t}var xLt=hA(),wLt=iw(),Ow=Nl(),Fw=P0e()(function*(e,r){let n=yield*(0,xLt.default)(r);return n===null?null:yield*(0,wLt.run)(n,e)}),kpr=wA.transform=function(e,r,n){let s,i;if(typeof r=="function"?(i=r,s=void 0):(s=r,i=n),i===void 0)return(0,Ow.beginHiddenCallStack)(Fw.sync)(e,s);(0,Ow.beginHiddenCallStack)(Fw.errback)(e,s,i)};function BLt(...t){return(0,Ow.beginHiddenCallStack)(Fw.sync)(...t)}function TLt(...t){return(0,Ow.beginHiddenCallStack)(Fw.async)(...t)}});var k0e=y(BA=>{"use strict";Object.defineProperty(BA,"__esModule",{value:!0});BA.transformFromAst=void 0;BA.transformFromAstAsync=NLt;BA.transformFromAstSync=_Lt;function N0e(){let t=Di();return N0e=function(){return t},t}var DLt=hA(),PLt=iw(),Lw=Nl(),Mw=N0e()(function*(t,e,r){let n=yield*(0,DLt.default)(r);if(n===null)return null;if(!t)throw new Error("No AST given");return yield*(0,PLt.run)(n,e,t)}),Rpr=BA.transformFromAst=function(e,r,n,s){let i,o;if(typeof n=="function"?(o=n,i=void 0):(i=n,o=s),o===void 0)return(0,Lw.beginHiddenCallStack)(Mw.sync)(e,r,i);(0,Lw.beginHiddenCallStack)(Mw.errback)(e,r,i,o)};function _Lt(...t){return(0,Lw.beginHiddenCallStack)(Mw.sync)(...t)}function NLt(...t){return(0,Lw.beginHiddenCallStack)(Mw.async)(...t)}});var R0e=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});TA.parse=void 0;TA.parseAsync=FLt;TA.parseSync=OLt;function Q0e(){let t=Di();return Q0e=function(){return t},t}var kLt=hA(),QLt=MU(),RLt=kU(),Uw=Nl(),jw=Q0e()(function*(e,r){let n=yield*(0,kLt.default)(r);return n===null?null:yield*(0,QLt.default)(n.passes,(0,RLt.default)(n),e)}),Fpr=TA.parse=function(e,r,n){if(typeof r=="function"&&(n=r,r=void 0),n===void 0)return(0,Uw.beginHiddenCallStack)(jw.sync)(e,r);(0,Uw.beginHiddenCallStack)(jw.errback)(e,r,n)};function OLt(...t){return(0,Uw.beginHiddenCallStack)(jw.sync)(...t)}function FLt(...t){return(0,Uw.beginHiddenCallStack)(jw.async)(...t)}});var wn=y(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.DEFAULT_EXTENSIONS=void 0;Object.defineProperty(ht,"File",{enumerable:!0,get:function(){return LLt.default}});Object.defineProperty(ht,"buildExternalHelpers",{enumerable:!0,get:function(){return MLt.default}});Object.defineProperty(ht,"createConfigItem",{enumerable:!0,get:function(){return $a.createConfigItem}});Object.defineProperty(ht,"createConfigItemAsync",{enumerable:!0,get:function(){return $a.createConfigItemAsync}});Object.defineProperty(ht,"createConfigItemSync",{enumerable:!0,get:function(){return $a.createConfigItemSync}});Object.defineProperty(ht,"getEnv",{enumerable:!0,get:function(){return ULt.getEnv}});Object.defineProperty(ht,"loadOptions",{enumerable:!0,get:function(){return $a.loadOptions}});Object.defineProperty(ht,"loadOptionsAsync",{enumerable:!0,get:function(){return $a.loadOptionsAsync}});Object.defineProperty(ht,"loadOptionsSync",{enumerable:!0,get:function(){return $a.loadOptionsSync}});Object.defineProperty(ht,"loadPartialConfig",{enumerable:!0,get:function(){return $a.loadPartialConfig}});Object.defineProperty(ht,"loadPartialConfigAsync",{enumerable:!0,get:function(){return $a.loadPartialConfigAsync}});Object.defineProperty(ht,"loadPartialConfigSync",{enumerable:!0,get:function(){return $a.loadPartialConfigSync}});Object.defineProperty(ht,"parse",{enumerable:!0,get:function(){return E6.parse}});Object.defineProperty(ht,"parseAsync",{enumerable:!0,get:function(){return E6.parseAsync}});Object.defineProperty(ht,"parseSync",{enumerable:!0,get:function(){return E6.parseSync}});ht.resolvePreset=ht.resolvePlugin=void 0;Object.defineProperty(ht,"template",{enumerable:!0,get:function(){return U0e().default}});Object.defineProperty(ht,"tokTypes",{enumerable:!0,get:function(){return L0e().tokTypes}});Object.defineProperty(ht,"transform",{enumerable:!0,get:function(){return m6.transform}});Object.defineProperty(ht,"transformAsync",{enumerable:!0,get:function(){return m6.transformAsync}});Object.defineProperty(ht,"transformFile",{enumerable:!0,get:function(){return g6.transformFile}});Object.defineProperty(ht,"transformFileAsync",{enumerable:!0,get:function(){return g6.transformFileAsync}});Object.defineProperty(ht,"transformFileSync",{enumerable:!0,get:function(){return g6.transformFileSync}});Object.defineProperty(ht,"transformFromAst",{enumerable:!0,get:function(){return y6.transformFromAst}});Object.defineProperty(ht,"transformFromAstAsync",{enumerable:!0,get:function(){return y6.transformFromAstAsync}});Object.defineProperty(ht,"transformFromAstSync",{enumerable:!0,get:function(){return y6.transformFromAstSync}});Object.defineProperty(ht,"transformSync",{enumerable:!0,get:function(){return m6.transformSync}});Object.defineProperty(ht,"traverse",{enumerable:!0,get:function(){return M0e().default}});ht.version=ht.types=void 0;var LLt=q3(),MLt=Jfe(),O0e=S0(),ULt=CU();function F0e(){let t=ze();return F0e=function(){return t},t}Object.defineProperty(ht,"types",{enumerable:!0,get:function(){return F0e()}});function L0e(){let t=Ty();return L0e=function(){return t},t}function M0e(){let t=xn();return M0e=function(){return t},t}function U0e(){let t=ky();return U0e=function(){return t},t}var $a=hA(),m6=_0e(),g6=e8(),y6=k0e(),E6=R0e(),Mpr=ht.version="7.29.7",jLt=(t,e)=>O0e.resolvePlugin(t,e,!1).filepath;ht.resolvePlugin=jLt;var qLt=(t,e)=>O0e.resolvePreset(t,e,!1).filepath;ht.resolvePreset=qLt;var Upr=ht.DEFAULT_EXTENSIONS=Object.freeze([".js",".jsx",".es6",".es",".mjs",".cjs"]);ht.OptionManager=class{init(e){return(0,$a.loadOptionsSync)(e)}};ht.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)}});var q0e=y(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.sanitize=void 0;function HLt(t){let e=t.replace(new RegExp(`(?<!^)(?:${j0e.source})([a-z])`,"g"),(r,n)=>n.toUpperCase());return e=e.replace(new RegExp(j0e.source,"g"),""),e}qw.sanitize=HLt;var j0e=/^[^a-zA-Z_$]|(?<=.)[^a-zA-Z_$0-9]/});var G0e=y($w=>{"use strict";Object.defineProperty($w,"__esModule",{value:!0});$w.ImportUtil=void 0;var $Lt=q0e(),b6=class{constructor(e,r){this.babel=e,this.program=r,this.t=e.types}removeImport(e,r){for(let n of this.program.get("body")){if(!V0e(n,e))continue;let s=n.get("specifiers").find(i=>$0e(i,r));s&&(n.node.specifiers.length===1?n.remove():s.remove())}}removeAllImports(e){for(let r of this.program.get("body"))V0e(r,e)&&r.remove()}import(e,r,n,s){return this.unreferencedImport(e,r,n,H0e(s,n,Hw(e)))}unreferencedImport(e,r,n,s){var i;let o=n==="*",l=!(n==="default")&&!o,c=this.findImportFrom(r),u=c?.node.specifiers.find(d=>d.type==="ImportNamespaceSpecifier");if(!(c?.node.specifiers.find(d=>d.type==="ImportSpecifier")&&o||u&&l||u&&o)&&c){let d=c.get("specifiers").find(A=>$0e(A,n));return d&&((i=e.scope.getBinding(d.node.local.name))===null||i===void 0?void 0:i.kind)==="module"?this.t.identifier(d.node.local.name):this.addSpecifier(e,c,n,s)}else{let d=this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(r)));return this.addSpecifier(e,d,n,s)}}importForSideEffect(e){this.findImportFrom(e)||this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(e)))}replaceWith(e,r){return this.mutate(n=>(e.replaceWith(r(n)),e),Hw(e))}insertAfter(e,r){return this.mutate(n=>e.insertAfter(r(n))[0],Hw(e))}insertBefore(e,r){return this.mutate(n=>e.insertBefore(r(n))[0],Hw(e))}mutate(e,r){let n=new Map,s={import:(a,l,c)=>{let u=this.t.identifier("__babel_import_util_placeholder__");return n.set(u,{moduleSpecifier:a,exportedName:l,nameHint:c}),u}},i=a=>{if(!a.isIdentifier())return;let l=n.get(a.node);if(l){let c=this.unreferencedImport(a,l.moduleSpecifier,l.exportedName,H0e(l.nameHint,l.exportedName,r));a.replaceWith(c);let u=a.scope.getBinding(c.name);if(!u)throw new Error("bug: this is supposed to never happen");u.reference(a)}},o=e(s);return i(o),this.babel.traverse(o.node,{ReferencedIdentifier:a=>{i(a)}},o.scope,{},o),o}addSpecifier(e,r,n,s){let i=this.t.identifier(VLt(e,s)),o=this.buildSpecifier(n,i),a;return o.type==="ImportDefaultSpecifier"?(r.node.specifiers.unshift(o),a=r.get("specifiers.0")):(r.node.specifiers.push(o),a=r.get(`specifiers.${r.node.specifiers.length-1}`)),r.scope.registerBinding("module",a),i}buildSpecifier(e,r){switch(e){case"default":return this.t.importDefaultSpecifier(r);case"*":return this.t.importNamespaceSpecifier(r);default:return this.t.importSpecifier(r,this.t.identifier(e))}}findImportFrom(e){for(let r of this.program.get("body"))if(r.isImportDeclaration()&&r.node.source.value===e&&r.node.importKind!=="type")return r}insertAfterExistingImports(e){let r;for(let[n,s]of this.program.node.body.entries())s.type==="ImportDeclaration"&&(r=n);return r==null?(this.program.node.body.unshift(e),this.program.get("body.0")):(this.program.node.body.splice(r+1,0,e),this.program.get(`body.${r+1}`))}};$w.ImportUtil=b6;function VLt(t,e){let r=e,n=0;for(;t.scope.hasBinding(r);)r=`${e}${n++}`;return r}function GLt(t){return t.type==="StringLiteral"?t.value:t.name}function H0e(t,e,r){return t?(0,$Lt.sanitize)(t):e==="default"||e==="*"?r??"a":e}function Hw(t){return t?.isIdentifier()?t.node.name:t?t.scope.generateUidIdentifierBasedOnNode(t.node).name:void 0}function $0e(t,e){switch(e){case"default":return t.isImportDefaultSpecifier();case"*":return t.isImportNamespaceSpecifier();default:return t.isImportSpecifier()&&GLt(t.node.imported)===e}}function V0e(t,e){return t.isImportDeclaration()&&t.get("source").node.value===e}});var S6=y(C6=>{"use strict";Object.defineProperty(C6,"__esModule",{value:!0});C6.astNodeHasBinding=YLt;function YLt(t,e){var r;let n=t;for(;n;){let s=(r=n.parent)===null||r===void 0?void 0:r.node;if(s?.type==="ElementNode"&&s.blockParams.includes(e)&&s.children.includes(n.node)||s?.type==="Block"&&s.blockParams.includes(e)&&s.body.includes(n.node))return!0;n=n.parent}return!1}});var Y0e=y(I6=>{"use strict";Object.defineProperty(I6,"__esModule",{value:!0});I6.readOnlyArray=JLt;var WLt=["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"];function JLt(t,e="Forbidden array mutation"){return new Proxy(t,{get(r,n){return typeof n=="string"&&WLt.includes(n)?()=>{throw new Error(e)}:Reflect.get(r,n)},set(r,n){throw new Error(e)},deleteProperty(){throw new Error(e)}})}});var B6=y(ta=>{"use strict";var KLt=ta&&ta.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},ls=ta&&ta.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},x6,Jl,bu,DA,W0e;Object.defineProperty(ta,"__esModule",{value:!0});ta.ScopeLocals=ta.ALLOWED_GLOBALS=void 0;var v6=S6(),zLt=Y0e();ta.ALLOWED_GLOBALS=new Set(["globalThis","Atomics","JSON","Math","Reflect","localStorage","sessionStorage","isNaN","isFinite","parseInt","parseFloat","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","postMessage","structuredClone","Array","BigInt","Boolean","Date","Number","Object","String","Infinity","NaN","isSecureContext"]);var w6=class{constructor(e){x6.add(this),Jl.set(this,{}),bu.set(this,[]),DA.set(this,void 0),KLt(this,DA,e,"f")}get locals(){return(0,zLt.readOnlyArray)(ls(this,bu,"f"),`The only supported way to manipulate locals is via the jsutils API
|
|
2728
|
+
https://github.com/emberjs/babel-plugin-ember-template-compilation#jsutils-manipulating-javascript-from-within-ast-transforms`)}has(e){return e in ls(this,Jl,"f")}get(e){return ls(this,Jl,"f")[e]}isEmpty(){return ls(this,bu,"f").length===0}entries(){return Object.entries(ls(this,Jl,"f"))}add(e,r){ls(this,Jl,"f")[e]=r??e,ls(this,bu,"f").includes(e)||ls(this,bu,"f").push(e)}crawl(){return e=>{let r;return{name:"scope-locals-crawl",visitor:{Template:{enter:()=>{r=new Set},exit:(n,s)=>{if(ls(this,DA,"f").mode==="implicit")for(let i of r)i==="this"?ls(this,DA,"f").mayUseLexicalThis&&this.add(i):ls(this,x6,"m",W0e).call(this,i,ls(this,DA,"f").jsPath)&&this.add(i);else for(let i of Object.keys(ls(this,Jl,"f")))r.has(i)||(ls(this,bu,"f").splice(ls(this,bu,"f").indexOf(i),1),delete ls(this,Jl,"f")[i])}},PathExpression:(n,s)=>{switch(n.head.type){case"ThisHead":(0,v6.astNodeHasBinding)(s,"this")||r.add("this");break;case"VarHead":{let i=n.head.name;(0,v6.astNodeHasBinding)(s,i)||r.add(i)}}},ElementNode:(n,s)=>{let i=n.tag.split(".")[0];(0,v6.astNodeHasBinding)(s,i)||r.add(i)}}}}}};ta.ScopeLocals=w6;Jl=new WeakMap,bu=new WeakMap,DA=new WeakMap,x6=new WeakSet,W0e=function(e,r){var n;let s=(n=ls(this,Jl,"f")[e])!==null&&n!==void 0?n:e;return ta.ALLOWED_GLOBALS.has(s)||r.scope.getBinding(s)}});var K0e=y(Vw=>{"use strict";Object.defineProperty(Vw,"__esModule",{value:!0});Vw.ExpressionParser=void 0;var XLt=B6(),T6=class{constructor(e){this.babel=e}parseExpression(e,r){switch(r.node.type){case"ObjectExpression":return this.parseObjectExpression(e,r);case"ArrayExpression":return this.parseArrayExpression(e,r);case"StringLiteral":case"BooleanLiteral":case"NumericLiteral":return r.node.value;default:throw r.buildCodeFrameError(`${e} can only accept static options but you passed ${JSON.stringify(r.node)}`)}}parseArrayExpression(e,r){return r.get("elements").map(n=>{if(n.isSpreadElement())throw n.buildCodeFrameError("spread element is not allowed here");return n.isExpression()?this.parseExpression(e,n):null})}parseScope(e,r){let n;if(r.node.type==="ObjectMethod")n=r.node.body;else{let{value:i}=r.node;if(this.t.isObjectExpression(i))throw r.buildCodeFrameError("Passing an object as the `scope` property to inline templates is no longer supported. Please pass a function that returns an object expression instead.");(this.t.isFunctionExpression(i)||this.t.isArrowFunctionExpression(i))&&(n=i.body)}let s;if(n?.type==="ObjectExpression")s=n;else if(n?.type==="BlockStatement"){let i=n.body.filter(o=>o.type==="ReturnStatement");if(i.length!==1)throw new Error("Scope functions must have a single return statement which returns an object expression containing references to in-scope values");s=i[0].argument}if(s?.type!=="ObjectExpression")throw r.buildCodeFrameError(`Scope objects for \`${e}\` must be an object expression containing only references to in-scope values, or a function that returns an object expression containing only references to in-scope values`);return s.properties.reduce((i,o)=>{if(this.t.isSpreadElement(o))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may not contain spread elements`);if(this.t.isObjectMethod(o))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may not contain methods`);let{key:a,value:l}=o;if(!this.t.isStringLiteral(a)&&!this.t.isIdentifier(a))throw r.buildCodeFrameError(`Scope objects for \`${e}\` may only contain static property names`);let c=J0e(a);switch(l.type){case"Identifier":i.add(c,l.name);break;case"ThisExpression":i.add(c,"this");break;default:throw r.buildCodeFrameError(`Scope objects for \`${e}\` may only contain direct references to in-scope values, e.g. { ${c} } or { ${c}: ${c} }. Found ${l.type}`)}return i},new XLt.ScopeLocals({mode:"explicit"}))}parseEval(e,r){let n;if(r.isObjectMethod())n=r.get("body");else if(r.isObjectProperty()){let p=r.get("value");if(p.isFunctionExpression())n=p.get("body");else throw r.buildCodeFrameError(`unsupported syntax for \`eval\` parameter to \`${e}\`. It must be an object method or a function.`)}else throw r.buildCodeFrameError(`unsupported syntax for \`eval\` parameter to \`${e}\`. It must be an object method or a function.`);let s=n.get("body").filter(p=>p.isReturnStatement());if(s.length!==1)throw n.buildCodeFrameError("eval function must have a single return statement");let i=s[0].get("argument");if(!i.isCallExpression())throw s[0].buildCodeFrameError("eval function must return `eval(arguments[0])`. Found non-CallExpression.");let o=i.get("callee");if(!o.isIdentifier()||o.node.name!=="eval")throw i.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found callee is not eval.");let a=i.get("arguments");if(a.length!==1)throw i.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found incorrect number of arguments.");let l=a[0];if(!l.isMemberExpression())throw l.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found argument is non-MemberExpression.");let c=l.get("object");if(!c.isIdentifier()||c.node.name!=="arguments")throw c.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found wrong argument to eval.");let u=l.get("property");if(!u.isNumericLiteral()||u.node.value!==0)throw u.buildCodeFrameError("eval function must return `eval(arguments[0])`. Found wrong property.");return{isEval:!0}}parseObjectExpression(e,r,n=!1,s=!1){let i={};return r.get("properties").forEach(o=>{let{node:a}=o;if(this.t.isSpreadElement(a))throw o.buildCodeFrameError(`${e} does not allow spread element`);if(a.computed)throw o.buildCodeFrameError(`${e} can only accept static property names`);let{key:l}=a;if(!this.t.isIdentifier(l)&&!this.t.isStringLiteral(l))throw o.buildCodeFrameError(`${e} can only accept static property names`);let c=J0e(l);if(n&&c==="scope")i.scope=this.parseScope(e,o);else if(s&&c==="eval")i.eval=this.parseEval(e,o);else if(s&&c==="component")i.component=o.get("value");else{if(this.t.isObjectMethod(a))throw o.buildCodeFrameError(`${e} does not accept a method for ${c}`);let u=o.get("value");if(!u.isExpression())throw u.buildCodeFrameError("must be an expression");i[c]=this.parseExpression(e,u)}}),i}get t(){return this.babel.types}};Vw.ExpressionParser=T6;function J0e(t){return t.type==="StringLiteral"?t.value:t.name}});var X0e=y(Cu=>{"use strict";var Hf=Cu&&Cu.__classPrivateFieldSet||function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},tr=Cu&&Cu.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qf,$f,ui,PA,_A,NA,Gw,P6,Yw,Ww;Object.defineProperty(Cu,"__esModule",{value:!0});Cu.JSUtils=void 0;var D6=S6(),_6=class{constructor(e,r,n,s,i){if(qf.add(this),$f.set(this,void 0),ui.set(this,void 0),PA.set(this,void 0),_A.set(this,void 0),NA.set(this,void 0),Hf(this,$f,e,"f"),Hf(this,ui,r,"f"),Hf(this,PA,n,"f"),Hf(this,_A,s,"f"),Hf(this,NA,i,"f"),!tr(this,ui,"f").lastInsertedPath){let o;for(let a of tr(this,ui,"f").program.get("body")){if(!a.isImportDeclaration())break;o=a}o&&(tr(this,ui,"f").lastInsertedPath=o)}}bindExpression(e,r,n){var s;let i=z0e((s=n?.nameHint)!==null&&s!==void 0?s:"a",l=>tr(this,PA,"f").scope.hasBinding(l)||(0,D6.astNodeHasBinding)(r,l)),o=tr(this,$f,"f").types,a=tr(this,qf,"m",Gw).call(this,o.variableDeclaration("let",[o.variableDeclarator(o.identifier(i),tr(this,qf,"m",P6).call(this,tr(this,ui,"f").program,e))]));return a.scope.registerBinding("let",a.get("declarations.0")),tr(this,_A,"f").call(this,i),i}bindImport(e,r,n,s){let i=tr(this,NA,"f").import(tr(this,PA,"f"),e,r,s?.nameHint);if(!(0,D6.astNodeHasBinding)(n,i.name))return tr(this,_A,"f").call(this,i.name),i.name;let o=z0e(i.name,c=>tr(this,PA,"f").scope.hasBinding(c)||(0,D6.astNodeHasBinding)(n,c)),a=tr(this,$f,"f").types,l=tr(this,qf,"m",Gw).call(this,a.variableDeclaration("let",[a.variableDeclarator(a.identifier(o),i)]));return l.scope.registerBinding("let",l.get("declarations.0")),tr(this,_A,"f").call(this,o),o}importForSideEffect(e){tr(this,NA,"f").importForSideEffect(e)}emitExpression(e){let r=tr(this,$f,"f").types;tr(this,qf,"m",Gw).call(this,r.expressionStatement(tr(this,qf,"m",P6).call(this,tr(this,ui,"f").program,e)))}};Cu.JSUtils=_6;$f=new WeakMap,ui=new WeakMap,PA=new WeakMap,_A=new WeakMap,NA=new WeakMap,qf=new WeakSet,Gw=function(e){return tr(this,ui,"f").lastInsertedPath?tr(this,ui,"f").lastInsertedPath=tr(this,ui,"f").lastInsertedPath.insertAfter(e)[0]:tr(this,ui,"f").lastInsertedPath=tr(this,ui,"f").program.unshiftContainer("body",e)[0],tr(this,ui,"f").lastInsertedPath},P6=function(e,r){let n;typeof r=="string"?n=r:n=r(new N6(tr(this,NA,"f"),e));let s=tr(this,$f,"f").parse(n);if(!s)throw new Error(`JSUtils.bindExpression could not understand the expression: ${n}`);let i=ZLt(s);if(i.length!==1)throw new Error(`JSUtils.bindExpression expected to find exactly one expression but found ${i.length} in: ${n}`);let o=i[0];if(o.type!=="ExpressionStatement")throw new Error(`JSUtils.bindExpression expected to find an expression but found ${o.type} in: ${n}`);return o.expression};function z0e(t,e){let r=t,n=0;for(;e(r);)r=`${t}${n++}`;return r}function ZLt(t){return t.type==="File"?t.program.body:t.body}var N6=class{constructor(e,r){Yw.set(this,void 0),Ww.set(this,void 0),Hf(this,Yw,e,"f"),Hf(this,Ww,r,"f")}import(e,r,n){return tr(this,Yw,"f").import(tr(this,Ww,"f"),e,r,n).name}};Yw=new WeakMap,Ww=new WeakMap});var FEe=y(lr=>{"use strict";var Vf={NBSP:160,QUOT:34,LT:60,GT:62,AMP:38},pEe=/["\x26\xa0]/u,eMt=new RegExp(pEe.source,"gu"),fEe=/[&<>\xa0]/u,tMt=new RegExp(fEe.source,"gu");function rMt(t){switch(t.charCodeAt(0)){case Vf.NBSP:return" ";case Vf.QUOT:return""";case Vf.AMP:return"&";default:return t}}function nMt(t){switch(t.charCodeAt(0)){case Vf.NBSP:return" ";case Vf.AMP:return"&";case Vf.LT:return"<";case Vf.GT:return">";default:return t}}function Z0e(t){return pEe.test(t)?t.replace(eMt,rMt):t}function sMt(t){return fEe.test(t)?t.replace(tMt,nMt):t}function dEe(t,e){return t.loc.isInvisible||e.loc.isInvisible?0:t.loc.startPosition.line<e.loc.startPosition.line||t.loc.startPosition.line===e.loc.startPosition.line&&t.loc.startPosition.column<e.loc.startPosition.column?-1:t.loc.startPosition.line===e.loc.startPosition.line&&t.loc.startPosition.column===e.loc.startPosition.column?0:1}var tB=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function iMt(){return[...tB]}var oMt=/^\S/u;function a5(t){return tB.has(t.toLowerCase())&&t[0]?.toLowerCase()===t[0]}var Y0=class{constructor(e){this.buffer="",this.options=e}handledByOverride(e,r=!1){if(this.options.override!==void 0){let n=this.options.override(e,this.options);if(typeof n=="string")return r&&oMt.test(n)&&(n=` ${n}`),this.buffer+=n,!0}return!1}Node(e){switch(e.type){case"MustacheStatement":case"BlockStatement":case"MustacheCommentStatement":case"CommentStatement":case"TextNode":case"ElementNode":case"AttrNode":case"Block":case"Template":return this.TopLevelStatement(e);case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":case"PathExpression":case"SubExpression":return this.Expression(e);case"ConcatStatement":return this.ConcatStatement(e);case"Hash":return this.Hash(e);case"HashPair":return this.HashPair(e);case"ElementModifierStatement":return this.ElementModifierStatement(e)}}Expression(e){switch(e.type){case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":return this.Literal(e);case"PathExpression":return this.PathExpression(e);case"SubExpression":return this.SubExpression(e)}}Literal(e){switch(e.type){case"StringLiteral":return this.StringLiteral(e);case"BooleanLiteral":return this.BooleanLiteral(e);case"NumberLiteral":return this.NumberLiteral(e);case"UndefinedLiteral":return this.UndefinedLiteral(e);case"NullLiteral":return this.NullLiteral(e)}}TopLevelStatement(e){switch(e.type){case"MustacheStatement":return this.MustacheStatement(e);case"BlockStatement":return this.BlockStatement(e);case"MustacheCommentStatement":return this.MustacheCommentStatement(e);case"CommentStatement":return this.CommentStatement(e);case"TextNode":return this.TextNode(e);case"ElementNode":return this.ElementNode(e);case"Block":return this.Block(e);case"Template":return this.Template(e);case"AttrNode":return this.AttrNode(e)}}Template(e){this.TopLevelStatements(e.body)}Block(e){if(e.chained){let r=e.body[0];r.chained=!0}this.handledByOverride(e)||this.TopLevelStatements(e.body)}TopLevelStatements(e){e.forEach(r=>this.TopLevelStatement(r))}ElementNode(e){this.handledByOverride(e)||(this.OpenElementNode(e),this.TopLevelStatements(e.children),this.CloseElementNode(e))}OpenElementNode(e){this.buffer+=`<${e.tag}`;let r=[...e.attributes,...e.modifiers,...e.comments].sort(dEe);for(let n of r)switch(this.buffer+=" ",n.type){case"AttrNode":this.AttrNode(n);break;case"ElementModifierStatement":this.ElementModifierStatement(n);break;case"MustacheCommentStatement":this.MustacheCommentStatement(n);break}e.blockParams.length&&this.BlockParams(e.blockParams),e.selfClosing&&(this.buffer+=" /"),this.buffer+=">"}CloseElementNode(e){e.selfClosing||a5(e.tag)||(this.buffer+=`</${e.tag}>`)}AttrNode(e){if(this.handledByOverride(e))return;let{name:r,value:n}=e;this.buffer+=r,!r.startsWith("@")&&n.type=="TextNode"&&n.chars.length===0||(this.buffer+="=",this.AttrNodeValue(n))}AttrNodeValue(e){if(e.type==="TextNode"){let r='"';this.options.entityEncoding==="raw"&&e.chars.includes('"')&&!e.chars.includes("'")&&(r="'"),this.buffer+=r,this.TextNode(e,r),this.buffer+=r}else this.Node(e)}TextNode(e,r){this.handledByOverride(e)||(this.options.entityEncoding==="raw"?r&&e.chars.includes(r)?this.buffer+=Z0e(e.chars):this.buffer+=e.chars:r?this.buffer+=Z0e(e.chars):this.buffer+=sMt(e.chars))}MustacheStatement(e){this.handledByOverride(e)||(this.buffer+=e.trusting?"{{{":"{{",e.strip.open&&(this.buffer+="~"),this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),e.strip.close&&(this.buffer+="~"),this.buffer+=e.trusting?"}}}":"}}")}BlockStatement(e){this.handledByOverride(e)||(e.chained?(this.buffer+=e.inverseStrip.open?"{{~":"{{",this.buffer+="else "):this.buffer+=e.openStrip.open?"{{~#":"{{#",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),e.program.blockParams.length&&this.BlockParams(e.program.blockParams),e.chained?this.buffer+=e.inverseStrip.close?"~}}":"}}":this.buffer+=e.openStrip.close?"~}}":"}}",this.Block(e.program),e.inverse&&(e.inverse.chained||(this.buffer+=e.inverseStrip.open?"{{~":"{{",this.buffer+="else",this.buffer+=e.inverseStrip.close?"~}}":"}}"),this.Block(e.inverse)),e.chained||(this.buffer+=e.closeStrip.open?"{{~/":"{{/",this.Expression(e.path),this.buffer+=e.closeStrip.close?"~}}":"}}"))}BlockParams(e){this.buffer+=` as |${e.join(" ")}|`}ConcatStatement(e){this.handledByOverride(e)||(this.buffer+='"',e.parts.forEach(r=>{r.type==="TextNode"?this.TextNode(r,'"'):this.Node(r)}),this.buffer+='"')}MustacheCommentStatement(e){this.handledByOverride(e)||(this.buffer+=`{{!--${e.value}--}}`)}ElementModifierStatement(e){this.handledByOverride(e)||(this.buffer+="{{",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),this.buffer+="}}")}CommentStatement(e){this.handledByOverride(e)||(this.buffer+=`<!--${e.value}-->`)}PathExpression(e){this.handledByOverride(e)||(this.buffer+=e.original)}SubExpression(e){this.handledByOverride(e)||(this.buffer+="(",this.Expression(e.path),this.Params(e.params),this.Hash(e.hash),this.buffer+=")")}Params(e){e.length&&e.forEach(r=>{this.buffer+=" ",this.Expression(r)})}Hash(e){this.handledByOverride(e,!0)||e.pairs.forEach(r=>{this.buffer+=" ",this.HashPair(r)})}HashPair(e){this.handledByOverride(e)||(this.buffer+=e.key,this.buffer+="=",this.Node(e.value))}StringLiteral(e){this.handledByOverride(e)||(this.buffer+=JSON.stringify(e.value))}BooleanLiteral(e){this.handledByOverride(e)||(this.buffer+=String(e.value))}NumberLiteral(e){this.handledByOverride(e)||(this.buffer+=String(e.value))}UndefinedLiteral(e){this.handledByOverride(e)||(this.buffer+="undefined")}NullLiteral(e){this.handledByOverride(e)||(this.buffer+="null")}print(e){let{options:r}=this;if(r.override){let n=r.override(e,r);if(n!==void 0)return n}return this.buffer="",this.Node(e),this.buffer}};function hEe(t,e={entityEncoding:"transformed"}){return t?new Y0(e).print(t):""}function AEe(t,e){return t in j6?e===void 0?!0:j6[t].includes(e):!1}var j6={action:["Call","Modifier"],component:["Call","Append","Block"],debugger:["Append"],"each-in":["Block"],each:["Block"],"has-block-params":["Call","Append"],"has-block":["Call","Append"],helper:["Call","Append"],if:["Call","Append","Block"],"in-element":["Block"],let:["Block"],log:["Call","Append"],modifier:["Call","Modifier"],mount:["Append"],mut:["Call","Append"],outlet:["Append"],readonly:["Call","Append"],unbound:["Call","Append"],unless:["Call","Append","Block"],yield:["Append"]};function l5(t,...e){}function aMt(t,e){return t}function yo(t){return t?t.length>0:!1}function FA(t,e="unexpected empty list"){return t}function aE(t){return t.length===0?void 0:t[t.length-1]}function c5(t){return t.length===0?void 0:t[0]}function k6(){return Object.create(null)}var Ga=Object.assign,eEe=console;function lMt(t,e="unexpected unreachable branch"){throw eEe.log("unreachable",t),eEe.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var Q6=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function vu(t,e){var r=e&&e.loc,n,s,i,o;r&&(n=r.start.line,s=r.end.line,i=r.start.column,o=r.end.column,t+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,t),l=0;l<Q6.length;l++)this[Q6[l]]=a[Q6[l]];Error.captureStackTrace&&Error.captureStackTrace(this,vu);try{r&&(this.lineNumber=n,this.endLineNumber=s,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=i,this.endColumn=o))}catch{}}vu.prototype=new Error;function G0(){this.parents=[]}G0.prototype={constructor:G0,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!G0.prototype[r.type])throw new vu('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new vu(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new vu("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||e)return e;if(e!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:Xw,Decorator:Xw,BlockStatement:tEe,DecoratorBlock:tEe,PartialStatement:rEe,PartialBlockStatement:function(t){rEe.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Xw,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function Xw(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function tEe(t){Xw.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function rEe(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Ya(t){t===void 0&&(t={}),this.options=t}Ya.prototype=new G0;Ya.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,s=0,i=n.length;s<i;s++){var o=n[s],a=this.accept(o);if(a){var l=q6(n,s,r),c=H6(n,s,r),u=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Gf(n,s,!0),a.open&&Su(n,s,!0),e&&f&&(Gf(n,s),Su(n,s)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[s-1].original)[1])),e&&u&&(Gf((o.program||o.inverse).body),Su(n,s)),e&&p&&(Gf(n,s),Su((o.inverse||o.program).body))}}return t};Ya.prototype.BlockStatement=Ya.prototype.DecoratorBlock=Ya.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,s=r;if(r&&r.chained)for(n=r.body[0].program;s.chained;)s=s.body[s.body.length-1].program;var i={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:H6(e.body),closeStandalone:q6((n||e).body)};if(t.openStrip.close&&Gf(e.body,null,!0),r){var o=t.inverseStrip;o.open&&Su(e.body,null,!0),o.close&&Gf(n.body,null,!0),t.closeStrip.open&&Su(s.body,null,!0),!this.options.ignoreStandalone&&q6(e.body)&&H6(n.body)&&(Su(e.body),Gf(n.body))}else t.closeStrip.open&&Su(e.body,null,!0);return i};Ya.prototype.Decorator=Ya.prototype.MustacheStatement=function(t){return t.strip};Ya.prototype.PartialStatement=Ya.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function q6(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],s=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function H6(t,e,r){e===void 0&&(e=-1);var n=t[e+1],s=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Gf(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var s=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function Su(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var s=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}var Jw=function(){var t=function(tt,J,ee,Z){for(ee=ee||{},Z=tt.length;Z--;ee[tt[Z]]=J);return ee},e=[2,52],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,53,57,61],s=[1,44],i=[1,40],o=[1,43],a=[1,33],l=[1,34],c=[1,35],u=[1,36],p=[1,37],f=[1,42],d=[1,46],A=[14,15,19,29,34,39,44,47,48,53,57,61],h=[14,15,19,29,34,44,47,48,53,57,61],m=[15,18],g=[14,15,19,29,34,47,48,53,57,61],E=[33,67,73,75,84,85,86,87,88,89],b=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],I=[1,62],w=[1,63],L=[23,33,56,68,73,79],U=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],q=[2,51],V=[1,64],ie=[67,73,75,77,84,85,86,87,88,89],re=[56,67,73,75,84,85,86,87,88,89],Ie=[1,75],Ze=[1,76],je=[1,83],Ct=[33,67,73,75,79,84,85,86,87,88,89],Mt=[23,67,73,75,84,85,86,87,88,89],qt=[67,68,73,75,84,85,86,87,88,89],Ht=[33,79],sr=[1,134],Jn=[73,81],Kn={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,2],[76,0],[76,2],[80,1],[80,2]],performAction:function(J,ee,Z,G,de,R,Kr){var F=R.length-1;switch(de){case 1:return R[F-1];case 2:this.$=G.prepareProgram(R[F]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 28:case 29:case 30:case 31:case 38:case 39:case 46:case 47:this.$=R[F];break;case 9:this.$={type:"CommentStatement",value:G.stripComment(R[F]),strip:G.stripFlags(R[F],R[F]),loc:G.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:R[F],value:R[F],loc:G.locInfo(this._$)};break;case 11:this.$=G.prepareRawBlock(R[F-2],R[F-1],R[F],this._$);break;case 12:this.$={path:R[F-3],params:R[F-2],hash:R[F-1]};break;case 13:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!1,this._$);break;case 14:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!0,this._$);break;case 15:this.$={open:R[F-5],path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 16:case 17:this.$={path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 18:this.$={strip:G.stripFlags(R[F-1],R[F-1]),program:R[F]};break;case 19:var Qn=G.prepareBlock(R[F-2],R[F-1],R[F],R[F],!1,this._$),ws=G.prepareProgram([Qn],R[F-1].loc);ws.chained=!0,this.$={strip:R[F-2].strip,program:ws,chain:!0};break;case 21:this.$={path:R[F-1],strip:G.stripFlags(R[F-2],R[F])};break;case 22:this.$=G.prepareMustache(G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"}),[],void 0,R[F-2],G.stripFlags(R[F-2],R[F]),this._$);break;case 23:case 24:this.$=G.prepareMustache(R[F-3],R[F-2],R[F-1],R[F-4],G.stripFlags(R[F-4],R[F]),this._$);break;case 25:this.$={type:"PartialStatement",name:R[F-3],params:R[F-2],hash:R[F-1],indent:"",strip:G.stripFlags(R[F-4],R[F]),loc:G.locInfo(this._$)};break;case 26:this.$=G.preparePartialBlock(R[F-2],R[F-1],R[F],this._$);break;case 27:this.$={path:R[F-3],params:R[F-2],hash:R[F-1],strip:G.stripFlags(R[F-4],R[F])};break;case 32:this.$=G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 33:this.$={type:"SubExpression",path:R[F-3],params:R[F-2],hash:R[F-1],loc:G.locInfo(this._$)};break;case 34:this.$={type:"Hash",pairs:R[F],loc:G.locInfo(this._$)};break;case 35:this.$={type:"HashPair",key:G.id(R[F-2]),value:R[F],loc:G.locInfo(this._$)};break;case 36:this.$=G.syntax.square(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 37:this.$=G.id(R[F-1]);break;case 40:this.$={type:"StringLiteral",value:R[F],original:R[F],loc:G.locInfo(this._$)};break;case 41:this.$={type:"NumberLiteral",value:Number(R[F]),original:Number(R[F]),loc:G.locInfo(this._$)};break;case 42:this.$={type:"BooleanLiteral",value:R[F]==="true",original:R[F]==="true",loc:G.locInfo(this._$)};break;case 43:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:G.locInfo(this._$)};break;case 44:this.$={type:"NullLiteral",original:null,value:null,loc:G.locInfo(this._$)};break;case 45:this.$=G.preparePath(!0,!1,R[F],this._$);break;case 48:this.$=G.preparePath(!1,R[F-2],R[F],this._$);break;case 49:this.$=G.preparePath(!1,!1,R[F],this._$);break;case 50:R[F-2].push({part:G.id(R[F]),original:R[F],separator:R[F-1]}),this.$=R[F-2];break;case 51:this.$=[{part:G.id(R[F]),original:R[F]}];break;case 52:case 54:case 56:case 64:case 70:case 76:case 84:case 88:case 92:case 96:case 100:case 106:this.$=[];break;case 53:case 55:case 57:case 65:case 71:case 77:case 85:case 89:case 93:case 97:case 101:case 105:case 107:case 109:R[F-1].push(R[F]);break;case 104:case 108:this.$=[R[F]];break}},table:[t([5,14,15,19,29,34,48,53,57,61],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,60:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],53:[1,14],57:[1,18],61:[1,24]}),{1:[2,1]},t(n,[2,53]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:28,49:25,50:26,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:45,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(A,e,{6:3,4:47}),t(h,e,{6:3,4:48}),t(m,[2,54],{17:49}),{20:28,50:50,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:51}),t([5,14,15,18,19,29,34,39,44,47,48,53,57,61],[2,10]),{20:52,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:54,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:55,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:56,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,57]},t(E,[2,84],{51:58}),t([23,33,56,68,79],[2,34],{72:59,73:[1,60]}),t(b,[2,28]),t(b,[2,29],{91:61,92:I,93:w}),t(L,[2,104]),t(b,[2,38]),t(b,[2,39]),t(b,[2,40]),t(b,[2,41]),t(b,[2,42]),t(b,[2,43]),t(b,[2,44]),t(U,[2,30]),t(U,[2,31]),t([23,33,56,67,68,73,75,79,84,85,86,87,88,89,92,93],q,{74:V}),t(b,[2,49],{91:65,92:I,93:w}),{73:d,90:66},t(ie,[2,106],{76:67}),{20:28,49:68,50:69,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(re,[2,88],{54:70}),t(U,q),{25:71,38:73,39:Ie,43:74,44:Ze,45:72,47:[2,60]},{28:77,43:78,44:Ze,47:[2,62]},{13:80,15:r,18:[1,79]},t(E,[2,92],{58:81}),{26:82,47:je},t(Ct,[2,64],{30:84}),{91:61,92:I,93:w},t(Ct,[2,70],{35:85}),t(Mt,[2,56],{21:86}),t(E,[2,96],{62:87}),t(n,[2,22]),{20:28,33:[2,86],49:90,50:89,52:88,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(L,[2,105]),{74:V},{73:d,90:91},{73:[2,46]},{73:[2,47]},{20:28,50:92,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{73:[1,93]},t(b,[2,45],{91:65,92:I,93:w}),{20:28,50:95,64:29,65:38,66:39,67:s,73:d,75:o,77:[1,94],82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{68:[1,96]},t(qt,[2,100],{69:97}),{20:28,49:100,50:99,55:98,56:[2,90],64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{26:101,47:je},{47:[2,61]},t(A,e,{6:3,4:102}),{47:[2,20]},{20:103,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:104}),{26:105,47:je},{47:[2,63]},t(n,[2,11]),t(m,[2,55]),{20:28,33:[2,94],49:108,50:107,59:106,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(n,[2,26]),{20:109,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(Ht,[2,66],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,31:110,50:111,49:112,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(Ht,[2,72],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,36:113,50:114,49:115,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),{20:28,22:116,23:[2,58],49:118,50:117,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,33:[2,98],49:121,50:120,63:119,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,122]},t(E,[2,85]),{33:[2,87]},t(b,[2,48],{91:65,92:I,93:w}),t(L,[2,35]),t(U,[2,50]),t(U,[2,36]),t(ie,[2,107]),t(U,[2,32]),{20:28,49:125,50:124,64:29,65:38,66:39,67:s,68:[2,102],70:123,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{56:[1,126]},t(re,[2,89]),{56:[2,91]},t(n,[2,13]),{38:73,39:Ie,43:74,44:Ze,45:128,46:127,47:[2,82]},t(Ct,[2,76],{40:129}),{47:[2,18]},t(n,[2,14]),{33:[1,130]},t(E,[2,93]),{33:[2,95]},{33:[1,131]},{32:132,33:[2,68],78:133,79:sr},t(Ct,[2,65]),t(Ht,[2,67]),{33:[2,74],37:135,78:136,79:sr},t(Ct,[2,71]),t(Ht,[2,73]),{23:[1,137]},t(Mt,[2,57]),{23:[2,59]},{33:[1,138]},t(E,[2,97]),{33:[2,99]},t(n,[2,23]),{68:[1,139]},t(qt,[2,101]),{68:[2,103]},t(n,[2,24]),{47:[2,19]},{47:[2,83]},t(Ht,[2,78],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,41:140,50:141,49:142,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(n,[2,25]),t(n,[2,21]),{33:[1,143]},{33:[2,69]},{73:[1,145],80:144},{33:[1,146]},{33:[2,75]},t(m,[2,12]),t(g,[2,27]),t(U,[2,33]),{33:[2,80],42:147,78:148,79:sr},t(Ct,[2,77]),t(Ht,[2,79]),t(A,[2,15]),{73:[1,150],81:[1,149]},t(Jn,[2,108]),t(h,[2,16]),{33:[1,151]},{33:[2,81]},{33:[2,37]},t(Jn,[2,109]),t(A,[2,17])],defaultActions:{4:[2,1],62:[2,46],63:[2,47],72:[2,61],74:[2,20],78:[2,63],90:[2,87],100:[2,91],104:[2,18],108:[2,95],118:[2,59],121:[2,99],125:[2,103],127:[2,19],128:[2,83],133:[2,69],136:[2,75],148:[2,81],149:[2,37]},parseError:function(J,ee){if(ee.recoverable)this.trace(J);else{var Z=new Error(J);throw Z.hash=ee,Z}},parse:function(J){var ee=this,Z=[0],G=[null],de=[],R=this.table,Kr="",F=0,Qn=0,ws=2,ua=1,me=de.slice.call(arguments,1),K=Object.create(this.lexer),Qe={yy:{}};for(var $t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$t)&&(Qe.yy[$t]=this.yy[$t]);K.setInput(J,Qe.yy),Qe.yy.lexer=K,Qe.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var Ar=K.yylloc;de.push(Ar);var Cr=K.options&&K.options.ranges;typeof Qe.yy.parseError=="function"?this.parseError=Qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var un=function(){var Mr;return Mr=K.lex()||ua,typeof Mr!="number"&&(Mr=ee.symbols_[Mr]||Mr),Mr},St,Rt,ft,pn,ir={},fs,Vt,fn,dn;;){if(Rt=Z[Z.length-1],this.defaultActions[Rt]?ft=this.defaultActions[Rt]:((St===null||typeof St>"u")&&(St=un()),ft=R[Rt]&&R[Rt][St]),typeof ft>"u"||!ft.length||!ft[0]){var Dn="";dn=[];for(fs in R[Rt])this.terminals_[fs]&&fs>ws&&dn.push("'"+this.terminals_[fs]+"'");K.showPosition?Dn="Parse error on line "+(F+1)+`:
|
|
2729
2729
|
`+K.showPosition()+`
|
|
2730
|
-
Expecting `+dn.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dn="Parse error on line "+(F+1)+": Unexpected "+(St==ua?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Dn,{text:K.match,token:this.terminals_[St]||St,line:K.yylineno,loc:Ar,expected:dn})}if(
|
|
2730
|
+
Expecting `+dn.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dn="Parse error on line "+(F+1)+": Unexpected "+(St==ua?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Dn,{text:K.match,token:this.terminals_[St]||St,line:K.yylineno,loc:Ar,expected:dn})}if(ft[0]instanceof Array&&ft.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+St);switch(ft[0]){case 1:Z.push(St),G.push(K.yytext),de.push(K.yylloc),Z.push(ft[1]),St=null,Qn=K.yyleng,Kr=K.yytext,F=K.yylineno,Ar=K.yylloc;break;case 2:if(Vt=this.productions_[ft[1]][1],ir.$=G[G.length-Vt],ir._$={first_line:de[de.length-(Vt||1)].first_line,last_line:de[de.length-1].last_line,first_column:de[de.length-(Vt||1)].first_column,last_column:de[de.length-1].last_column},Cr&&(ir._$.range=[de[de.length-(Vt||1)].range[0],de[de.length-1].range[1]]),pn=this.performAction.apply(ir,[Kr,Qn,F,Qe.yy,ft[1],G,de].concat(me)),typeof pn<"u")return pn;Vt&&(Z=Z.slice(0,-1*Vt*2),G=G.slice(0,-1*Vt),de=de.slice(0,-1*Vt)),Z.push(this.productions_[ft[1]][0]),G.push(ir.$),de.push(ir._$),fn=R[Z[Z.length-2]][Z[Z.length-1]],Z.push(fn);break;case 3:return!0}}return!0}},cn=function(){var tt={EOF:1,parseError:function(ee,Z){if(this.yy.parser)this.yy.parser.parseError(ee,Z);else throw new Error(ee)},setInput:function(J,ee){return this.yy=ee||this.yy||{},this._input=J,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var ee=J.match(/(?:\r\n?|\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var ee=J.length,Z=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var G=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Z.length-1&&(this.yylineno-=Z.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Z?(Z.length===G.length?this.yylloc.first_column:0)+G[G.length-Z.length].length-Z[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
2731
2731
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),ee=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
|
|
2732
2732
|
`+ee+"^"},test_match:function(J,ee){var Z,G,de;if(this.options.backtrack_lexer&&(de={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(de.yylloc.range=this.yylloc.range.slice(0))),G=J[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(J[0].length),this.matched+=J[0],Z=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Z)return Z;if(this._backtrack){for(var R in de)this[R]=de[R];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,ee,Z,G;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),R=0;R<de.length;R++)if(Z=this._input.match(this.rules[de[R]]),Z&&(!ee||Z[0].length>ee[0].length)){if(ee=Z,G=R,this.options.backtrack_lexer){if(J=this.test_match(Z,de[R]),J!==!1)return J;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(J=this.test_match(ee,de[G]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
2733
2733
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ee=this.next();return ee||this.lex()},begin:function(ee){this.conditionStack.push(ee)},popState:function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},pushState:function(ee){this.begin(ee)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ee,Z,G,de){function R(Kr,F){return Z.yytext=Z.yytext.substring(Kr,Z.yyleng-F+Kr)}switch(G){case 0:if(Z.yytext.slice(-2)==="\\\\"?(R(0,1),this.begin("mu")):Z.yytext.slice(-1)==="\\"?(R(0,1),this.begin("emu")):this.begin("mu"),Z.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(R(5,9),18);case 5:return 15;case 6:return this.popState(),14;case 7:return 67;case 8:return 68;case 9:if(ee.syntax.square==="string")this.unput(Z.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;case 18:return this.popState(),44;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(Z.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;case 33:return this.popState(),33;case 34:return Z.yytext=R(1,2).replace(/\\"/g,'"'),84;case 35:return Z.yytext=R(1,2).replace(/\\'/g,"'"),84;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return Z.yytext=Z.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return tt}();Kn.lexer=cn;function Ut(){this.yy={}}return Ut.prototype=Kn,Kn.Parser=Ut,new Ut}(),cMt=function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function $r(){this.padding=0}$r.prototype=new G0;$r.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
@@ -2786,8 +2786,8 @@ Expecting `+dn.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dn="Parse erro
|
|
|
2786
2786
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
2787
2787
|
https://www.w3ctech.com/topic/2226`));let a=r(...o);return a.postcssPlugin=e,a.postcssVersion=new n9().version,a}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,a,l){return hr([s(l)]).process(o,a)},s};hr.stringify=p8t;hr.parse=c8t;hr.fromJSON=s8t;hr.list=a8t;hr.comment=t=>new s1e(t);hr.atRule=t=>new n1e(t);hr.decl=t=>new i1e(t);hr.rule=t=>new l1e(t);hr.root=t=>new a1e(t);hr.document=t=>new o1e(t);hr.CssSyntaxError=n8t;hr.Declaration=i1e;hr.Container=r8t;hr.Processor=n9;hr.Document=o1e;hr.Comment=s1e;hr.Warning=f8t;hr.AtRule=n1e;hr.Result=u8t;hr.Input=i8t;hr.Rule=l1e;hr.Root=a1e;hr.Node=l8t;o8t.registerPostcss(hr);c1e.exports=hr;hr.default=hr});var s9={};Wu(s9,{AtRule:()=>N8t,Comment:()=>P8t,Container:()=>B8t,CssSyntaxError:()=>x8t,Declaration:()=>w8t,Document:()=>D8t,Input:()=>Q8t,Node:()=>F8t,Processor:()=>T8t,Result:()=>k8t,Root:()=>O8t,Rule:()=>R8t,Warning:()=>_8t,atRule:()=>C8t,comment:()=>b8t,decl:()=>I8t,default:()=>d8t,document:()=>E8t,fromJSON:()=>A8t,list:()=>y8t,parse:()=>g8t,plugin:()=>m8t,root:()=>v8t,rule:()=>S8t,stringify:()=>h8t});var wr,d8t,h8t,A8t,m8t,g8t,y8t,E8t,b8t,C8t,S8t,I8t,v8t,x8t,w8t,B8t,T8t,D8t,P8t,_8t,N8t,k8t,Q8t,R8t,O8t,F8t,i9=Yu(()=>{wr=We(u1e(),1),d8t=wr.default,h8t=wr.default.stringify,A8t=wr.default.fromJSON,m8t=wr.default.plugin,g8t=wr.default.parse,y8t=wr.default.list,E8t=wr.default.document,b8t=wr.default.comment,C8t=wr.default.atRule,S8t=wr.default.rule,I8t=wr.default.decl,v8t=wr.default.root,x8t=wr.default.CssSyntaxError,w8t=wr.default.Declaration,B8t=wr.default.Container,T8t=wr.default.Processor,D8t=wr.default.Document,P8t=wr.default.Comment,_8t=wr.default.Warning,N8t=wr.default.AtRule,k8t=wr.default.Result,Q8t=wr.default.Input,R8t=wr.default.Rule,O8t=wr.default.Root,F8t=wr.default.Node});var o9=y((tT,p1e)=>{"use strict";tT.__esModule=!0;tT.default=U8t;function L8t(t){for(var e=t.toLowerCase(),r="",n=!1,s=0;s<6&&e[s]!==void 0;s++){var i=e.charCodeAt(s),o=i>=97&&i<=102||i>=48&&i<=57;if(n=i===32,!o)break;r+=e[s]}if(r.length!==0){var a=parseInt(r,16),l=a>=55296&&a<=57343;return l||a===0||a>1114111?["\uFFFD",r.length+(n?1:0)]:[String.fromCodePoint(a),r.length+(n?1:0)]}}var M8t=/\\/;function U8t(t){var e=M8t.test(t);if(!e)return t;for(var r="",n=0;n<t.length;n++){if(t[n]==="\\"){var s=L8t(t.slice(n+1,n+7));if(s!==void 0){r+=s[0],n+=s[1];continue}if(t[n+1]==="\\"){r+="\\",n++;continue}t.length===n+1&&(r+=t[n]);continue}r+=t[n]}return r}p1e.exports=tT.default});var d1e=y((rT,f1e)=>{"use strict";rT.__esModule=!0;rT.default=j8t;function j8t(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(;r.length>0;){var s=r.shift();if(!t[s])return;t=t[s]}return t}f1e.exports=rT.default});var A1e=y((nT,h1e)=>{"use strict";nT.__esModule=!0;nT.default=q8t;function q8t(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(;r.length>0;){var s=r.shift();t[s]||(t[s]={}),t=t[s]}}h1e.exports=nT.default});var g1e=y((sT,m1e)=>{"use strict";sT.__esModule=!0;sT.default=H8t;function H8t(t){for(var e="",r=t.indexOf("/*"),n=0;r>=0;){e=e+t.slice(n,r);var s=t.indexOf("*/",r+2);if(s<0)return e;n=s+2,r=t.indexOf("/*",n)}return e=e+t.slice(n),e}m1e.exports=sT.default});var y1e=y(kE=>{"use strict";kE.__esModule=!0;kE.MAX_NESTING_DEPTH=void 0;kE.default=V8t;var $8t=kE.MAX_NESTING_DEPTH=256;function V8t(t){return Number.isSafeInteger(t)&&t>=0?t:$8t}});var KA=y(pi=>{"use strict";pi.__esModule=!0;pi.unesc=pi.stripComments=pi.resolveMaxNestingDepth=pi.getProp=pi.ensureObject=pi.MAX_NESTING_DEPTH=void 0;var G8t=iT(o9());pi.unesc=G8t.default;var Y8t=iT(d1e());pi.getProp=Y8t.default;var W8t=iT(A1e());pi.ensureObject=W8t.default;var J8t=iT(g1e());pi.stripComments=J8t.default;var E1e=b1e(y1e());pi.resolveMaxNestingDepth=E1e.default;pi.MAX_NESTING_DEPTH=E1e.MAX_NESTING_DEPTH;function b1e(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(b1e=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function iT(t){return t&&t.__esModule?t:{default:t}}});var rc=y((QE,S1e)=>{"use strict";QE.__esModule=!0;QE.default=void 0;var oT=KA();function C1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,z8t(n.key),n)}}function K8t(t,e,r){return e&&C1e(t.prototype,e),r&&C1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function z8t(t){var e=X8t(t,"string");return typeof e=="symbol"?e:e+""}function X8t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Z8t=function t(e,r,n){if(n===void 0&&(n=0),n>oT.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of "+oT.MAX_NESTING_DEPTH+".");if(typeof e!="object"||e===null)return e;var s=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var o=e[i],a=typeof o;i==="parent"&&a==="object"?r&&(s[i]=r):o instanceof Array?s[i]=o.map(function(l){return t(l,s,n+1)}):s[i]=t(o,s,n+1)}return s},Yfr=QE.default=function(){function t(r){r===void 0&&(r={}),Object.assign(this,r),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=t.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var n in arguments)this.parent.insertBefore(this,arguments[n]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(n){n===void 0&&(n={});var s=Z8t(this);for(var i in n)s[i]=n[i];return s},e.appendToPropertyAndEscape=function(n,s,i){this.raws||(this.raws={});var o=this[n],a=this.raws[n];this[n]=o+s,a||i!==s?this.raws[n]=(a||o)+i:delete this.raws[n]},e.setPropertyAndEscape=function(n,s,i){this.raws||(this.raws={}),this[n]=s,this.raws[n]=i},e.setPropertyWithoutEscape=function(n,s){this[n]=s,this.raws&&delete this.raws[n]},e.isAtPosition=function(n,s){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>n||this.source.end.line<n||this.source.start.line===n&&this.source.start.column>s||this.source.end.line===n&&this.source.end.column<s)},e.stringifyProperty=function(n){return this.raws&&this.raws[n]||this[n]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},e._stringify=function(){return this.toString()},K8t(t,[{key:"rawSpaceBefore",get:function(){var n=this.raws&&this.raws.spaces&&this.raws.spaces.before;return n===void 0&&(n=this.spaces&&this.spaces.before),n||""},set:function(n){(0,oT.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=n}},{key:"rawSpaceAfter",get:function(){var n=this.raws&&this.raws.spaces&&this.raws.spaces.after;return n===void 0&&(n=this.spaces.after),n||""},set:function(n){(0,oT.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=n}}]),t}();S1e.exports=QE.default});var us=y(Br=>{"use strict";Br.__esModule=!0;Br.UNIVERSAL=Br.TAG=Br.STRING=Br.SELECTOR=Br.ROOT=Br.PSEUDO=Br.NESTING=Br.ID=Br.COMMENT=Br.COMBINATOR=Br.CLASS=Br.ATTRIBUTE=void 0;var Wfr=Br.TAG="tag",Jfr=Br.STRING="string",Kfr=Br.SELECTOR="selector",zfr=Br.ROOT="root",Xfr=Br.PSEUDO="pseudo",Zfr=Br.NESTING="nesting",edr=Br.ID="id",tdr=Br.COMMENT="comment",rdr=Br.COMBINATOR="combinator",ndr=Br.CLASS="class",sdr=Br.ATTRIBUTE="attribute",idr=Br.UNIVERSAL="universal"});var aT=y((RE,w1e)=>{"use strict";RE.__esModule=!0;RE.default=void 0;var a9=KA(),e6t=t6t(rc()),nc=x1e(us());function x1e(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(x1e=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function t6t(t){return t&&t.__esModule?t:{default:t}}function r6t(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=n6t(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2788
2788
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n6t(t,e){if(t){if(typeof t=="string")return I1e(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I1e(t,e):void 0}}function I1e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function v1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i6t(n.key),n)}}function s6t(t,e,r){return e&&v1e(t.prototype,e),r&&v1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i6t(t){var e=o6t(t,"string");return typeof e=="symbol"?e:e+""}function o6t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function a6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,l9(t,e)}function l9(t,e){return l9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},l9(t,e)}var adr=RE.default=function(t){a6t(e,t);function e(n){var s;return s=t.call(this,n)||this,s.nodes||(s.nodes=[]),s}var r=e.prototype;return r.append=function(s){return s.parent=this,this.nodes.push(s),this},r.prepend=function(s){return s.parent=this,this.nodes.unshift(s),this},r.at=function(s){return this.nodes[s]},r.index=function(s){return typeof s=="number"?s:this.nodes.indexOf(s)},r.removeChild=function(s){s=this.index(s),this.at(s).parent=void 0,this.nodes.splice(s,1);var i;for(var o in this.indexes)i=this.indexes[o],i>=s&&(this.indexes[o]=i-1);return this},r.removeAll=function(){for(var s=r6t(this.nodes),i;!(i=s()).done;){var o=i.value;o.parent=void 0}return this.nodes=[],this},r.empty=function(){return this.removeAll()},r.insertAfter=function(s,i){i.parent=this;var o=this.index(s);this.nodes.splice(o+1,0,i),i.parent=this;var a;for(var l in this.indexes)a=this.indexes[l],o<=a&&(this.indexes[l]=a+1);return this},r.insertBefore=function(s,i){i.parent=this;var o=this.index(s);this.nodes.splice(o,0,i),i.parent=this;var a;for(var l in this.indexes)a=this.indexes[l],a<=o&&(this.indexes[l]=a+1);return this},r._findChildAtPosition=function(s,i){var o=void 0;return this.each(function(a){if(a.atPosition){var l=a.atPosition(s,i);if(l)return o=l,!1}else if(a.isAtPosition(s,i))return o=a,!1}),o},r.atPosition=function(s,i){if(this.isAtPosition(s,i))return this._findChildAtPosition(s,i)||this},r._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},r.each=function(s){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var i=this.lastEach;if(this.indexes[i]=0,!!this.length){for(var o,a;this.indexes[i]<this.length&&(o=this.indexes[i],a=s(this.at(o),o),a!==!1);)this.indexes[i]+=1;if(delete this.indexes[i],a===!1)return!1}},r.walk=function(s,i){if(i===void 0&&(i=0),i>a9.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of "+a9.MAX_NESTING_DEPTH+".");return this.each(function(o,a){var l=s(o,a);if(l!==!1&&o.length&&(l=o.walk(s,i+1)),l===!1)return!1})},r.walkAttributes=function(s){var i=this;return this.walk(function(o){if(o.type===nc.ATTRIBUTE)return s.call(i,o)})},r.walkClasses=function(s){var i=this;return this.walk(function(o){if(o.type===nc.CLASS)return s.call(i,o)})},r.walkCombinators=function(s){var i=this;return this.walk(function(o){if(o.type===nc.COMBINATOR)return s.call(i,o)})},r.walkComments=function(s){var i=this;return this.walk(function(o){if(o.type===nc.COMMENT)return s.call(i,o)})},r.walkIds=function(s){var i=this;return this.walk(function(o){if(o.type===nc.ID)return s.call(i,o)})},r.walkNesting=function(s){var i=this;return this.walk(function(o){if(o.type===nc.NESTING)return s.call(i,o)})},r.walkPseudos=function(s){var i=this;return this.walk(function(o){if(o.type===nc.PSEUDO)return s.call(i,o)})},r.walkTags=function(s){var i=this;return this.walk(function(o){if(o.type===nc.TAG)return s.call(i,o)})},r.walkUniversals=function(s){var i=this;return this.walk(function(o){if(o.type===nc.UNIVERSAL)return s.call(i,o)})},r.split=function(s){var i=this,o=[];return this.reduce(function(a,l,c){var u=s.call(i,l);return o.push(l),u?(a.push(o),o=[]):c===i.length-1&&a.push(o),a},[])},r.map=function(s){return this.nodes.map(s)},r.reduce=function(s,i){return this.nodes.reduce(s,i)},r.every=function(s){return this.nodes.every(s)},r.some=function(s){return this.nodes.some(s)},r.filter=function(s){return this.nodes.filter(s)},r.sort=function(s){return this.nodes.sort(s)},r.toString=function(s){return s===void 0&&(s={}),this._stringify(s,0,(0,a9.resolveMaxNestingDepth)(s.maxNestingDepth))},r._stringify=function(s,i,o){var a=this;return this.map(function(l){return a._stringifyChild(l,s,i,o)}).join("")},r._stringifyChild=function(s,i,o,a){return typeof s._stringify=="function"?s._stringify(i,o,a):String(s)},s6t(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e}(e6t.default);w1e.exports=RE.default});var u9=y((OE,T1e)=>{"use strict";OE.__esModule=!0;OE.default=void 0;var l6t=u6t(aT()),c6t=us();function u6t(t){return t&&t.__esModule?t:{default:t}}function B1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f6t(n.key),n)}}function p6t(t,e,r){return e&&B1e(t.prototype,e),r&&B1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f6t(t){var e=d6t(t,"string");return typeof e=="symbol"?e:e+""}function d6t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function h6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c9(t,e)}function c9(t,e){return c9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},c9(t,e)}var ldr=OE.default=function(t){h6t(e,t);function e(n){var s;return s=t.call(this,n)||this,s.type=c6t.ROOT,s}var r=e.prototype;return r._stringify=function(s,i,o){var a=this,l=this.reduce(function(c,u){return c.push(a._stringifyChild(u,s,i,o)),c},[]).join(",");return this.trailingComma?l+",":l},r.error=function(s,i){return this._error?this._error(s,i):new Error(s)},p6t(e,[{key:"errorGenerator",set:function(s){this._error=s}}]),e}(l6t.default);T1e.exports=OE.default});var f9=y((FE,D1e)=>{"use strict";FE.__esModule=!0;FE.default=void 0;var A6t=g6t(aT()),m6t=us();function g6t(t){return t&&t.__esModule?t:{default:t}}function y6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p9(t,e)}function p9(t,e){return p9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},p9(t,e)}var cdr=FE.default=function(t){y6t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=m6t.SELECTOR,n}return e}(A6t.default);D1e.exports=FE.default});var lT=y((udr,P1e)=>{"use strict";var E6t={},b6t=E6t.hasOwnProperty,C6t=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=b6t.call(e,s)?e[s]:r[s];return n},S6t=/[ -,\.\/:-@\[-\^`\{-~]/,I6t=/[ -,\.\/:-@\[\]\^`\{-~]/,v6t=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,d9=function t(e,r){r=C6t(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,l=e.length;a<l;){var c=e.charAt(a++),u=c.charCodeAt(),p=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&a<l){var f=e.charCodeAt(a++);(f&64512)==56320?u=((u&1023)<<10)+(f&1023)+65536:a--}p="\\"+u.toString(16).toUpperCase()+" "}else r.escapeEverything?S6t.test(c)?p="\\"+c:p="\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?p="\\"+u.toString(16).toUpperCase()+" ":c=="\\"||!s&&(c=='"'&&n==c||c=="'"&&n==c)||s&&I6t.test(c)?p="\\"+c:p=c;o+=p}return s&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(i)&&(o="\\3"+i+" "+o.slice(1))),o=o.replace(v6t,function(d,A,h){return A&&A.length%2?d:(A||"")+h}),!s&&r.wrap?n+o+n:o};d9.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};d9.version="3.0.0";P1e.exports=d9});var A9=y((LE,k1e)=>{"use strict";LE.__esModule=!0;LE.default=void 0;var x6t=N1e(lT()),w6t=KA(),B6t=N1e(rc()),T6t=us();function N1e(t){return t&&t.__esModule?t:{default:t}}function _1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P6t(n.key),n)}}function D6t(t,e,r){return e&&_1e(t.prototype,e),r&&_1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function P6t(t){var e=_6t(t,"string");return typeof e=="symbol"?e:e+""}function _6t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function N6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h9(t,e)}function h9(t,e){return h9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},h9(t,e)}var pdr=LE.default=function(t){N6t(e,t);function e(n){var s;return s=t.call(this,n)||this,s.type=T6t.CLASS,s._constructed=!0,s}var r=e.prototype;return r.valueToString=function(){return"."+t.prototype.valueToString.call(this)},D6t(e,[{key:"value",get:function(){return this._value},set:function(s){if(this._constructed){var i=(0,x6t.default)(s,{isIdentifier:!0});i!==s?((0,w6t.ensureObject)(this,"raws"),this.raws.value=i):this.raws&&delete this.raws.value}this._value=s}}]),e}(B6t.default);k1e.exports=LE.default});var g9=y((ME,Q1e)=>{"use strict";ME.__esModule=!0;ME.default=void 0;var k6t=R6t(rc()),Q6t=us();function R6t(t){return t&&t.__esModule?t:{default:t}}function O6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,m9(t,e)}function m9(t,e){return m9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},m9(t,e)}var fdr=ME.default=function(t){O6t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=Q6t.COMMENT,n}return e}(k6t.default);Q1e.exports=ME.default});var E9=y((UE,R1e)=>{"use strict";UE.__esModule=!0;UE.default=void 0;var F6t=M6t(rc()),L6t=us();function M6t(t){return t&&t.__esModule?t:{default:t}}function U6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,y9(t,e)}function y9(t,e){return y9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},y9(t,e)}var ddr=UE.default=function(t){U6t(e,t);function e(n){var s;return s=t.call(this,n)||this,s.type=L6t.ID,s}var r=e.prototype;return r.valueToString=function(){return"#"+t.prototype.valueToString.call(this)},e}(F6t.default);R1e.exports=UE.default});var cT=y((jE,L1e)=>{"use strict";jE.__esModule=!0;jE.default=void 0;var j6t=F1e(lT()),q6t=KA(),H6t=F1e(rc());function F1e(t){return t&&t.__esModule?t:{default:t}}function O1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,V6t(n.key),n)}}function $6t(t,e,r){return e&&O1e(t.prototype,e),r&&O1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function V6t(t){var e=G6t(t,"string");return typeof e=="symbol"?e:e+""}function G6t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Y6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b9(t,e)}function b9(t,e){return b9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},b9(t,e)}var hdr=jE.default=function(t){Y6t(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.qualifiedName=function(s){return this.namespace?this.namespaceString+"|"+s:s},r.valueToString=function(){return this.qualifiedName(t.prototype.valueToString.call(this))},$6t(e,[{key:"namespace",get:function(){return this._namespace},set:function(s){if(s===!0||s==="*"||s==="&"){this._namespace=s,this.raws&&delete this.raws.namespace;return}var i=(0,j6t.default)(s,{isIdentifier:!0});this._namespace=s,i!==s?((0,q6t.ensureObject)(this,"raws"),this.raws.namespace=i):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(s){this.namespace=s}},{key:"namespaceString",get:function(){if(this.namespace){var s=this.stringifyProperty("namespace");return s===!0?"":s}else return""}}]),e}(H6t.default);L1e.exports=jE.default});var S9=y((qE,M1e)=>{"use strict";qE.__esModule=!0;qE.default=void 0;var W6t=K6t(cT()),J6t=us();function K6t(t){return t&&t.__esModule?t:{default:t}}function z6t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,C9(t,e)}function C9(t,e){return C9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},C9(t,e)}var Adr=qE.default=function(t){z6t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=J6t.TAG,n}return e}(W6t.default);M1e.exports=qE.default});var v9=y((HE,U1e)=>{"use strict";HE.__esModule=!0;HE.default=void 0;var X6t=e5t(rc()),Z6t=us();function e5t(t){return t&&t.__esModule?t:{default:t}}function t5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,I9(t,e)}function I9(t,e){return I9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},I9(t,e)}var mdr=HE.default=function(t){t5t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=Z6t.STRING,n}return e}(X6t.default);U1e.exports=HE.default});var w9=y(($E,j1e)=>{"use strict";$E.__esModule=!0;$E.default=void 0;var r5t=s5t(aT()),n5t=us();function s5t(t){return t&&t.__esModule?t:{default:t}}function i5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,x9(t,e)}function x9(t,e){return x9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},x9(t,e)}var gdr=$E.default=function(t){i5t(e,t);function e(n){var s;return s=t.call(this,n)||this,s.type=n5t.PSEUDO,s}var r=e.prototype;return r._stringify=function(s,i,o){var a=this;if(i>=o)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of "+o+".");var l=this.length?"("+this.map(function(c){return a._stringifyChild(c,s,i+1,o)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),l,this.rawSpaceAfter].join("")},e}(r5t.default);j1e.exports=$E.default});var H1e=y((ydr,q1e)=>{q1e.exports=require("util").deprecate});var k9=y(YE=>{"use strict";YE.__esModule=!0;YE.default=void 0;YE.unescapeValue=_9;var VE=P9(lT()),o5t=P9(o9()),a5t=P9(cT()),l5t=us(),B9;function P9(t){return t&&t.__esModule?t:{default:t}}function $1e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u5t(n.key),n)}}function c5t(t,e,r){return e&&$1e(t.prototype,e),r&&$1e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u5t(t){var e=p5t(t,"string");return typeof e=="symbol"?e:e+""}function p5t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function f5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,D9(t,e)}function D9(t,e){return D9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},D9(t,e)}var GE=H1e(),d5t=/^('|")([^]*)\1$/,h5t=GE(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),A5t=GE(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),m5t=GE(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function _9(t){var e=!1,r=null,n=t,s=n.match(d5t);return s&&(r=s[1],n=s[2]),n=(0,o5t.default)(n),n!==t&&(e=!0),{deprecatedUsage:e,unescaped:n,quoteMark:r}}function g5t(t){if(t.quoteMark!==void 0||t.value===void 0)return t;m5t();var e=_9(t.value),r=e.quoteMark,n=e.unescaped;return t.raws||(t.raws={}),t.raws.value===void 0&&(t.raws.value=t.value),t.value=n,t.quoteMark=r,t}var N9=YE.default=function(t){f5t(e,t);function e(n){var s;return n===void 0&&(n={}),s=t.call(this,g5t(n))||this,s.type=l5t.ATTRIBUTE,s.raws=s.raws||{},Object.defineProperty(s.raws,"unquoted",{get:GE(function(){return s.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:GE(function(){return s.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),s._constructed=!0,s}var r=e.prototype;return r.getQuotedValue=function(s){s===void 0&&(s={});var i=this._determineQuoteMark(s),o=T9[i],a=(0,VE.default)(this._value,o);return a},r._determineQuoteMark=function(s){return s.smart?this.smartQuoteMark(s):this.preferredQuoteMark(s)},r.setValue=function(s,i){i===void 0&&(i={}),this._value=s,this._quoteMark=this._determineQuoteMark(i),this._syncRawValue()},r.smartQuoteMark=function(s){var i=this.value,o=i.replace(/[^']/g,"").length,a=i.replace(/[^"]/g,"").length;if(o+a===0){var l=(0,VE.default)(i,{isIdentifier:!0});if(l===i)return e.NO_QUOTE;var c=this.preferredQuoteMark(s);if(c===e.NO_QUOTE){var u=this.quoteMark||s.quoteMark||e.DOUBLE_QUOTE,p=T9[u],f=(0,VE.default)(i,p);if(f.length<l.length)return u}return c}else return a===o?this.preferredQuoteMark(s):a<o?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},r.preferredQuoteMark=function(s){var i=s.preferCurrentQuoteMark?this.quoteMark:s.quoteMark;return i===void 0&&(i=s.preferCurrentQuoteMark?s.quoteMark:this.quoteMark),i===void 0&&(i=e.DOUBLE_QUOTE),i},r._syncRawValue=function(){var s=(0,VE.default)(this._value,T9[this.quoteMark]);s===this._value?this.raws&&delete this.raws.value:this.raws.value=s},r._handleEscapes=function(s,i){if(this._constructed){var o=(0,VE.default)(i,{isIdentifier:!0});o!==i?this.raws[s]=o:delete this.raws[s]}},r._spacesFor=function(s){var i={before:"",after:""},o=this.spaces[s]||{},a=this.raws.spaces&&this.raws.spaces[s]||{};return Object.assign(i,o,a)},r._stringFor=function(s,i,o){i===void 0&&(i=s),o===void 0&&(o=V1e);var a=this._spacesFor(i);return o(this.stringifyProperty(s),a)},r.offsetOf=function(s){var i=1,o=this._spacesFor("attribute");if(i+=o.before.length,s==="namespace"||s==="ns")return this.namespace?i:-1;if(s==="attributeNS"||(i+=this.namespaceString.length,this.namespace&&(i+=1),s==="attribute"))return i;i+=this.stringifyProperty("attribute").length,i+=o.after.length;var a=this._spacesFor("operator");i+=a.before.length;var l=this.stringifyProperty("operator");if(s==="operator")return l?i:-1;i+=l.length,i+=a.after.length;var c=this._spacesFor("value");i+=c.before.length;var u=this.stringifyProperty("value");if(s==="value")return u?i:-1;i+=u.length,i+=c.after.length;var p=this._spacesFor("insensitive");return i+=p.before.length,s==="insensitive"&&this.insensitive?i:-1},r.toString=function(){var s=this,i=[this.rawSpaceBefore,"["];return i.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(i.push(this._stringFor("operator")),i.push(this._stringFor("value")),i.push(this._stringFor("insensitiveFlag","insensitive",function(o,a){return o.length>0&&!s.quoted&&a.before.length===0&&!(s.spaces.value&&s.spaces.value.after)&&(a.before=" "),V1e(o,a)}))),i.push("]"),i.push(this.rawSpaceAfter),i.join("")},c5t(e,[{key:"quoted",get:function(){var s=this.quoteMark;return s==="'"||s==='"'},set:function(s){A5t()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(s){if(!this._constructed){this._quoteMark=s;return}this._quoteMark!==s&&(this._quoteMark=s,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(s){if(this._constructed){var i=_9(s),o=i.deprecatedUsage,a=i.unescaped,l=i.quoteMark;if(o&&h5t(),a===this._value&&l===this._quoteMark)return;this._value=a,this._quoteMark=l,this._syncRawValue()}else this._value=s}},{key:"insensitive",get:function(){return this._insensitive},set:function(s){s||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=s}},{key:"attribute",get:function(){return this._attribute},set:function(s){this._handleEscapes("attribute",s),this._attribute=s}}]),e}(a5t.default);N9.NO_QUOTE=null;N9.SINGLE_QUOTE="'";N9.DOUBLE_QUOTE='"';var T9=(B9={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},B9[null]={isIdentifier:!0},B9);function V1e(t,e){return""+e.before+t+e.after}});var R9=y((WE,G1e)=>{"use strict";WE.__esModule=!0;WE.default=void 0;var y5t=b5t(cT()),E5t=us();function b5t(t){return t&&t.__esModule?t:{default:t}}function C5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Q9(t,e)}function Q9(t,e){return Q9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Q9(t,e)}var bdr=WE.default=function(t){C5t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=E5t.UNIVERSAL,n.value="*",n}return e}(y5t.default);G1e.exports=WE.default});var F9=y((JE,Y1e)=>{"use strict";JE.__esModule=!0;JE.default=void 0;var S5t=v5t(rc()),I5t=us();function v5t(t){return t&&t.__esModule?t:{default:t}}function x5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,O9(t,e)}function O9(t,e){return O9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},O9(t,e)}var Cdr=JE.default=function(t){x5t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=I5t.COMBINATOR,n}return e}(S5t.default);Y1e.exports=JE.default});var M9=y((KE,W1e)=>{"use strict";KE.__esModule=!0;KE.default=void 0;var w5t=T5t(rc()),B5t=us();function T5t(t){return t&&t.__esModule?t:{default:t}}function D5t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,L9(t,e)}function L9(t,e){return L9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},L9(t,e)}var Sdr=KE.default=function(t){D5t(e,t);function e(r){var n;return n=t.call(this,r)||this,n.type=B5t.NESTING,n.value="&",n}return e}(w5t.default);W1e.exports=KE.default});var K1e=y((uT,J1e)=>{"use strict";uT.__esModule=!0;uT.default=P5t;function P5t(t){return t.sort(function(e,r){return e-r})}J1e.exports=uT.default});var U9=y(De=>{"use strict";De.__esModule=!0;De.word=De.tilde=De.tab=De.str=De.space=De.slash=De.singleQuote=De.semicolon=De.plus=De.pipe=De.openSquare=De.openParenthesis=De.newline=De.greaterThan=De.feed=De.equals=De.doubleQuote=De.dollar=De.cr=De.comment=De.comma=De.combinator=De.colon=De.closeSquare=De.closeParenthesis=De.caret=De.bang=De.backslash=De.at=De.asterisk=De.ampersand=void 0;var Idr=De.ampersand=38,vdr=De.asterisk=42,xdr=De.at=64,wdr=De.comma=44,Bdr=De.colon=58,Tdr=De.semicolon=59,Ddr=De.openParenthesis=40,Pdr=De.closeParenthesis=41,_dr=De.openSquare=91,Ndr=De.closeSquare=93,kdr=De.dollar=36,Qdr=De.tilde=126,Rdr=De.caret=94,Odr=De.plus=43,Fdr=De.equals=61,Ldr=De.pipe=124,Mdr=De.greaterThan=62,Udr=De.space=32,_5t=De.singleQuote=39,jdr=De.doubleQuote=34,qdr=De.slash=47,Hdr=De.bang=33,$dr=De.backslash=92,Vdr=De.cr=13,Gdr=De.feed=12,Ydr=De.newline=10,Wdr=De.tab=9,Jdr=De.str=_5t,Kdr=De.comment=-1,zdr=De.word=-2,Xdr=De.combinator=-3});var Z1e=y(zE=>{"use strict";zE.__esModule=!0;zE.FIELDS=void 0;zE.default=O5t;var Ae=X1e(U9()),zA,br;function X1e(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(X1e=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}var N5t=(zA={},zA[Ae.tab]=!0,zA[Ae.newline]=!0,zA[Ae.cr]=!0,zA[Ae.feed]=!0,zA),k5t=(br={},br[Ae.space]=!0,br[Ae.tab]=!0,br[Ae.newline]=!0,br[Ae.cr]=!0,br[Ae.feed]=!0,br[Ae.ampersand]=!0,br[Ae.asterisk]=!0,br[Ae.bang]=!0,br[Ae.comma]=!0,br[Ae.colon]=!0,br[Ae.semicolon]=!0,br[Ae.openParenthesis]=!0,br[Ae.closeParenthesis]=!0,br[Ae.openSquare]=!0,br[Ae.closeSquare]=!0,br[Ae.singleQuote]=!0,br[Ae.doubleQuote]=!0,br[Ae.plus]=!0,br[Ae.pipe]=!0,br[Ae.tilde]=!0,br[Ae.greaterThan]=!0,br[Ae.equals]=!0,br[Ae.dollar]=!0,br[Ae.caret]=!0,br[Ae.slash]=!0,br),j9={},z1e="0123456789abcdefABCDEF";for(pT=0;pT<z1e.length;pT++)j9[z1e.charCodeAt(pT)]=!0;var pT;function Q5t(t,e){var r=e,n;do{if(n=t.charCodeAt(r),k5t[n])return r-1;n===Ae.backslash?r=R5t(t,r)+1:r++}while(r<t.length);return r-1}function R5t(t,e){var r=e,n=t.charCodeAt(r+1);if(!N5t[n])if(j9[n]){var s=0;do r++,s++,n=t.charCodeAt(r+1);while(j9[n]&&s<6);s<6&&n===Ae.space&&r++}else r++;return r}var ehr=zE.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function O5t(t){var e=[],r=t.css.valueOf(),n=r,s=n.length,i=-1,o=1,a=0,l=0,c,u,p,f,d,A,h,m,g,E,b,I,w;function L(U,q){if(t.safe)r+=q,g=r.length-1;else throw t.error("Unclosed "+U,o,a-i,a)}for(;a<s;){switch(c=r.charCodeAt(a),c===Ae.newline&&(i=a,o+=1),c){case Ae.space:case Ae.tab:case Ae.newline:case Ae.cr:case Ae.feed:g=a;do g+=1,c=r.charCodeAt(g),c===Ae.newline&&(i=g,o+=1);while(c===Ae.space||c===Ae.newline||c===Ae.tab||c===Ae.cr||c===Ae.feed);w=Ae.space,f=o,p=g-i-1,l=g;break;case Ae.plus:case Ae.greaterThan:case Ae.tilde:case Ae.pipe:g=a;do g+=1,c=r.charCodeAt(g);while(c===Ae.plus||c===Ae.greaterThan||c===Ae.tilde||c===Ae.pipe);w=Ae.combinator,f=o,p=a-i,l=g;break;case Ae.asterisk:case Ae.ampersand:case Ae.bang:case Ae.comma:case Ae.equals:case Ae.dollar:case Ae.caret:case Ae.openSquare:case Ae.closeSquare:case Ae.colon:case Ae.semicolon:case Ae.openParenthesis:case Ae.closeParenthesis:g=a,w=c,f=o,p=a-i,l=g+1;break;case Ae.singleQuote:case Ae.doubleQuote:I=c===Ae.singleQuote?"'":'"',g=a;do for(d=!1,g=r.indexOf(I,g+1),g===-1&&L("quote",I),A=g;r.charCodeAt(A-1)===Ae.backslash;)A-=1,d=!d;while(d);w=Ae.str,f=o,p=a-i,l=g+1;break;default:c===Ae.slash&&r.charCodeAt(a+1)===Ae.asterisk?(g=r.indexOf("*/",a+2)+1,g===0&&L("comment","*/"),u=r.slice(a,g+1),m=u.split(`
|
|
2789
|
-
`),h=m.length-1,h>0?(E=o+h,b=g-m[h].length):(E=o,b=i),w=Ae.comment,o=E,f=E,p=g-b):c===Ae.slash?(g=a,w=c,f=o,p=a-i,l=g+1):(g=Q5t(r,a),w=Ae.word,f=o,p=g-i),l=g+1;break}e.push([w,o,a-i,f,p,a,l]),b&&(i=b,b=null),a=l}return e}});var oSe=y((ZE,iSe)=>{"use strict";ZE.__esModule=!0;ZE.default=void 0;var F5t=Co(u9()),q9=Co(f9()),L5t=Co(A9()),eSe=Co(g9()),M5t=Co(E9()),U5t=Co(S9()),H9=Co(v9()),j5t=Co(w9()),tSe=XE(k9()),q5t=Co(R9()),$9=Co(F9()),H5t=Co(M9()),$5t=Co(K1e()),le=XE(Z1e()),be=XE(U9()),V5t=XE(us()),Lr=KA(),ed,V9;function XE(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(XE=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function Co(t){return t&&t.__esModule?t:{default:t}}function rSe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y5t(n.key),n)}}function G5t(t,e,r){return e&&rSe(t.prototype,e),r&&rSe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y5t(t){var e=W5t(t,"string");return typeof e=="symbol"?e:e+""}function W5t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var W9=(ed={},ed[be.space]=!0,ed[be.cr]=!0,ed[be.feed]=!0,ed[be.newline]=!0,ed[be.tab]=!0,ed),J5t=Object.assign({},W9,(V9={},V9[be.comment]=!0,V9));function nSe(t){return{line:t[le.FIELDS.START_LINE],column:t[le.FIELDS.START_COL]}}function sSe(t){return{line:t[le.FIELDS.END_LINE],column:t[le.FIELDS.END_COL]}}function td(t,e,r,n){return{start:{line:t,column:e},end:{line:r,column:n}}}function XA(t){return td(t[le.FIELDS.START_LINE],t[le.FIELDS.START_COL],t[le.FIELDS.END_LINE],t[le.FIELDS.END_COL])}function G9(t,e){if(t)return td(t[le.FIELDS.START_LINE],t[le.FIELDS.START_COL],e[le.FIELDS.END_LINE],e[le.FIELDS.END_COL])}function ZA(t,e){var r=t[e];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,Lr.ensureObject)(t,"raws"),t[e]=(0,Lr.unesc)(r),t.raws[e]===void 0&&(t.raws[e]=r)),t}function Y9(t,e){for(var r=-1,n=[];(r=t.indexOf(e,r+1))!==-1;)n.push(r);return n}function K5t(){var t=Array.prototype.concat.apply([],arguments);return t.filter(function(e,r){return r===t.indexOf(e)})}var rhr=ZE.default=function(){function t(r,n){n===void 0&&(n={}),this.rule=r,this.options=Object.assign({lossy:!1,safe:!1},n),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,Lr.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,le.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var s=G9(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new F5t.default({source:s}),this.root.errorGenerator=this._errorGenerator();var i=new q9.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(i),this.current=i,this.loop()}var e=t.prototype;return e._errorGenerator=function(){var n=this;return function(s,i){return typeof n.rule=="string"?new Error(s):n.rule.error(s,i)}},e.attribute=function(){var n=[],s=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[le.FIELDS.TYPE]!==be.closeSquare;)n.push(this.currToken),this.position++;if(this.currToken[le.FIELDS.TYPE]!==be.closeSquare)return this.expected("closing square bracket",this.currToken[le.FIELDS.START_POS]);var i=n.length,o={source:td(s[1],s[2],this.currToken[3],this.currToken[4]),sourceIndex:s[le.FIELDS.START_POS]};if(i===1&&!~[be.word].indexOf(n[0][le.FIELDS.TYPE]))return this.expected("attribute",n[0][le.FIELDS.START_POS]);for(var a=0,l="",c="",u=null,p=!1;a<i;){var f=n[a],d=this.content(f),A=n[a+1];switch(f[le.FIELDS.TYPE]){case be.space:if(p=!0,this.options.lossy)break;if(u){(0,Lr.ensureObject)(o,"spaces",u);var h=o.spaces[u].after||"";o.spaces[u].after=h+d;var m=(0,Lr.getProp)(o,"raws","spaces",u,"after")||null;m&&(o.raws.spaces[u].after=m+d)}else l=l+d,c=c+d;break;case be.asterisk:if(A[le.FIELDS.TYPE]===be.equals)o.operator=d,u="operator";else if((!o.namespace||u==="namespace"&&!p)&&A){l&&((0,Lr.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=l,c=""),o.namespace=(o.namespace||"")+d;var g=(0,Lr.getProp)(o,"raws","namespace")||null;g&&(o.raws.namespace+=d),u="namespace"}p=!1;break;case be.dollar:if(u==="value"){var E=(0,Lr.getProp)(o,"raws","value");o.value+="$",E&&(o.raws.value=E+"$");break}case be.caret:A[le.FIELDS.TYPE]===be.equals&&(o.operator=d,u="operator"),p=!1;break;case be.combinator:if(d==="~"&&A[le.FIELDS.TYPE]===be.equals&&(o.operator=d,u="operator"),d!=="|"){p=!1;break}A[le.FIELDS.TYPE]===be.equals?(o.operator=d,u="operator"):!o.namespace&&!o.attribute&&(o.namespace=!0),p=!1;break;case be.word:if(A&&this.content(A)==="|"&&n[a+2]&&n[a+2][le.FIELDS.TYPE]!==be.equals&&!o.operator&&!o.namespace)o.namespace=d,u="namespace";else if(!o.attribute||u==="attribute"&&!p){l&&((0,Lr.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=c,c=""),o.attribute=(o.attribute||"")+d;var b=(0,Lr.getProp)(o,"raws","attribute")||null;b&&(o.raws.attribute+=d),u="attribute"}else if(!o.value&&o.value!==""||u==="value"&&!(p||o.quoteMark)){var I=(0,Lr.unesc)(d),w=(0,Lr.getProp)(o,"raws","value")||"",L=o.value||"";o.value=L+I,o.quoteMark=null,(I!==d||w)&&((0,Lr.ensureObject)(o,"raws"),o.raws.value=(w||L)+d),u="value"}else{var U=d==="i"||d==="I";(o.value||o.value==="")&&(o.quoteMark||p)?(o.insensitive=U,(!U||d==="I")&&((0,Lr.ensureObject)(o,"raws"),o.raws.insensitiveFlag=d),u="insensitive",l&&((0,Lr.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=c,c="")):(o.value||o.value==="")&&(u="value",o.value+=d,o.raws.value&&(o.raws.value+=d))}p=!1;break;case be.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:f[le.FIELDS.START_POS]});var q=(0,tSe.unescapeValue)(d),V=q.unescaped,ie=q.quoteMark;o.value=V,o.quoteMark=ie,u="value",(0,Lr.ensureObject)(o,"raws"),o.raws.value=d,p=!1;break;case be.equals:if(!o.attribute)return this.expected("attribute",f[le.FIELDS.START_POS],d);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:f[le.FIELDS.START_POS]});o.operator=o.operator?o.operator+d:d,u="operator",p=!1;break;case be.comment:if(u)if(p||A&&A[le.FIELDS.TYPE]===be.space||u==="insensitive"){var re=(0,Lr.getProp)(o,"spaces",u,"after")||"",Ie=(0,Lr.getProp)(o,"raws","spaces",u,"after")||re;(0,Lr.ensureObject)(o,"raws","spaces",u),o.raws.spaces[u].after=Ie+d}else{var Ze=o[u]||"",je=(0,Lr.getProp)(o,"raws",u)||Ze;(0,Lr.ensureObject)(o,"raws"),o.raws[u]=je+d}else c=c+d;break;default:return this.error('Unexpected "'+d+'" found.',{index:f[le.FIELDS.START_POS]})}a++}ZA(o,"attribute"),ZA(o,"namespace"),this.newNode(new tSe.default(o)),this.position++},e.parseWhitespaceEquivalentTokens=function(n){n<0&&(n=this.tokens.length);var s=this.position,i=[],o="",a=void 0;do if(W9[this.currToken[le.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[le.FIELDS.TYPE]===be.comment){var l={};o&&(l.before=o,o=""),a=new eSe.default({value:this.content(),source:XA(this.currToken),sourceIndex:this.currToken[le.FIELDS.START_POS],spaces:l}),i.push(a)}while(++this.position<n);if(o){if(a)a.spaces.after=o;else if(!this.options.lossy){var c=this.tokens[s],u=this.tokens[this.position-1];i.push(new H9.default({value:"",source:td(c[le.FIELDS.START_LINE],c[le.FIELDS.START_COL],u[le.FIELDS.END_LINE],u[le.FIELDS.END_COL]),sourceIndex:c[le.FIELDS.START_POS],spaces:{before:o,after:""}}))}}return i},e.convertWhitespaceNodesToSpace=function(n,s){var i=this;s===void 0&&(s=!1);var o="",a="";n.forEach(function(c){var u=i.lossySpace(c.spaces.before,s),p=i.lossySpace(c.rawSpaceBefore,s);o+=u+i.lossySpace(c.spaces.after,s&&u.length===0),a+=u+c.value+i.lossySpace(c.rawSpaceAfter,s&&p.length===0)}),a===o&&(a=void 0);var l={space:o,rawSpace:a};return l},e.isNamedCombinator=function(n){return n===void 0&&(n=this.position),this.tokens[n+0]&&this.tokens[n+0][le.FIELDS.TYPE]===be.slash&&this.tokens[n+1]&&this.tokens[n+1][le.FIELDS.TYPE]===be.word&&this.tokens[n+2]&&this.tokens[n+2][le.FIELDS.TYPE]===be.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var n=this.content(this.tokens[this.position+1]),s=(0,Lr.unesc)(n).toLowerCase(),i={};s!==n&&(i.value="/"+n+"/");var o=new $9.default({value:"/"+s+"/",source:td(this.currToken[le.FIELDS.START_LINE],this.currToken[le.FIELDS.START_COL],this.tokens[this.position+2][le.FIELDS.END_LINE],this.tokens[this.position+2][le.FIELDS.END_COL]),sourceIndex:this.currToken[le.FIELDS.START_POS],raws:i});return this.position=this.position+3,o}else this.unexpected()},e.combinator=function(){var n=this;if(this.content()==="|")return this.namespace();var s=this.locateNextMeaningfulToken(this.position);if(s<0||this.tokens[s][le.FIELDS.TYPE]===be.comma||this.tokens[s][le.FIELDS.TYPE]===be.closeParenthesis){var i=this.parseWhitespaceEquivalentTokens(s);if(i.length>0){var o=this.current.last;if(o){var a=this.convertWhitespaceNodesToSpace(i),l=a.space,c=a.rawSpace;c!==void 0&&(o.rawSpaceAfter+=c),o.spaces.after+=l}else i.forEach(function(w){return n.newNode(w)})}return}var u=this.currToken,p=void 0;s>this.position&&(p=this.parseWhitespaceEquivalentTokens(s));var f;if(this.isNamedCombinator()?f=this.namedCombinator():this.currToken[le.FIELDS.TYPE]===be.combinator?(f=new $9.default({value:this.content(),source:XA(this.currToken),sourceIndex:this.currToken[le.FIELDS.START_POS]}),this.position++):W9[this.currToken[le.FIELDS.TYPE]]||p||this.unexpected(),f){if(p){var d=this.convertWhitespaceNodesToSpace(p),A=d.space,h=d.rawSpace;f.spaces.before=A,f.rawSpaceBefore=h}}else{var m=this.convertWhitespaceNodesToSpace(p,!0),g=m.space,E=m.rawSpace;E||(E=g);var b={},I={spaces:{}};g.endsWith(" ")&&E.endsWith(" ")?(b.before=g.slice(0,g.length-1),I.spaces.before=E.slice(0,E.length-1)):g.startsWith(" ")&&E.startsWith(" ")?(b.after=g.slice(1),I.spaces.after=E.slice(1)):I.value=E,f=new $9.default({value:" ",source:G9(u,this.tokens[this.position-1]),sourceIndex:u[le.FIELDS.START_POS],spaces:b,raws:I})}return this.currToken&&this.currToken[le.FIELDS.TYPE]===be.space&&(f.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(f)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var n=new q9.default({source:{start:nSe(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][le.FIELDS.START_POS]});this.current.parent.append(n),this.current=n,this.position++},e.comment=function(){var n=this.currToken;this.newNode(new eSe.default({value:this.content(),source:XA(n),sourceIndex:n[le.FIELDS.START_POS]})),this.position++},e.error=function(n,s){throw this.root.error(n,s)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[le.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[le.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[le.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[le.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[le.FIELDS.START_POS])},e.namespace=function(){var n=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[le.FIELDS.TYPE]===be.word)return this.position++,this.word(n);if(this.nextToken[le.FIELDS.TYPE]===be.asterisk)return this.position++,this.universal(n);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var n=this.content(this.nextToken);if(n==="|"){this.position++;return}}var s=this.currToken;this.newNode(new H5t.default({value:this.content(),source:XA(s),sourceIndex:s[le.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var n=this.current.last,s=1;if(this.position++,n&&n.type===V5t.PSEUDO){var i=new q9.default({source:{start:nSe(this.tokens[this.position])},sourceIndex:this.tokens[this.position][le.FIELDS.START_POS]}),o=this.current;n.append(i),this.current=i,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of "+this.maxNestingDepth+".",{index:this.currToken[le.FIELDS.START_POS]});this.position<this.tokens.length&&s;)this.currToken[le.FIELDS.TYPE]===be.openParenthesis&&s++,this.currToken[le.FIELDS.TYPE]===be.closeParenthesis&&s--,s?this.parse():(this.current.source.end=sSe(this.currToken),this.current.parent.source.end=sSe(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=o}else{for(var a=this.currToken,l="(",c;this.position<this.tokens.length&&s;)this.currToken[le.FIELDS.TYPE]===be.openParenthesis&&s++,this.currToken[le.FIELDS.TYPE]===be.closeParenthesis&&s--,c=this.currToken,l+=this.parseParenthesisToken(this.currToken),this.position++;n?n.appendToPropertyAndEscape("value",l,l):this.newNode(new H9.default({value:l,source:td(a[le.FIELDS.START_LINE],a[le.FIELDS.START_COL],c[le.FIELDS.END_LINE],c[le.FIELDS.END_COL]),sourceIndex:a[le.FIELDS.START_POS]}))}if(s)return this.expected("closing parenthesis",this.currToken[le.FIELDS.START_POS])},e.pseudo=function(){for(var n=this,s="",i=this.currToken;this.currToken&&this.currToken[le.FIELDS.TYPE]===be.colon;)s+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[le.FIELDS.TYPE]===be.word)this.splitWord(!1,function(o,a){s+=o,n.newNode(new j5t.default({value:s,source:G9(i,n.currToken),sourceIndex:i[le.FIELDS.START_POS]})),a>1&&n.nextToken&&n.nextToken[le.FIELDS.TYPE]===be.openParenthesis&&n.error("Misplaced parenthesis.",{index:n.nextToken[le.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[le.FIELDS.START_POS])},e.space=function(){var n=this.content();this.position===0||this.prevToken[le.FIELDS.TYPE]===be.comma||this.prevToken[le.FIELDS.TYPE]===be.openParenthesis||this.current.nodes.every(function(s){return s.type==="comment"})?(this.spaces=this.optionalSpace(n),this.position++):this.position===this.tokens.length-1||this.nextToken[le.FIELDS.TYPE]===be.comma||this.nextToken[le.FIELDS.TYPE]===be.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(n),this.position++):this.combinator()},e.string=function(){var n=this.currToken;this.newNode(new H9.default({value:this.content(),source:XA(n),sourceIndex:n[le.FIELDS.START_POS]})),this.position++},e.universal=function(n){var s=this.nextToken;if(s&&this.content(s)==="|")return this.position++,this.namespace();var i=this.currToken;this.newNode(new q5t.default({value:this.content(),source:XA(i),sourceIndex:i[le.FIELDS.START_POS]}),n),this.position++},e.splitWord=function(n,s){for(var i=this,o=this.nextToken,a=this.content();o&&~[be.dollar,be.caret,be.equals,be.word].indexOf(o[le.FIELDS.TYPE]);){this.position++;var l=this.content();if(a+=l,l.lastIndexOf("\\")===l.length-1){var c=this.nextToken;c&&c[le.FIELDS.TYPE]===be.space&&(a+=this.requiredSpace(this.content(c)),this.position++)}o=this.nextToken}var u=Y9(a,".").filter(function(A){var h=a[A-1]==="\\",m=/^\d+\.\d+%$/.test(a);return!h&&!m}),p=Y9(a,"#").filter(function(A){return a[A-1]!=="\\"}),f=Y9(a,"#{");f.length&&(p=p.filter(function(A){return!~f.indexOf(A)}));var d=(0,$5t.default)(K5t([0].concat(u,p)));d.forEach(function(A,h){var m=d[h+1]||a.length,g=a.slice(A,m);if(h===0&&s)return s.call(i,g,d.length);var E,b=i.currToken,I=b[le.FIELDS.START_POS]+d[h],w=td(b[1],b[2]+A,b[3],b[2]+(m-1));if(~u.indexOf(A)){var L={value:g.slice(1),source:w,sourceIndex:I};E=new L5t.default(ZA(L,"value"))}else if(~p.indexOf(A)){var U={value:g.slice(1),source:w,sourceIndex:I};E=new M5t.default(ZA(U,"value"))}else{var q={value:g,source:w,sourceIndex:I};ZA(q,"value"),E=new U5t.default(q)}i.newNode(E,n),n=null}),this.position++},e.word=function(n){var s=this.nextToken;return s&&this.content(s)==="|"?(this.position++,this.namespace()):this.splitWord(n)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(n){switch(this.currToken[le.FIELDS.TYPE]){case be.space:this.space();break;case be.comment:this.comment();break;case be.openParenthesis:this.parentheses();break;case be.closeParenthesis:n&&this.missingParenthesis();break;case be.openSquare:this.attribute();break;case be.dollar:case be.caret:case be.equals:case be.word:this.word();break;case be.colon:this.pseudo();break;case be.comma:this.comma();break;case be.asterisk:this.universal();break;case be.ampersand:this.nesting();break;case be.slash:case be.combinator:this.combinator();break;case be.str:this.string();break;case be.closeSquare:this.missingSquareBracket();case be.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(n,s,i){if(Array.isArray(n)){var o=n.pop();n=n.join(", ")+" or "+o}var a=/^[aeiou]/.test(n[0])?"an":"a";return i?this.error("Expected "+a+" "+n+', found "'+i+'" instead.',{index:s}):this.error("Expected "+a+" "+n+".",{index:s})},e.requiredSpace=function(n){return this.options.lossy?" ":n},e.optionalSpace=function(n){return this.options.lossy?"":n},e.lossySpace=function(n,s){return this.options.lossy?s?" ":"":n},e.parseParenthesisToken=function(n){var s=this.content(n);return n[le.FIELDS.TYPE]===be.space?this.requiredSpace(s):s},e.newNode=function(n,s){return s&&(/^ +$/.test(s)&&(this.options.lossy||(this.spaces=(this.spaces||"")+s),s=!0),n.namespace=s,ZA(n,"namespace")),this.spaces&&(n.spaces.before=this.spaces,this.spaces=""),this.current.append(n)},e.content=function(n){return n===void 0&&(n=this.currToken),this.css.slice(n[le.FIELDS.START_POS],n[le.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(n){n===void 0&&(n=this.position+1);for(var s=n;s<this.tokens.length;)if(J5t[this.tokens[s][le.FIELDS.TYPE]]){s++;continue}else return s;return-1},G5t(t,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),t}();iSe.exports=ZE.default});var lSe=y((eb,aSe)=>{"use strict";eb.__esModule=!0;eb.default=void 0;var z5t=X5t(oSe());function X5t(t){return t&&t.__esModule?t:{default:t}}var nhr=eb.default=function(){function t(r,n){this.func=r||function(){},this.funcRes=null,this.options=n}var e=t.prototype;return e._shouldUpdateSelector=function(n,s){s===void 0&&(s={});var i=Object.assign({},this.options,s);return i.updateSelector===!1?!1:typeof n!="string"},e._isLossy=function(n){n===void 0&&(n={});var s=Object.assign({},this.options,n);return s.lossless===!1},e._root=function(n,s){s===void 0&&(s={});var i=new z5t.default(n,this._parseOptions(s));return i.root},e._parseOptions=function(n){var s=Object.assign({},this.options,n);return{lossy:this._isLossy(s),maxNestingDepth:s.maxNestingDepth}},e._stringifyOptions=function(n){var s=Object.assign({},this.options,n);return{maxNestingDepth:s.maxNestingDepth}},e._run=function(n,s){var i=this;return s===void 0&&(s={}),new Promise(function(o,a){try{var l=i._root(n,s);Promise.resolve(i.func(l)).then(function(c){var u=void 0;return i._shouldUpdateSelector(n,s)&&(u=l.toString(i._stringifyOptions(s)),n.selector=u),{transform:c,root:l,string:u}}).then(o,a)}catch(c){a(c);return}})},e._runSync=function(n,s){s===void 0&&(s={});var i=this._root(n,s),o=this.func(i);if(o&&typeof o.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var a=void 0;return s.updateSelector&&typeof n!="string"&&(a=i.toString(this._stringifyOptions(s)),n.selector=a),{transform:o,root:i,string:a}},e.ast=function(n,s){return this._run(n,s).then(function(i){return i.root})},e.astSync=function(n,s){return this._runSync(n,s).root},e.transform=function(n,s){return this._run(n,s).then(function(i){return i.transform})},e.transformSync=function(n,s){return this._runSync(n,s).transform},e.process=function(n,s){var i=this;return this._run(n,s).then(function(o){return o.string||o.root.toString(i._stringifyOptions(s))})},e.processSync=function(n,s){var i=this._runSync(n,s);return i.string||i.root.toString(this._stringifyOptions(s))},t}();aSe.exports=eb.default});var cSe=y(Tr=>{"use strict";Tr.__esModule=!0;Tr.universal=Tr.tag=Tr.string=Tr.selector=Tr.root=Tr.pseudo=Tr.nesting=Tr.id=Tr.comment=Tr.combinator=Tr.className=Tr.attribute=void 0;var Z5t=So(k9()),e9t=So(A9()),t9t=So(F9()),r9t=So(g9()),n9t=So(E9()),s9t=So(M9()),i9t=So(w9()),o9t=So(u9()),a9t=So(f9()),l9t=So(v9()),c9t=So(S9()),u9t=So(R9());function So(t){return t&&t.__esModule?t:{default:t}}var shr=Tr.attribute=function(e){return new Z5t.default(e)},ihr=Tr.className=function(e){return new e9t.default(e)},ohr=Tr.combinator=function(e){return new t9t.default(e)},ahr=Tr.comment=function(e){return new r9t.default(e)},lhr=Tr.id=function(e){return new n9t.default(e)},chr=Tr.nesting=function(e){return new s9t.default(e)},uhr=Tr.pseudo=function(e){return new i9t.default(e)},phr=Tr.root=function(e){return new o9t.default(e)},fhr=Tr.selector=function(e){return new a9t.default(e)},dhr=Tr.string=function(e){return new l9t.default(e)},hhr=Tr.tag=function(e){return new c9t.default(e)},Ahr=Tr.universal=function(e){return new u9t.default(e)}});var fSe=y(nr=>{"use strict";nr.__esModule=!0;nr.isComment=nr.isCombinator=nr.isClassName=nr.isAttribute=void 0;nr.isContainer=A9t;nr.isIdentifier=void 0;nr.isNamespace=m9t;nr.isNesting=void 0;nr.isNode=J9;nr.isPseudo=void 0;nr.isPseudoClass=h9t;nr.isPseudoElement=pSe;nr.isUniversal=nr.isTag=nr.isString=nr.isSelector=nr.isRoot=void 0;var Vr=us(),fi,p9t=(fi={},fi[Vr.ATTRIBUTE]=!0,fi[Vr.CLASS]=!0,fi[Vr.COMBINATOR]=!0,fi[Vr.COMMENT]=!0,fi[Vr.ID]=!0,fi[Vr.NESTING]=!0,fi[Vr.PSEUDO]=!0,fi[Vr.ROOT]=!0,fi[Vr.SELECTOR]=!0,fi[Vr.STRING]=!0,fi[Vr.TAG]=!0,fi[Vr.UNIVERSAL]=!0,fi);function J9(t){return typeof t=="object"&&p9t[t.type]}function Io(t,e){return J9(e)&&e.type===t}var f9t=nr.isAttribute=Io.bind(null,Vr.ATTRIBUTE),ghr=nr.isClassName=Io.bind(null,Vr.CLASS),yhr=nr.isCombinator=Io.bind(null,Vr.COMBINATOR),Ehr=nr.isComment=Io.bind(null,Vr.COMMENT),bhr=nr.isIdentifier=Io.bind(null,Vr.ID),Chr=nr.isNesting=Io.bind(null,Vr.NESTING),uSe=nr.isPseudo=Io.bind(null,Vr.PSEUDO),Shr=nr.isRoot=Io.bind(null,Vr.ROOT),Ihr=nr.isSelector=Io.bind(null,Vr.SELECTOR),vhr=nr.isString=Io.bind(null,Vr.STRING),d9t=nr.isTag=Io.bind(null,Vr.TAG),xhr=nr.isUniversal=Io.bind(null,Vr.UNIVERSAL);function pSe(t){return uSe(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function h9t(t){return uSe(t)&&!pSe(t)}function A9t(t){return!!(J9(t)&&t.walk)}function m9t(t){return f9t(t)||d9t(t)}});var dSe=y(la=>{"use strict";la.__esModule=!0;var K9=us();Object.keys(K9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===K9[t]||(la[t]=K9[t])});var z9=cSe();Object.keys(z9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===z9[t]||(la[t]=z9[t])});var X9=fSe();Object.keys(X9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===X9[t]||(la[t]=X9[t])})});var mSe=y((tb,ASe)=>{"use strict";tb.__esModule=!0;tb.default=void 0;var g9t=E9t(lSe()),y9t=hSe(dSe());function hSe(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(hSe=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function E9t(t){return t&&t.__esModule?t:{default:t}}var Z9=function(e){return new g9t.default(e)};Object.assign(Z9,y9t);delete Z9.__esModule;var Thr=tb.default=Z9;ASe.exports=tb.default});var vSe=y(nb=>{"use strict";var ESe=(QB(),cc(S5)),b9t=(i9(),cc(s9)),C9t=mSe(),rb=require("fs"),fT=require("path");function bSe(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var S9t=bSe(b9t),ej=bSe(C9t),I9t=/^(-\w+-)?animation-name$/,v9t=/^(-\w+-)?animation$/;function x9t(t){console.warn(t)}var CSe=t=>{let e=t?.id??"",r={...t,id:void 0},n=Object.create(null),s=e.replace(/^data-v-/,"");return{postcssPlugin:"glimmer-scoped-css",Rule(i){w9t(e,i,r)},AtRule(i){/-?keyframes$/.test(i.name)&&!i.params.endsWith(`-${s}`)&&(n[i.params]=i.params=i.params+"-"+s)},OnceExit(i){Object.keys(n).length&&i.walkDecls(o=>{I9t.test(o.prop)&&(o.value=o.value.split(",").map(a=>n[a.trim()]||a.trim()).join(",")),v9t.test(o.prop)&&(o.value=o.value.split(",").map(a=>{let l=a.trim().split(/\s+/),c=l.findIndex(u=>n[u]);return c!==-1?(l.splice(c,1,n[l[c]]),l.join(" ")):a}).join(","))})}}},gSe=new WeakSet;function w9t(t,e,r){gSe.has(e)||e.parent&&e.parent.type==="atrule"&&/-?keyframes$/.test(e.parent.name)||(gSe.add(e),e.selector=ej.default(n=>{n.each(s=>{B9t(t,s,n,r)})}).processSync(e.selector))}function B9t(t,e,r,n){let s=null;e.each(i=>{if(i.type==="pseudo"){let{value:o}=i;if(o===":deep"){if(i.nodes.length){let a=i;i.nodes[0].each(c=>{e.insertAfter(a,c),a=c});let l=e.at(e.index(i)-1);(!l||!T9t(l))&&e.insertAfter(i,ej.default.combinator({value:" "})),e.removeChild(i)}return!1}if(o===":global")return n.noGlobal?(x9t(`:global is not supported in this environment, in this selector: ${e}`),!1):(r.insertAfter(e,i.nodes[0]),r.removeChild(e),!1)}i.type!=="pseudo"&&i.type!=="combinator"&&(s=i)}),s?s.spaces.after="":e.first.spaces.before="",e.insertAfter(s,ej.default.attribute({attribute:t,value:t,raws:{},quoteMark:'"'}))}function T9t(t){return t.type==="combinator"&&/^\s+$/.test(t.value)}CSe.postcss=!0;function D9t(t){let e=Array.from(new TextEncoder().encode(t),r=>String.fromCodePoint(r)).join("");return encodeURIComponent(btoa(e))}function P9t(t){let e=atob(decodeURIComponent(t));return new TextDecoder().decode(Uint8Array.from(e,r=>r.codePointAt(0)))}function _9t(t){if(!(typeof rb.existsSync!="function"||typeof rb.realpathSync!="function"||typeof process>"u"||typeof process.cwd!="function"||!fT.isAbsolute(t)||!rb.existsSync(t)))return fT.relative(rb.realpathSync(process.cwd()),rb.realpathSync(t)).split(fT.sep).join("/")}function SSe(t){return ESe.md5(_9t(t)??t).slice(0,10)}function ISe(t){return e=>{let r=`data-scopedcss-${SSe(e.filename)}`,n,{syntax:{builders:s},meta:{jsutils:i}}=e;return{name:"glimmer-scoped-css",visitor:{Template(o){let a=o.body.find(l=>l.type==="ElementNode"&&l.tag==="style");return a&&(n=ESe.md5(ySe(a)).slice(0,10)),o},ElementNode(o,a){let l=`${r}-${n}`;if(o.tag==="style"){let c=ySe(o),u;if(Q9t(o)){if(a.parent?.node.type!=="Template")throw new Error("<style> tags must be at the root of the template, they cannot be nested");u=S9t.default([CSe({id:l,...t})]).process(c).css}else return;let p=D9t(u);return i.importForSideEffect(`./${fT.basename(e.filename)}.${p}.glimmer-scoped.css`),null}else{if(o.tag.startsWith(":"))return o;n&&o.attributes.push(s.attr(l,s.text("")))}}}}}}var N9t=ISe({noGlobal:!1});function ySe(t){return t.children.filter(r=>r.type==="TextNode").map(r=>r.chars).join("")}var k9t="scoped";function Q9t(t){return t.attributes.some(e=>e.name===k9t)}nb.decodeCSS=P9t;nb.generateScopedCSSPlugin=ISe;nb.scopedCSSTransform=N9t;nb.uniqueIdentifier=SSe});var xSe=y(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});QB();i9();var tj=vSe();require("fs");require("path");sb.default=tj.scopedCSSTransform;sb.generateScopedCSSPlugin=tj.generateScopedCSSPlugin;sb.uniqueIdentifier=tj.uniqueIdentifier});var ive=y(V7=>{var pm=class t{static __wrap(e){let r=Object.create(t.prototype);return r.__wbg_ptr=e,q7.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,q7.unregister(this),e}free(){let e=this.__destroy_into_raw();Et.__wbg_codemappair_free(e,0)}constructor(e,r){let n=Gu(e,Et.__wbindgen_malloc,Et.__wbindgen_realloc),s=el,i=Gu(r,Et.__wbindgen_malloc,Et.__wbindgen_realloc),o=el,a=Et.codemappair_new(n,s,i,o);return this.__wbg_ptr=a,q7.register(this,this.__wbg_ptr,this),this}get code(){let e,r;try{let n=Et.__wbg_get_codemappair_code(this.__wbg_ptr);return e=n[0],r=n[1],l2(n[0],n[1])}finally{Et.__wbindgen_free(e,r,1)}}get map(){let e,r;try{let n=Et.__wbg_get_codemappair_map(this.__wbg_ptr);return e=n[0],r=n[1],l2(n[0],n[1])}finally{Et.__wbindgen_free(e,r,1)}}set code(e){let r=Gu(e,Et.__wbindgen_malloc,Et.__wbindgen_realloc),n=el;Et.__wbg_set_codemappair_code(this.__wbg_ptr,r,n)}set map(e){let r=Gu(e,Et.__wbindgen_malloc,Et.__wbindgen_realloc),n=el;Et.__wbg_set_codemappair_map(this.__wbg_ptr,r,n)}};Symbol.dispose&&(pm.prototype[Symbol.dispose]=pm.prototype.free);V7.CodeMapPair=pm;var xb=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,rve.unregister(this),e}free(){let e=this.__destroy_into_raw();Et.__wbg_preprocessor_free(e,0)}constructor(){let e=Et.preprocessor_new();return this.__wbg_ptr=e,rve.register(this,this.__wbg_ptr,this),this}parse(e,r){let n=Gu(e,Et.__wbindgen_malloc,Et.__wbindgen_realloc),s=el,i=Et.preprocessor_parse(this.__wbg_ptr,n,s,r);if(i[2])throw H7(i[1]);return H7(i[0])}process(e,r){let n=Gu(e,Et.__wbindgen_malloc,Et.__wbindgen_realloc),s=el,i=Et.preprocessor_process(this.__wbg_ptr,n,s,r);if(i[2])throw H7(i[1]);return pm.__wrap(i[0])}};Symbol.dispose&&(xb.prototype[Symbol.dispose]=xb.prototype.free);V7.Preprocessor=xb;function D7t(){return{__proto__:null,"./content_tag_bg.js":{__proto__:null,__wbg_Boolean_56701fbb0ba40957:function(e){return!!e},__wbg_Error_1793cae569d55d52:function(e){return Error(e)},__wbg_String_f656b08aa2423725:function(e,r){let n=String(r),s=Gu(n,Et.__wbindgen_malloc,Et.__wbindgen_realloc),i=el;i2().setInt32(e+4,i,!0),i2().setInt32(e+0,s,!0)},__wbg___wbindgen_debug_string_edece8177ad01481:function(e,r){let n=$7(r),s=Gu(n,Et.__wbindgen_malloc,Et.__wbindgen_realloc),i=el;i2().setInt32(e+4,i,!0),i2().setInt32(e+0,s,!0)},__wbg___wbindgen_throw_9c31b086c2b26051:function(e,r){throw new Error(l2(e,r))},__wbg_get_dcf82ab8aad1a593:function(){return nve(function(e,r){return Reflect.get(e,r)},arguments)},__wbg_parse_48d3dd02aeaf9065:function(e){return JSON.parse(e)},__wbg_set_a0e911be3da02782:function(){return nve(function(e,r,n){return Reflect.set(e,r,n)},arguments)},__wbindgen_cast_0000000000000001:function(e,r){return l2(e,r)},__wbindgen_init_externref_table:function(){let e=Et.__wbindgen_externrefs,r=e.grow(4);e.set(0,void 0),e.set(r+0,void 0),e.set(r+1,null),e.set(r+2,!0),e.set(r+3,!1)}}}}var q7=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Et.__wbg_codemappair_free(t,1)),rve=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Et.__wbg_preprocessor_free(t,1));function P7t(t){let e=Et.__externref_table_alloc();return Et.__wbindgen_externrefs.set(e,t),e}function $7(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let s=t.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){let s=t.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(t)){let s=t.length,i="[";s>0&&(i+=$7(t[0]));for(let o=1;o<s;o++)i+=", "+$7(t[o]);return i+="]",i}let r=/\[object ([^\]]+)\]/.exec(toString.call(t)),n;if(r&&r.length>1)n=r[1];else return toString.call(t);if(n=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
|
|
2790
|
-
${t.stack}`:n}var um=null;function i2(){return(um===null||um.buffer.detached===!0||um.buffer.detached===void 0&&um.buffer!==
|
|
2789
|
+
`),h=m.length-1,h>0?(E=o+h,b=g-m[h].length):(E=o,b=i),w=Ae.comment,o=E,f=E,p=g-b):c===Ae.slash?(g=a,w=c,f=o,p=a-i,l=g+1):(g=Q5t(r,a),w=Ae.word,f=o,p=g-i),l=g+1;break}e.push([w,o,a-i,f,p,a,l]),b&&(i=b,b=null),a=l}return e}});var oSe=y((ZE,iSe)=>{"use strict";ZE.__esModule=!0;ZE.default=void 0;var F5t=Co(u9()),q9=Co(f9()),L5t=Co(A9()),eSe=Co(g9()),M5t=Co(E9()),U5t=Co(S9()),H9=Co(v9()),j5t=Co(w9()),tSe=XE(k9()),q5t=Co(R9()),$9=Co(F9()),H5t=Co(M9()),$5t=Co(K1e()),le=XE(Z1e()),be=XE(U9()),V5t=XE(us()),Lr=KA(),ed,V9;function XE(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(XE=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function Co(t){return t&&t.__esModule?t:{default:t}}function rSe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y5t(n.key),n)}}function G5t(t,e,r){return e&&rSe(t.prototype,e),r&&rSe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y5t(t){var e=W5t(t,"string");return typeof e=="symbol"?e:e+""}function W5t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var W9=(ed={},ed[be.space]=!0,ed[be.cr]=!0,ed[be.feed]=!0,ed[be.newline]=!0,ed[be.tab]=!0,ed),J5t=Object.assign({},W9,(V9={},V9[be.comment]=!0,V9));function nSe(t){return{line:t[le.FIELDS.START_LINE],column:t[le.FIELDS.START_COL]}}function sSe(t){return{line:t[le.FIELDS.END_LINE],column:t[le.FIELDS.END_COL]}}function td(t,e,r,n){return{start:{line:t,column:e},end:{line:r,column:n}}}function XA(t){return td(t[le.FIELDS.START_LINE],t[le.FIELDS.START_COL],t[le.FIELDS.END_LINE],t[le.FIELDS.END_COL])}function G9(t,e){if(t)return td(t[le.FIELDS.START_LINE],t[le.FIELDS.START_COL],e[le.FIELDS.END_LINE],e[le.FIELDS.END_COL])}function ZA(t,e){var r=t[e];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,Lr.ensureObject)(t,"raws"),t[e]=(0,Lr.unesc)(r),t.raws[e]===void 0&&(t.raws[e]=r)),t}function Y9(t,e){for(var r=-1,n=[];(r=t.indexOf(e,r+1))!==-1;)n.push(r);return n}function K5t(){var t=Array.prototype.concat.apply([],arguments);return t.filter(function(e,r){return r===t.indexOf(e)})}var rhr=ZE.default=function(){function t(r,n){n===void 0&&(n={}),this.rule=r,this.options=Object.assign({lossy:!1,safe:!1},n),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,Lr.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,le.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var s=G9(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new F5t.default({source:s}),this.root.errorGenerator=this._errorGenerator();var i=new q9.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(i),this.current=i,this.loop()}var e=t.prototype;return e._errorGenerator=function(){var n=this;return function(s,i){return typeof n.rule=="string"?new Error(s):n.rule.error(s,i)}},e.attribute=function(){var n=[],s=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[le.FIELDS.TYPE]!==be.closeSquare;)n.push(this.currToken),this.position++;if(this.currToken[le.FIELDS.TYPE]!==be.closeSquare)return this.expected("closing square bracket",this.currToken[le.FIELDS.START_POS]);var i=n.length,o={source:td(s[1],s[2],this.currToken[3],this.currToken[4]),sourceIndex:s[le.FIELDS.START_POS]};if(i===1&&!~[be.word].indexOf(n[0][le.FIELDS.TYPE]))return this.expected("attribute",n[0][le.FIELDS.START_POS]);for(var a=0,l="",c="",u=null,p=!1;a<i;){var f=n[a],d=this.content(f),A=n[a+1];switch(f[le.FIELDS.TYPE]){case be.space:if(p=!0,this.options.lossy)break;if(u){(0,Lr.ensureObject)(o,"spaces",u);var h=o.spaces[u].after||"";o.spaces[u].after=h+d;var m=(0,Lr.getProp)(o,"raws","spaces",u,"after")||null;m&&(o.raws.spaces[u].after=m+d)}else l=l+d,c=c+d;break;case be.asterisk:if(A[le.FIELDS.TYPE]===be.equals)o.operator=d,u="operator";else if((!o.namespace||u==="namespace"&&!p)&&A){l&&((0,Lr.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=l,c=""),o.namespace=(o.namespace||"")+d;var g=(0,Lr.getProp)(o,"raws","namespace")||null;g&&(o.raws.namespace+=d),u="namespace"}p=!1;break;case be.dollar:if(u==="value"){var E=(0,Lr.getProp)(o,"raws","value");o.value+="$",E&&(o.raws.value=E+"$");break}case be.caret:A[le.FIELDS.TYPE]===be.equals&&(o.operator=d,u="operator"),p=!1;break;case be.combinator:if(d==="~"&&A[le.FIELDS.TYPE]===be.equals&&(o.operator=d,u="operator"),d!=="|"){p=!1;break}A[le.FIELDS.TYPE]===be.equals?(o.operator=d,u="operator"):!o.namespace&&!o.attribute&&(o.namespace=!0),p=!1;break;case be.word:if(A&&this.content(A)==="|"&&n[a+2]&&n[a+2][le.FIELDS.TYPE]!==be.equals&&!o.operator&&!o.namespace)o.namespace=d,u="namespace";else if(!o.attribute||u==="attribute"&&!p){l&&((0,Lr.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=c,c=""),o.attribute=(o.attribute||"")+d;var b=(0,Lr.getProp)(o,"raws","attribute")||null;b&&(o.raws.attribute+=d),u="attribute"}else if(!o.value&&o.value!==""||u==="value"&&!(p||o.quoteMark)){var I=(0,Lr.unesc)(d),w=(0,Lr.getProp)(o,"raws","value")||"",L=o.value||"";o.value=L+I,o.quoteMark=null,(I!==d||w)&&((0,Lr.ensureObject)(o,"raws"),o.raws.value=(w||L)+d),u="value"}else{var U=d==="i"||d==="I";(o.value||o.value==="")&&(o.quoteMark||p)?(o.insensitive=U,(!U||d==="I")&&((0,Lr.ensureObject)(o,"raws"),o.raws.insensitiveFlag=d),u="insensitive",l&&((0,Lr.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=l,l=""),c&&((0,Lr.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=c,c="")):(o.value||o.value==="")&&(u="value",o.value+=d,o.raws.value&&(o.raws.value+=d))}p=!1;break;case be.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:f[le.FIELDS.START_POS]});var q=(0,tSe.unescapeValue)(d),V=q.unescaped,ie=q.quoteMark;o.value=V,o.quoteMark=ie,u="value",(0,Lr.ensureObject)(o,"raws"),o.raws.value=d,p=!1;break;case be.equals:if(!o.attribute)return this.expected("attribute",f[le.FIELDS.START_POS],d);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:f[le.FIELDS.START_POS]});o.operator=o.operator?o.operator+d:d,u="operator",p=!1;break;case be.comment:if(u)if(p||A&&A[le.FIELDS.TYPE]===be.space||u==="insensitive"){var re=(0,Lr.getProp)(o,"spaces",u,"after")||"",Ie=(0,Lr.getProp)(o,"raws","spaces",u,"after")||re;(0,Lr.ensureObject)(o,"raws","spaces",u),o.raws.spaces[u].after=Ie+d}else{var Ze=o[u]||"",je=(0,Lr.getProp)(o,"raws",u)||Ze;(0,Lr.ensureObject)(o,"raws"),o.raws[u]=je+d}else c=c+d;break;default:return this.error('Unexpected "'+d+'" found.',{index:f[le.FIELDS.START_POS]})}a++}ZA(o,"attribute"),ZA(o,"namespace"),this.newNode(new tSe.default(o)),this.position++},e.parseWhitespaceEquivalentTokens=function(n){n<0&&(n=this.tokens.length);var s=this.position,i=[],o="",a=void 0;do if(W9[this.currToken[le.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[le.FIELDS.TYPE]===be.comment){var l={};o&&(l.before=o,o=""),a=new eSe.default({value:this.content(),source:XA(this.currToken),sourceIndex:this.currToken[le.FIELDS.START_POS],spaces:l}),i.push(a)}while(++this.position<n);if(o){if(a)a.spaces.after=o;else if(!this.options.lossy){var c=this.tokens[s],u=this.tokens[this.position-1];i.push(new H9.default({value:"",source:td(c[le.FIELDS.START_LINE],c[le.FIELDS.START_COL],u[le.FIELDS.END_LINE],u[le.FIELDS.END_COL]),sourceIndex:c[le.FIELDS.START_POS],spaces:{before:o,after:""}}))}}return i},e.convertWhitespaceNodesToSpace=function(n,s){var i=this;s===void 0&&(s=!1);var o="",a="";n.forEach(function(c){var u=i.lossySpace(c.spaces.before,s),p=i.lossySpace(c.rawSpaceBefore,s);o+=u+i.lossySpace(c.spaces.after,s&&u.length===0),a+=u+c.value+i.lossySpace(c.rawSpaceAfter,s&&p.length===0)}),a===o&&(a=void 0);var l={space:o,rawSpace:a};return l},e.isNamedCombinator=function(n){return n===void 0&&(n=this.position),this.tokens[n+0]&&this.tokens[n+0][le.FIELDS.TYPE]===be.slash&&this.tokens[n+1]&&this.tokens[n+1][le.FIELDS.TYPE]===be.word&&this.tokens[n+2]&&this.tokens[n+2][le.FIELDS.TYPE]===be.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var n=this.content(this.tokens[this.position+1]),s=(0,Lr.unesc)(n).toLowerCase(),i={};s!==n&&(i.value="/"+n+"/");var o=new $9.default({value:"/"+s+"/",source:td(this.currToken[le.FIELDS.START_LINE],this.currToken[le.FIELDS.START_COL],this.tokens[this.position+2][le.FIELDS.END_LINE],this.tokens[this.position+2][le.FIELDS.END_COL]),sourceIndex:this.currToken[le.FIELDS.START_POS],raws:i});return this.position=this.position+3,o}else this.unexpected()},e.combinator=function(){var n=this;if(this.content()==="|")return this.namespace();var s=this.locateNextMeaningfulToken(this.position);if(s<0||this.tokens[s][le.FIELDS.TYPE]===be.comma||this.tokens[s][le.FIELDS.TYPE]===be.closeParenthesis){var i=this.parseWhitespaceEquivalentTokens(s);if(i.length>0){var o=this.current.last;if(o){var a=this.convertWhitespaceNodesToSpace(i),l=a.space,c=a.rawSpace;c!==void 0&&(o.rawSpaceAfter+=c),o.spaces.after+=l}else i.forEach(function(w){return n.newNode(w)})}return}var u=this.currToken,p=void 0;s>this.position&&(p=this.parseWhitespaceEquivalentTokens(s));var f;if(this.isNamedCombinator()?f=this.namedCombinator():this.currToken[le.FIELDS.TYPE]===be.combinator?(f=new $9.default({value:this.content(),source:XA(this.currToken),sourceIndex:this.currToken[le.FIELDS.START_POS]}),this.position++):W9[this.currToken[le.FIELDS.TYPE]]||p||this.unexpected(),f){if(p){var d=this.convertWhitespaceNodesToSpace(p),A=d.space,h=d.rawSpace;f.spaces.before=A,f.rawSpaceBefore=h}}else{var m=this.convertWhitespaceNodesToSpace(p,!0),g=m.space,E=m.rawSpace;E||(E=g);var b={},I={spaces:{}};g.endsWith(" ")&&E.endsWith(" ")?(b.before=g.slice(0,g.length-1),I.spaces.before=E.slice(0,E.length-1)):g.startsWith(" ")&&E.startsWith(" ")?(b.after=g.slice(1),I.spaces.after=E.slice(1)):I.value=E,f=new $9.default({value:" ",source:G9(u,this.tokens[this.position-1]),sourceIndex:u[le.FIELDS.START_POS],spaces:b,raws:I})}return this.currToken&&this.currToken[le.FIELDS.TYPE]===be.space&&(f.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(f)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var n=new q9.default({source:{start:nSe(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][le.FIELDS.START_POS]});this.current.parent.append(n),this.current=n,this.position++},e.comment=function(){var n=this.currToken;this.newNode(new eSe.default({value:this.content(),source:XA(n),sourceIndex:n[le.FIELDS.START_POS]})),this.position++},e.error=function(n,s){throw this.root.error(n,s)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[le.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[le.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[le.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[le.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[le.FIELDS.START_POS])},e.namespace=function(){var n=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[le.FIELDS.TYPE]===be.word)return this.position++,this.word(n);if(this.nextToken[le.FIELDS.TYPE]===be.asterisk)return this.position++,this.universal(n);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var n=this.content(this.nextToken);if(n==="|"){this.position++;return}}var s=this.currToken;this.newNode(new H5t.default({value:this.content(),source:XA(s),sourceIndex:s[le.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var n=this.current.last,s=1;if(this.position++,n&&n.type===V5t.PSEUDO){var i=new q9.default({source:{start:nSe(this.tokens[this.position])},sourceIndex:this.tokens[this.position][le.FIELDS.START_POS]}),o=this.current;n.append(i),this.current=i,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of "+this.maxNestingDepth+".",{index:this.currToken[le.FIELDS.START_POS]});this.position<this.tokens.length&&s;)this.currToken[le.FIELDS.TYPE]===be.openParenthesis&&s++,this.currToken[le.FIELDS.TYPE]===be.closeParenthesis&&s--,s?this.parse():(this.current.source.end=sSe(this.currToken),this.current.parent.source.end=sSe(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=o}else{for(var a=this.currToken,l="(",c;this.position<this.tokens.length&&s;)this.currToken[le.FIELDS.TYPE]===be.openParenthesis&&s++,this.currToken[le.FIELDS.TYPE]===be.closeParenthesis&&s--,c=this.currToken,l+=this.parseParenthesisToken(this.currToken),this.position++;n?n.appendToPropertyAndEscape("value",l,l):this.newNode(new H9.default({value:l,source:td(a[le.FIELDS.START_LINE],a[le.FIELDS.START_COL],c[le.FIELDS.END_LINE],c[le.FIELDS.END_COL]),sourceIndex:a[le.FIELDS.START_POS]}))}if(s)return this.expected("closing parenthesis",this.currToken[le.FIELDS.START_POS])},e.pseudo=function(){for(var n=this,s="",i=this.currToken;this.currToken&&this.currToken[le.FIELDS.TYPE]===be.colon;)s+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[le.FIELDS.TYPE]===be.word)this.splitWord(!1,function(o,a){s+=o,n.newNode(new j5t.default({value:s,source:G9(i,n.currToken),sourceIndex:i[le.FIELDS.START_POS]})),a>1&&n.nextToken&&n.nextToken[le.FIELDS.TYPE]===be.openParenthesis&&n.error("Misplaced parenthesis.",{index:n.nextToken[le.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[le.FIELDS.START_POS])},e.space=function(){var n=this.content();this.position===0||this.prevToken[le.FIELDS.TYPE]===be.comma||this.prevToken[le.FIELDS.TYPE]===be.openParenthesis||this.current.nodes.every(function(s){return s.type==="comment"})?(this.spaces=this.optionalSpace(n),this.position++):this.position===this.tokens.length-1||this.nextToken[le.FIELDS.TYPE]===be.comma||this.nextToken[le.FIELDS.TYPE]===be.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(n),this.position++):this.combinator()},e.string=function(){var n=this.currToken;this.newNode(new H9.default({value:this.content(),source:XA(n),sourceIndex:n[le.FIELDS.START_POS]})),this.position++},e.universal=function(n){var s=this.nextToken;if(s&&this.content(s)==="|")return this.position++,this.namespace();var i=this.currToken;this.newNode(new q5t.default({value:this.content(),source:XA(i),sourceIndex:i[le.FIELDS.START_POS]}),n),this.position++},e.splitWord=function(n,s){for(var i=this,o=this.nextToken,a=this.content();o&&~[be.dollar,be.caret,be.equals,be.word].indexOf(o[le.FIELDS.TYPE]);){this.position++;var l=this.content();if(a+=l,l.lastIndexOf("\\")===l.length-1){var c=this.nextToken;c&&c[le.FIELDS.TYPE]===be.space&&(a+=this.requiredSpace(this.content(c)),this.position++)}o=this.nextToken}var u=Y9(a,".").filter(function(A){var h=a[A-1]==="\\",m=/^\d+\.\d+%$/.test(a);return!h&&!m}),p=Y9(a,"#").filter(function(A){return a[A-1]!=="\\"}),f=Y9(a,"#{");f.length&&(p=p.filter(function(A){return!~f.indexOf(A)}));var d=(0,$5t.default)(K5t([0].concat(u,p)));d.forEach(function(A,h){var m=d[h+1]||a.length,g=a.slice(A,m);if(h===0&&s)return s.call(i,g,d.length);var E,b=i.currToken,I=b[le.FIELDS.START_POS]+d[h],w=td(b[1],b[2]+A,b[3],b[2]+(m-1));if(~u.indexOf(A)){var L={value:g.slice(1),source:w,sourceIndex:I};E=new L5t.default(ZA(L,"value"))}else if(~p.indexOf(A)){var U={value:g.slice(1),source:w,sourceIndex:I};E=new M5t.default(ZA(U,"value"))}else{var q={value:g,source:w,sourceIndex:I};ZA(q,"value"),E=new U5t.default(q)}i.newNode(E,n),n=null}),this.position++},e.word=function(n){var s=this.nextToken;return s&&this.content(s)==="|"?(this.position++,this.namespace()):this.splitWord(n)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(n){switch(this.currToken[le.FIELDS.TYPE]){case be.space:this.space();break;case be.comment:this.comment();break;case be.openParenthesis:this.parentheses();break;case be.closeParenthesis:n&&this.missingParenthesis();break;case be.openSquare:this.attribute();break;case be.dollar:case be.caret:case be.equals:case be.word:this.word();break;case be.colon:this.pseudo();break;case be.comma:this.comma();break;case be.asterisk:this.universal();break;case be.ampersand:this.nesting();break;case be.slash:case be.combinator:this.combinator();break;case be.str:this.string();break;case be.closeSquare:this.missingSquareBracket();case be.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(n,s,i){if(Array.isArray(n)){var o=n.pop();n=n.join(", ")+" or "+o}var a=/^[aeiou]/.test(n[0])?"an":"a";return i?this.error("Expected "+a+" "+n+', found "'+i+'" instead.',{index:s}):this.error("Expected "+a+" "+n+".",{index:s})},e.requiredSpace=function(n){return this.options.lossy?" ":n},e.optionalSpace=function(n){return this.options.lossy?"":n},e.lossySpace=function(n,s){return this.options.lossy?s?" ":"":n},e.parseParenthesisToken=function(n){var s=this.content(n);return n[le.FIELDS.TYPE]===be.space?this.requiredSpace(s):s},e.newNode=function(n,s){return s&&(/^ +$/.test(s)&&(this.options.lossy||(this.spaces=(this.spaces||"")+s),s=!0),n.namespace=s,ZA(n,"namespace")),this.spaces&&(n.spaces.before=this.spaces,this.spaces=""),this.current.append(n)},e.content=function(n){return n===void 0&&(n=this.currToken),this.css.slice(n[le.FIELDS.START_POS],n[le.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(n){n===void 0&&(n=this.position+1);for(var s=n;s<this.tokens.length;)if(J5t[this.tokens[s][le.FIELDS.TYPE]]){s++;continue}else return s;return-1},G5t(t,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),t}();iSe.exports=ZE.default});var lSe=y((eb,aSe)=>{"use strict";eb.__esModule=!0;eb.default=void 0;var z5t=X5t(oSe());function X5t(t){return t&&t.__esModule?t:{default:t}}var nhr=eb.default=function(){function t(r,n){this.func=r||function(){},this.funcRes=null,this.options=n}var e=t.prototype;return e._shouldUpdateSelector=function(n,s){s===void 0&&(s={});var i=Object.assign({},this.options,s);return i.updateSelector===!1?!1:typeof n!="string"},e._isLossy=function(n){n===void 0&&(n={});var s=Object.assign({},this.options,n);return s.lossless===!1},e._root=function(n,s){s===void 0&&(s={});var i=new z5t.default(n,this._parseOptions(s));return i.root},e._parseOptions=function(n){var s=Object.assign({},this.options,n);return{lossy:this._isLossy(s),maxNestingDepth:s.maxNestingDepth}},e._stringifyOptions=function(n){var s=Object.assign({},this.options,n);return{maxNestingDepth:s.maxNestingDepth}},e._run=function(n,s){var i=this;return s===void 0&&(s={}),new Promise(function(o,a){try{var l=i._root(n,s);Promise.resolve(i.func(l)).then(function(c){var u=void 0;return i._shouldUpdateSelector(n,s)&&(u=l.toString(i._stringifyOptions(s)),n.selector=u),{transform:c,root:l,string:u}}).then(o,a)}catch(c){a(c);return}})},e._runSync=function(n,s){s===void 0&&(s={});var i=this._root(n,s),o=this.func(i);if(o&&typeof o.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var a=void 0;return s.updateSelector&&typeof n!="string"&&(a=i.toString(this._stringifyOptions(s)),n.selector=a),{transform:o,root:i,string:a}},e.ast=function(n,s){return this._run(n,s).then(function(i){return i.root})},e.astSync=function(n,s){return this._runSync(n,s).root},e.transform=function(n,s){return this._run(n,s).then(function(i){return i.transform})},e.transformSync=function(n,s){return this._runSync(n,s).transform},e.process=function(n,s){var i=this;return this._run(n,s).then(function(o){return o.string||o.root.toString(i._stringifyOptions(s))})},e.processSync=function(n,s){var i=this._runSync(n,s);return i.string||i.root.toString(this._stringifyOptions(s))},t}();aSe.exports=eb.default});var cSe=y(Tr=>{"use strict";Tr.__esModule=!0;Tr.universal=Tr.tag=Tr.string=Tr.selector=Tr.root=Tr.pseudo=Tr.nesting=Tr.id=Tr.comment=Tr.combinator=Tr.className=Tr.attribute=void 0;var Z5t=So(k9()),e9t=So(A9()),t9t=So(F9()),r9t=So(g9()),n9t=So(E9()),s9t=So(M9()),i9t=So(w9()),o9t=So(u9()),a9t=So(f9()),l9t=So(v9()),c9t=So(S9()),u9t=So(R9());function So(t){return t&&t.__esModule?t:{default:t}}var shr=Tr.attribute=function(e){return new Z5t.default(e)},ihr=Tr.className=function(e){return new e9t.default(e)},ohr=Tr.combinator=function(e){return new t9t.default(e)},ahr=Tr.comment=function(e){return new r9t.default(e)},lhr=Tr.id=function(e){return new n9t.default(e)},chr=Tr.nesting=function(e){return new s9t.default(e)},uhr=Tr.pseudo=function(e){return new i9t.default(e)},phr=Tr.root=function(e){return new o9t.default(e)},fhr=Tr.selector=function(e){return new a9t.default(e)},dhr=Tr.string=function(e){return new l9t.default(e)},hhr=Tr.tag=function(e){return new c9t.default(e)},Ahr=Tr.universal=function(e){return new u9t.default(e)}});var fSe=y(nr=>{"use strict";nr.__esModule=!0;nr.isComment=nr.isCombinator=nr.isClassName=nr.isAttribute=void 0;nr.isContainer=A9t;nr.isIdentifier=void 0;nr.isNamespace=m9t;nr.isNesting=void 0;nr.isNode=J9;nr.isPseudo=void 0;nr.isPseudoClass=h9t;nr.isPseudoElement=pSe;nr.isUniversal=nr.isTag=nr.isString=nr.isSelector=nr.isRoot=void 0;var Vr=us(),fi,p9t=(fi={},fi[Vr.ATTRIBUTE]=!0,fi[Vr.CLASS]=!0,fi[Vr.COMBINATOR]=!0,fi[Vr.COMMENT]=!0,fi[Vr.ID]=!0,fi[Vr.NESTING]=!0,fi[Vr.PSEUDO]=!0,fi[Vr.ROOT]=!0,fi[Vr.SELECTOR]=!0,fi[Vr.STRING]=!0,fi[Vr.TAG]=!0,fi[Vr.UNIVERSAL]=!0,fi);function J9(t){return typeof t=="object"&&p9t[t.type]}function Io(t,e){return J9(e)&&e.type===t}var f9t=nr.isAttribute=Io.bind(null,Vr.ATTRIBUTE),ghr=nr.isClassName=Io.bind(null,Vr.CLASS),yhr=nr.isCombinator=Io.bind(null,Vr.COMBINATOR),Ehr=nr.isComment=Io.bind(null,Vr.COMMENT),bhr=nr.isIdentifier=Io.bind(null,Vr.ID),Chr=nr.isNesting=Io.bind(null,Vr.NESTING),uSe=nr.isPseudo=Io.bind(null,Vr.PSEUDO),Shr=nr.isRoot=Io.bind(null,Vr.ROOT),Ihr=nr.isSelector=Io.bind(null,Vr.SELECTOR),vhr=nr.isString=Io.bind(null,Vr.STRING),d9t=nr.isTag=Io.bind(null,Vr.TAG),xhr=nr.isUniversal=Io.bind(null,Vr.UNIVERSAL);function pSe(t){return uSe(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function h9t(t){return uSe(t)&&!pSe(t)}function A9t(t){return!!(J9(t)&&t.walk)}function m9t(t){return f9t(t)||d9t(t)}});var dSe=y(la=>{"use strict";la.__esModule=!0;var K9=us();Object.keys(K9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===K9[t]||(la[t]=K9[t])});var z9=cSe();Object.keys(z9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===z9[t]||(la[t]=z9[t])});var X9=fSe();Object.keys(X9).forEach(function(t){t==="default"||t==="__esModule"||t in la&&la[t]===X9[t]||(la[t]=X9[t])})});var mSe=y((tb,ASe)=>{"use strict";tb.__esModule=!0;tb.default=void 0;var g9t=E9t(lSe()),y9t=hSe(dSe());function hSe(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(hSe=function(i,o){if(!o&&i&&i.__esModule)return i;var a,l,c={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return c;if(a=o?n:r){if(a.has(i))return a.get(i);a.set(i,c)}for(var u in i)u!=="default"&&{}.hasOwnProperty.call(i,u)&&((l=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,u))&&(l.get||l.set)?a(c,u,l):c[u]=i[u]);return c})(t,e)}function E9t(t){return t&&t.__esModule?t:{default:t}}var Z9=function(e){return new g9t.default(e)};Object.assign(Z9,y9t);delete Z9.__esModule;var Thr=tb.default=Z9;ASe.exports=tb.default});var vSe=y(nb=>{"use strict";var ESe=(QB(),cc(S5)),b9t=(i9(),cc(s9)),C9t=mSe(),rb=require("fs"),fT=require("path");function bSe(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var S9t=bSe(b9t),ej=bSe(C9t),I9t=/^(-\w+-)?animation-name$/,v9t=/^(-\w+-)?animation$/;function x9t(t){console.warn(t)}var CSe=t=>{let e=t?.id??"",r={...t,id:void 0},n=Object.create(null),s=e.replace(/^data-v-/,"");return{postcssPlugin:"glimmer-scoped-css",Rule(i){w9t(e,i,r)},AtRule(i){/-?keyframes$/.test(i.name)&&!i.params.endsWith(`-${s}`)&&(n[i.params]=i.params=i.params+"-"+s)},OnceExit(i){Object.keys(n).length&&i.walkDecls(o=>{I9t.test(o.prop)&&(o.value=o.value.split(",").map(a=>n[a.trim()]||a.trim()).join(",")),v9t.test(o.prop)&&(o.value=o.value.split(",").map(a=>{let l=a.trim().split(/\s+/),c=l.findIndex(u=>n[u]);return c!==-1?(l.splice(c,1,n[l[c]]),l.join(" ")):a}).join(","))})}}},gSe=new WeakSet;function w9t(t,e,r){gSe.has(e)||e.parent&&e.parent.type==="atrule"&&/-?keyframes$/.test(e.parent.name)||(gSe.add(e),e.selector=ej.default(n=>{n.each(s=>{B9t(t,s,n,r)})}).processSync(e.selector))}function B9t(t,e,r,n){let s=null;e.each(i=>{if(i.type==="pseudo"){let{value:o}=i;if(o===":deep"){if(i.nodes.length){let a=i;i.nodes[0].each(c=>{e.insertAfter(a,c),a=c});let l=e.at(e.index(i)-1);(!l||!T9t(l))&&e.insertAfter(i,ej.default.combinator({value:" "})),e.removeChild(i)}return!1}if(o===":global")return n.noGlobal?(x9t(`:global is not supported in this environment, in this selector: ${e}`),!1):(r.insertAfter(e,i.nodes[0]),r.removeChild(e),!1)}i.type!=="pseudo"&&i.type!=="combinator"&&(s=i)}),s?s.spaces.after="":e.first.spaces.before="",e.insertAfter(s,ej.default.attribute({attribute:t,value:t,raws:{},quoteMark:'"'}))}function T9t(t){return t.type==="combinator"&&/^\s+$/.test(t.value)}CSe.postcss=!0;function D9t(t){let e=Array.from(new TextEncoder().encode(t),r=>String.fromCodePoint(r)).join("");return encodeURIComponent(btoa(e))}function P9t(t){let e=atob(decodeURIComponent(t));return new TextDecoder().decode(Uint8Array.from(e,r=>r.codePointAt(0)))}function _9t(t){if(!(typeof rb.existsSync!="function"||typeof rb.realpathSync!="function"||typeof process>"u"||typeof process.cwd!="function"||!fT.isAbsolute(t)||!rb.existsSync(t)))return fT.relative(rb.realpathSync(process.cwd()),rb.realpathSync(t)).split(fT.sep).join("/")}function SSe(t){return ESe.md5(_9t(t)??t).slice(0,10)}function ISe(t){return e=>{let r=`data-scopedcss-${SSe(e.filename)}`,n,{syntax:{builders:s},meta:{jsutils:i}}=e;return{name:"glimmer-scoped-css",visitor:{Template(o){let a=o.body.find(l=>l.type==="ElementNode"&&l.tag==="style");return a&&(n=ESe.md5(ySe(a)).slice(0,10)),o},ElementNode(o,a){let l=`${r}-${n}`;if(o.tag==="style"){let c=ySe(o),u;if(Q9t(o)){if(a.parent?.node.type!=="Template")throw new Error("<style> tags must be at the root of the template, they cannot be nested");u=S9t.default([CSe({id:l,...t})]).process(c).css}else return;let p=D9t(u);return i.importForSideEffect(`./${fT.basename(e.filename)}.${p}.glimmer-scoped.css`),null}else{if(o.tag.startsWith(":"))return o;n&&o.attributes.push(s.attr(l,s.text("")))}}}}}}var N9t=ISe({noGlobal:!1});function ySe(t){return t.children.filter(r=>r.type==="TextNode").map(r=>r.chars).join("")}var k9t="scoped";function Q9t(t){return t.attributes.some(e=>e.name===k9t)}nb.decodeCSS=P9t;nb.generateScopedCSSPlugin=ISe;nb.scopedCSSTransform=N9t;nb.uniqueIdentifier=SSe});var xSe=y(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});QB();i9();var tj=vSe();require("fs");require("path");sb.default=tj.scopedCSSTransform;sb.generateScopedCSSPlugin=tj.generateScopedCSSPlugin;sb.uniqueIdentifier=tj.uniqueIdentifier});var ive=y(V7=>{var pm=class t{static __wrap(e){let r=Object.create(t.prototype);return r.__wbg_ptr=e,q7.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,q7.unregister(this),e}free(){let e=this.__destroy_into_raw();bt.__wbg_codemappair_free(e,0)}constructor(e,r){let n=Gu(e,bt.__wbindgen_malloc,bt.__wbindgen_realloc),s=el,i=Gu(r,bt.__wbindgen_malloc,bt.__wbindgen_realloc),o=el,a=bt.codemappair_new(n,s,i,o);return this.__wbg_ptr=a,q7.register(this,this.__wbg_ptr,this),this}get code(){let e,r;try{let n=bt.__wbg_get_codemappair_code(this.__wbg_ptr);return e=n[0],r=n[1],l2(n[0],n[1])}finally{bt.__wbindgen_free(e,r,1)}}get map(){let e,r;try{let n=bt.__wbg_get_codemappair_map(this.__wbg_ptr);return e=n[0],r=n[1],l2(n[0],n[1])}finally{bt.__wbindgen_free(e,r,1)}}set code(e){let r=Gu(e,bt.__wbindgen_malloc,bt.__wbindgen_realloc),n=el;bt.__wbg_set_codemappair_code(this.__wbg_ptr,r,n)}set map(e){let r=Gu(e,bt.__wbindgen_malloc,bt.__wbindgen_realloc),n=el;bt.__wbg_set_codemappair_map(this.__wbg_ptr,r,n)}};Symbol.dispose&&(pm.prototype[Symbol.dispose]=pm.prototype.free);V7.CodeMapPair=pm;var xb=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,rve.unregister(this),e}free(){let e=this.__destroy_into_raw();bt.__wbg_preprocessor_free(e,0)}constructor(){let e=bt.preprocessor_new();return this.__wbg_ptr=e,rve.register(this,this.__wbg_ptr,this),this}parse(e,r){let n=Gu(e,bt.__wbindgen_malloc,bt.__wbindgen_realloc),s=el,i=bt.preprocessor_parse(this.__wbg_ptr,n,s,r);if(i[2])throw H7(i[1]);return H7(i[0])}process(e,r){let n=Gu(e,bt.__wbindgen_malloc,bt.__wbindgen_realloc),s=el,i=bt.preprocessor_process(this.__wbg_ptr,n,s,r);if(i[2])throw H7(i[1]);return pm.__wrap(i[0])}};Symbol.dispose&&(xb.prototype[Symbol.dispose]=xb.prototype.free);V7.Preprocessor=xb;function D7t(){return{__proto__:null,"./content_tag_bg.js":{__proto__:null,__wbg_Boolean_56701fbb0ba40957:function(e){return!!e},__wbg_Error_1793cae569d55d52:function(e){return Error(e)},__wbg_String_f656b08aa2423725:function(e,r){let n=String(r),s=Gu(n,bt.__wbindgen_malloc,bt.__wbindgen_realloc),i=el;i2().setInt32(e+4,i,!0),i2().setInt32(e+0,s,!0)},__wbg___wbindgen_debug_string_edece8177ad01481:function(e,r){let n=$7(r),s=Gu(n,bt.__wbindgen_malloc,bt.__wbindgen_realloc),i=el;i2().setInt32(e+4,i,!0),i2().setInt32(e+0,s,!0)},__wbg___wbindgen_throw_9c31b086c2b26051:function(e,r){throw new Error(l2(e,r))},__wbg_get_dcf82ab8aad1a593:function(){return nve(function(e,r){return Reflect.get(e,r)},arguments)},__wbg_parse_48d3dd02aeaf9065:function(e){return JSON.parse(e)},__wbg_set_a0e911be3da02782:function(){return nve(function(e,r,n){return Reflect.set(e,r,n)},arguments)},__wbindgen_cast_0000000000000001:function(e,r){return l2(e,r)},__wbindgen_init_externref_table:function(){let e=bt.__wbindgen_externrefs,r=e.grow(4);e.set(0,void 0),e.set(r+0,void 0),e.set(r+1,null),e.set(r+2,!0),e.set(r+3,!1)}}}}var q7=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>bt.__wbg_codemappair_free(t,1)),rve=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>bt.__wbg_preprocessor_free(t,1));function P7t(t){let e=bt.__externref_table_alloc();return bt.__wbindgen_externrefs.set(e,t),e}function $7(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let s=t.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){let s=t.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(t)){let s=t.length,i="[";s>0&&(i+=$7(t[0]));for(let o=1;o<s;o++)i+=", "+$7(t[o]);return i+="]",i}let r=/\[object ([^\]]+)\]/.exec(toString.call(t)),n;if(r&&r.length>1)n=r[1];else return toString.call(t);if(n=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
|
|
2790
|
+
${t.stack}`:n}var um=null;function i2(){return(um===null||um.buffer.detached===!0||um.buffer.detached===void 0&&um.buffer!==bt.memory.buffer)&&(um=new DataView(bt.memory.buffer)),um}function l2(t,e){return _7t(t>>>0,e)}var o2=null;function a2(){return(o2===null||o2.byteLength===0)&&(o2=new Uint8Array(bt.memory.buffer)),o2}function nve(t,e){try{return t.apply(this,e)}catch(r){let n=P7t(r);bt.__wbindgen_exn_store(n)}}function Gu(t,e,r){if(r===void 0){let a=vb.encode(t),l=e(a.length,1)>>>0;return a2().subarray(l,l+a.length).set(a),el=a.length,l}let n=t.length,s=e(n,1)>>>0,i=a2(),o=0;for(;o<n;o++){let a=t.charCodeAt(o);if(a>127)break;i[s+o]=a}if(o!==n){o!==0&&(t=t.slice(o)),s=r(s,n,n=o+t.length*3,1)>>>0;let a=a2().subarray(s+o,s+n),l=vb.encodeInto(t,a);o+=l.written,s=r(s,n,o,1)>>>0}return el=o,s}function H7(t){let e=bt.__wbindgen_externrefs.get(t);return bt.__externref_table_dealloc(t),e}var sve=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});sve.decode();function _7t(t,e){return sve.decode(a2().subarray(t,t+e))}var vb=new TextEncoder;"encodeInto"in vb||(vb.encodeInto=function(t,e){let r=vb.encode(t);return e.set(r),{read:t.length,written:r.length}});var el=0,N7t=`${__dirname}/content_tag_bg.wasm`,k7t=require("fs").readFileSync(N7t),Q7t=new WebAssembly.Module(k7t),R7t=new WebAssembly.Instance(Q7t,D7t()),bt=R7t.exports;bt.__wbindgen_start()});var ave=y((Zhr,ove)=>{var{Preprocessor:O7t}=ive();ove.exports.Preprocessor=O7t});(function(){lq().config(Object.assign({},uq(),fq()(process.argv)))})();var xve=require("fs"),wve=require("path");var Ive=We(_b());var Ro=We(require("fs")),mQ=We(require("path")),Jte=We(require("os")),Kte=We(bD());var wPe=process.stdout.isTTY===!0&&!process.env.NO_COLOR,dc=t=>wPe?t:"",he=dc("\x1B[32m"),ot=dc("\x1B[33m"),Ye=dc("\x1B[36m"),Bo=dc("\x1B[35m"),W=dc("\x1B[31m"),te=dc("\x1B[2m"),Ys=dc("\x1B[1m"),v=dc("\x1B[0m");var BPe="boxel-local://",PHt=`${BPe}capture/`;var eG="app.boxel.realms";function ce(t){return t.endsWith("/")?t:`${t}/`}var di=class extends Error{status;constructor(e,r){super(r),this.name="MatrixAuthError",this.status=e}},gd=class extends Error{retryAfterMs;constructor(e,r){super(e),this.name="MatrixRateLimitError",r!==void 0&&(this.retryAfterMs=r)}};async function tG(t,e,r){let n=await fetch(new URL("_matrix/client/v3/login",t).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:{type:"m.id.user",user:e},password:r,type:"m.login.password"})}),s=await n.json();if(!n.ok)throw new Error(`Matrix login failed: ${n.status} ${JSON.stringify(s)}`);return{accessToken:s.access_token,deviceId:s.device_id,userId:s.user_id,matrixUrl:t}}function TPe(t){try{let e=JSON.parse(t);if(!e||typeof e!="object")return{};let r=typeof e.retry_after_ms=="number"&&e.retry_after_ms>=0?e.retry_after_ms:void 0;return{errcode:e.errcode,flows:e.flows,...r!==void 0?{retryAfterMs:r}:{}}}catch{return{}}}async function rG(t,e=fetch){let r=await e(new URL("_matrix/client/v1/login/get_token",t.matrixUrl).href,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.accessToken}`},body:"{}"});if(r.ok){let l=await r.json();if(!l.login_token)throw new Error(`Matrix login-token response from ${t.matrixUrl} did not include a login_token`);return{loginToken:l.login_token,...l.expires_in_ms!==void 0?{expiresInMs:l.expires_in_ms}:{}}}let n=await r.text(),{errcode:s,flows:i,retryAfterMs:o}=TPe(n);if(r.status===401&&s==="M_UNKNOWN_TOKEN")throw new di(r.status,`Matrix rejected the access token: ${r.status} ${n}`);if(r.status===429||s==="M_LIMIT_EXCEEDED"){let l=r.headers.get("Retry-After");if(o===void 0&&l){let c=Number(l);Number.isFinite(c)&&c>=0&&(o=c*1e3)}throw new gd(`Matrix rate-limited the login-token request: ${r.status} ${n}`,o)}throw s==="M_UNRECOGNIZED"||r.status===404||r.status===401&&Array.isArray(i)?new Error(`The Matrix server at ${t.matrixUrl} does not have login_via_existing_session enabled, so it cannot mint a login token (${r.status} ${s??"no errcode"}). This is expected until that feature is turned on for this environment.`):new Error(`Matrix login-token request failed: ${r.status} ${n}`)}async function DPe(t){let e=await fetch(new URL(`_matrix/client/v3/user/${encodeURIComponent(t.userId)}/openid/request_token`,t.matrixUrl).href,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.accessToken}`},body:"{}"});if(!e.ok){let r=await e.text();throw e.status===401||e.status===403?new di(e.status,`OpenID token request failed: ${e.status} ${r}`):new Error(`OpenID token request failed: ${e.status} ${r}`)}return await e.json()}async function Xu(t,e,r={}){let n=await DPe(t),s=`${e.replace(/\/$/,"")}/_server-session`,i=await fetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r.extendedLifetime?{...n,lifetime:"extended"}:n)});if(!i.ok){let a=await i.text();throw new Error(`Realm server session failed: ${i.status} ${a}`)}let o=i.headers.get("Authorization");if(!o)throw new Error("Realm server session response did not include an Authorization header");return o}async function CD(t,e){let r=`${t.replace(/\/$/,"")}/_realm-auth?include-public=true`,n=await fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:e}});if(!n.ok){let s=await n.text();throw new Error(`Realm auth lookup failed: ${n.status} ${s}`)}return await n.json()}function SD(t){return new URL(`_matrix/client/v3/user/${encodeURIComponent(t.userId)}/account_data/${eG}`,t.matrixUrl).href}async function ID(t){return nG(t,"best-effort")}async function vD(t){return nG(t,"strict")}async function nG(t,e){let r;try{r=await fetch(SD(t),{headers:{Authorization:`Bearer ${t.accessToken}`}})}catch(n){if(e==="strict")throw new Error(`Could not read the realm list from Matrix account data: ${n instanceof Error?n.message:String(n)}`);return[]}if(r.status===401||r.status===403){let n=await r.text();throw new di(r.status,`Matrix account_data fetch failed: ${r.status} ${n}`)}if(r.status===404)return[];if(!r.ok){if(e==="strict"){let n=await r.text();throw new Error(`Could not read the realm list from Matrix account data: ${r.status} ${n}`)}return[]}try{let n=await r.json();return Array.isArray(n.realms)?[...n.realms]:[]}catch{if(e==="strict")throw new Error("Could not read the realm list from Matrix account data: response body was not valid JSON");return[]}}async function Im(t,e){let r=await vD(t);if(!r.includes(e)){r.push(e);let n=await fetch(SD(t),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.accessToken}`},body:JSON.stringify({realms:r})});if(!n.ok){let s=await n.text();throw n.status===401||n.status===403?new di(n.status,`Failed to update Matrix account data: ${n.status} ${s}`):new Error(`Failed to update Matrix account data: ${n.status} ${s}`)}}}async function sG(t,e){let r=ce(e),n=await ID(t),s=n.filter(o=>ce(o)!==r);if(s.length===n.length)return!1;let i=await fetch(SD(t),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.accessToken}`},body:JSON.stringify({realms:s})});if(!i.ok){let o=await i.text();throw i.status===401||i.status===403?new di(i.status,`Failed to update Matrix account data: ${i.status} ${o}`):new Error(`Failed to update Matrix account data: ${i.status} ${o}`)}return!0}var xD=We(require("readline")),iG=require("stream"),vm=class extends Error{constructor(e,r){super(`No answer to "${e.trim()}".`+(r?"":" Input ended before one was given. Run the command in a terminal, or pass what it asks for as flags or environment variables.")),this.name="PromptInputClosedError"}};function To(t,e={}){let r=e.input??process.stdin,n=r.readableFlowing,s=xD.createInterface({input:r,output:e.output??process.stdout});return new Promise((i,o)=>{let a=!1;s.once("close",()=>{a||o(new vm(t,!!r.isTTY))}),s.on("SIGINT",()=>{a=!0,s.close(),process.exit(130)}),s.question(t,l=>{a=!0,s.close(),n||r.pause(),i(l.trim())})})}function PPe(t,e){let r=Math.min(e,Math.floor(t.length/4));return r>0?t.slice(-r):""}function Zu(t,e={}){let r=e.input??process.stdin,n=e.output??process.stdout,s=new iG.Writable({write:(o,a,l)=>l()}),i=xD.createInterface({input:r,output:s,terminal:!0});return new Promise((o,a)=>{let l=r.readableFlowing;r.isTTY&&r.setRawMode(!0);let c=()=>{r.removeListener("data",u),r.isTTY&&r.setRawMode(!1),i.close(),l||r.pause()},u=f=>{try{let d=f.toString().split("\x1B[200~").join("").split("\x1B[201~").join("");for(let A of d)if(A===`
|
|
2791
2791
|
`||A==="\r"){c(),n.write(`
|
|
2792
2792
|
`);let h=e.revealLast?PPe(p,e.revealLast):"";h&&n.write(` (${[...p].length} characters, ending in ${h})
|
|
2793
2793
|
`),o(p);return}else A===""?(c(),process.exit()):A==="\x7F"||A==="\b"?p.length>0&&(p=[...p].slice(0,-1).join(""),n.write("\b \b")):A>=" "&&(p+=A,n.write("*"))}catch(d){c(),a(d)}},p="";try{n.write(t),r.on("data",u),r.resume()}catch(f){c(),a(f)}})}async function mr(t){let e=process.env.BOXEL_REALM_SECRET_SEED;if(e)return e;if(t){if(!process.stdin.isTTY)throw new Error("Cannot prompt for realm secret seed: stdin is not a TTY. Set BOXEL_REALM_SECRET_SEED in the environment instead.");return Zu("Realm secret seed: ")}}var Wte=We(Gte()),Aje=15*6e4,Yte;function Qg(t,e){Yte??=new Wte.Agent({headersTimeout:Aje});let r={...e,dispatcher:Yte};return fetch(t,r)}var mje=mQ.join(Jte.homedir(),".boxel-cli"),gje="profiles.json",yje=300;function Eje(t,e=yje){let r=t.replace(/^Bearer\s+/i,""),n=Kte.default.decode(r);if(!n?.exp)return!0;let s=Math.floor(Date.now()/1e3);return n.exp-s<e}var ct="No active profile. Run `boxel profile add` to create one.";function bje(t){return t.match(/^https:\/\/cardstack\.com\/([^/]+)\/$/)?.[1]}function Rg(t){return t.endsWith(":stack.cards")?"staging":t.endsWith(":boxel.ai")?"production":t.endsWith(":localhost")?"local":"unknown"}function Fc(t){let e=t.match(/^@([^:]+):/);return e?e[1]:t}function ah(t){let e=t.match(/:([^:]+)$/);return e?e[1]:"unknown"}function zi(t){let e=Fc(t),r=ah(t);return`${te}[${v}${Ye}${e}${v} ${te}\xB7${v} ${Bo}${r}${v}${te}]${v}`}var AQ=class{config;configDir;profilesFile;matrixLoginFn;promptPasswordFn;isTtyFn;loadError=null;constructor(e,r){this.configDir=e||mje,this.profilesFile=mQ.join(this.configDir,gje),this.config=this.loadConfig(),this.matrixLoginFn=r?.matrixLogin??tG,this.promptPasswordFn=r?.promptPassword??Zu,this.isTtyFn=r?.isTty??(()=>!!process.stdin.isTTY)}ensureConfigDir(){Ro.existsSync(this.configDir)||Ro.mkdirSync(this.configDir,{recursive:!0})}loadConfig(){let e={profiles:{},activeProfile:null};if(!Ro.existsSync(this.profilesFile))return e;try{let r=Ro.readFileSync(this.profilesFile,"utf-8"),n=JSON.parse(r);if(n&&typeof n=="object"&&!Array.isArray(n)){let s=n,i=s.profiles&&typeof s.profiles=="object"&&!Array.isArray(s.profiles)?s.profiles:null,o=s.activeProfile===null||typeof s.activeProfile=="string"?s.activeProfile:null;if(i)return{profiles:i,activeProfile:o}}this.loadError=`Profiles file at ${this.profilesFile} is not a recognizable profiles store; starting with no profiles.`}catch(r){this.loadError=`Could not read profiles file at ${this.profilesFile}: ${r instanceof Error?r.message:String(r)}`}return e}getLoadError(){return this.loadError}saveConfig(){this.ensureConfigDir(),Ro.writeFileSync(this.profilesFile,JSON.stringify(this.config,null,2),{mode:384});try{Ro.chmodSync(this.profilesFile,384)}catch{}}listProfiles(){return Object.keys(this.config.profiles)}getProfile(e){return this.config.profiles[e]}getActiveProfileId(){return this.config.activeProfile}getActiveProfile(){let e=this.config.activeProfile;if(!e)return null;let r=this.config.profiles[e];return r?{id:e,profile:r}:null}resolveProfileSlots(e,r,n,s){let i=Rg(e),o=Fc(e);if(i==="unknown"&&(!n||!s))throw new Error(`Unknown domain in Matrix ID "${e}". You must provide explicit --matrix-url and --realm-server-url for non-standard domains.`);let a,l;i==="production"?(a="https://matrix.boxel.ai",l="https://app.boxel.ai/"):i==="local"?(a="http://localhost:8008",l="https://localhost:4201/"):(a="https://matrix-staging.stack.cards",l="https://realms-staging.stack.cards/");let c=ah(e);return{matrixUrl:n||a,realmServerUrl:s||l,displayName:r||`${o} \xB7 ${c}`,username:o}}async addProfileWithAuth(e,r,n,s,i){let o=this.resolveProfileSlots(e,n,r.matrixUrl,s),a=this.config.profiles[e],l=!!a&&(a.matrixUrl!==o.matrixUrl||a.realmServerUrl!==o.realmServerUrl),c={displayName:o.displayName,matrixUrl:o.matrixUrl,realmServerUrl:o.realmServerUrl,matrixAccessToken:r.accessToken,matrixUserId:r.userId,matrixDeviceId:r.deviceId,realmTokens:l?void 0:a?.realmTokens,realmServerToken:l?void 0:a?.realmServerToken,secureSession:i??(l?void 0:a?.secureSession)};this.config.profiles[e]=c,this.config.activeProfile||(this.config.activeProfile=e),this.saveConfig()}async addProfile(e,r,n,s,i){let o=this.config.profiles[e],a=this.resolveProfileSlots(e,n??o?.displayName,s??o?.matrixUrl,i??o?.realmServerUrl),l=await this.matrixLoginFn(a.matrixUrl,a.username,r);if(l.userId!==e)throw new Error(`Matrix returned userId "${l.userId}" but profile was added as "${e}". Check the Matrix ID and try again.`);await this.addProfileWithAuth(e,l,a.displayName,a.realmServerUrl)}async removeProfile(e){if(!this.config.profiles[e])return!1;if(delete this.config.profiles[e],this.config.activeProfile===e){let r=Object.keys(this.config.profiles);this.config.activeProfile=r.length>0?r[0]:null}return this.saveConfig(),!0}switchProfile(e){return this.config.profiles[e]?(this.config.activeProfile=e,this.saveConfig(),!0):!1}updateDisplayName(e,r){return this.config.profiles[e]?(this.config.profiles[e].displayName=r,this.saveConfig(),!0):!1}updateUrls(e,r){let n=this.config.profiles[e];if(!n)return!1;let s=!1;return r.matrixUrl&&r.matrixUrl!==n.matrixUrl&&(n.matrixUrl=r.matrixUrl,s=!0),r.realmServerUrl&&r.realmServerUrl!==n.realmServerUrl&&(n.realmServerUrl=r.realmServerUrl,s=!0),s&&(n.realmTokens=void 0,n.realmServerToken=void 0,n.secureSession=void 0,this.saveConfig()),s}setRealmToken(e,r){let n=this.getActiveProfile();n&&(n.profile.realmTokens||(n.profile.realmTokens={}),n.profile.realmTokens[e]=r,this.saveConfig())}getRealmToken(e){return this.getActiveProfile()?.profile.realmTokens?.[e]}setRealmServerToken(e){let r=this.getActiveProfile();r&&(r.profile.realmServerToken=e,this.saveConfig())}getRealmServerToken(){return this.getActiveProfile()?.profile.realmServerToken}setSecureSession(e){let r=this.getActiveProfile();r&&(r.profile.secureSession=e,this.saveConfig())}getSecureSession(){let e=this.getActiveProfile()?.profile.secureSession;if(!(!e||Date.parse(e.expiresAt)<=Date.now()))return e}clearSecureSession(){let e=this.getActiveProfile();e?.profile.secureSession&&(e.profile.secureSession=void 0,this.saveConfig())}getStoredMatrixAuth(e){let r=e??this.config.activeProfile??void 0,n=r?this.config.profiles[r]:void 0;if(!r||!n)throw new Error(ct);if(!n.matrixAccessToken)throw new Error(`Profile "${r}" has no stored Matrix access token. Run \`boxel profile add\` to re-authenticate.`);return{accessToken:n.matrixAccessToken,userId:n.matrixUserId,deviceId:n.matrixDeviceId,matrixUrl:n.matrixUrl}}async reAuthenticate(e){let r=e??this.config.activeProfile??void 0,n=r?this.config.profiles[r]:void 0;if(!r||!n)throw new Error(ct);if(!this.isTtyFn())throw new Error(`Stored Matrix token for "${r}" is no longer valid. Run \`boxel profile add -u ${r} -p <password>\` to re-authenticate.`);console.log(`
|
|
@@ -2883,20 +2883,20 @@ Run to preview:`),console.warn(" boxel consolidate-workspaces . --dry-run"),co
|
|
|
2883
2883
|
`)}function S7e(t){Oo.existsSync(t)||Oo.mkdirSync(t,{recursive:!0})}function I7e(t,e){try{Oo.renameSync(t,e)}catch(r){let n=r;if(n.code!=="EXDEV")throw n;Oo.cpSync(t,e,{recursive:!0}),Oo.rmSync(t,{recursive:!0,force:!0})}}async function v7e(t,e){let r=qp.resolve(t||"."),n=IQ(r);if(n.length===0){console.log(`No misplaced local realm paths found under ${r}`);return}console.log(`Found ${n.length} misplaced local realm path(s):
|
|
2884
2884
|
`);let s=0,i=0;for(let o of n){let a=qp.relative(r,o.currentDir)||".",l=qp.relative(r,o.expectedDir)||".";if(console.log(`- ${a} -> ${l}`),!e.dryRun){if(Oo.existsSync(o.expectedDir)){console.warn(" Skipping: target path already exists"),i+=1;continue}S7e(qp.dirname(o.expectedDir));try{I7e(o.currentDir,o.expectedDir),s+=1}catch(c){let u=c instanceof Error?c.message:String(c);console.warn(` Skipping: failed to move (${u})`),i+=1}}}if(e.dryRun){console.log(`
|
|
2885
2885
|
[DRY RUN] No directories moved.`);return}console.log(`
|
|
2886
|
-
Moved ${s} director${s===1?"y":"ies"}.`),i>0&&console.log(`Skipped ${i} due to existing target paths or move failures.`)}function Cre(t){t.command("consolidate-workspaces").description("Move local realm mirror directories into the canonical <root>/<domain>/<owner>/<realm> layout").argument("[root-dir]","Root directory to scan (default: current directory)").option("--dry-run","Preview without moving anything").action(async(e,r)=>{await v7e(e,r)})}var x7e="https://boxel.ai/ext/operations",Ur={CardJson:"application/vnd.card+json",CardHtml:"application/vnd.card+html",FileMetaHtml:"application/vnd.card.file-meta+html",CardSource:"application/vnd.card+source",FileMeta:"application/vnd.card.file-meta+json",DirectoryListing:"application/vnd.api+json",RealmInfo:"application/vnd.api+json",Mtimes:"application/vnd.api+json",Permissions:"application/vnd.api+json",Session:"application/json",EventStream:"text/event-stream",HTML:"text/html",Markdown:"text/markdown",JSONAPI:"application/vnd.api+json",BoxelOperations:`application/vnd.api+json;ext="${x7e}"`,JSON:"application/json",CardDependencies:"application/json",CardTypeSummary:"application/json",OctetStream:"application/octet-stream",All:"*/*"};function Ug(t){if(t.trim()==="")return"Path must be a non-empty realm-relative file path.";if(/^[a-z][a-z0-9+.-]*:/i.test(t))return`Path "${t}" must be realm-relative \u2014 absolute URLs (with a scheme) are not accepted.`;if(t.startsWith("/"))return`Path "${t}" must be realm-relative \u2014 paths starting with "/" are not accepted.`;if(t.includes("\\"))return`Path "${t}" must not contain backslash characters.`;let e;try{e=decodeURIComponent(t)}catch{return`Path "${t}" contains an invalid percent-encoded escape.`}return e.split("/").some(n=>n==="..")?`Path "${t}" must not contain ".." segments \u2014 the path must stay inside the target realm.`:null}var yS=require("fs");var Sre="X-Filename";function Ire(t){return encodeURIComponent(t)}var jg="@cardstack/";function w7e(t){return t.startsWith("@")}function
|
|
2887
|
-
`)}async function V7e(){let t=[];for await(let e of process.stdin)t.push(e);return Buffer.concat(t).toString("utf-8")}function Rre(t){t.command("write").description("Write a file to a realm (reads content from STDIN or --file)").argument("<path>","Realm-relative file path (e.g., hello.gts, Cards/my-card.json)").requiredOption("--realm <realm-url>","The realm URL to write to").option("--file <filepath>","Read content from a local file instead of STDIN").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--no-realm-events","Index the write without announcing it to open tabs, which pick it up on their next load (for deploys)").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await mr(r.realmSecretSeed===!0)}catch(o){Hp(`${W}Error:${v} ${o instanceof Error?o.message:String(o)}`),process.exit(1)}let s;if(r.file){let o=Ta(r.file),a=Ta(e);o&&!a&&(Hp(`${W}Error:${v} source file ${r.file} is binary but destination path ${e} is text. Refusing to write to avoid silent corruption \u2014 rename the destination to match.`),process.exit(1));try{s=o?(0,vQ.readFileSync)(r.file):(0,vQ.readFileSync)(r.file,"utf-8")}catch(l){Hp(`${W}Error:${v} Could not read file: ${l instanceof Error?l.message:String(l)}`),process.exit(1)}}else process.stdin.isTTY&&Hp(`${te}Reading from STDIN. Type or paste content, then press Enter followed by Ctrl+D to finish.${v}`),s=await V7e(),Hp(`${te}Received ${s.length} bytes. Writing to realm...${v}`);let i;try{i=await Hg(r.realm,e,s,{realmSecretSeed:n,realmEvents:r.realmEvents})}catch(o){Hp(`${W}Error:${v} ${o instanceof Error?o.message:String(o)}`),process.exit(1)}r.json?Fe.output(JSON.stringify(i,null,2)):i.ok?console.log(`${he}Written:${v} ${e} ${te}\u2192${v} ${r.realm}`):Hp(`${W}Error:${v} ${i.error}`),i.ok||process.exit(1)})}async function xQ(t,e,r,n){let s=n?.profileManager??Re();if(!s.getActiveProfile())return{ok:!1,error:ct};let o=
|
|
2888
|
-
${te}${l.length} error(s), ${c.length} warning(s)${v}`),l.length>0&&process.exit(1)})}async function $p(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return{filenames:[],error:ct};let s=
|
|
2889
|
-
${te}${r.filenames.length} file(s)${v}`)}})}var wQ=[".gts",".gjs",".ts",".js"];async function G7e(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return $g(ct);let s=
|
|
2886
|
+
Moved ${s} director${s===1?"y":"ies"}.`),i>0&&console.log(`Skipped ${i} due to existing target paths or move failures.`)}function Cre(t){t.command("consolidate-workspaces").description("Move local realm mirror directories into the canonical <root>/<domain>/<owner>/<realm> layout").argument("[root-dir]","Root directory to scan (default: current directory)").option("--dry-run","Preview without moving anything").action(async(e,r)=>{await v7e(e,r)})}var x7e="https://boxel.ai/ext/operations",Ur={CardJson:"application/vnd.card+json",CardHtml:"application/vnd.card+html",FileMetaHtml:"application/vnd.card.file-meta+html",CardSource:"application/vnd.card+source",FileMeta:"application/vnd.card.file-meta+json",DirectoryListing:"application/vnd.api+json",RealmInfo:"application/vnd.api+json",Mtimes:"application/vnd.api+json",Permissions:"application/vnd.api+json",Session:"application/json",EventStream:"text/event-stream",HTML:"text/html",Markdown:"text/markdown",JSONAPI:"application/vnd.api+json",BoxelOperations:`application/vnd.api+json;ext="${x7e}"`,JSON:"application/json",CardDependencies:"application/json",CardTypeSummary:"application/json",OctetStream:"application/octet-stream",All:"*/*"};function Ug(t){if(t.trim()==="")return"Path must be a non-empty realm-relative file path.";if(/^[a-z][a-z0-9+.-]*:/i.test(t))return`Path "${t}" must be realm-relative \u2014 absolute URLs (with a scheme) are not accepted.`;if(t.startsWith("/"))return`Path "${t}" must be realm-relative \u2014 paths starting with "/" are not accepted.`;if(t.includes("\\"))return`Path "${t}" must not contain backslash characters.`;let e;try{e=decodeURIComponent(t)}catch{return`Path "${t}" contains an invalid percent-encoded escape.`}return e.split("/").some(n=>n==="..")?`Path "${t}" must not contain ".." segments \u2014 the path must stay inside the target realm.`:null}var yS=require("fs");var Sre="X-Filename";function Ire(t){return encodeURIComponent(t)}var jg="@cardstack/";function w7e(t){return t.startsWith("@")}function dt(t,e){if(!w7e(t))return{ok:!0,url:t};if(!t.startsWith(jg))return{ok:!1,error:`Unsupported realm identifier "${t}": only @cardstack/<realm>/ identifiers are supported`};let r=t.slice(jg.length);if(!r.split("/")[0])return{ok:!1,error:`Malformed realm identifier "${t}": expected @cardstack/<realm>/\u2026`};let n=B7e(e);return n.ok?{ok:!0,url:new URL(r,ce(n.url)).href}:n}function vre(t){if(!t.startsWith(jg))return;let e=t.slice(jg.length),r=e.indexOf("/");if(!(r===-1||r===e.length-1))return{realm:`${jg}${e.slice(0,r)}/`,path:e.slice(r+1)}}function B7e(t){if(t?.realmServerUrl)return{ok:!0,url:t.realmServerUrl};let e=(t?.profileManager??Re()).getActiveProfile();return e?{ok:!0,url:e.profile.realmServerUrl}:process.env.REALM_SERVER_URL?{ok:!0,url:process.env.REALM_SERVER_URL}:{ok:!1,error:"Cannot resolve a @cardstack/ realm identifier without a realm-server URL. Run `boxel profile add` to create a profile, or set REALM_SERVER_URL."}}var vQ=require("fs");var AS=We(bD());var xre="realm_server";function wre(t){let{hostname:e}=new URL(t);if(e==="localhost"||e.endsWith(".localhost"))return"localhost";let r=e.split(".");return r.length<=2?e:r.slice(-2).join(".")}function T7e(t,e=xre){return`@${e}:${wre(t)}`}function yl(t){return new URL(t).origin+"/"}function ph(t){let e=new URL(t).pathname.split("/").filter(Boolean);if(e.length<2)throw new Error(`Cannot derive realm owner: ${t} is not a <host>/<owner>/<realm>/ realm URL`);return`@${e[0]}:${wre(t)}`}function mS(t,e,r={}){return AS.default.sign({user:e,sessionRoom:r.sessionRoom??""},t,{expiresIn:r.expiresIn??"7d"})}function D7e(t,e,r,n={}){return AS.default.sign({operator:e},t,{audience:r,expiresIn:n.expiresIn??"5m"})}var P7e=new Set(["localhost","127.0.0.1","[::1]"]);function _7e(t,e){let r;try{r=new URL(e,ce(t))}catch{throw new Error(`${t} is not a URL`)}if(r.protocol!=="https:"&&!P7e.has(r.hostname))throw new Error(`${r.origin} is not https; refusing to send an operator request to it`);return r}async function fh({realmServerUrl:t,realmSecretSeed:e,fetch:r=globalThis.fetch},n,s,i,o){let a=_7e(t,s),l=await r(a.href,{method:i,redirect:"error",headers:{Accept:"application/json",Authorization:`Bearer ${D7e(e,n,a.origin)}`,...o!==void 0?{"Content-Type":"application/json"}:{}},...o!==void 0?{body:JSON.stringify(o)}:{}});return{url:a.href,response:l}}function N7e(t){try{return new URL(t).href.replace(/\/+$/,"")+"/"}catch{throw new Error(`Invalid realm URL: ${t}`)}}var uh=class{#e;#t;#r;#n;#i=new Map;constructor(e){if(!e.seed)throw new Error("SeedAuthenticator requires a non-empty seed");this.#e=e.seed,this.#t=e.botUsername??xre,this.#r=e.botUserId,this.#n=e.expiresIn??"7d"}buildClaims(e){let r=N7e(e);return{user:this.#r??T7e(r,this.#t),realm:r,sessionRoom:void 0,permissions:[],realmServerURL:yl(r)}}mintTokenForRealm(e){let r=this.buildClaims(e),n=this.#i.get(r.realm);if(n)return n;let s=AS.default.sign(r,this.#e,{expiresIn:this.#n});return this.#i.set(r.realm,s),s}#s(e){for(let i of this.#i.keys())if(e.startsWith(i))return i;let r=new URL(e),n=r.pathname.split("/").filter(Boolean),s=n.length>0?`/${n.slice(0,2).join("/")}/`:"/";return`${r.origin}${s}`}async authedRealmFetch(e,r){let n=e instanceof Request?e.url:e instanceof URL?e.href:e,s=this.#s(n),i=this.mintTokenForRealm(s),o=this.#a(e,r,i);return Qg(e,{...r,headers:o})}#a(e,r,n){let s=e instanceof Request?new Headers(e.headers):new Headers,i=new Headers(r?.headers);for(let[o,a]of i)s.set(o,a);return s.has("Authorization")||s.set("Authorization",n),s}registerRealmUrl(e){this.mintTokenForRealm(e)}};function Ln(t){if(t.authenticator)return{ok:!0,authenticator:t.authenticator,mode:"injected"};if(t.realmSecretSeed)try{let r=new uh({seed:t.realmSecretSeed});return r.registerRealmUrl(t.realmUrl),{ok:!0,authenticator:r,mode:"seed"}}catch(r){return{ok:!1,error:r instanceof Error?r.message:String(r)}}let e=t.profileManager??Re();return e.getActiveProfile()?{ok:!0,authenticator:e,mode:"profile"}:{ok:!1,error:ct}}var Qre=We(Nre(),1),kre="application/octet-stream",U7e={".gts":"text/typescript+glimmer",".gjs":"text/javascript+glimmer",".ts":"text/typescript",".jsonl":"application/jsonl"};function j7e(t){let e=t.lastIndexOf(".");if(e===-1)return kre;let r=t.slice(e).toLowerCase(),n=U7e[r];if(n)return n;let s=(0,Qre.lookup)(t);return s||kre}var q7e=new Set(["application/json","application/jsonl","application/javascript","application/ecmascript","application/node","application/xml","application/x-sh","application/sql","application/x-sql","application/yaml","application/x-yaml","application/toml"]),H7e=["+json","+xml","+html","+source"];function qg(t){let e=$7e(t);return e.startsWith("text/")||H7e.some(r=>e.endsWith(r))?!1:!q7e.has(e)}function $7e(t){return t.split(";")[0].trim().toLowerCase()}function Ta(t){return qg(j7e(t))}async function Hg(t,e,r,n){let s=dt(t,{profileManager:n?.profileManager});if(!s.ok)return{ok:!1,error:s.error};t=s.url;let i=Ln({realmUrl:t,realmSecretSeed:n?.realmSecretSeed,profileManager:n?.profileManager,authenticator:n?.authenticator});if(!i.ok)return{ok:!1,error:i.error};let o=i.authenticator,a=new URL(e,ce(t)).href,l=Ta(e);if(typeof r!="string"&&!l)return{ok:!1,error:`Path ${e} is text by extension but content is bytes. Refusing to write to avoid silent corruption.`};let c=typeof r=="string"&&l?new TextEncoder().encode(r):r,u=typeof c!="string";try{let p=await o.authedRealmFetch(a,{method:"POST",headers:{...u?{"Content-Type":Ur.OctetStream}:{Accept:Ur.CardSource,"Content-Type":Ur.CardSource},...n?.realmEvents===!1?{"X-Boxel-Realm-Events":"none"}:{}},body:c});if(!p.ok){let f=await p.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${p.status}: ${f.slice(0,300)}`}}return{ok:!0}}catch(p){return{ok:!1,error:p instanceof Error?p.message:String(p)}}}function Hp(t){process.stderr.write(t+`
|
|
2887
|
+
`)}async function V7e(){let t=[];for await(let e of process.stdin)t.push(e);return Buffer.concat(t).toString("utf-8")}function Rre(t){t.command("write").description("Write a file to a realm (reads content from STDIN or --file)").argument("<path>","Realm-relative file path (e.g., hello.gts, Cards/my-card.json)").requiredOption("--realm <realm-url>","The realm URL to write to").option("--file <filepath>","Read content from a local file instead of STDIN").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--no-realm-events","Index the write without announcing it to open tabs, which pick it up on their next load (for deploys)").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await mr(r.realmSecretSeed===!0)}catch(o){Hp(`${W}Error:${v} ${o instanceof Error?o.message:String(o)}`),process.exit(1)}let s;if(r.file){let o=Ta(r.file),a=Ta(e);o&&!a&&(Hp(`${W}Error:${v} source file ${r.file} is binary but destination path ${e} is text. Refusing to write to avoid silent corruption \u2014 rename the destination to match.`),process.exit(1));try{s=o?(0,vQ.readFileSync)(r.file):(0,vQ.readFileSync)(r.file,"utf-8")}catch(l){Hp(`${W}Error:${v} Could not read file: ${l instanceof Error?l.message:String(l)}`),process.exit(1)}}else process.stdin.isTTY&&Hp(`${te}Reading from STDIN. Type or paste content, then press Enter followed by Ctrl+D to finish.${v}`),s=await V7e(),Hp(`${te}Received ${s.length} bytes. Writing to realm...${v}`);let i;try{i=await Hg(r.realm,e,s,{realmSecretSeed:n,realmEvents:r.realmEvents})}catch(o){Hp(`${W}Error:${v} ${o instanceof Error?o.message:String(o)}`),process.exit(1)}r.json?Fe.output(JSON.stringify(i,null,2)):i.ok?console.log(`${he}Written:${v} ${e} ${te}\u2192${v} ${r.realm}`):Hp(`${W}Error:${v} ${i.error}`),i.ok||process.exit(1)})}async function xQ(t,e,r,n){let s=n?.profileManager??Re();if(!s.getActiveProfile())return{ok:!1,error:ct};let o=dt(t,{profileManager:s});if(!o.ok)return{ok:!1,error:o.error};t=o.url;let a=`${ce(t)}_lint`;try{let l=await s.authedRealmFetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":Ur.CardSource,[Sre]:Ire(r),"X-HTTP-Method-Override":"QUERY"},body:e});if(!l.ok){let u=await l.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${l.status}: ${u.slice(0,300)}`}}let c=await l.json();return{ok:!0,fixed:c.fixed,output:c.output,messages:c.messages}}catch(l){return{ok:!1,error:l instanceof Error?l.message:String(l)}}}function Ore(t){t.command("lint").description("Lint a file in a realm using the realm lint endpoint").argument("<path>","Realm-relative file path to lint (e.g., my-card.gts)").requiredOption("--realm <realm-url>","The realm URL to lint against").option("--file <local-filepath>","Read source from a local file instead of fetching from the realm").option("--json","Output raw JSON response").option("--fix","Write auto-fixed output back to the source").action(async(e,r)=>{let n=Re();n.getActiveProfile()||(console.error(`${W}Error:${v} ${ct}`),process.exit(1));let i;if(r.file)try{i=(0,yS.readFileSync)(r.file,"utf-8")}catch(u){console.error(`${W}Error:${v} Could not read local file: ${u instanceof Error?u.message:String(u)}`),process.exit(1)}else{let u=new URL(e,ce(r.realm)).href;try{let p=await n.authedRealmFetch(u,{method:"GET",headers:{Accept:Ur.CardSource}});if(!p.ok){let f=await p.text().catch(()=>"(no body)");console.error(`${W}Error:${v} Could not read file from realm: HTTP ${p.status}: ${f.slice(0,300)}`),process.exit(1)}i=await p.text()}catch(p){console.error(`${W}Error:${v} ${p instanceof Error?p.message:String(p)}`),process.exit(1)}}let o;try{o=await xQ(r.realm,i,e,{profileManager:n})}catch(u){console.error(`${W}Error:${v} ${u instanceof Error?u.message:String(u)}`),process.exit(1)}if(r.json){Fe.output(JSON.stringify(o,null,2)),o.ok||process.exit(1);return}if(o.ok||(console.error(`${W}Error:${v} ${o.error}`),process.exit(1)),r.fix&&o.fixed&&o.output)if(r.file)(0,yS.writeFileSync)(r.file,o.output,"utf-8"),console.log(`${he}Fixed:${v} ${r.file}`);else{let u=await Hg(r.realm,e,o.output,{profileManager:n});u.ok||(console.error(`${W}Error:${v} Could not write fixed file: ${u.error}`),process.exit(1)),console.log(`${he}Fixed:${v} ${e} ${te}\u2192${v} ${r.realm}`)}let a=o.messages??[],l=a.filter(u=>u.severity===2),c=a.filter(u=>u.severity===1);if(a.length===0){console.log(`${te}No lint issues found.${v}`);return}for(let u of a){let p=u.severity===2?W:ot,f=u.severity===2?"error":"warning",d=u.ruleId?` (${u.ruleId})`:"";console.log(`${p}${f}${v} ${u.line}:${u.column} ${u.message}${te}${d}${v}`)}console.log(`
|
|
2888
|
+
${te}${l.length} error(s), ${c.length} warning(s)${v}`),l.length>0&&process.exit(1)})}async function $p(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return{filenames:[],error:ct};let s=dt(t,{profileManager:r});if(!s.ok)return{filenames:[],error:s.error};t=s.url;let i=ce(t),o=`${i}_mtimes`;try{let a=await r.authedRealmFetch(o,{method:"GET",headers:{Accept:Ur.Mtimes}});if(!a.ok){let p=await a.text().catch(()=>"(no body)");return{filenames:[],error:`_mtimes returned HTTP ${a.status}: ${p.slice(0,300)}`}}let l=await a.json(),c=l?.data?.attributes?.mtimes??l,u=[];for(let p of Object.keys(c)){if(!p.startsWith(i))continue;let f=p.slice(i.length);!f||f.endsWith("/")||u.push(f)}return{filenames:u.sort()}}catch(a){return{filenames:[],error:a instanceof Error?a.message:String(a)}}}function Fre(t){t.command("list").alias("ls").description("List all files in a realm").requiredOption("--realm <realm-url>","The realm URL to list files from").option("--json","Output raw JSON response").action(async e=>{let r;try{r=await $p(e.realm)}catch(n){console.error(`${W}Error:${v} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}if(e.json)Fe.output(JSON.stringify(r,null,2)),r.error&&process.exit(1);else if(r.error)console.error(`${W}Error:${v} ${r.error}`),process.exit(1);else{for(let n of r.filenames)console.log(`${te}${n}${v}`);console.log(`
|
|
2889
|
+
${te}${r.filenames.length} file(s)${v}`)}})}var wQ=[".gts",".gjs",".ts",".js"];async function G7e(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return $g(ct);let s=dt(t,{profileManager:r});if(!s.ok)return $g(s.error);t=s.url;let i=ce(t),o=Date.now(),a;if(e?.path){let f=e.path,d=Ug(f);if(d)return $g(d);if(!wQ.some(A=>f.endsWith(A)))return $g(`Path "${f}" is not lintable \u2014 must end with one of ${wQ.join(", ")}`);a=[f]}else{let f=await $p(i,{profileManager:r});if(f.error)return $g(`Failed to list realm files: ${f.error}`);a=f.filenames.filter(d=>wQ.some(A=>d.endsWith(A)))}if(a.length===0)return{status:"passed",filesChecked:0,filesWithErrors:0,errorCount:0,warningCount:0,durationMs:Date.now()-o,lintableFiles:[],violations:[]};let l=[],c=0,u=0,p=0;for(let f of a){let d;try{let m=new URL(f,i).href,g=await r.authedRealmFetch(m,{method:"GET",headers:{Accept:Ur.CardSource}});if(!g.ok){let E=await g.text().catch(()=>"(no body)");BQ(f,`HTTP ${g.status}: ${E.slice(0,300)}`,l),c+=1,u+=1;continue}d=await g.text()}catch(m){BQ(f,m instanceof Error?m.message:String(m),l),c+=1,u+=1;continue}let A=await xQ(i,d,f,{profileManager:r});if(!A.ok){BQ(f,A.error??"lint failed",l),c+=1,u+=1;continue}let h=!1;for(let m of A.messages??[]){let g=m.severity===2?"error":"warning";l.push({rule:m.ruleId,file:f,line:m.line,column:m.column,message:m.message,severity:g}),g==="error"?(u+=1,h=!0):p+=1}h&&(c+=1)}return{status:u===0?"passed":"failed",filesChecked:a.length,filesWithErrors:c,errorCount:u,warningCount:p,durationMs:Date.now()-o,lintableFiles:a,violations:l}}function BQ(t,e,r){r.push({rule:"lint-error",file:t,line:0,column:0,message:e,severity:"error"})}function $g(t){return{status:"error",filesChecked:0,filesWithErrors:0,errorCount:0,warningCount:0,durationMs:0,lintableFiles:[],violations:[],errorMessage:t}}function Lre(t){t.command("lint").description("Lint every lintable (.gts/.gjs/.ts/.js) file in a realm via the realm lint endpoint. Pass a realm-relative path to lint a single file.").argument("[path]","Optional realm-relative file path. When omitted, lints every lintable file in the realm.").requiredOption("--realm <realm-url>","The realm URL to lint against").option("--json","Output structured JSON result").action(async(e,r)=>{let n;try{n=await G7e(r.realm,e?{path:e}:{})}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json){Fe.output(JSON.stringify(n,null,2)),n.status!=="passed"&&process.exit(1);return}if(n.errorMessage&&(console.error(`${W}Error:${v} ${n.errorMessage}`),process.exit(1)),n.violations.length===0){console.log(`${te}No lint issues found (${n.filesChecked} file(s) checked).${v}`);return}let s;for(let i of n.violations){i.file!==s&&(s=i.file,console.log(`
|
|
2890
2890
|
${te}${i.file}${v}`));let o=i.severity==="error"?W:ot,a=i.rule?` (${i.rule})`:"";console.log(` ${o}${i.severity}${v} ${i.line}:${i.column} ${i.message}${te}${a}${v}`)}console.log(`
|
|
2891
2891
|
${te}${n.errorCount} error(s), ${n.warningCount} warning(s) across ${n.filesChecked} file(s)${v}`),n.errorCount>0&&process.exit(1)})}var sne=require("node:child_process"),jr=require("node:fs"),ine=require("node:os"),Me=require("node:path");var Vg=require("node:fs"),xi=require("node:path");var Y7e=10,W7e=1e4,jre=[".gts",".ts",".gjs",".js"],Mre=new Map;function Ure(t){let e=[],r=/(?:^|[\s;})])(?:import|export)\s*(?:[\w*{}\n\r\t,$ ]+\s*from\s*)?['"]([^'"]+)['"]/g,n=/\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g;for(let s of[r,n]){let i;for(;(i=s.exec(t))!==null;)e.push(i[1])}return e}function J7e(t,e){let r;for(let[n,s]of Object.entries(e))t.startsWith(n)&&(r&&r.prefix.length>=n.length||(r={prefix:n,realmURL:s,realmPath:t.slice(n.length)}));return r}function ES(t){let e=t.split("/").filter(Boolean);return e[e.length-1]??t}function K7e(t,e){let r=t.split("/").slice(0,-1),n=e.split("/");for(let s of n)if(!(s==="."||s==="")){if(s===".."){r.pop();continue}r.push(s)}return r.join("/")}function z7e(t){return jre.some(e=>t.endsWith(e))}async function X7e(t,e,r,n,s){let i=z7e(e)?[e]:jre.map(a=>`${e}${a}`),o=[];for(let a of i){let l=new URL(a,t).href;if(!l.startsWith(t)){o.push(`${a}: resolves outside the realm`);continue}let c=`${n??""}|${l}`,u=Mre.get(c),p={Accept:Ur.CardSource};u?.etag?p["If-None-Match"]=u.etag:u?.lastModified&&(p["If-Modified-Since"]=u.lastModified);let f;try{f=await r(l,{headers:p,signal:AbortSignal.timeout(s)})}catch(A){o.push(`${a}: ${A instanceof Error?A.message:String(A)}`);continue}if(f.status===304&&u)return{realmPath:a,source:u.source};if(!f.ok){o.push(`${a}: ${f.status}`);continue}let d=await f.text();return Mre.set(c,{source:d,etag:f.headers.get("etag")??void 0,lastModified:f.headers.get("last-modified")??void 0}),{realmPath:a,source:d}}return{error:o.join("; ")||"not found"}}async function qre(t){let{entries:e,prefixRealmURLs:r,fetch:n=globalThis.fetch,maxDepth:s=Y7e,cacheScope:i,fetchTimeoutMs:o=W7e}=t,a=new Map,l=new Set,c=[],u=new Set,p=[];function f(d,A,h){let m;if(d.startsWith(".")){if(!h)return;m={prefix:h.prefix,realmPath:K7e(h.realmPath,d)}}else{let E=J7e(d,r);if(!E)return;m={prefix:E.prefix,realmPath:E.realmPath}}let g=`${m.prefix}${m.realmPath}`;u.has(g)||(u.add(g),p.push({...m,depth:A}))}for(let d of e)for(let A of Ure(d.content))f(A,0);for(;p.length>0;){let d=p;p=[];let A=await Promise.all(d.map(async h=>{let m=r[h.prefix],g=await X7e(m,h.realmPath,n,i,o);return{pending:h,fetched:g}}));for(let{pending:h,fetched:m}of A){if("error"in m){c.push({specifier:`${h.prefix}${h.realmPath}`,reason:m.error});continue}if(l.add(h.prefix),a.set(`${ES(h.prefix)}/${m.realmPath}`,m.source),!(h.depth>=s))for(let g of Ure(m.source))f(g,h.depth+1,{prefix:h.prefix,realmPath:m.realmPath})}}return{modules:a,resolvedPrefixes:[...l],failures:c}}var Z7e=/^(.+?)\((\d+),(\d+)\):\s*error\s+(TS\d+):\s*(.+)/,eqe=/^\s+\S/,tqe=/^\S/;function Hre(t){let e=[],r=null;for(let n of t.split(/\r?\n/)){let s=n.match(Z7e);if(s){let[,i,o,a,l,c]=s;r={file:i,line:parseInt(o,10),column:parseInt(a,10),code:l,message:c,elaboration:[]},e.push(r)}else r&&eqe.test(n)?r.elaboration.push(n.trimEnd()):tqe.test(n)&&(r=null)}return e}function $re(t){return[t.message,...t.elaboration].join(`
|
|
2892
2892
|
`)}var bS=".realm-sources";async function Vre(t){let e=await rqe(t);return iqe(t.tempDir,e.shimmedPrefixes),e}function TQ(t,e){let r=[];for(let n of t)r.push(`Could not fetch realm module ${n.specifier} (${n.reason}) \u2014 this check ran against an incomplete copy of that realm's code.`);return e.length>0&&r.push(`Realm prefix(es) ${e.join(", ")} could not be resolved; their imports were typed as 'any', so card-level adoption from them was not actually type-checked.`),r}async function rqe(t){let{tempDir:e,files:r,prefixes:n,origin:s,fetchFn:i,cacheScope:o,onWarn:a}=t,l=h=>a?.(h),c=n.filter(h=>r.some(m=>m.content.includes(h)));if(c.length===0)return{realmPaths:{},shimmedPrefixes:[],failures:[],warnings:[]};if(!s)return l(`Realm-prefixed imports (${c.join(", ")}) but no realm to resolve them against \u2014 falling back to the ambient shim.`),{realmPaths:{},shimmedPrefixes:c,failures:[],warnings:TQ([],c)};let u=Object.fromEntries(n.map(h=>[h,new URL(`/${ES(h)}/`,s).href])),p;try{p=await qre({entries:r,prefixRealmURLs:u,fetch:i,cacheScope:o})}catch(h){return l(`Could not fetch realm sources (${h instanceof Error?h.message:String(h)}) \u2014 falling back to the ambient shim.`),{realmPaths:{},shimmedPrefixes:c,failures:[],warnings:TQ([],c)}}let f=(0,xi.join)(e,bS);for(let[h,m]of p.modules){let g=(0,xi.resolve)(f,h);if(!g.startsWith(f+xi.sep)){l(`Skipping realm module with unsafe path: ${h}`);continue}(0,Vg.mkdirSync)((0,xi.dirname)(g),{recursive:!0}),(0,Vg.writeFileSync)(g,m,"utf8")}let d={};for(let h of p.resolvedPrefixes)d[`${h}*`]=[`${(0,xi.join)(f,ES(h))}/*`];let A=c.filter(h=>!p.resolvedPrefixes.includes(h));return{realmPaths:d,shimmedPrefixes:A,failures:p.failures,warnings:TQ(p.failures,A)}}function Gre({output:t,exitedWithError:e,tempDir:r,files:n}){let s=nqe(r),i=new Set(n.map(l=>l.path)),o=[],a=0;for(let l of Hre(t)){let c=(0,xi.resolve)(r,l.file);if(s.trackIfStaged(c,l)||(a++,!c.startsWith(r))||l.code==="TS2353"&&l.message.includes("'scoped'"))continue;let u=c.slice(r.length+1);i.has(u)&&o.push({...l,file:u})}return{diagnostics:o,stagedWarning:s.warning(),silentSetupFailure:sqe({exitedWithError:e,errorCount:o.length,inputDiagnosticLines:a,stagedDiagnosticLines:s.count()})}}function nqe(t){let e=(0,xi.join)(t,bS),r=0,n;return{trackIfStaged(s,i){if(!s.startsWith(e+xi.sep))return!1;if(r++,n===void 0){let{line:o,column:a,code:l}=i;n=`${s.slice(t.length+1)}(${o},${a}): ${l}: ${$re(i)}`}return!0},count:()=>r,warning(){if(r!==0)return`ember-tsc reported ${r} diagnostic(s) in fetched realm sources rather than in the checked files. These are dropped \u2014 staged realm code is not what this run checks. If they name missing modules, the fetch-failure warnings above carry the cause. The first: ${n}`}}}function sqe(t){return t.exitedWithError&&t.errorCount===0&&t.inputDiagnosticLines===0&&t.stagedDiagnosticLines===0}function iqe(t,e){e.length!==0&&(0,Vg.writeFileSync)((0,xi.join)(t,"realm-shims.d.ts"),e.map(r=>`declare module '${r}*';`).join(`
|
|
2893
2893
|
`)+`
|
|
2894
|
-
`,"utf8")}var CS=require("node:fs"),SS=require("node:path");function dh(t){let e=t;for(;;){let r=(0,SS.join)(e,"package.json");if((0,CS.existsSync)(r))try{if(JSON.parse((0,CS.readFileSync)(r,"utf8"))?.name==="@cardstack/boxel-cli")return e}catch{}let n=(0,SS.dirname)(e);if(n===e)throw new Error("Could not locate the @cardstack/boxel-cli package root walking up from "+t);e=n}}var oqe=["glimmer-motion","glimmer-motion/layout-group","glimmer-motion/motion-config","glimmer-motion/presence","glimmer-motion/reorder/group","glimmer-motion/reorder/item","glimmer-motion/test-support","@cardstack/choreo","@cardstack/choreo/choreo","@cardstack/choreo/steps","@cardstack/choreo/test-support","@cardstack/choreo/film","@cardstack/choreo/film/clip","@cardstack/choreo/film/film","@cardstack/choreo/film/graph/adjust","@cardstack/choreo/film/graph/host","@cardstack/choreo/film/graph/nodes","@cardstack/choreo/film/joins","@cardstack/choreo/film/overlays","@cardstack/choreo/film/picture","@cardstack/choreo/film/plate","@cardstack/choreo/film/player","@cardstack/choreo/film/rail","@cardstack/choreo/film/titles","@cardstack/choreo-player"];function Yre(t){let e=[["glimmer-motion",t.glimmerMotion],["@cardstack/choreo",t.choreo],["@cardstack/choreo-player",t.choreoPlayer]],r={};for(let n of oqe){let[s,i]=e.find(([a])=>n===a||n.startsWith(`${a}/`)),o=n.slice(s.length+1);r[n]=[`${i}/${o||"index"}`]}return r}var aqe="\0";function DQ(t,e){return`${t}${aqe}${e}`}var Wre="_isCardInstanceFile";var Kre="item.",zre="item.on",Jre=["eq","contains","in","range"];function PQ(t){let e={};for(let[r,n]of Object.entries(t))if(r==="type"||r==="on")e[zre]=n;else if(r==="any"||r==="every"){if(!Array.isArray(n))throw new Error(`filter.${r} must be an array`);e[r]=n.map(s=>PQ(s))}else if(r==="not")e.not=PQ(n);else if(Jre.includes(r)){if(typeof n!="object"||n==null||Array.isArray(n))throw new Error(`filter.${r} must be an object`);e[r]=Object.fromEntries(Object.entries(n).map(([s,i])=>[`${Kre}${s}`,i]))}else if(r==="matches")e.matches=n;else throw new Error(`cannot translate filter member "${r}" to an entry query \u2014 the type anchor is "on"/"type" and field paths live under the ${Jre.join("/")} operators`);return e}function lqe(t){let e={};for(let[r,n]of Object.entries(t))if(r==="by"){if(typeof n!="string")throw new Error('sort entry "by" must be a string');e.by=`${Kre}${n}`}else if(r==="on")e[zre]=n;else if(r==="direction")e.direction=n;else throw new Error(`unknown sort member "${r}"`);return e}function _Q(t,e){let r={fields:{entry:["item"]}};if(e!==void 0&&(r.realms=e),t.filter!==void 0){if(typeof t.filter!="object"||t.filter==null||Array.isArray(t.filter))throw new Error("filter must be an object");r.filter=PQ(t.filter)}if(t.sort!==void 0){if(!Array.isArray(t.sort))throw new Error("sort must be an array");r.sort=t.sort.map(n=>lqe(n))}return t.page!==void 0&&(r.page=t.page),t.cardUrls!==void 0&&(r.cardUrls=t.cardUrls),t.scope!==void 0&&(r.scope=t.scope),r}function NQ(t){let e=new Map;for(let n of t.included??[])(n.type==="card"||n.type==="file-meta")&&e.set(DQ(n.type,n.id),n);let r=[];for(let n of t.data??[]){let s=n.relationships?.item?.data;if(!s)continue;let i=e.get(DQ(s.type,s.id));if(!i)continue;let o=n.meta?._matchRelevance;o!==void 0&&(i={...i,meta:{...i.meta,_matchRelevance:o}}),r.push(i)}return r}var cqe=["https://cardstack.com/base/card-api","@cardstack/base/card-api"],uqe=["BaseDef","CardDef","FieldDef","FileDef"];function pqe(t){if(typeof t!="object"||t==null)return!1;let{module:e,name:r}=t;return typeof e=="string"&&typeof r=="string"&&cqe.includes(e)&&uqe.includes(r)}function IS(t,e=!1){if(typeof t!="object"||t==null||Array.isArray(t))return!1;let r=t;return r.on!=null||r.type!=null?!e&&!pqe(r.on??r.type):r.not!=null?IS(r.not,!e):Array.isArray(r.every)?r.every.some(n=>IS(n,e)):Array.isArray(r.any)?r.any.some(n=>IS(n,e)):!1}function fqe(t){if(t.scope==="cards"||t.scope==="files"||IS(t.filter))return t;let e={eq:{[Wre]:!1}},r=t.filter==null?e:{every:[t.filter,e]};return{...t,filter:r}}async function kQ(t,e,r){let n=r?.profileManager??Re(),s=n.getActiveProfile();if(!s)return{ok:!1,error:ct};let o=`${s.profile.realmServerUrl.replace(/\/$/,"")}/_federated-search`;e=fqe(e);let a=[];for(let c of Array.isArray(t)?t:[t]){let u=ft(c,{profileManager:n});if(!u.ok)return{ok:!1,error:u.error};a.push(ce(u.url))}let l;try{l=_Q(e,a)}catch(c){return{ok:!1,status:0,error:c instanceof Error?c.message:String(c)}}try{let c=await n.authedRealmServerFetch(o,{method:"QUERY",headers:{Accept:"application/vnd.card+json","Content-Type":"application/json"},body:JSON.stringify(l)});if(!c.ok){let p=await c.text();return{ok:!1,status:c.status,error:`HTTP ${c.status}: ${p.slice(0,300)}`}}let u=await c.json();return{ok:!0,status:c.status,data:NQ(u)}}catch(c){return{ok:!1,status:0,error:c instanceof Error?c.message:String(c)}}}function dqe(t){if(t==null||t.trim()==="")return{};let e;try{e=JSON.parse(t)}catch(i){throw new Error(`Invalid JSON in --query: ${i instanceof Error?i.message:String(i)}`)}if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`--query must be a JSON object, got ${Array.isArray(e)?"array":typeof e}`);let r=e,n=r.filter;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length===0){let{filter:i,...o}=r;return o}return r}function Xre(t){t.command("search").description("Federated search across realms using a JSON query").requiredOption("--realm <realm-url>","Realm URL to search (repeatable)",(e,r)=>(r.push(e),r),[]).option("--query <json>","JSON query object (as a string). Omit to list every card in the realm(s).").option("--json","Output raw JSON response").action(async e=>{e.realm.length===0&&(console.error(`${W}Error:${v} At least one --realm is required`),process.exit(1));let r;try{r=dqe(e.query)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1);return}let n;try{n=await kQ(e.realm,r)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1);return}e.json?Fe.output(JSON.stringify(n,null,2)):n.ok?Fe.output(JSON.stringify(n.data??[],null,2)):(console.error(`${te}Status:${v} ${n.status??"(no status)"}`),console.error(`${W}Error:${v} ${n.error}`)),n.ok||process.exit(1)})}var hqe={module:"@cardstack/base/spec",name:"Spec"},xS=[".gts",".gjs",".ts"],Gg=".json",Yg=dh(__dirname),ri=(0,Me.resolve)(Yg,".."),Ir=(()=>{let t=(0,Me.join)(Yg,"bundled-types");if((0,jr.existsSync)((0,Me.join)(t,"base")))return t})(),Zre=Ir?(0,Me.join)(Ir,"base"):(0,Me.join)(ri,"base"),vS=Ir?(0,Me.join)(Ir,"host-app"):(0,Me.join)(ri,"host","app"),Aqe=Ir?(0,Me.join)(Ir,"host-tests"):(0,Me.join)(ri,"host","tests"),mqe=Ir?(0,Me.join)(Ir,"host-types"):(0,Me.join)(ri,"host","types"),gqe=Ir?(0,Me.join)(Ir,"boxel-ui"):(0,Me.join)(ri,"boxel-ui","src"),yqe=Ir?(0,Me.join)(Ir,"local-types"):(0,Me.join)(ri,"local-types"),ene=Ir?(0,Me.join)(Ir,"runtime-common"):(0,Me.join)(ri,"runtime-common"),tne=Ir?(0,Me.join)(Ir,"bxl"):(0,Me.join)(ri,"bxl","src"),Eqe=Ir?(0,Me.join)(Ir,"glimmer-motion"):(0,Me.join)(ri,"glimmer-motion","src"),bqe=Ir?(0,Me.join)(Ir,"choreo"):(0,Me.join)(ri,"choreo","src"),Cqe=Ir?(0,Me.join)(Ir,"choreo-player"):(0,Me.join)(ri,"choreo-player","src"),rne=Ir?(0,Me.join)(Ir,"shims"):void 0,nne=Ir?void 0:[`${(0,Me.join)(ri,"boxel-icons","src","icons")}/*`,`${(0,Me.join)(ri,"boxel-icons","src")}/*`],Sqe=(0,Me.join)(ri,"host","node_modules"),Iqe=(()=>{try{let t=JSON.parse((0,jr.readFileSync)((0,Me.join)(Yg,"package.json"),"utf8"));return Object.keys(t.dependencies??{})}catch{return[]}})(),vqe=["@cardstack/catalog/","@cardstack/skills/","@cardstack/openrouter/","@cardstack/pretui/"];async function xqe(t,e,r={}){let n=r.totalWaitMs??3e4,s=r.pollMs??250,i=Date.now()+n,o=await t();for(;e(o)&&Date.now()<i;)await new Promise(a=>setTimeout(a,s)),o=await t();return o}function wqe(t,e){return t||e.getActiveProfile()?.profile.realmServerUrl}async function Bqe(t,e){let r=!t,n=e?.workspace??(r?process.cwd():void 0);if(r&&n&&!jqe(n))return Vp(`workspace directory not found: ${n}`);let s=e?.profileManager??Re();if(!r&&!s.getActiveProfile())return Vp(ct);if(t){let A=ft(t,{profileManager:s});if(!A.ok)return Vp(A.error);t=A.url}let i=t?ce(t):"",o=Date.now(),a=[],l=[];if(e?.path){let A=e.path,h=Ug(A);if(h)return Vp(h);if(xS.some(m=>A.endsWith(m)))a=[A];else if(A.endsWith(Gg))l=[A];else return Vp(`Path "${A}" is not parseable \u2014 must end with one of ${xS.join(", ")}, or ${Gg}`)}else if(r)try{a=Lqe(n),l=Mqe(n)}catch(A){return Vp(`Failed to walk workspace ${n}: ${A instanceof Error?A.message:String(A)}`)}else try{[a,l]=await Promise.all([Tqe(i,s),Dqe(i,s)])}catch(A){return Vp(`Failed to discover parseable files: ${A instanceof Error?A.message:String(A)}`)}let c=[...a,...l];if(c.length===0)return{status:"passed",filesChecked:0,filesWithErrors:0,errorCount:0,durationMs:Date.now()-o,parseableFiles:[],errors:[],warnings:[]};let u=A=>r?Uqe(n,A):_qe(i,A,s),p=[],f=[],d=new Set;if(a.length>0){let A=[];for(let h of a){let m=await u(h);if(!m.ok){p.push({file:h,line:0,column:0,message:`Could not read ${h}: ${m.error}`}),d.add(h);continue}A.push({path:h,content:m.content})}if(A.length>0)try{let h=await Qqe(A,{realmOrigin:wqe(i,s),fetchFn:(m,g)=>s.authedRealmFetch(m,g),cacheScope:s.getActiveProfile()?.id});f.push(...h.warnings);for(let m of h.errors)p.push(m),d.add(m.file)}catch(h){let m=A[0].path;p.push({file:m,line:0,column:0,message:`Glint check failed: ${h instanceof Error?h.message:String(h)}`}),d.add(m)}}for(let A of l){let h=await u(A);if(!h.ok){p.push({file:A,line:0,column:0,message:`Could not read ${A}: ${h.error}`}),d.add(A);continue}let m=Oqe(A,h.content);for(let g of m)p.push(g),d.add(g.file)}return{status:p.length===0?"passed":"failed",filesChecked:c.length,filesWithErrors:d.size,errorCount:p.length,durationMs:Date.now()-o,parseableFiles:c,errors:p,warnings:f}}async function Tqe(t,e){let r=`${t}_mtimes`,n=await e.authedRealmFetch(r,{method:"GET",headers:{Accept:Ur.Mtimes}});if(!n.ok){let a=await n.text().catch(()=>"(no body)");throw new Error(`_mtimes returned HTTP ${n.status}: ${a.slice(0,300)}`)}let s=await n.json(),i=s?.data?.attributes?.mtimes??s,o=[];for(let a of Object.keys(i)){if(!a.startsWith(t))continue;let l=a.slice(t.length);!l||l.endsWith("/")||xS.some(c=>l.endsWith(c))&&o.push(l)}return o.sort()}async function Dqe(t,e){let r=await xqe(()=>kQ(t,{filter:{type:hqe}},{profileManager:e}),i=>i.ok&&(i.data?.length??0)===0);if(!r.ok)return[];let n=[];for(let i of r.data??[]){let o=i.id;if(!o)continue;let a=i.attributes;if(!a||a.specType==="field")continue;let c=i.relationships,u=Pqe(c),p=new URL(o,t).href,f=[];for(let d of u){let A=new URL(d,p).href;A.startsWith(t)&&f.push(A.slice(t.length))}n.push({specId:o,exampleUrls:f})}let s=[];for(let i of n)for(let o of i.exampleUrls){let a=o.endsWith(Gg)?o:`${o}${Gg}`;s.includes(a)||s.push(a)}return s.sort()}function Pqe(t){if(!t)return[];let e=[];for(let r=0;;r++){let n=t[`linkedExamples.${r}`];if(!n?.links?.self)break;e.push(n.links.self)}if(e.length===0){let r=t.linkedExamples;r?.links?.self&&e.push(r.links.self)}return e}async function _qe(t,e,r){try{let n=new URL(e,t).href,s=await r.authedRealmFetch(n,{method:"GET",headers:{Accept:Ur.CardSource}});if(!s.ok){let i=await s.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${s.status}: ${i.slice(0,300)}`}}return{ok:!0,content:await s.text()}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function Nqe(t){let e=Yg;for(;;){let r=(0,Me.join)(e,"node_modules",t);if((0,jr.existsSync)((0,Me.join)(r,"package.json")))return r;let n=(0,Me.dirname)(e);if(n===e)return;e=n}}function kqe(t){(0,jr.mkdirSync)(t,{recursive:!0});for(let e of Iqe){let r=Nqe(e);if(!r)continue;let n=(0,Me.join)(t,e);(0,jr.mkdirSync)((0,Me.dirname)(n),{recursive:!0}),(0,jr.symlinkSync)(r,n)}}async function Qqe(t,e={}){let r=(0,jr.mkdtempSync)((0,Me.join)((0,ine.tmpdir)(),"boxel-parse-"));try{for(let m of t){let g=Ug(m.path);if(g)throw new Error(g);let E=(0,Me.join)(r,m.path),b=(0,Me.resolve)(E);if(!b.startsWith(r+"/"))throw new Error(`Path "${m.path}" resolves outside the parse workspace and was rejected.`);(0,jr.mkdirSync)((0,Me.dirname)(b),{recursive:!0}),(0,jr.writeFileSync)(b,m.content,"utf8")}let{realmPaths:n,warnings:s}=await Vre({tempDir:r,files:t,prefixes:vqe,origin:e.realmOrigin,fetchFn:e.fetchFn,cacheScope:e.cacheScope,onWarn:m=>Fe.warn(m)}),i=[...s],o={compilerOptions:{target:"es2022",allowJs:!0,moduleResolution:"bundler",allowSyntheticDefaultImports:!0,noEmit:!0,baseUrl:".",module:"es2022",strict:!0,experimentalDecorators:!0,skipLibCheck:!0,noUnusedLocals:!1,noUnusedParameters:!1,allowImportingTsExtensions:!0,types:["qunit-dom"],paths:{...n,"@cardstack/base/*":[`${Zre}/*`],"https://cardstack.com/base/*":[`${Zre}/*`],"@cardstack/runtime-common":[`${ene}/index`],"@cardstack/runtime-common/*":[`${ene}/*`],"@cardstack/bxl":[`${tne}/index`],"@cardstack/bxl/*":[`${tne}/*`],...Yre({glimmerMotion:Eqe,choreo:bqe,choreoPlayer:Cqe}),"@cardstack/host/tests/*":[`${Aqe}/*`],"@cardstack/host/*":[`${vS}/*`],"@cardstack/boxel-host/commands/*":[`${vS}/tools/*`],"@cardstack/boxel-host/tools/*":[`${vS}/tools/*`],"@cardstack/boxel-host/lib/*":[`${vS}/lib/*`],"@cardstack/boxel-ui/*":[`${gqe}/*`],...nne?{"@cardstack/boxel-icons/*":nne}:{},"*":[`${mqe}/*`]}},include:["**/*.ts","**/*.gts","**/*.gjs",`${yqe}/**/*.d.ts`,...rne?[`${rne}/**/*.d.ts`]:[]],exclude:["node_modules",bS]};(0,jr.writeFileSync)((0,Me.join)(r,"tsconfig.json"),JSON.stringify(o,null,2),"utf8"),Ir?kqe((0,Me.join)(r,"node_modules")):(0,jr.symlinkSync)(Sqe,(0,Me.join)(r,"node_modules"));let a=require.resolve("@glint/ember-tsc",{paths:[Yg]}),l=(0,Me.resolve)((0,Me.dirname)(a),".."),c=(0,Me.join)(l,"bin","ember-tsc.js"),{output:u,exitedWithError:p}=await new Promise((m,g)=>{let E=(0,sne.execFile)(process.execPath,[c,"--noEmit","--project",(0,Me.join)(r,"tsconfig.json")],{cwd:r,timeout:12e4,maxBuffer:10485760},(b,I,w)=>{if(b&&!I&&!w){g(new Error(`ember-tsc execution failed: ${b.message}`));return}if(E.killed||b?.killed){g(new Error("ember-tsc was killed (timeout or signal)"));return}m({output:I+w,exitedWithError:!!b})})}),{diagnostics:f,stagedWarning:d,silentSetupFailure:A}=Gre({output:u,exitedWithError:p,tempDir:r,files:t}),h=f.map(m=>({file:m.file,line:m.line,column:m.column,message:Rqe(m)}));if(d&&i.push(d),A){let m=u.slice(0,500).trim();h.push({file:t[0]?.path??"unknown",line:0,column:0,message:`ember-tsc exited with errors but produced no TS diagnostics. Check the tsconfig paths and node_modules symlink. Output: ${m}`})}return{errors:h,warnings:i}}finally{try{(0,jr.rmSync)(r,{recursive:!0,force:!0})}catch{}}}function Rqe(t){let e=t.message;return t.code==="TS1206"&&(e+=" Decorators like @tracked aren't allowed inside a format-class expression (e.g. `static isolated = class { \u2026 }`). Move reactive state into a top-level component that the format class renders."),[e,...t.elaboration].join(`
|
|
2894
|
+
`,"utf8")}var CS=require("node:fs"),SS=require("node:path");function dh(t){let e=t;for(;;){let r=(0,SS.join)(e,"package.json");if((0,CS.existsSync)(r))try{if(JSON.parse((0,CS.readFileSync)(r,"utf8"))?.name==="@cardstack/boxel-cli")return e}catch{}let n=(0,SS.dirname)(e);if(n===e)throw new Error("Could not locate the @cardstack/boxel-cli package root walking up from "+t);e=n}}var oqe=["glimmer-motion","glimmer-motion/layout-group","glimmer-motion/motion-config","glimmer-motion/presence","glimmer-motion/reorder/group","glimmer-motion/reorder/item","glimmer-motion/test-support","@cardstack/choreo","@cardstack/choreo/choreo","@cardstack/choreo/steps","@cardstack/choreo/test-support","@cardstack/choreo/film","@cardstack/choreo/film/clip","@cardstack/choreo/film/film","@cardstack/choreo/film/graph/adjust","@cardstack/choreo/film/graph/host","@cardstack/choreo/film/graph/nodes","@cardstack/choreo/film/joins","@cardstack/choreo/film/overlays","@cardstack/choreo/film/picture","@cardstack/choreo/film/plate","@cardstack/choreo/film/player","@cardstack/choreo/film/rail","@cardstack/choreo/film/titles","@cardstack/choreo-player"];function Yre(t){let e=[["glimmer-motion",t.glimmerMotion],["@cardstack/choreo",t.choreo],["@cardstack/choreo-player",t.choreoPlayer]],r={};for(let n of oqe){let[s,i]=e.find(([a])=>n===a||n.startsWith(`${a}/`)),o=n.slice(s.length+1);r[n]=[`${i}/${o||"index"}`]}return r}var aqe="\0";function DQ(t,e){return`${t}${aqe}${e}`}var Wre="_isCardInstanceFile";var Kre="item.",zre="item.on",Jre=["eq","contains","in","range"];function PQ(t){let e={};for(let[r,n]of Object.entries(t))if(r==="type"||r==="on")e[zre]=n;else if(r==="any"||r==="every"){if(!Array.isArray(n))throw new Error(`filter.${r} must be an array`);e[r]=n.map(s=>PQ(s))}else if(r==="not")e.not=PQ(n);else if(Jre.includes(r)){if(typeof n!="object"||n==null||Array.isArray(n))throw new Error(`filter.${r} must be an object`);e[r]=Object.fromEntries(Object.entries(n).map(([s,i])=>[`${Kre}${s}`,i]))}else if(r==="matches")e.matches=n;else throw new Error(`cannot translate filter member "${r}" to an entry query \u2014 the type anchor is "on"/"type" and field paths live under the ${Jre.join("/")} operators`);return e}function lqe(t){let e={};for(let[r,n]of Object.entries(t))if(r==="by"){if(typeof n!="string")throw new Error('sort entry "by" must be a string');e.by=`${Kre}${n}`}else if(r==="on")e[zre]=n;else if(r==="direction")e.direction=n;else throw new Error(`unknown sort member "${r}"`);return e}function _Q(t,e){let r={fields:{entry:["item"]}};if(e!==void 0&&(r.realms=e),t.filter!==void 0){if(typeof t.filter!="object"||t.filter==null||Array.isArray(t.filter))throw new Error("filter must be an object");r.filter=PQ(t.filter)}if(t.sort!==void 0){if(!Array.isArray(t.sort))throw new Error("sort must be an array");r.sort=t.sort.map(n=>lqe(n))}return t.page!==void 0&&(r.page=t.page),t.cardUrls!==void 0&&(r.cardUrls=t.cardUrls),t.scope!==void 0&&(r.scope=t.scope),r}function NQ(t){let e=new Map;for(let n of t.included??[])(n.type==="card"||n.type==="file-meta")&&e.set(DQ(n.type,n.id),n);let r=[];for(let n of t.data??[]){let s=n.relationships?.item?.data;if(!s)continue;let i=e.get(DQ(s.type,s.id));if(!i)continue;let o=n.meta?._matchRelevance;o!==void 0&&(i={...i,meta:{...i.meta,_matchRelevance:o}}),r.push(i)}return r}var cqe=["https://cardstack.com/base/card-api","@cardstack/base/card-api"],uqe=["BaseDef","CardDef","FieldDef","FileDef"];function pqe(t){if(typeof t!="object"||t==null)return!1;let{module:e,name:r}=t;return typeof e=="string"&&typeof r=="string"&&cqe.includes(e)&&uqe.includes(r)}function IS(t,e=!1){if(typeof t!="object"||t==null||Array.isArray(t))return!1;let r=t;return r.on!=null||r.type!=null?!e&&!pqe(r.on??r.type):r.not!=null?IS(r.not,!e):Array.isArray(r.every)?r.every.some(n=>IS(n,e)):Array.isArray(r.any)?r.any.some(n=>IS(n,e)):!1}function fqe(t){if(t.scope==="cards"||t.scope==="files"||IS(t.filter))return t;let e={eq:{[Wre]:!1}},r=t.filter==null?e:{every:[t.filter,e]};return{...t,filter:r}}async function kQ(t,e,r){let n=r?.profileManager??Re(),s=n.getActiveProfile();if(!s)return{ok:!1,error:ct};let o=`${s.profile.realmServerUrl.replace(/\/$/,"")}/_federated-search`;e=fqe(e);let a=[];for(let c of Array.isArray(t)?t:[t]){let u=dt(c,{profileManager:n});if(!u.ok)return{ok:!1,error:u.error};a.push(ce(u.url))}let l;try{l=_Q(e,a)}catch(c){return{ok:!1,status:0,error:c instanceof Error?c.message:String(c)}}try{let c=await n.authedRealmServerFetch(o,{method:"QUERY",headers:{Accept:"application/vnd.card+json","Content-Type":"application/json"},body:JSON.stringify(l)});if(!c.ok){let p=await c.text();return{ok:!1,status:c.status,error:`HTTP ${c.status}: ${p.slice(0,300)}`}}let u=await c.json();return{ok:!0,status:c.status,data:NQ(u)}}catch(c){return{ok:!1,status:0,error:c instanceof Error?c.message:String(c)}}}function dqe(t){if(t==null||t.trim()==="")return{};let e;try{e=JSON.parse(t)}catch(i){throw new Error(`Invalid JSON in --query: ${i instanceof Error?i.message:String(i)}`)}if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`--query must be a JSON object, got ${Array.isArray(e)?"array":typeof e}`);let r=e,n=r.filter;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length===0){let{filter:i,...o}=r;return o}return r}function Xre(t){t.command("search").description("Federated search across realms using a JSON query").requiredOption("--realm <realm-url>","Realm URL to search (repeatable)",(e,r)=>(r.push(e),r),[]).option("--query <json>","JSON query object (as a string). Omit to list every card in the realm(s).").option("--json","Output raw JSON response").action(async e=>{e.realm.length===0&&(console.error(`${W}Error:${v} At least one --realm is required`),process.exit(1));let r;try{r=dqe(e.query)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1);return}let n;try{n=await kQ(e.realm,r)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1);return}e.json?Fe.output(JSON.stringify(n,null,2)):n.ok?Fe.output(JSON.stringify(n.data??[],null,2)):(console.error(`${te}Status:${v} ${n.status??"(no status)"}`),console.error(`${W}Error:${v} ${n.error}`)),n.ok||process.exit(1)})}var hqe={module:"@cardstack/base/spec",name:"Spec"},xS=[".gts",".gjs",".ts"],Gg=".json",Yg=dh(__dirname),ri=(0,Me.resolve)(Yg,".."),Ir=(()=>{let t=(0,Me.join)(Yg,"bundled-types");if((0,jr.existsSync)((0,Me.join)(t,"base")))return t})(),Zre=Ir?(0,Me.join)(Ir,"base"):(0,Me.join)(ri,"base"),vS=Ir?(0,Me.join)(Ir,"host-app"):(0,Me.join)(ri,"host","app"),Aqe=Ir?(0,Me.join)(Ir,"host-tests"):(0,Me.join)(ri,"host","tests"),mqe=Ir?(0,Me.join)(Ir,"host-types"):(0,Me.join)(ri,"host","types"),gqe=Ir?(0,Me.join)(Ir,"boxel-ui"):(0,Me.join)(ri,"boxel-ui","src"),yqe=Ir?(0,Me.join)(Ir,"local-types"):(0,Me.join)(ri,"local-types"),ene=Ir?(0,Me.join)(Ir,"runtime-common"):(0,Me.join)(ri,"runtime-common"),tne=Ir?(0,Me.join)(Ir,"bxl"):(0,Me.join)(ri,"bxl","src"),Eqe=Ir?(0,Me.join)(Ir,"glimmer-motion"):(0,Me.join)(ri,"glimmer-motion","src"),bqe=Ir?(0,Me.join)(Ir,"choreo"):(0,Me.join)(ri,"choreo","src"),Cqe=Ir?(0,Me.join)(Ir,"choreo-player"):(0,Me.join)(ri,"choreo-player","src"),rne=Ir?(0,Me.join)(Ir,"shims"):void 0,nne=Ir?void 0:[`${(0,Me.join)(ri,"boxel-icons","src","icons")}/*`,`${(0,Me.join)(ri,"boxel-icons","src")}/*`],Sqe=(0,Me.join)(ri,"host","node_modules"),Iqe=(()=>{try{let t=JSON.parse((0,jr.readFileSync)((0,Me.join)(Yg,"package.json"),"utf8"));return Object.keys(t.dependencies??{})}catch{return[]}})(),vqe=["@cardstack/catalog/","@cardstack/skills/","@cardstack/openrouter/","@cardstack/pretui/"];async function xqe(t,e,r={}){let n=r.totalWaitMs??3e4,s=r.pollMs??250,i=Date.now()+n,o=await t();for(;e(o)&&Date.now()<i;)await new Promise(a=>setTimeout(a,s)),o=await t();return o}function wqe(t,e){return t||e.getActiveProfile()?.profile.realmServerUrl}async function Bqe(t,e){let r=!t,n=e?.workspace??(r?process.cwd():void 0);if(r&&n&&!jqe(n))return Vp(`workspace directory not found: ${n}`);let s=e?.profileManager??Re();if(!r&&!s.getActiveProfile())return Vp(ct);if(t){let A=dt(t,{profileManager:s});if(!A.ok)return Vp(A.error);t=A.url}let i=t?ce(t):"",o=Date.now(),a=[],l=[];if(e?.path){let A=e.path,h=Ug(A);if(h)return Vp(h);if(xS.some(m=>A.endsWith(m)))a=[A];else if(A.endsWith(Gg))l=[A];else return Vp(`Path "${A}" is not parseable \u2014 must end with one of ${xS.join(", ")}, or ${Gg}`)}else if(r)try{a=Lqe(n),l=Mqe(n)}catch(A){return Vp(`Failed to walk workspace ${n}: ${A instanceof Error?A.message:String(A)}`)}else try{[a,l]=await Promise.all([Tqe(i,s),Dqe(i,s)])}catch(A){return Vp(`Failed to discover parseable files: ${A instanceof Error?A.message:String(A)}`)}let c=[...a,...l];if(c.length===0)return{status:"passed",filesChecked:0,filesWithErrors:0,errorCount:0,durationMs:Date.now()-o,parseableFiles:[],errors:[],warnings:[]};let u=A=>r?Uqe(n,A):_qe(i,A,s),p=[],f=[],d=new Set;if(a.length>0){let A=[];for(let h of a){let m=await u(h);if(!m.ok){p.push({file:h,line:0,column:0,message:`Could not read ${h}: ${m.error}`}),d.add(h);continue}A.push({path:h,content:m.content})}if(A.length>0)try{let h=await Qqe(A,{realmOrigin:wqe(i,s),fetchFn:(m,g)=>s.authedRealmFetch(m,g),cacheScope:s.getActiveProfile()?.id});f.push(...h.warnings);for(let m of h.errors)p.push(m),d.add(m.file)}catch(h){let m=A[0].path;p.push({file:m,line:0,column:0,message:`Glint check failed: ${h instanceof Error?h.message:String(h)}`}),d.add(m)}}for(let A of l){let h=await u(A);if(!h.ok){p.push({file:A,line:0,column:0,message:`Could not read ${A}: ${h.error}`}),d.add(A);continue}let m=Oqe(A,h.content);for(let g of m)p.push(g),d.add(g.file)}return{status:p.length===0?"passed":"failed",filesChecked:c.length,filesWithErrors:d.size,errorCount:p.length,durationMs:Date.now()-o,parseableFiles:c,errors:p,warnings:f}}async function Tqe(t,e){let r=`${t}_mtimes`,n=await e.authedRealmFetch(r,{method:"GET",headers:{Accept:Ur.Mtimes}});if(!n.ok){let a=await n.text().catch(()=>"(no body)");throw new Error(`_mtimes returned HTTP ${n.status}: ${a.slice(0,300)}`)}let s=await n.json(),i=s?.data?.attributes?.mtimes??s,o=[];for(let a of Object.keys(i)){if(!a.startsWith(t))continue;let l=a.slice(t.length);!l||l.endsWith("/")||xS.some(c=>l.endsWith(c))&&o.push(l)}return o.sort()}async function Dqe(t,e){let r=await xqe(()=>kQ(t,{filter:{type:hqe}},{profileManager:e}),i=>i.ok&&(i.data?.length??0)===0);if(!r.ok)return[];let n=[];for(let i of r.data??[]){let o=i.id;if(!o)continue;let a=i.attributes;if(!a||a.specType==="field")continue;let c=i.relationships,u=Pqe(c),p=new URL(o,t).href,f=[];for(let d of u){let A=new URL(d,p).href;A.startsWith(t)&&f.push(A.slice(t.length))}n.push({specId:o,exampleUrls:f})}let s=[];for(let i of n)for(let o of i.exampleUrls){let a=o.endsWith(Gg)?o:`${o}${Gg}`;s.includes(a)||s.push(a)}return s.sort()}function Pqe(t){if(!t)return[];let e=[];for(let r=0;;r++){let n=t[`linkedExamples.${r}`];if(!n?.links?.self)break;e.push(n.links.self)}if(e.length===0){let r=t.linkedExamples;r?.links?.self&&e.push(r.links.self)}return e}async function _qe(t,e,r){try{let n=new URL(e,t).href,s=await r.authedRealmFetch(n,{method:"GET",headers:{Accept:Ur.CardSource}});if(!s.ok){let i=await s.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${s.status}: ${i.slice(0,300)}`}}return{ok:!0,content:await s.text()}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function Nqe(t){let e=Yg;for(;;){let r=(0,Me.join)(e,"node_modules",t);if((0,jr.existsSync)((0,Me.join)(r,"package.json")))return r;let n=(0,Me.dirname)(e);if(n===e)return;e=n}}function kqe(t){(0,jr.mkdirSync)(t,{recursive:!0});for(let e of Iqe){let r=Nqe(e);if(!r)continue;let n=(0,Me.join)(t,e);(0,jr.mkdirSync)((0,Me.dirname)(n),{recursive:!0}),(0,jr.symlinkSync)(r,n)}}async function Qqe(t,e={}){let r=(0,jr.mkdtempSync)((0,Me.join)((0,ine.tmpdir)(),"boxel-parse-"));try{for(let m of t){let g=Ug(m.path);if(g)throw new Error(g);let E=(0,Me.join)(r,m.path),b=(0,Me.resolve)(E);if(!b.startsWith(r+"/"))throw new Error(`Path "${m.path}" resolves outside the parse workspace and was rejected.`);(0,jr.mkdirSync)((0,Me.dirname)(b),{recursive:!0}),(0,jr.writeFileSync)(b,m.content,"utf8")}let{realmPaths:n,warnings:s}=await Vre({tempDir:r,files:t,prefixes:vqe,origin:e.realmOrigin,fetchFn:e.fetchFn,cacheScope:e.cacheScope,onWarn:m=>Fe.warn(m)}),i=[...s],o={compilerOptions:{target:"es2022",allowJs:!0,moduleResolution:"bundler",allowSyntheticDefaultImports:!0,noEmit:!0,baseUrl:".",module:"es2022",strict:!0,experimentalDecorators:!0,skipLibCheck:!0,noUnusedLocals:!1,noUnusedParameters:!1,allowImportingTsExtensions:!0,types:["qunit-dom"],paths:{...n,"@cardstack/base/*":[`${Zre}/*`],"https://cardstack.com/base/*":[`${Zre}/*`],"@cardstack/runtime-common":[`${ene}/index`],"@cardstack/runtime-common/*":[`${ene}/*`],"@cardstack/bxl":[`${tne}/index`],"@cardstack/bxl/*":[`${tne}/*`],...Yre({glimmerMotion:Eqe,choreo:bqe,choreoPlayer:Cqe}),"@cardstack/host/tests/*":[`${Aqe}/*`],"@cardstack/host/*":[`${vS}/*`],"@cardstack/boxel-host/commands/*":[`${vS}/tools/*`],"@cardstack/boxel-host/tools/*":[`${vS}/tools/*`],"@cardstack/boxel-host/lib/*":[`${vS}/lib/*`],"@cardstack/boxel-ui/*":[`${gqe}/*`],...nne?{"@cardstack/boxel-icons/*":nne}:{},"*":[`${mqe}/*`]}},include:["**/*.ts","**/*.gts","**/*.gjs",`${yqe}/**/*.d.ts`,...rne?[`${rne}/**/*.d.ts`]:[]],exclude:["node_modules",bS]};(0,jr.writeFileSync)((0,Me.join)(r,"tsconfig.json"),JSON.stringify(o,null,2),"utf8"),Ir?kqe((0,Me.join)(r,"node_modules")):(0,jr.symlinkSync)(Sqe,(0,Me.join)(r,"node_modules"));let a=require.resolve("@glint/ember-tsc",{paths:[Yg]}),l=(0,Me.resolve)((0,Me.dirname)(a),".."),c=(0,Me.join)(l,"bin","ember-tsc.js"),{output:u,exitedWithError:p}=await new Promise((m,g)=>{let E=(0,sne.execFile)(process.execPath,[c,"--noEmit","--project",(0,Me.join)(r,"tsconfig.json")],{cwd:r,timeout:12e4,maxBuffer:10485760},(b,I,w)=>{if(b&&!I&&!w){g(new Error(`ember-tsc execution failed: ${b.message}`));return}if(E.killed||b?.killed){g(new Error("ember-tsc was killed (timeout or signal)"));return}m({output:I+w,exitedWithError:!!b})})}),{diagnostics:f,stagedWarning:d,silentSetupFailure:A}=Gre({output:u,exitedWithError:p,tempDir:r,files:t}),h=f.map(m=>({file:m.file,line:m.line,column:m.column,message:Rqe(m)}));if(d&&i.push(d),A){let m=u.slice(0,500).trim();h.push({file:t[0]?.path??"unknown",line:0,column:0,message:`ember-tsc exited with errors but produced no TS diagnostics. Check the tsconfig paths and node_modules symlink. Output: ${m}`})}return{errors:h,warnings:i}}finally{try{(0,jr.rmSync)(r,{recursive:!0,force:!0})}catch{}}}function Rqe(t){let e=t.message;return t.code==="TS1206"&&(e+=" Decorators like @tracked aren't allowed inside a format-class expression (e.g. `static isolated = class { \u2026 }`). Move reactive state into a top-level component that the format class renders."),[e,...t.elaboration].join(`
|
|
2895
2895
|
`)}function Oqe(t,e){let r;try{r=JSON.parse(e)}catch(n){let s=n instanceof Error?n.message:String(n);return[{file:t,line:0,column:0,message:`Invalid JSON: ${s}`}]}return typeof r!="object"||r===null||Array.isArray(r)?[{file:t,line:0,column:0,message:"Card document must be a JSON object"}]:Fqe(t,r)}function Fqe(t,e){let r=[],n=e.data;if(typeof n!="object"||n===null||Array.isArray(n))return r.push({file:t,line:0,column:0,message:'Card document must have a "data" object'}),r;let s=n;typeof s.type!="string"&&r.push({file:t,line:0,column:0,message:'Card document "data.type" must be a string'});let i=s.meta;if(typeof i!="object"||i===null)r.push({file:t,line:0,column:0,message:'Card document must have a "data.meta" object'});else{let o=i.adoptsFrom;typeof o!="object"||o===null?r.push({file:t,line:0,column:0,message:'Card document must have a "data.meta.adoptsFrom" object with "module" and "name"'}):(typeof o.module!="string"&&r.push({file:t,line:0,column:0,message:'"data.meta.adoptsFrom.module" must be a string'}),typeof o.name!="string"&&r.push({file:t,line:0,column:0,message:'"data.meta.adoptsFrom.name" must be a string'}))}return r}function Lqe(t){let e=[];return one(t,r=>{xS.some(n=>r.endsWith(n))&&e.push(r)}),e.sort()}function Mqe(t){let e=[];return one(t,r=>{if(!r.endsWith(Gg))return;let n=r.split("/").pop();n==="tsconfig.json"||n==="package.json"||n==="realm.json"||n==="index.json"||n===".boxel-sync.json"||r.startsWith("Validations/")||e.push(r)}),e.sort()}function one(t,e){let r=(0,Me.resolve)(t),n=s=>{let i;try{i=(0,jr.readdirSync)(s,{withFileTypes:!0})}catch{return}for(let o of i){let a=(0,Me.join)(s,o.name);if(o.isDirectory()){if(o.name==="node_modules"||o.name===".git")continue;n(a)}else if(o.isFile()){let l=(0,Me.relative)(r,a).split(Me.sep).join("/");e(l)}}};n(r)}function Uqe(t,e){let r=(0,Me.join)(t,e),n=(0,Me.resolve)(r);if(!n.startsWith((0,Me.resolve)(t)+"/"))return{ok:!1,error:"path resolves outside workspace"};try{return{ok:!0,content:(0,jr.readFileSync)(n,"utf8")}}catch(s){return{ok:!1,error:s instanceof Error?s.message:String(s)}}}function jqe(t){try{return(0,jr.statSync)(t).isDirectory()}catch{return!1}}function Vp(t){return{status:"error",filesChecked:0,filesWithErrors:0,errorCount:0,durationMs:0,parseableFiles:[],errors:[],warnings:[],errorMessage:t}}function ane(t,e){let r=" ".repeat(t.length);return e.split(`
|
|
2896
2896
|
`).map((n,s)=>s===0||n.trim()===""?n:r+n).join(`
|
|
2897
2897
|
`)}function qqe(t){let e=` error ${t.line}:${t.column} `;return` ${W}error${v} ${t.line}:${t.column} ${ane(e,t.message)}`}function Hqe(t){return`${te}warning${v} ${ane("warning ",t)}`}function lne(t){t.command("parse").description("Type-check .gts / .gjs / .ts files with glint, plus validate the document structure of any .json card instances. Defaults to reading from the current working directory \u2014 the factory's pre-push validator (write files locally, parse, fix, then push). Pass --realm <url> to fetch source from a realm over HTTP instead, or --workspace <dir> to point at a non-cwd directory.").argument("[path]","Optional workspace-relative (default) or realm-relative (with --realm) file path. When omitted, parses every parseable file in the workspace / realm.").option("--realm <realm-url>","Fetch source from this realm over HTTP instead of reading from the workspace.").option("--workspace <dir>","Read source from this directory (default: cwd). Ignored when --realm is set.").option("--json","Output structured JSON result").action(async(e,r)=>{let n;try{n=await Bqe(r.realm,{...e?{path:e}:{},...r.workspace?{workspace:r.workspace}:{}})}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json){Fe.output(JSON.stringify(n,null,2)),n.status!=="passed"&&process.exit(1);return}n.errorMessage&&(console.error(`${W}Error:${v} ${n.errorMessage}`),process.exit(1));for(let i of n.warnings)console.log(Hqe(i));if(n.errors.length===0){console.log(`${te}No parse errors (${n.filesChecked} file(s) checked${n.warnings.length>0?`; ${n.warnings.length} warning(s) above`:""}).${v}`);return}let s;for(let i of n.errors)i.file!==s&&(s=i.file,console.log(`
|
|
2898
2898
|
${te}${i.file}${v}`)),console.log(qqe(i));console.log(`
|
|
2899
|
-
${te}${n.errorCount} error(s) across ${n.filesWithErrors} of ${n.filesChecked} file(s)${v}`),n.errorCount>0&&process.exit(1)})}async function $qe(t,e,r){let n=r?.profileManager??Re();if(!n.getActiveProfile())throw new Error("No active profile. Run `boxel profile add` to create one.");let i=ft(t,{profileManager:n});if(!i.ok)return{ok:!1,error:i.error};t=i.url;let o=new URL(e,ce(t)).href,a;try{a=await n.authedRealmFetch(o,{method:"GET",headers:{Accept:"*/*"}})}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}if(!a.ok){let c=await a.text().catch(()=>"(no body)");return{ok:!1,status:a.status,error:`HTTP ${a.status}: ${c.slice(0,300)}`}}let l=await a.text();return{ok:!0,status:a.status,content:l}}function cne(t){t.command("read-transpiled").description("Debugging tool ONLY for investigating runtime errors in .gts modules you've written. Use when an eval or instantiate error reports a line/column number \u2014 those line numbers refer to the transpiled output, not your .gts source, so fetching the transpiled output is how you locate the offending source construct. Never use the transpiled output as a reference for how to write code: do not copy its patterns (setComponentTemplate, precompileTemplate, wire-format templates, base64 CSS imports) into source. Always write idiomatic Ember / <template>-tag / CardDef source.").argument("<path>","Realm-relative module path. The .gts extension is optional \u2014 the realm accepts either form.").requiredOption("--realm <realm-url>","The realm URL to fetch from").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await $qe(r.realm,e)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}r.json?Fe.output(JSON.stringify(n,null,2)):n.ok?Fe.output(n.content??""):(console.error(`${te}Status:${v} ${n.status??"(no status)"}`),console.error(`${W}Error:${v} ${n.error}`)),n.ok||process.exit(1)})}async function Vqe(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,archived:!1,error:ct};let s=n.profile.realmServerUrl.replace(/\/$/,""),i;try{i=await r.authedRealmServerFetch(`${s}/_archive-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(o){return{realmUrl:e,archived:!1,error:`Failed to reach realm server: ${o instanceof Error?o.message:String(o)}`}}if(!i.ok){let o=await Gqe(i),a=i.status===403?`You do not own this realm and cannot archive it. Server returned 403: ${o}`:`Realm server returned ${i.status}: ${o}`;return{realmUrl:e,archived:!1,error:a}}return{realmUrl:e,archived:!0}}async function Gqe(t){try{return await t.text()}catch{return"<no response body>"}}function une(t){t.command("archive").description("Archive a realm \u2014 hides it from enumeration and stops its indexer (owner-only)").argument("<realm-url>","realm URL to archive").option("-y, --yes","Skip the interactive confirmation prompt").action(async(e,r)=>{let n=ce(e.trim());if(console.log(`Archive target: ${Ye}${n}${v}`),!r.yes){process.stdin.isTTY||(console.error(`${W}Error:${v} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let i=await To("This will archive the realm: it will be hidden from your realm list, sealed for content, and its indexer will stop. You can restore it later with `boxel realm restore`. Proceed? (y/N) ");if(!/^y/i.test(i)){console.log(`${te}Cancelled.${v}`);return}}let s=await Vqe({realmUrl:n});(s.error||!s.archived)&&(console.error(`${W}Error:${v} ${s.error??"Archive did not complete."}`),process.exit(1)),console.log(`${he}Archived:${v} ${Ye}${s.realmUrl}${v}`)})}async function Yqe(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return{ok:!1,error:ct};let s=ft(t,{profileManager:r});if(!s.ok)return{ok:!1,error:s.error};t=s.url;let i=e?.cancelPending??!1,o=`${ce(t)}_cancel-indexing-job`;try{let a=await r.authedRealmFetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({cancelPending:i})});if(!a.ok){let l=await a.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${a.status}: ${l.slice(0,300)}`}}return{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}function pne(t){t.command("cancel-indexing").description("Cancel running indexing jobs for a realm (use --cancel-pending to also cancel queued jobs)").requiredOption("--realm <realm-url>","URL of the realm to cancel indexing for").option("--cancel-pending","Also cancel queued/pending indexing jobs (default: cancel running only)").option("--json","Output raw JSON response").action(async e=>{let r=await Yqe(e.realm,{cancelPending:e.cancelPending});if(e.json)Fe.output(JSON.stringify(r,null,2)),r.ok||process.exit(1);else if(r.ok){let n=e.cancelPending?"running and pending":"running";console.log(`${he}Cancelled ${n} indexing jobs for ${e.realm}${v}`)}else console.error(`${W}Error:${v} ${r.error}`),process.exit(1)})}var Wqe=/^[a-z0-9-]+$/;function dne(t){t.command("create").description("Create a new realm on the realm server").argument("<realm-name>","realm name (lowercase, numbers, hyphens only)").argument("<display-name>","display name for the realm").option("--background <url>","background image URL").option("--icon <url>","icon image URL").action(async(e,r,n)=>{await zqe(e,r,n)})}async function Jqe(t,e,r={}){let n=r.profileManager??Re(),s=n.getActiveProfile();if(!s)throw new Error("No active profile. Run `boxel profile add` to create one.");let i=s.profile.realmServerUrl.replace(/\/$/,""),o={endpoint:t,name:e,backgroundURL:r.background??aS(),iconURL:r.icon??Og(e)??Og(t)},a=await n.authedRealmServerFetch(`${i}/_create-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",attributes:o}})});if(!a.ok){let f;try{f=await a.text()}catch{f="server returned a non-serialized object body"}if(f.includes("[object Object]")&&(f="server returned a non-serialized object body"),f.includes("already exists")){let d=Xqe(f,i,t),A=await fne(n,d);try{await n.addToUserRealms(d)}catch{}return{realmUrl:d,created:!1,realmToken:A}}throw new Error(`Realm server returned ${a.status}: ${f}`)}let c=(await a.json())?.data?.id;if(typeof c!="string"||c.trim()==="")throw new Error(`Realm server response did not include a realm URL (data.id) for "${t}".`);let u=ce(c),p=await fne(n,u);try{await n.addToUserRealms(u)}catch{}return r.waitForReady&&p&&await Kqe(u,p),{realmUrl:u,created:!0,realmToken:p}}async function fne(t,e){try{let r=await t.getOrRefreshServerToken();return await t.fetchAndStoreRealmToken(e,r)}catch{return}}async function Kqe(t,e){let r=new URL("_readiness-check",t).href,n=15e3,s=250,i=Date.now(),o;for(;Date.now()-i<n;){try{let a=await fetch(r,{headers:{Accept:"application/vnd.api+json",Authorization:e}});if(a.ok)return;o=`HTTP ${a.status}`}catch(a){o=a instanceof Error?a.message:String(a)}await new Promise(a=>setTimeout(a,s))}throw new Error(`Timed out waiting for realm ${t} to become ready${o?`: ${o}`:""}`)}async function zqe(t,e,r){Wqe.test(t)||(console.error("Error: realm name must contain only lowercase letters, numbers, and hyphens"),process.exit(1));try{let n=await Jqe(t,e,r),s=n.created?"created":"already exists";console.log(`${he}Realm ${s}:${v} ${Ye}${n.realmUrl}${v}`)}catch(n){console.error(`Error: ${n instanceof Error?n.message:String(n)}`),process.exit(1)}}function Xqe(t,e,r){let n=t.match(/'(https?:\/\/[^']+)'/);if(n)return ce(n[1]);throw new Error(`Could not determine realm URL from server error response for endpoint "${r}" on "${e}". The response did not include an explicit realm URL.`)}var Jg=We(require("fs"));var TS=require("child_process"),ms=We(require("fs/promises")),BS=require("fs"),en=We(require("path"));var Cn=We(require("fs/promises")),Mn=We(require("path")),HQ=We(Sne());var UQ=class{value;next;constructor(e){this.value=e}},Wg=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new UQ(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function jQ(t){let e=!1;if(typeof t=="object"&&({concurrency:t,rejectOnClear:e=!1}=t),Ine(t),typeof e!="boolean")throw new TypeError("Expected `rejectOnClear` to be a boolean");let r=new Wg,n=0,s=()=>{n<t&&r.size>0&&(n++,r.dequeue().run())},i=()=>{n--,s()},o=async(c,u,p)=>{let f=(async()=>c(...p))();u(f);try{await f}catch{}i()},a=(c,u,p,f)=>{let d={reject:p};new Promise(A=>{d.run=A,r.enqueue(d)}).then(o.bind(void 0,c,u,f)),n<t&&s()},l=(c,...u)=>new Promise((p,f)=>{a(c,p,f,u)});return Object.defineProperties(l,{activeCount:{get:()=>n},pendingCount:{get:()=>r.size},clearQueue:{value(){if(!e){r.clear();return}let c=AbortSignal.abort().reason;for(;r.size>0;)r.dequeue().reject(c)}},concurrency:{get:()=>t,set(c){Ine(c),t=c,queueMicrotask(()=>{for(;n<t&&r.size>0;)s()})}},map:{async value(c,u){let p=Array.from(c,(f,d)=>this(u,f,d));return Promise.all(p)}}}),l}function Ine(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var mHe=HQ.default.default||HQ.default,gHe=new Set([]),qQ=1e4,yHe=3e3;function kr(t){let e=t.replace(/\\/g,"/").replace(/^\/+/,"");return gHe.has(e)}async function vne(t){try{return await Cn.access(t),!0}catch{return!1}}function xne(t){try{return decodeURIComponent(t)}catch{return t}}async function wne(t,e){let r=await t.text().catch(()=>""),n=`Failed to upload ${e}: ${t.status} ${t.statusText}${r?` \u2014 ${r.slice(0,200)}`:""}`,s=new Error(n);throw s.status=t.status,s.body=r,s}var Lc={CardSource:"application/vnd.card+source",DirectoryListing:"application/vnd.api+json",Mtimes:"application/vnd.api+json",OctetStream:"application/octet-stream"},EHe=10,bHe=500,Bne=/\.(gts|ts|gjs|js)$/,Tne=new Set(["node_modules"]),ni=class{options;authenticator;normalizedRealmUrl;ignoreCache=new Map;remoteLimit=jQ(EHe);constructor(e,r){this.options=e,this.authenticator=r,this.normalizedRealmUrl=this.normalizeRealmUrl(e.realmUrl)}normalizeRealmUrl(e){try{let r=new URL(e),n=r.pathname;return(n.split("/").filter(Boolean).pop()||"").includes(".")?console.warn(`Warning: "${e}" looks like a file URL, not a realm URL.
|
|
2899
|
+
${te}${n.errorCount} error(s) across ${n.filesWithErrors} of ${n.filesChecked} file(s)${v}`),n.errorCount>0&&process.exit(1)})}async function $qe(t,e,r){let n=r?.profileManager??Re();if(!n.getActiveProfile())throw new Error("No active profile. Run `boxel profile add` to create one.");let i=dt(t,{profileManager:n});if(!i.ok)return{ok:!1,error:i.error};t=i.url;let o=new URL(e,ce(t)).href,a;try{a=await n.authedRealmFetch(o,{method:"GET",headers:{Accept:"*/*"}})}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}if(!a.ok){let c=await a.text().catch(()=>"(no body)");return{ok:!1,status:a.status,error:`HTTP ${a.status}: ${c.slice(0,300)}`}}let l=await a.text();return{ok:!0,status:a.status,content:l}}function cne(t){t.command("read-transpiled").description("Debugging tool ONLY for investigating runtime errors in .gts modules you've written. Use when an eval or instantiate error reports a line/column number \u2014 those line numbers refer to the transpiled output, not your .gts source, so fetching the transpiled output is how you locate the offending source construct. Never use the transpiled output as a reference for how to write code: do not copy its patterns (setComponentTemplate, precompileTemplate, wire-format templates, base64 CSS imports) into source. Always write idiomatic Ember / <template>-tag / CardDef source.").argument("<path>","Realm-relative module path. The .gts extension is optional \u2014 the realm accepts either form.").requiredOption("--realm <realm-url>","The realm URL to fetch from").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await $qe(r.realm,e)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}r.json?Fe.output(JSON.stringify(n,null,2)):n.ok?Fe.output(n.content??""):(console.error(`${te}Status:${v} ${n.status??"(no status)"}`),console.error(`${W}Error:${v} ${n.error}`)),n.ok||process.exit(1)})}async function Vqe(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,archived:!1,error:ct};let s=n.profile.realmServerUrl.replace(/\/$/,""),i;try{i=await r.authedRealmServerFetch(`${s}/_archive-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(o){return{realmUrl:e,archived:!1,error:`Failed to reach realm server: ${o instanceof Error?o.message:String(o)}`}}if(!i.ok){let o=await Gqe(i),a=i.status===403?`You do not own this realm and cannot archive it. Server returned 403: ${o}`:`Realm server returned ${i.status}: ${o}`;return{realmUrl:e,archived:!1,error:a}}return{realmUrl:e,archived:!0}}async function Gqe(t){try{return await t.text()}catch{return"<no response body>"}}function une(t){t.command("archive").description("Archive a realm \u2014 hides it from enumeration and stops its indexer (owner-only)").argument("<realm-url>","realm URL to archive").option("-y, --yes","Skip the interactive confirmation prompt").action(async(e,r)=>{let n=ce(e.trim());if(console.log(`Archive target: ${Ye}${n}${v}`),!r.yes){process.stdin.isTTY||(console.error(`${W}Error:${v} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let i=await To("This will archive the realm: it will be hidden from your realm list, sealed for content, and its indexer will stop. You can restore it later with `boxel realm restore`. Proceed? (y/N) ");if(!/^y/i.test(i)){console.log(`${te}Cancelled.${v}`);return}}let s=await Vqe({realmUrl:n});(s.error||!s.archived)&&(console.error(`${W}Error:${v} ${s.error??"Archive did not complete."}`),process.exit(1)),console.log(`${he}Archived:${v} ${Ye}${s.realmUrl}${v}`)})}async function Yqe(t,e){let r=e?.profileManager??Re();if(!r.getActiveProfile())return{ok:!1,error:ct};let s=dt(t,{profileManager:r});if(!s.ok)return{ok:!1,error:s.error};t=s.url;let i=e?.cancelPending??!1,o=`${ce(t)}_cancel-indexing-job`;try{let a=await r.authedRealmFetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({cancelPending:i})});if(!a.ok){let l=await a.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${a.status}: ${l.slice(0,300)}`}}return{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}function pne(t){t.command("cancel-indexing").description("Cancel running indexing jobs for a realm (use --cancel-pending to also cancel queued jobs)").requiredOption("--realm <realm-url>","URL of the realm to cancel indexing for").option("--cancel-pending","Also cancel queued/pending indexing jobs (default: cancel running only)").option("--json","Output raw JSON response").action(async e=>{let r=await Yqe(e.realm,{cancelPending:e.cancelPending});if(e.json)Fe.output(JSON.stringify(r,null,2)),r.ok||process.exit(1);else if(r.ok){let n=e.cancelPending?"running and pending":"running";console.log(`${he}Cancelled ${n} indexing jobs for ${e.realm}${v}`)}else console.error(`${W}Error:${v} ${r.error}`),process.exit(1)})}var Wqe=/^[a-z0-9-]+$/;function dne(t){t.command("create").description("Create a new realm on the realm server").argument("<realm-name>","realm name (lowercase, numbers, hyphens only)").argument("<display-name>","display name for the realm").option("--background <url>","background image URL").option("--icon <url>","icon image URL").action(async(e,r,n)=>{await zqe(e,r,n)})}async function Jqe(t,e,r={}){let n=r.profileManager??Re(),s=n.getActiveProfile();if(!s)throw new Error("No active profile. Run `boxel profile add` to create one.");let i=s.profile.realmServerUrl.replace(/\/$/,""),o={endpoint:t,name:e,backgroundURL:r.background??aS(),iconURL:r.icon??Og(e)??Og(t)},a=await n.authedRealmServerFetch(`${i}/_create-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",attributes:o}})});if(!a.ok){let f;try{f=await a.text()}catch{f="server returned a non-serialized object body"}if(f.includes("[object Object]")&&(f="server returned a non-serialized object body"),f.includes("already exists")){let d=Xqe(f,i,t),A=await fne(n,d);try{await n.addToUserRealms(d)}catch{}return{realmUrl:d,created:!1,realmToken:A}}throw new Error(`Realm server returned ${a.status}: ${f}`)}let c=(await a.json())?.data?.id;if(typeof c!="string"||c.trim()==="")throw new Error(`Realm server response did not include a realm URL (data.id) for "${t}".`);let u=ce(c),p=await fne(n,u);try{await n.addToUserRealms(u)}catch{}return r.waitForReady&&p&&await Kqe(u,p),{realmUrl:u,created:!0,realmToken:p}}async function fne(t,e){try{let r=await t.getOrRefreshServerToken();return await t.fetchAndStoreRealmToken(e,r)}catch{return}}async function Kqe(t,e){let r=new URL("_readiness-check",t).href,n=15e3,s=250,i=Date.now(),o;for(;Date.now()-i<n;){try{let a=await fetch(r,{headers:{Accept:"application/vnd.api+json",Authorization:e}});if(a.ok)return;o=`HTTP ${a.status}`}catch(a){o=a instanceof Error?a.message:String(a)}await new Promise(a=>setTimeout(a,s))}throw new Error(`Timed out waiting for realm ${t} to become ready${o?`: ${o}`:""}`)}async function zqe(t,e,r){Wqe.test(t)||(console.error("Error: realm name must contain only lowercase letters, numbers, and hyphens"),process.exit(1));try{let n=await Jqe(t,e,r),s=n.created?"created":"already exists";console.log(`${he}Realm ${s}:${v} ${Ye}${n.realmUrl}${v}`)}catch(n){console.error(`Error: ${n instanceof Error?n.message:String(n)}`),process.exit(1)}}function Xqe(t,e,r){let n=t.match(/'(https?:\/\/[^']+)'/);if(n)return ce(n[1]);throw new Error(`Could not determine realm URL from server error response for endpoint "${r}" on "${e}". The response did not include an explicit realm URL.`)}var Jg=We(require("fs"));var TS=require("child_process"),ms=We(require("fs/promises")),BS=require("fs"),en=We(require("path"));var Cn=We(require("fs/promises")),Mn=We(require("path")),HQ=We(Sne());var UQ=class{value;next;constructor(e){this.value=e}},Wg=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new UQ(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function jQ(t){let e=!1;if(typeof t=="object"&&({concurrency:t,rejectOnClear:e=!1}=t),Ine(t),typeof e!="boolean")throw new TypeError("Expected `rejectOnClear` to be a boolean");let r=new Wg,n=0,s=()=>{n<t&&r.size>0&&(n++,r.dequeue().run())},i=()=>{n--,s()},o=async(c,u,p)=>{let f=(async()=>c(...p))();u(f);try{await f}catch{}i()},a=(c,u,p,f)=>{let d={reject:p};new Promise(A=>{d.run=A,r.enqueue(d)}).then(o.bind(void 0,c,u,f)),n<t&&s()},l=(c,...u)=>new Promise((p,f)=>{a(c,p,f,u)});return Object.defineProperties(l,{activeCount:{get:()=>n},pendingCount:{get:()=>r.size},clearQueue:{value(){if(!e){r.clear();return}let c=AbortSignal.abort().reason;for(;r.size>0;)r.dequeue().reject(c)}},concurrency:{get:()=>t,set(c){Ine(c),t=c,queueMicrotask(()=>{for(;n<t&&r.size>0;)s()})}},map:{async value(c,u){let p=Array.from(c,(f,d)=>this(u,f,d));return Promise.all(p)}}}),l}function Ine(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var mHe=HQ.default.default||HQ.default,gHe=new Set([]),qQ=1e4,yHe=3e3;function kr(t){let e=t.replace(/\\/g,"/").replace(/^\/+/,"");return gHe.has(e)}async function vne(t){try{return await Cn.access(t),!0}catch{return!1}}function xne(t){try{return decodeURIComponent(t)}catch{return t}}async function wne(t,e){let r=await t.text().catch(()=>""),n=`Failed to upload ${e}: ${t.status} ${t.statusText}${r?` \u2014 ${r.slice(0,200)}`:""}`,s=new Error(n);throw s.status=t.status,s.body=r,s}var Lc={CardSource:"application/vnd.card+source",DirectoryListing:"application/vnd.api+json",Mtimes:"application/vnd.api+json",OctetStream:"application/octet-stream"},EHe=10,bHe=500,Bne=/\.(gts|ts|gjs|js)$/,Tne=new Set(["node_modules"]),ni=class{options;authenticator;normalizedRealmUrl;ignoreCache=new Map;remoteLimit=jQ(EHe);constructor(e,r){this.options=e,this.authenticator=r,this.normalizedRealmUrl=this.normalizeRealmUrl(e.realmUrl)}normalizeRealmUrl(e){try{let r=new URL(e),n=r.pathname;return(n.split("/").filter(Boolean).pop()||"").includes(".")?console.warn(`Warning: "${e}" looks like a file URL, not a realm URL.
|
|
2900
2900
|
Realm URLs should point to a directory (e.g., ${r.origin}${n.replace(/\/[^/]*\.[^/]*$/,"/")})`):e.endsWith("/")||console.warn(`Warning: Realm URL should end with a trailing slash.
|
|
2901
2901
|
Did you mean "${e}/"?`),r.href.replace(/\/+$/,"")+"/"}catch{throw new Error(`Invalid workspace URL: ${e}`)}}buildDirectoryUrl(e=""){if(!e)return this.normalizedRealmUrl;let r=e.replace(/^\/+|\/+$/g,"");return`${this.normalizedRealmUrl}${r}/`}writeHeaders(e){return this.options.realmEvents===!1?{...e,"X-Boxel-Realm-Events":"none"}:e}buildFileUrl(e){let r=e.replace(/^\/+/,"");return`${this.normalizedRealmUrl}${r}`}async getRemoteFileList(e=""){let r=new Map;try{let n=this.buildDirectoryUrl(e),s=await this.remoteLimit(()=>this.authenticator.authedRealmFetch(n,{headers:{Accept:"application/vnd.api+json"}}));if(!s.ok){if(s.status===404)return r;throw s.status===401||s.status===403?new Error(`Authentication failed (${s.status}): Cannot access workspace. Check your Matrix credentials and workspace permissions.`):new Error(`Failed to get directory listing: ${s.status} ${s.statusText}`)}let i=await s.json();if(i.data&&i.data.relationships){let o=Object.entries(i.data.relationships),a=await Promise.all(o.map(([l,c])=>{let p=c.meta.kind==="file",f=e?Mn.posix.join(e,l):l;return p?this.shouldIgnoreRemoteFile(f)?[]:[[f,!0]]:(async()=>{let d=await this.getRemoteFileList(f);return Array.from(d.entries())})()}));for(let l of a)for(let[c,u]of l)r.set(c,u)}}catch(n){throw n instanceof Error&&(n.message.includes("Authentication failed")||n.message.includes("Cannot access workspace")||n.message.includes("401")||n.message.includes("403"))||console.error(`Error reading remote directory ${e}:`,n),n}return r}async getRemoteMtimes(){let e=new Map;try{let r=`${this.normalizedRealmUrl}_mtimes`,n=await this.authenticator.authedRealmFetch(r,{headers:{Accept:Lc.Mtimes}});if(!n.ok){if(n.status===404)return console.log("Note: _mtimes endpoint not available, will upload all files"),e;throw new Error(`Failed to get mtimes: ${n.status} ${n.statusText}`)}let s=await n.json();if(s.data?.attributes?.mtimes){let i=Object.entries(s.data.attributes.mtimes);process.env.DEBUG&&(console.log(`Remote mtimes received: ${i.length} entries`),i.length>0&&console.log(`Sample: ${i[0][0]} = ${i[0][1]}`));for(let[o,a]of i){let l=o.replace(this.normalizedRealmUrl,""),c;try{c=decodeURIComponent(l)}catch{c=l}this.shouldIgnoreRemoteFile(c)||e.set(c,a)}}else process.env.DEBUG&&console.log("No mtimes in response:",JSON.stringify(s).slice(0,200))}catch(r){console.warn("Could not fetch remote mtimes, will upload all files:",r)}return e}async getLocalFileListWithMtimes(e=""){let r=new Map,n=Mn.join(this.options.localDir,e),s;try{s=await Cn.readdir(n,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return r;throw o}let i=await Promise.all(s.map(async o=>{let a=Mn.join(n,o.name),l=e?Mn.posix.join(e,o.name):o.name;if(o.isDirectory()&&Tne.has(o.name))return[];if(await this.shouldIgnoreFile(l,a))return[];if(o.isFile()){let c=await Cn.stat(a);return[[l,{path:a,mtime:c.mtimeMs}]]}else if(o.isDirectory()){let c=await this.getLocalFileListWithMtimes(l);return Array.from(c.entries())}return[]}));for(let o of i)for(let[a,l]of o)r.set(a,l);return r}async getLocalFileList(e=""){let r=new Map,n=Mn.join(this.options.localDir,e),s;try{s=await Cn.readdir(n,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return r;throw o}let i=await Promise.all(s.map(async o=>{let a=Mn.join(n,o.name),l=e?Mn.posix.join(e,o.name):o.name;if(o.isDirectory()&&Tne.has(o.name))return[];if(await this.shouldIgnoreFile(l,a))return[];if(o.isFile())return[[l,a]];if(o.isDirectory()){let c=await this.getLocalFileList(l);return Array.from(c.entries())}return[]}));for(let o of i)for(let[a,l]of o)r.set(a,l);return r}async uploadFile(e,r){if(kr(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Uploading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would upload ${e}`);return}if(Ta(e)){await this.uploadBinaryFile(e,r),console.log(` Uploaded: ${e}`);return}let n=await Cn.readFile(r,"utf8"),s=this.buildFileUrl(e),i=await this.authenticator.authedRealmFetch(s,{method:"POST",headers:this.writeHeaders({"Content-Type":"text/plain;charset=UTF-8",Accept:Lc.CardSource}),body:n});i.ok||await wne(i,e),console.log(` Uploaded: ${e}`)}async uploadBinaryFile(e,r){let n=await Cn.readFile(r),s=this.buildFileUrl(e),i=await this.authenticator.authedRealmFetch(s,{method:"POST",headers:this.writeHeaders({"Content-Type":Lc.OctetStream}),body:n});i.ok||await wne(i,e)}async uploadFilesAtomic(e,r){let n=Array.from(e.entries()).filter(([u])=>!kr(u));if(n.length===0)return{succeeded:[],unanswered:[]};if(this.options.dryRun){for(let[u]of n)console.log(`[DRY RUN] Would upload ${u}`);return{succeeded:[],unanswered:[]}}let s=[],i=[];for(let u of n)Ta(u[0])?i.push(u):s.push(u);let[o,a]=await Promise.all([this.uploadBinaryBatch(i),this.uploadTextAtomic(s,r)]),l=[...a.succeeded,...o.succeeded],c=a.unanswered;return a.fatal?{succeeded:l,unanswered:c,error:{status:a.fatal.status,perFile:[...a.failed,...o.failed],message:a.fatal.message}}:o.failed.length>0?{succeeded:l,unanswered:c,error:{status:o.failed[0].status,perFile:o.failed,message:`Binary upload failed for ${o.failed.length} file(s)`}}:{succeeded:l,unanswered:c}}async uploadBinaryBatch(e){if(e.length===0)return{succeeded:[],failed:[]};let r=await Promise.allSettled(e.map(([i,o])=>this.remoteLimit(async()=>{try{return await this.uploadBinaryFile(i,o),console.log(` Uploaded: ${i}`),{relativePath:i,ok:!0}}catch(a){let l=a,c=typeof l?.status=="number"?l.status:500,u=a instanceof Error?a.message:String(a);return{relativePath:i,ok:!1,status:c,title:u}}}))),n=[],s=[];for(let i=0;i<r.length;i++){let o=r[i];o.status==="fulfilled"?o.value.ok?n.push(o.value.relativePath):s.push({path:o.value.relativePath,status:o.value.status,title:o.value.title}):s.push({path:e[i][0],status:500,title:String(o.reason)})}return{succeeded:n,failed:s}}async uploadTextAtomic(e,r){let n=this.options.atomicBatchSize??bHe,s=[...e].sort(([o],[a])=>+!Bne.test(o)-+!Bne.test(a)),i=[];for(let o=0;o<s.length;o+=n){let a=s.slice(o,o+n),l=await this.postTextAtomic(a,r);if(i.push(...l.succeeded),l.fatal){let c=s.length-o-a.length,u=l.unanswered?`${a.length} may or may not have been written`:`${a.length} rejected`;return{succeeded:i,unanswered:l.unanswered?a.map(([p])=>p):[],failed:l.failed,fatal:{status:l.fatal.status,message:`${l.fatal.message} (${i.length} of ${s.length} text file(s) written, ${u}, ${c} not sent)`}}}}return{succeeded:i,unanswered:[],failed:[]}}async postTextAtomic(e,r){let n=await Promise.all(e.map(async([c,u])=>{let p=await Cn.readFile(u,"utf8");return{op:r.has(c)?"add":"update",href:this.buildFileUrl(c),data:{type:"source",attributes:{content:p},meta:{}}}})),s=this.options.waitForIndex?`${this.normalizedRealmUrl}_atomic?waitForIndex=true`:`${this.normalizedRealmUrl}_atomic`,i;try{i=await this.authenticator.authedRealmFetch(s,{method:"POST",headers:this.writeHeaders({"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"}),body:JSON.stringify({"atomic:operations":n})})}catch(c){let u=c instanceof Error?c.cause:void 0,p=(c instanceof Error?c.message:String(c))+(u instanceof Error?`: ${u.message}`:"");return{succeeded:[],failed:[],unanswered:!0,fatal:{status:500,message:`Atomic upload failed: ${p}`}}}let o=new Map(e.map(([c])=>[this.buildFileUrl(c),c]));if(i.status===201){let u=(await i.json())["atomic:results"]??[],p;u.length===e.length?p=e.map(([f])=>f):p=u.map(f=>f.data?.id).filter(f=>typeof f=="string").map(f=>o.get(xne(f))).filter(f=>f!==void 0);for(let f of p)console.log(` Uploaded: ${f}`);return{succeeded:p,failed:[]}}let a={};try{a=await i.json()}catch{}let l=(a.errors??[]).map(c=>{let p=(c.detail??"").match(/Resource (\S+) /),f=p?xne(p[1]):"";return{path:o.get(f)??f,status:c.status??i.status,title:c.title??"Error"}});return{succeeded:[],failed:l,fatal:{status:i.status,message:`Atomic upload failed: ${i.status} ${i.statusText}`}}}async downloadFile(e,r){if(console.log(`Downloading: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would download ${e}`);return}let n=this.buildFileUrl(e),s=await this.authenticator.authedRealmFetch(n,{headers:{Accept:Lc.CardSource}});if(!s.ok)throw new Error(`Failed to download: ${s.status} ${s.statusText}`);let i=Mn.dirname(r);await Cn.mkdir(i,{recursive:!0});let o=s.headers.get("content-type");if(o?qg(o):Ta(e)){let l=Buffer.from(await s.arrayBuffer());await Cn.writeFile(r,l)}else{let l=await s.text();await Cn.writeFile(r,l,"utf8")}console.log(` Downloaded: ${e}`)}async deleteFile(e){if(kr(e)){console.log(` Skipped (protected): ${e}`);return}if(console.log(`Deleting remote: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete ${e}`);return}let r=this.buildFileUrl(e),n=Date.now(),s;try{s=await this.authenticator.authedRealmFetch(r,{method:"DELETE",headers:this.writeHeaders({Accept:Lc.CardSource}),signal:AbortSignal.timeout(qQ)})}catch(o){let a=Date.now()-n;if(console.error(` Delete request failed after ${a}ms: ${e}`),o instanceof Error&&(o.name==="TimeoutError"||o.name==="AbortError")){if(await this.verifyDeleteApplied(e)===!0){console.warn(` Delete response timed out after ${qQ}ms, but ${e} is already gone on the realm; continuing`);return}throw new Error(`Timed out deleting ${e} after ${qQ}ms`,{cause:o})}throw o}let i=Date.now()-n;if(console.log(` Delete response for ${e}: ${s.status} ${s.statusText} (${i}ms)`),!s.ok&&s.status!==404)throw new Error(`Failed to delete: ${s.status} ${s.statusText}`);console.log(` Deleted: ${e}`)}async verifyDeleteApplied(e){let r=this.buildFileUrl(e);try{let n=await this.authenticator.authedRealmFetch(r,{headers:{Accept:Lc.CardSource},signal:AbortSignal.timeout(yHe)});return console.warn(` Delete-timeout probe for ${e}: ${n.status} ${n.statusText}`),n.status===404}catch(n){return console.warn(` Delete-timeout probe failed for ${e}:`,n),"unknown"}}async deleteLocalFile(e){if(console.log(`Deleting local: ${e}`),this.options.dryRun){console.log(`[DRY RUN] Would delete local file ${e}`);return}try{await Cn.unlink(e),console.log(` Deleted: ${e}`)}catch(r){if(r.code!=="ENOENT")throw r}}getIgnoreInstance(e){let r=this.ignoreCache.get(e);if(r)return r;let n=(async()=>{let s=mHe(),i=e,o=this.options.localDir;for(;i.startsWith(o);){let a=Mn.join(i,".gitignore");if(await vne(a))try{let u=await Cn.readFile(a,"utf8");s.add(u)}catch(u){console.warn(`Warning: Could not read .gitignore file at ${a}:`,u)}let l=Mn.join(i,".boxelignore");if(await vne(l))try{let u=await Cn.readFile(l,"utf8");s.add(u)}catch(u){console.warn(`Warning: Could not read .boxelignore file at ${l}:`,u)}let c=Mn.dirname(i);if(c===i)break;i=c}return s})();return this.ignoreCache.set(e,n),n}async shouldIgnoreFile(e,r){let n=Mn.basename(e);if(n===".boxel-sync.json"||n.startsWith("."))return!0;let s=Mn.dirname(r),i=await this.getIgnoreInstance(s),o=e.replace(/\\/g,"/");return i.ignores(o)}shouldIgnoreRemoteFile(e){return!!Mn.basename(e).startsWith(".")}};async function $Q(t){try{return await ms.access(t),!0}catch{return!1}}var tn=class t{workspaceDir;gitDir;constructor(e){this.workspaceDir=en.resolve(e),this.gitDir=en.join(this.workspaceDir,".boxel-history")}async init(){await $Q(this.gitDir)||await ms.mkdir(this.gitDir,{recursive:!0});let e=en.join(this.gitDir,".git");await $Q(e)||(await this.git("init"),await this.git("config","user.email","boxel-cli@local"),await this.git("config","user.name","Boxel CLI"),await this.git("commit","--allow-empty","-m","[init] Initialize checkpoint history"))}async isInitialized(){return $Q(en.join(this.gitDir,".git"))}async hasCommits(){return(await this.spawnGit(["rev-parse","--verify","--quiet","HEAD"],r=>r===1)).trim().length>0}async syncFilesToHistory(){let e=await this.getWorkspaceFiles(),r=new Set(e),n=await this.getHistoryFiles();await Promise.all(n.map(async s=>{if(!r.has(s)){let i=en.join(this.gitDir,s);try{await ms.unlink(i)}catch(o){if(o.code!=="ENOENT")throw o}}})),await Promise.all(e.map(async s=>{let i=en.join(this.workspaceDir,s),o=en.join(this.gitDir,s),a=en.dirname(o);await ms.mkdir(a,{recursive:!0}),await ms.copyFile(i,o)}))}async getWorkspaceFiles(){let e=[],r=async(n,s="")=>{let i;try{i=await ms.readdir(n,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(i.map(async o=>{if(o.name===".boxel-history"||o.name===".boxel-sync.json"||o.name==="node_modules"||o.name.startsWith("."))return;let a=s?`${s}/${o.name}`:o.name;o.isDirectory()?await r(en.join(n,o.name),a):e.push(a)}))};return await r(this.workspaceDir),e}async getHistoryFiles(){let e=[],r=async(n,s="")=>{let i;try{i=await ms.readdir(n,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;throw o}await Promise.all(i.map(async o=>{if(o.name===".git")return;let a=s?`${s}/${o.name}`:o.name;o.isDirectory()?await r(en.join(n,o.name),a):e.push(a)}))};return await r(this.gitDir),e}async detectCurrentChanges(){if(!await this.isInitialized())return(await this.getWorkspaceFiles()).map(s=>({file:s,status:"added"}));await this.syncFilesToHistory();let e=(await this.git("status","--porcelain")).replace(/\n+$/,"");if(!e)return[];let r=[];for(let n of e.split(`
|
|
2902
2902
|
`)){if(!n)continue;let s=n.substring(0,2),i=n.substring(3);if(s.includes("R")){let o=i.indexOf(" -> ");if(o!==-1){let a=i.substring(0,o),l=i.substring(o+4);r.push({file:a,status:"deleted"}),r.push({file:l,status:"added"});continue}}s.includes("D")?r.push({file:i,status:"deleted"}):s.includes("A")||s.includes("C")||s==="??"?r.push({file:i,status:"added"}):(s.includes("M")||s.includes("U")||s.includes("T"))&&r.push({file:i,status:"modified"})}return r}async createCheckpoint(e,r,n){if(await this.isInitialized()||await this.init(),await this.syncFilesToHistory(),await this.git("add","-A"),!(await this.git("status","--porcelain")).trim())return null;let i=this.classifyChanges(r),{message:o,description:a}=n?{message:n,description:""}:this.generateCommitMessage(e,r,i),l=i?"[MAJOR]":"[minor]",c=`[${e}]`,u=`${l} ${c} ${o}${a?`
|
|
@@ -2914,8 +2914,8 @@ ${Ys}Checkpoint History${v}
|
|
|
2914
2914
|
`);let n=String(t.length).length;t.forEach((s,i)=>{let o=i+1,a=`${te}${String(o).padStart(n," ")}${v}`,l=s.isMajor?`${ot}[MAJOR]${v}`:`${te}[minor]${v}`,c=s.isMilestone?`${ot}\u2B50${v} ${Bo}[${s.milestoneName}]${v} `:"";console.log(`${a} ${ot}${s.shortHash}${v} ${c}${xHe(s.source)} ${l} ${s.message} ${te}(${s.filesChanged} files)${v}`),console.log(` ${te}${Pne(s.date)}${v}
|
|
2915
2915
|
`)}),e&&console.log(`${te}Showing first ${r} checkpoints. Pass --limit <n> to see more.${v}`),console.log(`${te}Restore: boxel realm history <local-dir> -r <ref>${v}`)}function BHe(t){if(t===void 0)return Dne;if(!/^\d+$/.test(t))return null;let e=parseInt(t,10);return e>0?e:null}function Gp(t){console.error(`${W}Error:${v} ${t}`),process.exit(1)}function _ne(t){t.command("history").alias("hist").description("View, restore, or create local checkpoints stored under .boxel-history/").argument("<local-dir>","The local workspace directory").option("-r, --restore <ref>","Restore the workspace to a checkpoint (1-based index, short hash, or full hash)").option("-m, --message <message>","Create a manual checkpoint with the given message").option("-y, --yes","Skip the interactive confirmation prompt before --restore").option("--limit <n>",`Maximum number of checkpoints to list or consider for --restore (default: ${Dne})`).action(async(e,r)=>{r.restore!==void 0&&r.message!==void 0&&Gp("Only one of --restore or --message may be specified.");let n=BHe(r.limit);if(n===null&&Gp("--limit must be a positive integer."),r.message!==void 0){let i=await SHe(e,r.message);i.ok||Gp(i.error),console.log(`${he}\u2713${v} Checkpoint created: ${ot}${i.created.shortHash}${v} ${i.created.message}`);return}if(r.restore!==void 0){let i=await IHe(e,r.restore,n);i.ok||Gp(i.error);let o=i.target;if(!r.yes){process.stdin.isTTY||Gp("--restore overwrites local files. Pass --yes to confirm in non-interactive mode."),console.log(`
|
|
2916
2916
|
${Ys}Restoring to:${v} ${ot}${o.shortHash}${v} - ${o.message}`),console.log(`${te}${Pne(o.date)}${v}
|
|
2917
|
-
`);let l=await To(`${ot}This will overwrite current files. Continue? (y/N) ${v}`);if(!/^y/i.test(l)){console.log(`${te}Restore cancelled.${v}`);return}}let a=await vHe(e,o.hash);a.ok||Gp(a.error),console.log(`${he}\u2713${v} Restored to ${ot}${o.shortHash}${v} ${o.message}`),console.log(`${te}Run 'boxel realm sync <local-dir> <realm-url> --prefer-local' to push the restored state to the realm.${v}`);return}let s=await CHe(e,n);s.ok||Gp(s.error),wHe(s.checkpoints,s.truncated,n)})}var Nne=100;async function THe(t,e={}){let r=e.profileManager??Re();if(!r.getActiveProfile())return{ok:!1,error:ct};let s=
|
|
2918
|
-
Checkpoint created: ${r.shortHash} ${n} ${r.message}`)}}catch(r){console.warn(`Warning: failed to create checkpoint: ${r instanceof Error?r.message:String(r)}`)}}};function LHe(t){try{let e=JSON.parse(t);return e&&typeof e=="object"?e:null}catch{return null}}async function MHe(t,e,r){t=t.replace(/\/$/,"");let n=r.profileManager??Re(),s=
|
|
2917
|
+
`);let l=await To(`${ot}This will overwrite current files. Continue? (y/N) ${v}`);if(!/^y/i.test(l)){console.log(`${te}Restore cancelled.${v}`);return}}let a=await vHe(e,o.hash);a.ok||Gp(a.error),console.log(`${he}\u2713${v} Restored to ${ot}${o.shortHash}${v} ${o.message}`),console.log(`${te}Run 'boxel realm sync <local-dir> <realm-url> --prefer-local' to push the restored state to the realm.${v}`);return}let s=await CHe(e,n);s.ok||Gp(s.error),wHe(s.checkpoints,s.truncated,n)})}var Nne=100;async function THe(t,e={}){let r=e.profileManager??Re();if(!r.getActiveProfile())return{ok:!1,error:ct};let s=dt(t,{profileManager:r});if(!s.ok)return{ok:!1,error:s.error};t=s.url;let i=`${ce(t)}_indexing-errors`;try{let o=await r.authedRealmFetch(i,{method:"GET",headers:{Accept:Ur.JSONAPI}});if(!o.ok){let l=await o.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${o.status}: ${l.slice(0,300)}`}}return{ok:!0,document:await o.json()}}catch(o){return{ok:!1,error:o instanceof Error?o.message:String(o)}}}function YQ(t){let e=t.replace(/\s+/g," ").trim();return e.length<=Nne?e:`${e.slice(0,Nne-1)}\u2026`}function DHe(t){return t?YQ(t.title??t.message??"<no message>"):"<no error document>"}function kne(t){t.command("indexing-errors").description("List every card or module in a realm whose latest indexing attempt errored").requiredOption("--realm <realm-url>","The realm URL to query").option("--json","Output the full JSON-API document").action(async e=>{let r=await THe(e.realm,{});if(e.json){r.ok||(Fe.output(JSON.stringify({error:r.error},null,2)),console.error(`${W}Error:${v} ${r.error}`),process.exit(1)),Fe.output(JSON.stringify(r.document??{data:[]},null,2));return}r.ok||(console.error(`${W}Error:${v} ${r.error}`),process.exit(1));let n=r.document?.data??[];if(n.length===0){console.log(`${he}No indexing errors.${v}`);return}console.log(`${he}${n.length} indexing finding${n.length===1?"":"s"} for ${e.realm}:${v}`);for(let s of n)console.log(PHe(s))})}function PHe(t){let e=`[${t.attributes.entryType}]`,r=t.attributes.url;return t.type==="indexing-error"?`${e} ${r} ${DHe(t.attributes.errorDoc)}`:t.type==="frontmatter-error"?`${e} ${r} ${NHe(t.attributes.frontmatterParseError)}`:t.type==="tool-schema-error"?`${e} ${r} ${_He(t.attributes.toolSchemaErrors)}`:`${e} ${r} ${kHe(t.attributes.brokenLinks)}`}var VQ=3;function _He(t){if(!t||t.length===0)return"<no tool schema errors>";let e=t.slice(0,VQ).map(n=>{let s=YQ(n.message??"<no message>");return`${n.module||n.name?`${n.module}#${n.name}`:"<tool with no codeRef>"}: ${s}`}).join("; "),r=t.length>VQ?`; \u2026+${t.length-VQ} more`:"";return`${t.length} tool schema failure${t.length===1?"":"s"}: ${e}${r}`}function NHe(t){if(!t)return"<no frontmatter error>";let e=typeof t.line=="number"?` (line ${t.line}${typeof t.column=="number"?`:${t.column}`:""})`:"",r=YQ(t.message??"<no message>");return`frontmatter parse error${e}: ${r}`}var GQ=3;function kHe(t){if(!t||t.length===0)return"<no broken links>";let e=t.slice(0,GQ).map(n=>`${n.fieldName}\u2192${n.reference}`).join(", "),r=t.length>GQ?`, \u2026+${t.length-GQ} more`:"";return`${t.length} broken: ${e}${r}`}var Rne=We(require("path"));var One="application/vnd.card+json",Qne=[".gts",".gjs",".ts",".js"],QHe="https://cardstack.com/base/spec";function WQ(t){return t.replace(/\.(gts|gjs|ts|js)$/,"")}function RHe(t){let e=new Set,r=/\bfrom\s*['"]([^'"]+)['"]/g,n=/\bimport\s*['"]([^'"]+)['"]/g,s;for(;s=r.exec(t);)e.add(s[1]);for(;s=n.exec(t);)e.add(s[1]);return[...e]}function OHe(t){let e;try{e=JSON.parse(t)}catch{return[]}let r=e?.data?.relationships;if(!r||typeof r!="object")return[];let n=[];for(let s of Object.values(r)){let i=s?.links?.self;typeof i=="string"&&i&&n.push(i)}return n}function FHe(t){let e=new Set,r=/\bexport\s+(?:default\s+)?(?:abstract\s+)?class\s+(\w+)\s+extends\b/g,n;for(;n=r.exec(t);)e.add(n[1]);return[...e]}function JQ(t,e,r,n){let s;if(t.startsWith(".")||t.startsWith("/")){let o=new URL(t,e).href;if(!o.startsWith(r))return null;s=o.slice(r.length).replace(/^\/+/,"")}else if(/^https?:\/\//.test(t)){if(!t.startsWith(r))return null;s=t.slice(r.length).replace(/^\/+/,"")}else if(t.startsWith("@")){let o=new URL(r).pathname.replace(/^\/+/,""),a=o?t.indexOf(o):-1;if(a<0)return null;s=t.slice(a+o.length).replace(/^\/+/,"")}else return null;let i=Qne.some(o=>s.endsWith(o))?[s]:[s,...Qne.map(o=>s+o)];for(let o of i)if(n.has(o))return o;return null}var KQ=class extends ni{hasError=!1;copiedFiles=[];cardUrl;sourceCache=new Map;constructor(e,r){super(e,r),this.cardUrl=e.cardUrl}get realmRoot(){return this.normalizedRealmUrl}relToAbs(e){return this.realmRoot+e.replace(/^\/+/,"")}toRel(e){return e.startsWith(this.realmRoot)?e.slice(this.realmRoot.length).replace(/^\/+/,""):e}relativize(e){if(e.startsWith(this.realmRoot))return e.slice(this.realmRoot.length).replace(/^\/+/,"");let r=new URL(this.realmRoot).pathname.replace(/^\/+/,""),n=r?e.indexOf(r):-1;return n>=0?e.slice(n+r.length).replace(/^\/+/,""):e.replace(/^\/+/,"")}refToRel(e,r){return/^https?:\/\//.test(e)||e.startsWith("@")?this.relativize(e):new URL(e,`https://_/${r}`).pathname.replace(/^\/+/,"")}async fetchText(e){if(this.sourceCache.has(e))return this.sourceCache.get(e);let r=await this.authenticator.authedRealmFetch(this.buildFileUrl(e),{headers:{Accept:Lc.CardSource}}),n=r.ok?await r.text():null;return this.sourceCache.set(e,n),n}async sync(){let e=this.cardUrl,r=new Set((await this.getRemoteMtimes()).keys());if(r.size===0)throw new Error(`Source realm ${this.realmRoot} returned no files (check the URL and your access).`);let n=new Set,s=await this.resolveEntry(e,r),i=await this.crawlModules(s.moduleRels,r);for(let l of i)n.add(l);for(let l of i){let c=l.replace(/\.(gts|gjs|ts|js)$/,".test.$1");c!==l&&r.has(c)&&n.add(c)}let o;if(s.instanceRels.length>0)o=await this.crawlInstanceLinks(s.instanceRels,r);else{let l=s.moduleRels.map(c=>this.relToAbs(c));o=await this.findEntryInstances(i,l,r)}for(let l of o)n.add(l);let a=await this.findCardSpecs(i,r);for(let l of a)n.add(l);if(n.size===0)throw new Error(`Nothing to ingest for ${e}.`);await this.downloadAll([...n],r),await this.writeCheckpoint()}async resolveEntry(e,r){let n=this.toRel(e.replace(/\/$/,"")),s=n.endsWith(".json")?n:`${n}.json`;if(r.has(s)){let o=await this.fetchText(s),a=o!=null?LHe(o)?.data?.meta?.adoptsFrom?.module:void 0;if(a){let l=JQ(a,this.relToAbs(s),this.realmRoot,r);return{moduleRels:l?[l]:[],instanceRels:[s]}}}let i=JQ(e,this.realmRoot,this.realmRoot,r);if(!i)throw new Error(`Could not resolve ${e} to a module or instance in ${this.realmRoot}.`);return{moduleRels:[i],instanceRels:[]}}async crawlModules(e,r){let n=new Set,s=[...e];for(;s.length;){let i=s.shift();if(n.has(i))continue;n.add(i);let o=await this.fetchText(i);if(o!=null)for(let a of RHe(o)){let l=JQ(a,this.relToAbs(i),this.realmRoot,r);l&&!n.has(l)&&s.push(l)}}return n}async findEntryInstances(e,r,n){let s=new Set;for(let i of e){let o=this.relToAbs(i);if(!r.includes(o))continue;let a=await this.fetchText(i);if(a!=null)for(let l of FHe(a)){let c=await this.searchCards({filter:{type:{module:WQ(o),name:l}}});for(let u of c){let p=this.cardIdToInstanceRel(u.id);p&&n.has(p)&&s.add(p)}}}return s}async crawlInstanceLinks(e,r){let n=new Set,s=[...e];for(;s.length;){let i=s.shift();if(n.has(i))continue;n.add(i);let o=await this.fetchText(i);if(o!=null)for(let a of OHe(o)){let l=this.resolveLinkedInstanceRel(a,i,r);l&&!n.has(l)&&s.push(l)}}return n}resolveLinkedInstanceRel(e,r,n){let s;if(e.startsWith("@"))s=this.relativize(e);else{let o=/^https?:\/\//.test(e)?e:new URL(e,this.relToAbs(r)).href;if(!o.startsWith(this.realmRoot))return null;s=o.slice(this.realmRoot.length).replace(/^\/+/,"")}let i=s.endsWith(".json")?s:`${s}.json`;return n.has(i)?i:null}async findCardSpecs(e,r){let n=new Set,s=new Set([...e].map(WQ)),i=await this.searchCards({filter:{type:{module:QHe,name:"Spec"}}});for(let o of i){let a=o.attributes??{},l=a.specType;if(l!=="card"&&l!=="app")continue;let c=a.ref;if(!c?.module||!o.id)continue;let u=WQ(this.refToRel(c.module,this.relativize(o.id)));if(!s.has(u))continue;let p=this.cardIdToInstanceRel(o.id);p&&r.has(p)&&n.add(p)}return n}async searchCards(e){let r=await this.authenticator.authedRealmFetch(`${this.realmRoot}_search`,{method:"QUERY",headers:{Accept:One,"Content-Type":"application/json"},body:JSON.stringify(_Q(e))});if(!r.ok){this.hasError=!0;let s=await r.text().catch(()=>"");return console.warn(` search failed: HTTP ${r.status} ${r.statusText}`.trimEnd()+(s?` \u2014 ${s.slice(0,300)}`:"")),[]}let n=await r.json();return NQ(n)}cardIdToInstanceRel(e){if(!e)return null;let r=this.relativize(e);return r?r.endsWith(".json")?r:`${r}.json`:null}async downloadAll(e,r){let n=await Promise.all(e.map(s=>this.remoteLimit(async()=>{try{return await this.downloadFile(s,Rne.join(this.options.localDir,s)),s}catch(i){return this.hasError=!0,console.error(`Error downloading ${s}:`,i),null}})));this.copiedFiles=n.filter(s=>s!==null)}async writeCheckpoint(){if(this.options.dryRun||this.copiedFiles.length===0)return;let e=this.copiedFiles.map(r=>({file:r,status:"modified"}));try{let r=await new tn(this.options.localDir).createCheckpoint("remote",e,`Ingest card: ${this.copiedFiles.length} files`);if(r){let n=r.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
2918
|
+
Checkpoint created: ${r.shortHash} ${n} ${r.message}`)}}catch(r){console.warn(`Warning: failed to create checkpoint: ${r instanceof Error?r.message:String(r)}`)}}};function LHe(t){try{let e=JSON.parse(t);return e&&typeof e=="object"?e:null}catch{return null}}async function MHe(t,e,r){t=t.replace(/\/$/,"");let n=r.profileManager??Re(),s=dt(t,{profileManager:n});if(!s.ok)return{files:[],error:s.error};if(t=s.url,r.realm){let l=dt(r.realm,{profileManager:n});if(!l.ok)return{files:[],error:l.error};r={...r,realm:l.url}}let i=Ln({realmUrl:r.realm??t,realmSecretSeed:r.realmSecretSeed,profileManager:n,authenticator:r.authenticator});if(!i.ok)return{files:[],error:i.error};let o=i.authenticator,a=r.realm?ce(r.realm):void 0;if(!a){try{let c=(await o.authedRealmFetch(t,{headers:{Accept:One}})).headers.get("x-boxel-realm-url");c&&(a=ce(c))}catch{}if(!a)return{files:[],error:`Could not determine the source realm for ${t}. Pass --realm <source-realm-url>.`}}try{let l=new KQ({realmUrl:a,localDir:e,dryRun:r.dryRun,cardUrl:t},o);return console.log(`Ingesting ${t}
|
|
2919
2919
|
from realm ${a}
|
|
2920
2920
|
into ${e}`),await l.sync(),console.log(`
|
|
2921
2921
|
Ingested ${l.copiedFiles.length} file(s).`),{files:l.copiedFiles.sort(),error:l.hasError?"Ingest completed with errors \u2014 some files may be missing.":void 0}}catch(l){return{files:[],error:`Ingest failed: ${l instanceof Error?l.message:String(l)}`}}}function Fne(t){t.command("ingest-card").description("Copy a card from a source realm into a local directory, bundling the deps that live in the card's own realm: the module, the modules it imports from the same realm, its sample instances, and its Catalog Spec. Imports that resolve to the base realm or other realms are left as references (they resolve at runtime). Works across realms; source and target must be on the same realm server.").argument("<source-card-url>","Absolute URL of the source card module (or a card instance) to ingest").argument("<local-dir>","The local directory to write the card + deps into").option("--realm <url>","Source realm URL (defaults to the realm the card belongs to)").option("--dry-run","Show what would be copied without writing files").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0),i=await MHe(e,r,{realm:n.realm,dryRun:n.dryRun,realmSecretSeed:s});i.error&&(console.error(`Error: ${i.error}`),process.exit(i.files.length>0?2:1)),console.log("Ingest completed successfully")})}var UHe="--all-accessible and --hidden are mutually exclusive";async function jHe(t={}){if(t.allAccessible&&t.hidden)return{realms:[],error:UHe};let e=t.profileManager??Re(),r=e.getActiveProfile();if(!r)return{realms:[],error:ct};let n=r.profile.realmServerUrl.replace(/\/$/,""),s=await e.authedRealmServerFetch(`${n}/_realm-auth?include-public=true`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!s.ok){let u=await s.text();return{realms:[],error:`Realm auth lookup failed: ${s.status} ${u}`}}let i=await s.json(),o=Object.keys(i).map(ce),a;try{a=await e.getUserRealms()}catch(u){return{realms:[],error:`Failed to load UI realm list: ${u instanceof Error?u.message:String(u)}`}}let l=new Set(a.map(ce)),c=o.map(u=>({url:u,hidden:!l.has(u),archived:!1}));if(t.allAccessible||(t.hidden?c=c.filter(u=>u.hidden):c=c.filter(u=>!u.hidden)),t.includeArchived){let u=await e.authedRealmServerFetch(`${n}/_archived-realms`,{method:"GET",headers:{Accept:"application/vnd.api+json"}});if(!u.ok){let A=await u.text();return{realms:[],error:`Archived realms lookup failed: ${u.status} ${A}`}}let f=((await u.json()).data??[]).map(A=>A?.id?ce(A.id):null).filter(A=>A!==null),d=new Set(c.map(A=>A.url));for(let A of f)d.has(A)||(c.push({url:A,hidden:!l.has(A),archived:!0}),d.add(A))}return c.sort((u,p)=>u.url.localeCompare(p.url)),{realms:c}}function Lne(t){t.command("list").alias("ls").description("List realms accessible to the active profile").option("--json","Output JSON").option("--all-accessible","Show all accessible realms, including hidden ones").option("--hidden","Show only realms not in the user's UI realm list").option("--include-archived","Also list realms the caller owns that have been archived").action(async e=>{let r;try{r=await jHe({allAccessible:e.allAccessible,hidden:e.hidden,includeArchived:e.includeArchived})}catch(n){console.error(`${W}Error:${v} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}if(e.json){console.log(JSON.stringify(r,null,2)),r.error&&process.exit(1);return}if(r.error&&(console.error(`${W}Error:${v} ${r.error}`),process.exit(1)),r.realms.length===0){console.log(`${te}No realms found.${v}`);return}console.log(`${Ys}${r.realms.length} realm(s):${v}`);for(let n of r.realms){let s=[];n.archived&&s.push("archived"),n.hidden&&!n.archived&&s.push("hidden");let i=s.length?` ${te}(${s.join(", ")})${v}`:"";console.log(` ${Ye}${n.url}${v}${i}`)}})}var NS=We(require("fs"));var zQ=100;function kS(t){return t instanceof Error?t.message:String(t)}function qHe(t){let e=Date.now()-t.getTime(),r=Math.floor(e/6e4),n=Math.floor(r/60),s=Math.floor(n/24);return s>7?`${t.toLocaleDateString()} ${t.toLocaleTimeString()}`:s>0?`${s} day${s===1?"":"s"} ago`:n>0?`${n} hour${n===1?"":"s"} ago`:r>0?`${r} minute${r===1?"":"s"} ago`:"just now"}async function Mne(t,e,r){try{let n=new tn(t);if(!await n.isInitialized())return{ok:!1,error:"No checkpoint history found for this workspace. Checkpoints are created automatically during sync operations."};let s=await n.getCheckpoints(r),i=DS(e,s);if(i.kind==="none")return{ok:!1,error:`Checkpoint not found: ${e}. Use a number (1-${s.length}) or a commit hash.`};if(i.kind==="ambiguous"){let o=i.matches.slice(0,5).map(l=>l.shortHash).join(", "),a=i.matches.length>5?", \u2026":"";return{ok:!1,error:`Ambiguous reference: ${e} matches ${i.matches.length} checkpoints (${o}${a}). Use a longer prefix or full hash.`}}return{ok:!0,target:i.target}}catch(n){return{ok:!1,error:`Failed to read checkpoints: ${kS(n)}`}}}async function HHe(t){if(!NS.existsSync(t))return{ok:!1,error:`Directory not found: ${t}`};try{let e=new tn(t);return await e.isInitialized()?{ok:!0,milestones:await e.getMilestones()}:{ok:!0,milestones:[]}}catch(e){return{ok:!1,error:`Failed to read milestones: ${kS(e)}`}}}async function $He(t,e,r,n){if(!NS.existsSync(t))return{ok:!1,error:`Directory not found: ${t}`};let s=r.trim();if(!s)return{ok:!1,error:"--name must not be empty."};let i=await Mne(t,e,n);if(!i.ok)return i;try{let o=new tn(t);if(!await o.markMilestone(i.target.hash,s))return{ok:!1,error:"Could not mark milestone. The checkpoint may already have one."};let c=(await o.getCheckpoints(n)).find(u=>u.hash===i.target.hash);return c?{ok:!0,marked:c}:{ok:!1,error:"Milestone created but checkpoint could not be re-read."}}catch(o){return{ok:!1,error:`Failed to mark milestone: ${kS(o)}`}}}async function VHe(t,e,r){if(!NS.existsSync(t))return{ok:!1,error:`Directory not found: ${t}`};let n=await Mne(t,e,r);if(!n.ok)return n;let s=n.target;if(!s.isMilestone)return{ok:!1,error:`Checkpoint ${s.shortHash} is not marked as a milestone.`};try{return{ok:!0,removed:await new tn(t).unmarkMilestone(s.hash)}}catch(i){return{ok:!1,error:`Failed to remove milestone: ${kS(i)}`}}}async function GHe(t,e={}){if(e.mark!==void 0&&e.remove!==void 0)return{ok:!1,error:"Only one of --mark or --remove may be specified."};if(e.limit!==void 0&&(!Number.isInteger(e.limit)||e.limit<=0))return{ok:!1,error:"limit must be a positive integer."};let r=e.limit??zQ;if(e.mark!==void 0){if(e.name===void 0)return{ok:!1,error:"--name is required when using --mark."};let s=await $He(t,e.mark,e.name,r);return s.ok?{ok:!0,marked:s.marked}:{ok:!1,error:s.error}}if(e.remove!==void 0){let s=await VHe(t,e.remove,r);return s.ok?{ok:!0,removed:s.removed}:{ok:!1,error:s.error}}let n=await HHe(t);return n.ok?{ok:!0,milestones:n.milestones}:{ok:!1,error:n.error}}function YHe(t,e){if(t.length===0){console.log(`
|
|
@@ -2929,8 +2929,8 @@ Exposed ${e.written.length} realm skill(s) to Claude Code in ${r}:`);for(let n o
|
|
|
2929
2929
|
`)}function C$e(t){if(typeof t!="object"||t===null)return!1;let e=t;if(e.version!==rse||typeof e.realms!="object"||e.realms===null)return!1;for(let r of Object.values(e.realms)){if(typeof r!="object"||r===null)return!1;let n=r;if(!Array.isArray(n.entries)||!n.entries.every(s=>typeof s=="string"))return!1}return!0}async function S$e(t){try{return(await Sn.stat(t)).isDirectory()}catch{return!1}}async function nse(t){try{return await Sn.lstat(t),!0}catch{return!1}}var RS=We(require("fs/promises")),sse=We(require("path")),eR=class extends ni{hasError=!1;downloadedFiles=[];pullOptions;constructor(e,r){super(e,r),this.pullOptions=e}async sync(){console.log(`Starting pull from ${this.options.realmUrl} to ${this.options.localDir}`),console.log("Testing realm access...");try{await this.getRemoteFileList("")}catch(a){throw console.error("Failed to access realm:",a),new Error("Cannot proceed with pull: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[e,r]=await Promise.all([this.getRemoteFileList(),this.getLocalFileList()]);if(console.log(`Found ${e.size} files in remote realm`),console.log(`Found ${r.size} files in local directory`),this.options.dryRun)try{await RS.access(this.options.localDir)}catch{console.log(`[DRY RUN] Would create directory: ${this.options.localDir}`)}else await RS.mkdir(this.options.localDir,{recursive:!0});let n=new Set;if(this.pullOptions.deleteLocal)for(let a of r.keys())e.has(a)||n.add(a);let s=new tn(this.options.localDir);if(n.size>0&&!this.options.dryRun){let a=Array.from(n).map(c=>({file:c,status:"deleted"})),l=await s.createCheckpoint("remote",a,`Pre-delete checkpoint: ${n.size} files not on server`);l&&console.log(`
|
|
2930
2930
|
Checkpoint created before deletion: ${l.shortHash}`)}let i=await Promise.all(Array.from(e.keys()).map(a=>this.remoteLimit(async()=>{try{let l=sse.join(this.options.localDir,a);return await this.downloadFile(a,l),a}catch(l){return this.hasError=!0,console.error(`Error downloading ${a}:`,l),null}})));this.downloadedFiles=i.filter(a=>a!==null);let o=[];if(n.size>0&&(console.log(`
|
|
2931
2931
|
Deleting ${n.size} local files that don't exist in realm...`),o=(await Promise.all(Array.from(n).map(async l=>{try{let c=r.get(l);return c?(await this.deleteLocalFile(c),console.log(` Deleted: ${l}`),l):null}catch(c){return this.hasError=!0,console.error(`Error deleting local file ${l}:`,c),null}}))).filter(l=>l!==null)),!this.options.dryRun&&this.downloadedFiles.length+o.length>0){let a=[...this.downloadedFiles.map(c=>({file:c,status:"modified"})),...o.map(c=>({file:c,status:"deleted"}))],l=await s.createCheckpoint("remote",a);if(l){let c=l.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
2932
|
-
Checkpoint created: ${l.shortHash} ${c} ${l.message}`)}}await mh({realmUrl:this.normalizedRealmUrl,localDir:this.options.localDir,dryRun:this.options.dryRun,enabled:this.pullOptions.claudeSkills}),console.log("Pull completed")}};function ise(t){t.command("pull").description("Pull files from a Boxel realm to a local directory").argument("<realm-url>","The URL of the source realm (e.g., https://app.boxel.ai/demo/)").argument("<local-dir>","The local directory to sync files to").option("--delete","Delete local files that do not exist in the realm").option("--dry-run","Show what would be done without making changes").option("--no-claude-skills","Skip mirroring the realm's skills/ directory into the checkout's .claude/skills/ (env: BOXEL_DISABLE_CLAUDE_SKILLS_SYNC=1)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0),i=await I$e(e,r,{delete:n.delete,dryRun:n.dryRun,claudeSkills:n.claudeSkills,realmSecretSeed:s});i.error&&(console.error(`Error: ${i.error}`),process.exit(i.files.length>0?2:1)),console.log("Pull completed successfully")})}async function I$e(t,e,r){let n=
|
|
2933
|
-
Checkpoint created: ${d.shortHash} ${A} ${d.message}`)}}console.log("Push completed")}};function use(t){t.command("push").description("Push local files to a Boxel realm").argument("<local-dir>","The local directory containing files to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--delete","Delete remote files that do not exist locally").option("--dry-run","Show what would be done without making changes").option("--force","Upload all files, even if unchanged").option("--changed-since <revision>","Upload only files that differ from this git revision (one the realm already holds), plus files git does not track and files missing from the realm, instead of comparing against the sync manifest. Repeat it to name every revision the realm may hold part of, such as one a failed sync stopped partway through; a file is skipped only when it matches all of them. A file edited directly on the realm stays as it is until it changes in git. The local directory must be a git checkout whose history reaches each revision",(e,r=[])=>[...r,e]).option("--no-realm-events","Index the pushed changes without announcing them to open tabs, which pick them up on their next load (for deploys)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0);await w$e(e,r,{delete:n.delete,dryRun:n.dryRun,force:n.force,realmEvents:n.realmEvents,changedSince:n.changedSince,realmSecretSeed:s})})}async function w$e(t,e,r){let n=ft(e,{profileManager:r.profileManager});n.ok||(console.error(`Error: ${n.error}`),process.exit(1)),e=n.url;let s=Ln({realmUrl:e,realmSecretSeed:r.realmSecretSeed,profileManager:r.profileManager,authenticator:r.authenticator});s.ok||(console.error(`Error: ${s.error}`),process.exit(1));let i=s.authenticator;await gh(t)||(console.error(`Local directory does not exist: ${t}`),process.exit(1));let o=r.changedSince?.length?r.changedSince:void 0;r.force&&o!==void 0&&(console.error("Error: --force uploads every file and --changed-since uploads only changed ones; pass one of them."),process.exit(1));try{let a=new sR({realmUrl:e,localDir:t,deleteRemote:r.delete,dryRun:r.dryRun,force:r.force,realmEvents:r.realmEvents,atomicBatchSize:r.atomicBatchSize,changedSince:o},i);await a.sync(),a.hasError?(console.log("Push did not complete successfully. View logs for details"),process.exit(2)):console.log("Push completed successfully")}catch(a){console.error("Push failed:",a),process.exit(1)}}async function pse(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:ct};let s;try{s=await r.getUserRealms()}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:`Failed to load realm list: ${f instanceof Error?f.message:String(f)}`}}let i=s.map(ce),o=i.length,a=i.filter(f=>f===e).length;if(a===0)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,notInList:!0,error:"Realm is not in app.boxel.realms. Nothing to remove."};let l=o-a;if(t.dryRun)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:l};let c=n.profile.realmServerUrl.replace(/\/$/,""),u;try{u=await r.authedRealmServerFetch(`${c}/_delete-realm`,{method:"DELETE",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:`Failed to reach realm server: ${f instanceof Error?f.message:String(f)}`}}if(!u.ok){let f=await B$e(u),d=u.status===403?`You do not own this realm and cannot delete it on the server. Server returned 403: ${f}`:`Realm server returned ${u.status}: ${f}`;return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:d}}let p;try{p=await r.removeFromUserRealms(e)}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:`Server delete succeeded, but Matrix unlink failed: ${f instanceof Error?f.message:String(f)}`}}return p?{realmUrl:e,removed:!0,serverDeleted:!0,unlinked:p,previousCount:o,nextCount:l}:{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:"Server delete succeeded, but Matrix account_data did not contain the URL by the time we PUT (concurrent edit?). Server-side files are gone; please refresh and check your realm list."}}async function B$e(t){try{return await t.text()}catch{return"<no response body>"}}function fse(t){t.command("remove").description("Remove a realm \u2014 deletes server-side files and unlinks it from your realm list").argument("<realm-url>","realm URL to remove").option("-y, --yes","Skip the interactive confirmation prompt").option("--dry-run","Preview the change without writing to Matrix").action(async(e,r)=>{let n=ce(e.trim()),s=await pse({realmUrl:n,dryRun:!0});if(s.error&&!s.notInList&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1)),s.notInList&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1)),console.log(`Remove target: ${Ye}${s.realmUrl}${v}`),console.log(`${te}app.boxel.realms: ${s.previousCount} -> ${s.nextCount}${v}`),r.dryRun){console.log(`${te}[DRY RUN] No server delete or Matrix changes sent.${v}`);return}if(!r.yes){process.stdin.isTTY||(console.error(`${W}Error:${v} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let o=await To("This will permanently delete the realm files, indexer state, and registry entry on the server. Proceed? (y/N) ");if(!/^y/i.test(o)){console.log(`${te}Cancelled.${v}`);return}}let i=await pse({realmUrl:n});(i.error||!i.removed)&&(console.error(`${W}Error:${v} ${i.error??"Removal did not complete."}`),i.serverDeleted&&!i.unlinked&&console.error(`${te}The realm is gone, but your account_data still references ${i.realmUrl}.${v}`),process.exit(1)),console.log(`${he}Removed:${v} ${Ye}${i.realmUrl}${v}`)})}async function T$e(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,restored:!1,error:ct};let s=n.profile.realmServerUrl.replace(/\/$/,""),i;try{i=await r.authedRealmServerFetch(`${s}/_unarchive-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(o){return{realmUrl:e,restored:!1,error:`Failed to reach realm server: ${o instanceof Error?o.message:String(o)}`}}if(!i.ok){let o=await D$e(i),a=i.status===403?`You do not own this realm and cannot restore it. Server returned 403: ${o}`:`Realm server returned ${i.status}: ${o}`;return{realmUrl:e,restored:!1,error:a}}return{realmUrl:e,restored:!0}}async function D$e(t){try{return await t.text()}catch{return"<no response body>"}}function dse(t){t.command("restore").description("Restore a previously archived realm and trigger a full reindex (owner-only)").argument("<realm-url>","realm URL to restore").action(async e=>{let r=ce(e.trim()),n=await T$e({realmUrl:r});(n.error||!n.restored)&&(console.error(`${W}Error:${v} ${n.error??"Restore did not complete."}`),process.exit(1)),console.log(`${he}Restored:${v} ${Ye}${n.realmUrl}${v}`)})}var yh=We(require("fs/promises")),Xg=We(require("path"));function OS(t,e,r){let n=e.has(t),s=r?.files[t]!==void 0;return n&&s?e.get(t)===r.files[t]?"unchanged":"changed":n&&!s?"added":!n&&s?"deleted":"unchanged"}function FS(t,e,r){let n=e.has(t),s=r?.remoteMtimes?.[t]!==void 0,i=r?.files[t]!==void 0,o=s||i;return n&&s?e.get(t)===r.remoteMtimes[t]?"unchanged":"changed":n&&i?"changed":n&&!o?"added":!n&&o?"deleted":"unchanged"}function hse(t,e,r){return t==="unchanged"&&e==="unchanged"?"noop":t==="changed"&&e==="unchanged"?"push":t==="unchanged"&&e==="changed"?"pull":t==="added"&&e==="unchanged"?"push":t==="unchanged"&&e==="added"?"pull":t==="changed"&&e==="changed"||t==="added"&&e==="added"||t==="changed"&&e==="added"||t==="added"&&e==="changed"?"conflict":t==="deleted"&&e==="unchanged"?r.deleteSync||r.preferLocal?"push-delete":"noop":t==="unchanged"&&e==="deleted"?r.deleteSync||r.preferRemote?"pull-delete":"noop":t==="deleted"&&e==="changed"||t==="changed"&&e==="deleted"?"conflict":t==="deleted"&&e==="deleted"?"noop":t==="added"&&e==="deleted"?"push":t==="deleted"&&e==="added"?"pull":"noop"}function Ase(t,e,r,n){let{localStatus:s,remoteStatus:i,relativePath:o}=t;if(!n)return null;switch(n){case"prefer-local":return s==="deleted"?"push-delete":"push";case"prefer-remote":return i==="deleted"?"pull-delete":"pull";case"prefer-newest":{if(s==="deleted"&&i==="changed")return"pull";if(s==="changed"&&i==="deleted")return"push";let a=e.get(o),l=r.get(o);return a&&l!==void 0?a.mtime>l*1e3?"push":"pull":"push"}}}var P$e=new Set(["node_modules",".git",".boxel-history",".cache",".vscode","dist","build","tmp"]),_$e=6;function N$e(t,e){return t==="unchanged"&&e==="unchanged"||t==="deleted"&&e==="deleted"?null:t==="unchanged"&&e==="added"?"new-remote":t==="unchanged"&&e==="changed"?"modified-remote":t==="unchanged"&&e==="deleted"?"deleted-remote":t==="added"&&e==="unchanged"?"new-local":t==="changed"&&e==="unchanged"?"modified-local":t==="deleted"&&e==="unchanged"?"deleted-local":t==="changed"&&e==="changed"||t==="added"&&e==="added"||t==="changed"&&e==="added"||t==="added"&&e==="changed"||t==="changed"&&e==="deleted"||t==="deleted"&&e==="changed"?"conflict":t==="added"&&e==="deleted"?"new-local":t==="deleted"&&e==="added"?"new-remote":null}var iR=class extends ni{changes=[];pulled=[];hasError=!1;error;remoteMtimes=new Map;statusOptions;loadedManifest;constructor(e,r,n){super(e,n),this.statusOptions=e,this.loadedManifest=r}async sync(){let e,r;try{[e,this.remoteMtimes,r]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),this.getRemoteFileList()])}catch(o){this.hasError=!0,this.error=o instanceof Error?`Failed to fetch realm state: ${o.message}`:`Failed to fetch realm state: ${String(o)}`;return}if(r&&this.remoteMtimes.size===0&&r.size>0)for(let[o]of r)this.remoteMtimes.set(o,0);let n=new Map;for(let[o,a]of e)n.set(o,a.path);let s=new Map;await Promise.all(Array.from(n.entries()).map(async([o,a])=>{kr(o)||s.set(o,await si(a))}));let i=new Set;for(let o of n.keys())i.add(o);for(let o of this.remoteMtimes.keys())i.add(o);for(let o of Object.keys(this.loadedManifest.files))i.add(o);if(this.loadedManifest.remoteMtimes)for(let o of Object.keys(this.loadedManifest.remoteMtimes))i.add(o);for(let o of i){if(kr(o))continue;let a=OS(o,s,this.loadedManifest),l=FS(o,this.remoteMtimes,this.loadedManifest),c=N$e(a,l);c!==null&&this.changes.push({file:o,status:c})}this.changes.sort((o,a)=>o.file.localeCompare(a.file)),this.statusOptions.pull&&await this.performSafePull()}async performSafePull(){let e=this.changes.filter(n=>n.status==="new-remote"||n.status==="modified-remote");if(e.length===0)return;let r=[];for(let n of e){let s=Xg.join(this.options.localDir,n.file);try{await this.downloadFile(n.file,s),this.pulled.push(n.file);let i=await si(s);this.loadedManifest.files[n.file]=i;let o=this.remoteMtimes.get(n.file);o!==void 0&&(this.loadedManifest.remoteMtimes=this.loadedManifest.remoteMtimes??{},this.loadedManifest.remoteMtimes[n.file]=o)}catch(i){this.hasError=!0;let o=i instanceof Error?i.message:String(i);r.push({file:n.file,message:o}),console.error(` ${W}\u2717 ${n.file}${v} (${o})`)}}r.length>0&&(this.error=`Failed to pull ${r.length} file(s): ${r.map(n=>`${n.file} (${n.message})`).join("; ")}`),this.pulled.length>0&&await Mc(this.options.localDir,this.loadedManifest)}};async function mse(t,e){let r={localDir:t,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!1},n=Xg.join(t,".boxel-sync.json");if(!await gh(n))return{...r,hasError:!0,error:`No .boxel-sync.json found in ${t}. Run: boxel realm sync ${t} <realm-url>`};let s=await Da(t);if(!s)return{...r,hasError:!0,error:`Malformed .boxel-sync.json in ${t}`};let i;try{i=(await yh.stat(n)).mtimeMs}catch{}let o=Ln({realmUrl:s.realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager,authenticator:e.authenticator});if(!o.ok)return{...r,realmUrl:s.realmUrl,manifestMtime:i,hasError:!0,error:o.error};let a=o.authenticator,l=new iR({realmUrl:s.realmUrl,localDir:t,pull:e.pull},s,a);return await l.sync(),{localDir:t,realmUrl:s.realmUrl,manifestMtime:i,changes:l.changes,pulled:l.pulled.slice().sort(),inSync:!l.hasError&&l.changes.length===0,hasError:l.hasError,error:l.error}}async function k$e(t,e){let r=[];async function n(s,i){if(i>e)return;let o;try{o=await yh.readdir(s,{withFileTypes:!0})}catch{return}if(o.some(l=>l.isFile()&&l.name===".boxel-sync.json")){r.push(s);return}for(let l of o)l.isDirectory()&&(P$e.has(l.name)||await n(Xg.join(s,l.name),i+1))}return await n(t,0),r.sort(),r}async function Q$e(t,e){if(e.pull)return{rootDir:t,workspaces:[],hasError:!0,error:"Cannot use --pull with --all"};let r=process.env.BOXEL_STATUS_ALL_MAX_DEPTH,n=r!==void 0?Number(r):NaN,s=Number.isFinite(n)&&n>=0?n:_$e,i=await k$e(t,s),o=[],a=!1;for(let l of i){let c=Xg.join(l,".boxel-sync.json"),u;try{u=await yh.readFile(c,"utf8")}catch{o.push({localDir:l,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"no-manifest"}),a=!0;continue}let p;try{p=JSON.parse(u)}catch{p=void 0}if(!rR(p)){o.push({localDir:l,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"malformed"}),a=!0;continue}let f=await mse(l,{profileManager:e.profileManager,realmSecretSeed:e.realmSecretSeed,authenticator:e.authenticator}),d={...f};f.hasError&&(d.skipped="fetch-failed",a=!0),o.push(d)}return{rootDir:t,workspaces:o,hasError:a}}function R$e(t){if(t.hasError&&t.error){console.error(`${W}Error:${v} ${t.error}`);return}if(console.log(`Realm: ${t.realmUrl}`),console.log(`Local: ${t.localDir}`),t.manifestMtime&&console.log(`${te}Manifest updated:${v} ${new Date(t.manifestMtime).toISOString()}`),console.log(""),t.changes.length===0){console.log(`${he}\u2713 In sync${v}`);return}let e={"new-remote":[],"modified-remote":[],"new-local":[],"modified-local":[],conflict:[],"deleted-local":[],"deleted-remote":[]};for(let r of t.changes)e[r.status].push(r.file);if(e["new-remote"].length>0){console.log(`${Ye}\u2193 New on remote (${e["new-remote"].length}):${v}`);for(let r of e["new-remote"])console.log(` + ${r}`);console.log("")}if(e["modified-remote"].length>0){console.log(`${Ye}\u2193 Modified on remote (${e["modified-remote"].length}):${v}`);for(let r of e["modified-remote"])console.log(` ~ ${r}`);console.log("")}if(e["new-local"].length>0){console.log(`${he}\u2191 New locally (${e["new-local"].length}):${v}`);for(let r of e["new-local"])console.log(` + ${r}`);console.log("")}if(e["modified-local"].length>0){console.log(`${he}\u2191 Modified locally (${e["modified-local"].length}):${v}`);for(let r of e["modified-local"])console.log(` ~ ${r}`);console.log("")}if(e.conflict.length>0){console.log(`${ot}\u26A0 Conflicts (${e.conflict.length}):${v}`);for(let r of e.conflict)console.log(` ! ${r}`);console.log("")}if(e["deleted-local"].length>0){console.log(`${W}- Deleted locally (${e["deleted-local"].length}):${v}`);for(let r of e["deleted-local"])console.log(` - ${r}`);console.log("")}if(e["deleted-remote"].length>0){console.log(`${W}- Deleted on remote (${e["deleted-remote"].length}):${v}`);for(let r of e["deleted-remote"])console.log(` - ${r}`);console.log("")}if(t.pulled.length>0){console.log(`${Ye}Pulled ${t.pulled.length} file(s):${v}`);for(let r of t.pulled)console.log(` \u2713 ${r}`)}}function O$e(t){if(t.error){console.error(`${W}Error:${v} ${t.error}`);return}if(t.workspaces.length===0){console.log(`No .boxel-sync.json directories found under ${t.rootDir}.`);return}for(let e of t.workspaces){if(e.skipped){console.log(`${ot}${e.localDir}${v} [${e.skipped}]`),e.error&&console.log(` ${te}${e.error}${v}`),console.log("");continue}let r={newRemote:0,modRemote:0,newLocal:0,modLocal:0,conflict:0,delLocal:0,delRemote:0};for(let n of e.changes)n.status==="new-remote"?r.newRemote++:n.status==="modified-remote"?r.modRemote++:n.status==="new-local"?r.newLocal++:n.status==="modified-local"?r.modLocal++:n.status==="conflict"?r.conflict++:n.status==="deleted-local"?r.delLocal++:n.status==="deleted-remote"&&r.delRemote++;if(console.log(`${e.localDir} ${te}${e.realmUrl}${v}`),e.inSync)console.log(` ${he}\u2713 in sync${v}`);else{let n=[];r.newRemote>0&&n.push(`${Ye}\u2193+${r.newRemote}${v}`),r.modRemote>0&&n.push(`${Ye}\u2193~${r.modRemote}${v}`),r.newLocal>0&&n.push(`${he}\u2191+${r.newLocal}${v}`),r.modLocal>0&&n.push(`${he}\u2191~${r.modLocal}${v}`),r.conflict>0&&n.push(`${ot}\u26A0${r.conflict}${v}`),r.delLocal>0&&n.push(`${W}-L${r.delLocal}${v}`),r.delRemote>0&&n.push(`${W}-R${r.delRemote}${v}`),console.log(` ${n.join(" ")}`)}console.log("")}}function gse(t){t.command("status").aliases(["st"]).description("Show pending changes between a local sync dir and its realm").argument("[local-dir]","Local sync directory (defaults to current working directory)").option("--pull","Download safe remote changes and update manifest").option("--all","Recursively report all .boxel-sync.json dirs under the current directory").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r)=>{let n=await mr(r.realmSecretSeed===!0);if(r.all){r.pull&&(console.error(`${W}Error:${v} Cannot use --pull with --all`),process.exit(1));let i=await Q$e(e??process.cwd(),{all:!0,realmSecretSeed:n});O$e(i),i.hasError&&process.exit(2);return}let s=await mse(e??process.cwd(),{pull:r.pull,realmSecretSeed:n});R$e(s),s.hasError&&process.exit(s.pulled.length>0?2:1)})}var oR=We(require("path"));var aR=class extends ni{hasError=!1;pushedFiles=[];pulledFiles=[];remoteDeletedFiles=[];localDeletedFiles=[];skippedConflicts=[];uploadFatalMessage;syncOptions;constructor(e,r){super(e,r),this.syncOptions=e}get conflictStrategy(){return this.syncOptions.preferLocal?"prefer-local":this.syncOptions.preferRemote?"prefer-remote":this.syncOptions.preferNewest?"prefer-newest":null}async sync(){console.log(`Starting sync between ${this.options.localDir} and ${this.options.realmUrl}`),console.log("Testing realm access...");let e;try{e=await this.getRemoteFileList("")}catch(g){throw console.error("Failed to access realm:",g),new Error("Cannot proceed with sync: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[r,n,s]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),Da(this.options.localDir)]),i=new Map;for(let[g,E]of r)i.set(g,E.path);if(n.size===0&&e&&e.size>0){console.log("Remote mtimes unavailable, falling back to file listing for remote detection");for(let[g]of e)n.set(g,0)}console.log(`Found ${i.size} local files`),console.log(`Found ${n.size} remote files`),s&&s.realmUrl!==this.normalizedRealmUrl&&console.warn(`${ot}Warning:${v} Manifest realm URL (${s.realmUrl}) differs from target (${this.normalizedRealmUrl}). Treating as first sync.`);let o=s&&s.realmUrl===this.normalizedRealmUrl?s:null,a=new Map;await Promise.all(Array.from(i.entries()).map(async([g,E])=>{kr(g)||a.set(g,await si(E))}));let l=new Set;for(let g of i.keys())l.add(g);for(let g of n.keys())l.add(g);if(o){for(let g of Object.keys(o.files))l.add(g);if(o.remoteMtimes)for(let g of Object.keys(o.remoteMtimes))l.add(g)}let c=[];for(let g of l){if(kr(g))continue;let E=OS(g,a,o),b=FS(g,n,o),I=hse(E,b,this.syncOptions);c.push({relativePath:g,localStatus:E,remoteStatus:b,action:I})}let u=[],p=[],f=[],d=[],A=[],h=0;for(let g of c)switch(g.action){case"push":u.push(g.relativePath);break;case"pull":p.push(g.relativePath);break;case"push-delete":f.push(g.relativePath);break;case"pull-delete":d.push(g.relativePath);break;case"conflict":A.push(g);break;case"noop":h++;break}for(let g of A)switch(Ase(g,r,n,this.conflictStrategy)){case"push":u.push(g.relativePath);break;case"pull":p.push(g.relativePath);break;case"push-delete":f.push(g.relativePath);break;case"pull-delete":d.push(g.relativePath);break;case"noop":break;default:this.skippedConflicts.push(g.relativePath);break}if(console.log(`
|
|
2932
|
+
Checkpoint created: ${l.shortHash} ${c} ${l.message}`)}}await mh({realmUrl:this.normalizedRealmUrl,localDir:this.options.localDir,dryRun:this.options.dryRun,enabled:this.pullOptions.claudeSkills}),console.log("Pull completed")}};function ise(t){t.command("pull").description("Pull files from a Boxel realm to a local directory").argument("<realm-url>","The URL of the source realm (e.g., https://app.boxel.ai/demo/)").argument("<local-dir>","The local directory to sync files to").option("--delete","Delete local files that do not exist in the realm").option("--dry-run","Show what would be done without making changes").option("--no-claude-skills","Skip mirroring the realm's skills/ directory into the checkout's .claude/skills/ (env: BOXEL_DISABLE_CLAUDE_SKILLS_SYNC=1)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0),i=await I$e(e,r,{delete:n.delete,dryRun:n.dryRun,claudeSkills:n.claudeSkills,realmSecretSeed:s});i.error&&(console.error(`Error: ${i.error}`),process.exit(i.files.length>0?2:1)),console.log("Pull completed successfully")})}async function I$e(t,e,r){let n=dt(t,{profileManager:r.profileManager});if(!n.ok)return{files:[],error:n.error};t=n.url;let s=Ln({realmUrl:t,realmSecretSeed:r.realmSecretSeed,profileManager:r.profileManager,authenticator:r.authenticator});if(!s.ok)return{files:[],error:s.error};let i=s.authenticator;try{let o=new eR({realmUrl:t,localDir:e,deleteLocal:r.delete,dryRun:r.dryRun,claudeSkills:r.claudeSkills},i);return await o.sync(),o.hasError?{files:o.downloadedFiles.sort(),error:"Pull completed with errors. Some files may not have been downloaded."}:{files:o.downloadedFiles.sort()}}catch(o){return{files:[],error:`Pull failed: ${o instanceof Error?o.message:String(o)}`}}}var Yp=We(require("fs/promises")),tR=We(require("path")),ose=We(require("crypto"));function rR(t){if(typeof t!="object"||t===null)return!1;let e=t;if(typeof e.realmUrl!="string"||typeof e.files!="object"||e.files===null)return!1;for(let r of Object.values(e.files))if(typeof r!="string")return!1;if(e.remoteMtimes!==void 0){if(typeof e.remoteMtimes!="object"||e.remoteMtimes===null)return!1;for(let r of Object.values(e.remoteMtimes))if(typeof r!="number")return!1}return!0}async function gh(t){try{return await Yp.access(t),!0}catch{return!1}}async function si(t){let e=await Yp.readFile(t);return ose.createHash("md5").update(e).digest("hex")}async function Da(t){let e=tR.join(t,".boxel-sync.json"),r;try{r=await Yp.readFile(e,"utf8")}catch(s){if(s.code==="ENOENT")return null;throw s}let n;try{n=JSON.parse(r)}catch{return null}return rR(n)?n:(console.warn("Warning: .boxel-sync.json is malformed or has an unexpected shape; falling back to a full upload."),null)}async function Mc(t,e){let r=tR.join(t,".boxel-sync.json");await Yp.writeFile(r,JSON.stringify(e,null,2))}var lse=require("child_process"),v$e=64*1024*1024;function nR(t,e){return new Promise((r,n)=>{(0,lse.execFile)("git",e,{cwd:t,maxBuffer:v$e,encoding:"utf8"},(s,i,o)=>{if(s){n(new Error(`git ${e.join(" ")} failed: ${(o||s.message).trim()}`));return}r(i)})})}function ase(t){return t.split("\0").filter(Boolean)}async function cse(t,e){if(e.startsWith("-"))throw new Error(`"${e}" is not a git revision`);let r;try{r=(await nR(t,["rev-parse","--verify","--quiet",`${e}^{commit}`])).trim()}catch(o){throw new Error(`${e} is not a commit in the git repository at ${t}. Check that ${t} is a git checkout and that its history reaches ${e} (a shallow CI checkout needs a deeper fetch). ${o instanceof Error?o.message:String(o)}`)}let[n,s]=await Promise.all([nR(t,["ls-files","-v","--cached","-z"]),nR(t,["diff","--name-only","--no-renames","--relative","-z",r,"--"])]),i=new Set(ase(s));return new Set(ase(n).filter(o=>o.startsWith("H ")).map(o=>o.slice(2)).filter(o=>!i.has(o)))}var x$e=new Set(["index.json","realm.json"]),sR=class extends ni{hasError=!1;pushOptions;constructor(e,r){super(e,r),this.pushOptions=e}async sync(){console.log(`Starting push from ${this.options.localDir} to ${this.options.realmUrl}`),console.log("Testing realm access...");let e;try{e=await this.getRemoteFileList("")}catch(p){throw console.error("Failed to access realm:",p),new Error("Cannot proceed with push: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let r=await this.getLocalFileList();console.log(`Found ${r.size} files in local directory`);let n=await Da(this.options.localDir),s={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}},i=new Map,o=new Set,a=this.pushOptions.changedSince,l=!this.pushOptions.force&&n!==null&&n.realmUrl===this.normalizedRealmUrl;if(a!==void 0){let p=await Promise.all(a.map(m=>cse(this.options.localDir,m))),f=new Set([...p[0]].filter(m=>p.every(g=>g.has(m)))),d=a.join(", "),A=0,h=0;for(let[m,g]of r)kr(m)||(f.has(m)?e.has(m)?(A++,s.files[m]=await si(g)):(i.set(m,g),h++):i.set(m,g));console.log(`${i.size-h} file(s) changed since ${d}`),h>0&&console.log(`${h} unchanged file(s) are missing from the realm and will be uploaded`),A>0&&console.log(`Skipping ${A} files unchanged since ${d}`)}else if(l){console.log("Checking for changed files...");let p=0,[f,d]=await Promise.all([this.getRemoteMtimes(),Promise.all(Array.from(r.entries()).map(async([A,h])=>{if(kr(A))return{relativePath:A,localPath:h,currentHash:"",protected:!0};let m=await si(h);return{relativePath:A,localPath:h,currentHash:m,protected:!1}}))]);for(let A of d){if(A.protected){p++;continue}let h=n.files[A.relativePath],m=n.remoteMtimes?.[A.relativePath],g=f.get(A.relativePath),E=h!==A.currentHash,b=h!==void 0&&!e.has(A.relativePath),I=m!==void 0&&g!==void 0&&g!==m;E||b||I?(i.set(A.relativePath,A.localPath),!E&&(b||I)&&o.add(A.relativePath)):(p++,s.files[A.relativePath]=A.currentHash,m!==void 0&&(s.remoteMtimes[A.relativePath]=m))}if(p>0&&console.log(`Skipping ${p} unchanged files`),o.size>0){let A=Array.from(o),h=A.slice(0,5).join(", "),m=A.length>5?", ...":"";console.warn(`Warning: ${o.size} file(s) changed on the realm since your last push; your local versions will overwrite them: ${h}${m}`)}}else{this.pushOptions.force?console.log("Force mode: uploading all files"):console.log(n?"Realm URL changed, will upload all files":"No sync manifest found, will upload all files");for(let[p,f]of r)kr(p)||i.set(p,f)}let c=!1,u=[];if(i.size===0)console.log("No files to upload - everything is up to date");else{console.log(`Uploading ${i.size} file(s) via /_atomic...`);let p=new Set,f=this.pushOptions.force||a!==void 0||!n;for(let A of i.keys())if(f)e.has(A)||p.add(A);else{let h=n.files[A]!==void 0,m=h&&!e.has(A);(!h||m)&&p.add(A)}let d=await this.uploadFilesAtomic(i,p);if(u=d.unanswered,d.succeeded.length>0){let A=await Promise.all(d.succeeded.filter(h=>i.has(h)).map(async h=>({rel:h,hash:await si(i.get(h))})));for(let{rel:h,hash:m}of A)s.files[h]=m}if(d.error){c=!0,this.hasError=!0,console.error(d.error.message);for(let A of d.error.perFile){let h;A.status===409?h=`${A.path} was created on the realm concurrently \u2014 run with --force to overwrite.`:A.status===404?h=`${A.path} was removed from the realm concurrently \u2014 run with --force to re-create it from your local copy.`:h=`${A.path}: ${A.title}`,console.error(` ${h}`)}}}if(this.pushOptions.deleteRemote&&c)console.error("Skipping --delete because the upload did not complete");else if(this.pushOptions.deleteRemote){let p=new Set(e.keys()),f=[];for(let d of p){if(kr(d)){p.delete(d);continue}x$e.has(d)&&(p.delete(d),f.push(d))}for(let d of r.keys())p.delete(d);if(f.length>0&&console.log(`Skipping ${f.length} realm-managed remote artifact(s): ${f.join(", ")}`),p.size>0){let d=Array.from(p).sort();console.log(`Deleting ${d.length} remote files that don't exist locally: ${d.join(", ")}`);for(let A of d)try{await this.deleteFile(A)}catch(h){this.hasError=!0,console.error(`Error deleting ${A}:`,h)}}}if(!this.options.dryRun&&(i.size>0||a!==void 0)){let p=new Set(e.keys());try{let d=await this.getRemoteMtimes();p=new Set(d.keys());for(let A of Object.keys(s.files)){let h=d.get(A);h!==void 0&&(s.remoteMtimes[A]=h)}}catch(d){console.warn("Could not refresh remote mtimes after upload:",d)}let f=new Set(u);for(let d of i.keys())if(s.files[d]===void 0){if(f.has(d)&&!e.has(d)&&p.has(d))s.files[d]="";else if(n?.files[d]!==void 0){s.files[d]=n.files[d];let A=n.remoteMtimes?.[d];A!==void 0?s.remoteMtimes[d]=A:delete s.remoteMtimes[d]}}}if(s.remoteMtimes&&Object.keys(s.remoteMtimes).length===0&&delete s.remoteMtimes,this.options.dryRun||await Mc(this.options.localDir,s),!this.options.dryRun&&i.size>0&&!c){let p=new tn(this.options.localDir),f=Array.from(i.keys()).map(A=>({file:A,status:"modified"})),d=await p.createCheckpoint("local",f);if(d){let A=d.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
2933
|
+
Checkpoint created: ${d.shortHash} ${A} ${d.message}`)}}console.log("Push completed")}};function use(t){t.command("push").description("Push local files to a Boxel realm").argument("<local-dir>","The local directory containing files to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--delete","Delete remote files that do not exist locally").option("--dry-run","Show what would be done without making changes").option("--force","Upload all files, even if unchanged").option("--changed-since <revision>","Upload only files that differ from this git revision (one the realm already holds), plus files git does not track and files missing from the realm, instead of comparing against the sync manifest. Repeat it to name every revision the realm may hold part of, such as one a failed sync stopped partway through; a file is skipped only when it matches all of them. A file edited directly on the realm stays as it is until it changes in git. The local directory must be a git checkout whose history reaches each revision",(e,r=[])=>[...r,e]).option("--no-realm-events","Index the pushed changes without announcing them to open tabs, which pick them up on their next load (for deploys)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0);await w$e(e,r,{delete:n.delete,dryRun:n.dryRun,force:n.force,realmEvents:n.realmEvents,changedSince:n.changedSince,realmSecretSeed:s})})}async function w$e(t,e,r){let n=dt(e,{profileManager:r.profileManager});n.ok||(console.error(`Error: ${n.error}`),process.exit(1)),e=n.url;let s=Ln({realmUrl:e,realmSecretSeed:r.realmSecretSeed,profileManager:r.profileManager,authenticator:r.authenticator});s.ok||(console.error(`Error: ${s.error}`),process.exit(1));let i=s.authenticator;await gh(t)||(console.error(`Local directory does not exist: ${t}`),process.exit(1));let o=r.changedSince?.length?r.changedSince:void 0;r.force&&o!==void 0&&(console.error("Error: --force uploads every file and --changed-since uploads only changed ones; pass one of them."),process.exit(1));try{let a=new sR({realmUrl:e,localDir:t,deleteRemote:r.delete,dryRun:r.dryRun,force:r.force,realmEvents:r.realmEvents,atomicBatchSize:r.atomicBatchSize,changedSince:o},i);await a.sync(),a.hasError?(console.log("Push did not complete successfully. View logs for details"),process.exit(2)):console.log("Push completed successfully")}catch(a){console.error("Push failed:",a),process.exit(1)}}async function pse(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:ct};let s;try{s=await r.getUserRealms()}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:0,nextCount:0,error:`Failed to load realm list: ${f instanceof Error?f.message:String(f)}`}}let i=s.map(ce),o=i.length,a=i.filter(f=>f===e).length;if(a===0)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,notInList:!0,error:"Realm is not in app.boxel.realms. Nothing to remove."};let l=o-a;if(t.dryRun)return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:l};let c=n.profile.realmServerUrl.replace(/\/$/,""),u;try{u=await r.authedRealmServerFetch(`${c}/_delete-realm`,{method:"DELETE",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:`Failed to reach realm server: ${f instanceof Error?f.message:String(f)}`}}if(!u.ok){let f=await B$e(u),d=u.status===403?`You do not own this realm and cannot delete it on the server. Server returned 403: ${f}`:`Realm server returned ${u.status}: ${f}`;return{realmUrl:e,removed:!1,serverDeleted:!1,unlinked:!1,previousCount:o,nextCount:o,error:d}}let p;try{p=await r.removeFromUserRealms(e)}catch(f){return{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:`Server delete succeeded, but Matrix unlink failed: ${f instanceof Error?f.message:String(f)}`}}return p?{realmUrl:e,removed:!0,serverDeleted:!0,unlinked:p,previousCount:o,nextCount:l}:{realmUrl:e,removed:!1,serverDeleted:!0,unlinked:!1,previousCount:o,nextCount:o,error:"Server delete succeeded, but Matrix account_data did not contain the URL by the time we PUT (concurrent edit?). Server-side files are gone; please refresh and check your realm list."}}async function B$e(t){try{return await t.text()}catch{return"<no response body>"}}function fse(t){t.command("remove").description("Remove a realm \u2014 deletes server-side files and unlinks it from your realm list").argument("<realm-url>","realm URL to remove").option("-y, --yes","Skip the interactive confirmation prompt").option("--dry-run","Preview the change without writing to Matrix").action(async(e,r)=>{let n=ce(e.trim()),s=await pse({realmUrl:n,dryRun:!0});if(s.error&&!s.notInList&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1)),s.notInList&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1)),console.log(`Remove target: ${Ye}${s.realmUrl}${v}`),console.log(`${te}app.boxel.realms: ${s.previousCount} -> ${s.nextCount}${v}`),r.dryRun){console.log(`${te}[DRY RUN] No server delete or Matrix changes sent.${v}`);return}if(!r.yes){process.stdin.isTTY||(console.error(`${W}Error:${v} stdin is not a TTY. Pass --yes to confirm in non-interactive mode.`),process.exit(1));let o=await To("This will permanently delete the realm files, indexer state, and registry entry on the server. Proceed? (y/N) ");if(!/^y/i.test(o)){console.log(`${te}Cancelled.${v}`);return}}let i=await pse({realmUrl:n});(i.error||!i.removed)&&(console.error(`${W}Error:${v} ${i.error??"Removal did not complete."}`),i.serverDeleted&&!i.unlinked&&console.error(`${te}The realm is gone, but your account_data still references ${i.realmUrl}.${v}`),process.exit(1)),console.log(`${he}Removed:${v} ${Ye}${i.realmUrl}${v}`)})}async function T$e(t){let e=ce(t.realmUrl.trim()),r=t.profileManager??Re(),n=r.getActiveProfile();if(!n)return{realmUrl:e,restored:!1,error:ct};let s=n.profile.realmServerUrl.replace(/\/$/,""),i;try{i=await r.authedRealmServerFetch(`${s}/_unarchive-realm`,{method:"POST",headers:{"Content-Type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"realm",id:e}})})}catch(o){return{realmUrl:e,restored:!1,error:`Failed to reach realm server: ${o instanceof Error?o.message:String(o)}`}}if(!i.ok){let o=await D$e(i),a=i.status===403?`You do not own this realm and cannot restore it. Server returned 403: ${o}`:`Realm server returned ${i.status}: ${o}`;return{realmUrl:e,restored:!1,error:a}}return{realmUrl:e,restored:!0}}async function D$e(t){try{return await t.text()}catch{return"<no response body>"}}function dse(t){t.command("restore").description("Restore a previously archived realm and trigger a full reindex (owner-only)").argument("<realm-url>","realm URL to restore").action(async e=>{let r=ce(e.trim()),n=await T$e({realmUrl:r});(n.error||!n.restored)&&(console.error(`${W}Error:${v} ${n.error??"Restore did not complete."}`),process.exit(1)),console.log(`${he}Restored:${v} ${Ye}${n.realmUrl}${v}`)})}var yh=We(require("fs/promises")),Xg=We(require("path"));function OS(t,e,r){let n=e.has(t),s=r?.files[t]!==void 0;return n&&s?e.get(t)===r.files[t]?"unchanged":"changed":n&&!s?"added":!n&&s?"deleted":"unchanged"}function FS(t,e,r){let n=e.has(t),s=r?.remoteMtimes?.[t]!==void 0,i=r?.files[t]!==void 0,o=s||i;return n&&s?e.get(t)===r.remoteMtimes[t]?"unchanged":"changed":n&&i?"changed":n&&!o?"added":!n&&o?"deleted":"unchanged"}function hse(t,e,r){return t==="unchanged"&&e==="unchanged"?"noop":t==="changed"&&e==="unchanged"?"push":t==="unchanged"&&e==="changed"?"pull":t==="added"&&e==="unchanged"?"push":t==="unchanged"&&e==="added"?"pull":t==="changed"&&e==="changed"||t==="added"&&e==="added"||t==="changed"&&e==="added"||t==="added"&&e==="changed"?"conflict":t==="deleted"&&e==="unchanged"?r.deleteSync||r.preferLocal?"push-delete":"noop":t==="unchanged"&&e==="deleted"?r.deleteSync||r.preferRemote?"pull-delete":"noop":t==="deleted"&&e==="changed"||t==="changed"&&e==="deleted"?"conflict":t==="deleted"&&e==="deleted"?"noop":t==="added"&&e==="deleted"?"push":t==="deleted"&&e==="added"?"pull":"noop"}function Ase(t,e,r,n){let{localStatus:s,remoteStatus:i,relativePath:o}=t;if(!n)return null;switch(n){case"prefer-local":return s==="deleted"?"push-delete":"push";case"prefer-remote":return i==="deleted"?"pull-delete":"pull";case"prefer-newest":{if(s==="deleted"&&i==="changed")return"pull";if(s==="changed"&&i==="deleted")return"push";let a=e.get(o),l=r.get(o);return a&&l!==void 0?a.mtime>l*1e3?"push":"pull":"push"}}}var P$e=new Set(["node_modules",".git",".boxel-history",".cache",".vscode","dist","build","tmp"]),_$e=6;function N$e(t,e){return t==="unchanged"&&e==="unchanged"||t==="deleted"&&e==="deleted"?null:t==="unchanged"&&e==="added"?"new-remote":t==="unchanged"&&e==="changed"?"modified-remote":t==="unchanged"&&e==="deleted"?"deleted-remote":t==="added"&&e==="unchanged"?"new-local":t==="changed"&&e==="unchanged"?"modified-local":t==="deleted"&&e==="unchanged"?"deleted-local":t==="changed"&&e==="changed"||t==="added"&&e==="added"||t==="changed"&&e==="added"||t==="added"&&e==="changed"||t==="changed"&&e==="deleted"||t==="deleted"&&e==="changed"?"conflict":t==="added"&&e==="deleted"?"new-local":t==="deleted"&&e==="added"?"new-remote":null}var iR=class extends ni{changes=[];pulled=[];hasError=!1;error;remoteMtimes=new Map;statusOptions;loadedManifest;constructor(e,r,n){super(e,n),this.statusOptions=e,this.loadedManifest=r}async sync(){let e,r;try{[e,this.remoteMtimes,r]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),this.getRemoteFileList()])}catch(o){this.hasError=!0,this.error=o instanceof Error?`Failed to fetch realm state: ${o.message}`:`Failed to fetch realm state: ${String(o)}`;return}if(r&&this.remoteMtimes.size===0&&r.size>0)for(let[o]of r)this.remoteMtimes.set(o,0);let n=new Map;for(let[o,a]of e)n.set(o,a.path);let s=new Map;await Promise.all(Array.from(n.entries()).map(async([o,a])=>{kr(o)||s.set(o,await si(a))}));let i=new Set;for(let o of n.keys())i.add(o);for(let o of this.remoteMtimes.keys())i.add(o);for(let o of Object.keys(this.loadedManifest.files))i.add(o);if(this.loadedManifest.remoteMtimes)for(let o of Object.keys(this.loadedManifest.remoteMtimes))i.add(o);for(let o of i){if(kr(o))continue;let a=OS(o,s,this.loadedManifest),l=FS(o,this.remoteMtimes,this.loadedManifest),c=N$e(a,l);c!==null&&this.changes.push({file:o,status:c})}this.changes.sort((o,a)=>o.file.localeCompare(a.file)),this.statusOptions.pull&&await this.performSafePull()}async performSafePull(){let e=this.changes.filter(n=>n.status==="new-remote"||n.status==="modified-remote");if(e.length===0)return;let r=[];for(let n of e){let s=Xg.join(this.options.localDir,n.file);try{await this.downloadFile(n.file,s),this.pulled.push(n.file);let i=await si(s);this.loadedManifest.files[n.file]=i;let o=this.remoteMtimes.get(n.file);o!==void 0&&(this.loadedManifest.remoteMtimes=this.loadedManifest.remoteMtimes??{},this.loadedManifest.remoteMtimes[n.file]=o)}catch(i){this.hasError=!0;let o=i instanceof Error?i.message:String(i);r.push({file:n.file,message:o}),console.error(` ${W}\u2717 ${n.file}${v} (${o})`)}}r.length>0&&(this.error=`Failed to pull ${r.length} file(s): ${r.map(n=>`${n.file} (${n.message})`).join("; ")}`),this.pulled.length>0&&await Mc(this.options.localDir,this.loadedManifest)}};async function mse(t,e){let r={localDir:t,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!1},n=Xg.join(t,".boxel-sync.json");if(!await gh(n))return{...r,hasError:!0,error:`No .boxel-sync.json found in ${t}. Run: boxel realm sync ${t} <realm-url>`};let s=await Da(t);if(!s)return{...r,hasError:!0,error:`Malformed .boxel-sync.json in ${t}`};let i;try{i=(await yh.stat(n)).mtimeMs}catch{}let o=Ln({realmUrl:s.realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager,authenticator:e.authenticator});if(!o.ok)return{...r,realmUrl:s.realmUrl,manifestMtime:i,hasError:!0,error:o.error};let a=o.authenticator,l=new iR({realmUrl:s.realmUrl,localDir:t,pull:e.pull},s,a);return await l.sync(),{localDir:t,realmUrl:s.realmUrl,manifestMtime:i,changes:l.changes,pulled:l.pulled.slice().sort(),inSync:!l.hasError&&l.changes.length===0,hasError:l.hasError,error:l.error}}async function k$e(t,e){let r=[];async function n(s,i){if(i>e)return;let o;try{o=await yh.readdir(s,{withFileTypes:!0})}catch{return}if(o.some(l=>l.isFile()&&l.name===".boxel-sync.json")){r.push(s);return}for(let l of o)l.isDirectory()&&(P$e.has(l.name)||await n(Xg.join(s,l.name),i+1))}return await n(t,0),r.sort(),r}async function Q$e(t,e){if(e.pull)return{rootDir:t,workspaces:[],hasError:!0,error:"Cannot use --pull with --all"};let r=process.env.BOXEL_STATUS_ALL_MAX_DEPTH,n=r!==void 0?Number(r):NaN,s=Number.isFinite(n)&&n>=0?n:_$e,i=await k$e(t,s),o=[],a=!1;for(let l of i){let c=Xg.join(l,".boxel-sync.json"),u;try{u=await yh.readFile(c,"utf8")}catch{o.push({localDir:l,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"no-manifest"}),a=!0;continue}let p;try{p=JSON.parse(u)}catch{p=void 0}if(!rR(p)){o.push({localDir:l,realmUrl:"",changes:[],pulled:[],inSync:!1,hasError:!0,skipped:"malformed"}),a=!0;continue}let f=await mse(l,{profileManager:e.profileManager,realmSecretSeed:e.realmSecretSeed,authenticator:e.authenticator}),d={...f};f.hasError&&(d.skipped="fetch-failed",a=!0),o.push(d)}return{rootDir:t,workspaces:o,hasError:a}}function R$e(t){if(t.hasError&&t.error){console.error(`${W}Error:${v} ${t.error}`);return}if(console.log(`Realm: ${t.realmUrl}`),console.log(`Local: ${t.localDir}`),t.manifestMtime&&console.log(`${te}Manifest updated:${v} ${new Date(t.manifestMtime).toISOString()}`),console.log(""),t.changes.length===0){console.log(`${he}\u2713 In sync${v}`);return}let e={"new-remote":[],"modified-remote":[],"new-local":[],"modified-local":[],conflict:[],"deleted-local":[],"deleted-remote":[]};for(let r of t.changes)e[r.status].push(r.file);if(e["new-remote"].length>0){console.log(`${Ye}\u2193 New on remote (${e["new-remote"].length}):${v}`);for(let r of e["new-remote"])console.log(` + ${r}`);console.log("")}if(e["modified-remote"].length>0){console.log(`${Ye}\u2193 Modified on remote (${e["modified-remote"].length}):${v}`);for(let r of e["modified-remote"])console.log(` ~ ${r}`);console.log("")}if(e["new-local"].length>0){console.log(`${he}\u2191 New locally (${e["new-local"].length}):${v}`);for(let r of e["new-local"])console.log(` + ${r}`);console.log("")}if(e["modified-local"].length>0){console.log(`${he}\u2191 Modified locally (${e["modified-local"].length}):${v}`);for(let r of e["modified-local"])console.log(` ~ ${r}`);console.log("")}if(e.conflict.length>0){console.log(`${ot}\u26A0 Conflicts (${e.conflict.length}):${v}`);for(let r of e.conflict)console.log(` ! ${r}`);console.log("")}if(e["deleted-local"].length>0){console.log(`${W}- Deleted locally (${e["deleted-local"].length}):${v}`);for(let r of e["deleted-local"])console.log(` - ${r}`);console.log("")}if(e["deleted-remote"].length>0){console.log(`${W}- Deleted on remote (${e["deleted-remote"].length}):${v}`);for(let r of e["deleted-remote"])console.log(` - ${r}`);console.log("")}if(t.pulled.length>0){console.log(`${Ye}Pulled ${t.pulled.length} file(s):${v}`);for(let r of t.pulled)console.log(` \u2713 ${r}`)}}function O$e(t){if(t.error){console.error(`${W}Error:${v} ${t.error}`);return}if(t.workspaces.length===0){console.log(`No .boxel-sync.json directories found under ${t.rootDir}.`);return}for(let e of t.workspaces){if(e.skipped){console.log(`${ot}${e.localDir}${v} [${e.skipped}]`),e.error&&console.log(` ${te}${e.error}${v}`),console.log("");continue}let r={newRemote:0,modRemote:0,newLocal:0,modLocal:0,conflict:0,delLocal:0,delRemote:0};for(let n of e.changes)n.status==="new-remote"?r.newRemote++:n.status==="modified-remote"?r.modRemote++:n.status==="new-local"?r.newLocal++:n.status==="modified-local"?r.modLocal++:n.status==="conflict"?r.conflict++:n.status==="deleted-local"?r.delLocal++:n.status==="deleted-remote"&&r.delRemote++;if(console.log(`${e.localDir} ${te}${e.realmUrl}${v}`),e.inSync)console.log(` ${he}\u2713 in sync${v}`);else{let n=[];r.newRemote>0&&n.push(`${Ye}\u2193+${r.newRemote}${v}`),r.modRemote>0&&n.push(`${Ye}\u2193~${r.modRemote}${v}`),r.newLocal>0&&n.push(`${he}\u2191+${r.newLocal}${v}`),r.modLocal>0&&n.push(`${he}\u2191~${r.modLocal}${v}`),r.conflict>0&&n.push(`${ot}\u26A0${r.conflict}${v}`),r.delLocal>0&&n.push(`${W}-L${r.delLocal}${v}`),r.delRemote>0&&n.push(`${W}-R${r.delRemote}${v}`),console.log(` ${n.join(" ")}`)}console.log("")}}function gse(t){t.command("status").aliases(["st"]).description("Show pending changes between a local sync dir and its realm").argument("[local-dir]","Local sync directory (defaults to current working directory)").option("--pull","Download safe remote changes and update manifest").option("--all","Recursively report all .boxel-sync.json dirs under the current directory").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(e,r)=>{let n=await mr(r.realmSecretSeed===!0);if(r.all){r.pull&&(console.error(`${W}Error:${v} Cannot use --pull with --all`),process.exit(1));let i=await Q$e(e??process.cwd(),{all:!0,realmSecretSeed:n});O$e(i),i.hasError&&process.exit(2);return}let s=await mse(e??process.cwd(),{pull:r.pull,realmSecretSeed:n});R$e(s),s.hasError&&process.exit(s.pulled.length>0?2:1)})}var oR=We(require("path"));var aR=class extends ni{hasError=!1;pushedFiles=[];pulledFiles=[];remoteDeletedFiles=[];localDeletedFiles=[];skippedConflicts=[];uploadFatalMessage;syncOptions;constructor(e,r){super(e,r),this.syncOptions=e}get conflictStrategy(){return this.syncOptions.preferLocal?"prefer-local":this.syncOptions.preferRemote?"prefer-remote":this.syncOptions.preferNewest?"prefer-newest":null}async sync(){console.log(`Starting sync between ${this.options.localDir} and ${this.options.realmUrl}`),console.log("Testing realm access...");let e;try{e=await this.getRemoteFileList("")}catch(g){throw console.error("Failed to access realm:",g),new Error("Cannot proceed with sync: Authentication or access failed. Please check your credentials and realm permissions.")}console.log("Realm access verified");let[r,n,s]=await Promise.all([this.getLocalFileListWithMtimes(),this.getRemoteMtimes(),Da(this.options.localDir)]),i=new Map;for(let[g,E]of r)i.set(g,E.path);if(n.size===0&&e&&e.size>0){console.log("Remote mtimes unavailable, falling back to file listing for remote detection");for(let[g]of e)n.set(g,0)}console.log(`Found ${i.size} local files`),console.log(`Found ${n.size} remote files`),s&&s.realmUrl!==this.normalizedRealmUrl&&console.warn(`${ot}Warning:${v} Manifest realm URL (${s.realmUrl}) differs from target (${this.normalizedRealmUrl}). Treating as first sync.`);let o=s&&s.realmUrl===this.normalizedRealmUrl?s:null,a=new Map;await Promise.all(Array.from(i.entries()).map(async([g,E])=>{kr(g)||a.set(g,await si(E))}));let l=new Set;for(let g of i.keys())l.add(g);for(let g of n.keys())l.add(g);if(o){for(let g of Object.keys(o.files))l.add(g);if(o.remoteMtimes)for(let g of Object.keys(o.remoteMtimes))l.add(g)}let c=[];for(let g of l){if(kr(g))continue;let E=OS(g,a,o),b=FS(g,n,o),I=hse(E,b,this.syncOptions);c.push({relativePath:g,localStatus:E,remoteStatus:b,action:I})}let u=[],p=[],f=[],d=[],A=[],h=0;for(let g of c)switch(g.action){case"push":u.push(g.relativePath);break;case"pull":p.push(g.relativePath);break;case"push-delete":f.push(g.relativePath);break;case"pull-delete":d.push(g.relativePath);break;case"conflict":A.push(g);break;case"noop":h++;break}for(let g of A)switch(Ase(g,r,n,this.conflictStrategy)){case"push":u.push(g.relativePath);break;case"pull":p.push(g.relativePath);break;case"push-delete":f.push(g.relativePath);break;case"pull-delete":d.push(g.relativePath);break;case"noop":break;default:this.skippedConflicts.push(g.relativePath);break}if(console.log(`
|
|
2934
2934
|
${te}Sync plan:${v}`),u.length>0&&console.log(` ${he}\u2191 Push:${v} ${u.length} file(s)`),p.length>0&&console.log(` ${Ye}\u2193 Pull:${v} ${p.length} file(s)`),f.length>0&&console.log(` ${W}\u2191 Delete remote:${v} ${f.length} file(s)`),d.length>0&&console.log(` ${W}\u2193 Delete local:${v} ${d.length} file(s)`),this.skippedConflicts.length>0){console.log(` ${ot}\u26A0 Conflicts skipped:${v} ${this.skippedConflicts.length} file(s)`);for(let g of this.skippedConflicts)console.log(` ${g}`);console.log(` ${te}Use --prefer-local, --prefer-remote, or --prefer-newest to resolve.${v}`)}if(h>0&&console.log(` ${te}Unchanged: ${h} file(s)${v}`),u.length+p.length+f.length+d.length===0){console.log(`
|
|
2935
2935
|
Everything is up to date`),!this.options.dryRun&&!o&&this.skippedConflicts.length===0&&await this.writeManifest(a,n),await this.reconcileClaudeSkills();return}if(p.length>0){console.log(`
|
|
2936
2936
|
Pulling ${p.length} file(s)...`);let g=await Promise.all(p.map(E=>this.remoteLimit(async()=>{try{let b=oR.join(this.options.localDir,E);return await this.downloadFile(E,b),E}catch(b){return this.hasError=!0,console.error(`Error downloading ${E}:`,b),null}})));this.pulledFiles.push(...g.filter(E=>E!==null))}if(u.length>0){console.log(`
|
|
@@ -2938,14 +2938,14 @@ Pushing ${u.length} file(s)...`);let g=new Map;for(let I of u){let w=i.get(I);w&
|
|
|
2938
2938
|
Deleting ${f.length} remote file(s)...`);let g=await Promise.all(f.map(E=>this.remoteLimit(async()=>{try{return await this.deleteFile(E),E}catch(b){return this.hasError=!0,console.error(`Error deleting remote ${E}:`,b),null}})));this.remoteDeletedFiles.push(...g.filter(E=>E!==null))}if(d.length>0){console.log(`
|
|
2939
2939
|
Deleting ${d.length} local file(s)...`);let g=await Promise.all(d.map(async E=>{try{let b=i.get(E);return b?(await this.deleteLocalFile(b),E):null}catch(b){return this.hasError=!0,console.error(`Error deleting local ${E}:`,b),null}}));this.localDeletedFiles.push(...g.filter(E=>E!==null))}if(!this.options.dryRun){let g=new Map;if(o)for(let[b,I]of Object.entries(o.files))g.set(b,I);for(let[b,I]of a)g.set(b,I);for(let b of this.pushedFiles){let I=i.get(b);I&&g.set(b,await si(I))}for(let b of this.pulledFiles){let I=oR.join(this.options.localDir,b);g.set(b,await si(I))}for(let b of this.remoteDeletedFiles)g.delete(b);for(let b of this.localDeletedFiles)g.delete(b);let E=n;if(this.pushedFiles.length>0||this.remoteDeletedFiles.length>0)try{E=await this.getRemoteMtimes()}catch{console.warn("Could not refresh remote mtimes after sync")}await this.writeManifest(g,E)}if(!this.options.dryRun){let g=[...this.pushedFiles.map(E=>({file:E,status:"modified"})),...this.pulledFiles.map(E=>({file:E,status:"modified"})),...this.remoteDeletedFiles.map(E=>({file:E,status:"deleted"})),...this.localDeletedFiles.map(E=>({file:E,status:"deleted"}))];if(g.length>0){let b=await new tn(this.options.localDir).createCheckpoint("local",g);if(b){let I=b.isMajor?"[MAJOR]":"[minor]";console.log(`
|
|
2940
2940
|
Checkpoint created: ${b.shortHash} ${I} ${b.message}`)}}}await this.reconcileClaudeSkills(),console.log(`
|
|
2941
|
-
Sync completed`)}async reconcileClaudeSkills(){await mh({realmUrl:this.normalizedRealmUrl,localDir:this.options.localDir,dryRun:this.options.dryRun,enabled:this.syncOptions.claudeSkills})}async writeManifest(e,r){let n={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}};for(let[s,i]of e){n.files[s]=i;let o=r.get(s);o!==void 0&&o!==0&&(n.remoteMtimes[s]=o)}n.remoteMtimes&&Object.keys(n.remoteMtimes).length===0&&delete n.remoteMtimes,await Mc(this.options.localDir,n)}};function yse(t){return t.command("sync").description("Bidirectional sync between a local directory and a Boxel realm").argument("<local-dir>","The local directory to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--prefer-local","Resolve conflicts by keeping local version").option("--prefer-remote","Resolve conflicts by keeping remote version").option("--prefer-newest","Resolve conflicts by keeping newest version").option("--delete","Sync deletions both ways").option("--dry-run","Preview without making changes").option("--no-claude-skills","Skip mirroring the realm's skills/ directory into the checkout's .claude/skills/ (env: BOXEL_DISABLE_CLAUDE_SKILLS_SYNC=1)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(r,n,s)=>{let i=await mr(s.realmSecretSeed===!0),o=await F$e(r,n,{preferLocal:s.preferLocal,preferRemote:s.preferRemote,preferNewest:s.preferNewest,delete:s.delete,dryRun:s.dryRun,claudeSkills:s.claudeSkills,realmSecretSeed:i}),a=Array.isArray(o.pushed)&&o.pushed.length>0||Array.isArray(o.pulled)&&o.pulled.length>0||Array.isArray(o.remoteDeleted)&&o.remoteDeleted.length>0||Array.isArray(o.localDeleted)&&o.localDeleted.length>0;o.error&&(console.error(`Error: ${o.error}`),process.exit(a?2:1)),console.log("Sync completed successfully")})}async function F$e(t,e,r){let n=
|
|
2941
|
+
Sync completed`)}async reconcileClaudeSkills(){await mh({realmUrl:this.normalizedRealmUrl,localDir:this.options.localDir,dryRun:this.options.dryRun,enabled:this.syncOptions.claudeSkills})}async writeManifest(e,r){let n={realmUrl:this.normalizedRealmUrl,files:{},remoteMtimes:{}};for(let[s,i]of e){n.files[s]=i;let o=r.get(s);o!==void 0&&o!==0&&(n.remoteMtimes[s]=o)}n.remoteMtimes&&Object.keys(n.remoteMtimes).length===0&&delete n.remoteMtimes,await Mc(this.options.localDir,n)}};function yse(t){return t.command("sync").description("Bidirectional sync between a local directory and a Boxel realm").argument("<local-dir>","The local directory to sync").argument("<realm-url>","The URL of the target realm (e.g., https://app.boxel.ai/demo/)").option("--prefer-local","Resolve conflicts by keeping local version").option("--prefer-remote","Resolve conflicts by keeping remote version").option("--prefer-newest","Resolve conflicts by keeping newest version").option("--delete","Sync deletions both ways").option("--dry-run","Preview without making changes").option("--no-claude-skills","Skip mirroring the realm's skills/ directory into the checkout's .claude/skills/ (env: BOXEL_DISABLE_CLAUDE_SKILLS_SYNC=1)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").action(async(r,n,s)=>{let i=await mr(s.realmSecretSeed===!0),o=await F$e(r,n,{preferLocal:s.preferLocal,preferRemote:s.preferRemote,preferNewest:s.preferNewest,delete:s.delete,dryRun:s.dryRun,claudeSkills:s.claudeSkills,realmSecretSeed:i}),a=Array.isArray(o.pushed)&&o.pushed.length>0||Array.isArray(o.pulled)&&o.pulled.length>0||Array.isArray(o.remoteDeleted)&&o.remoteDeleted.length>0||Array.isArray(o.localDeleted)&&o.localDeleted.length>0;o.error&&(console.error(`Error: ${o.error}`),process.exit(a?2:1)),console.log("Sync completed successfully")})}async function F$e(t,e,r){let n=dt(e,{profileManager:r.profileManager});if(!n.ok)return LS({error:n.error});e=n.url;let s=Ln({realmUrl:e,realmSecretSeed:r.realmSecretSeed,profileManager:r.profileManager,authenticator:r.authenticator});if(!s.ok)return LS({error:s.error});let i=s.authenticator;if([r.preferLocal,r.preferRemote,r.preferNewest].filter(Boolean).length>1)return LS({error:"Only one conflict strategy can be specified (--prefer-local, --prefer-remote, or --prefer-newest)."});if(!await gh(t))return LS({error:`Local directory does not exist: ${t}`});let a;try{a=new aR({realmUrl:e,localDir:t,preferLocal:r.preferLocal,preferRemote:r.preferRemote,preferNewest:r.preferNewest,deleteSync:r.delete,dryRun:r.dryRun,claudeSkills:r.claudeSkills,waitForIndex:r.waitForIndex},i),await a.sync()}catch(l){return{pushed:a?.pushedFiles.slice().sort()??[],pulled:a?.pulledFiles.slice().sort()??[],remoteDeleted:a?.remoteDeletedFiles.slice().sort()??[],localDeleted:a?.localDeletedFiles.slice().sort()??[],skippedConflicts:a?.skippedConflicts.slice().sort()??[],hasError:!0,error:`Sync failed: ${l instanceof Error?l.message:String(l)}`}}return{pushed:a.pushedFiles.slice().sort(),pulled:a.pulledFiles.slice().sort(),remoteDeleted:a.remoteDeletedFiles.slice().sort(),localDeleted:a.localDeletedFiles.slice().sort(),skippedConflicts:a.skippedConflicts.slice().sort(),hasError:a.hasError,error:a.hasError?L$e(a):void 0}}function L$e(t){let r=`Sync completed with errors. ${[`${t.pushedFiles.length} pushed`,`${t.pulledFiles.length} pulled`,`${t.remoteDeletedFiles.length} remote deleted`,`${t.localDeletedFiles.length} local deleted`,`${t.skippedConflicts.length} conflicts skipped`].join(", ")}.`;return t.uploadFatalMessage?`${r} ${t.uploadFatalMessage}`:r}function LS(t){return{pushed:[],pulled:[],remoteDeleted:[],localDeleted:[],skippedConflicts:[],hasError:!0,...t}}var Ese=We(_b());function M$e(t){let e=Number.parseInt(t,10);if(!Number.isFinite(e)||e<0||String(e)!==t.trim())throw new Ese.InvalidArgumentError("--timeout must be a non-negative integer (milliseconds).");return e}async function U$e(t,e={}){let r=e.timeoutMs??3e4;if(!Number.isFinite(r)||r<0)return{ready:!1,error:`Invalid timeoutMs: must be a finite, non-negative number (got ${e.timeoutMs}).`};let n=e.profileManager??Re();if(!n.getActiveProfile())return{ready:!1,error:ct};let i=dt(t,{profileManager:n});if(!i.ok)return{ready:!1,error:i.error};t=i.url;let o=`${ce(t)}_readiness-check`,a=Date.now();for(;Date.now()-a<r;){try{if((await n.authedRealmFetch(o,{method:"GET",headers:{Accept:Ur.RealmInfo}})).ok)return{ready:!0}}catch{}let l=r-(Date.now()-a);if(l<=0)break;await new Promise(c=>setTimeout(c,Math.min(1e3,l)))}return{ready:!1,error:`Realm not ready after ${r}ms: ${o}`}}function bse(t){t.command("wait-for-ready").description("Poll a realm readiness-check endpoint until it responds OK or the timeout is reached").requiredOption("--realm <realm-url>","The realm URL to check").option("--timeout <ms>","Timeout in milliseconds (default: 30000)",M$e).action(async e=>{let r;try{r=await U$e(e.realm,{timeoutMs:e.timeout})}catch(n){console.error(`${W}Error:${v} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}r.ready?console.log(`${he}Realm is ready.${v}`):(console.error(`${W}Error:${v} ${r.error??"Realm not ready"}`),process.exit(1))})}var hR=We(_b()),Pse=We(require("fs/promises")),US=We(require("path"));var Uc=We(require("fs/promises")),Cse=We(require("path")),j$e=".boxel-watch.lock";function lR(t){return Cse.join(t,j$e)}function cR(t){try{return process.kill(t,0),!0}catch(e){return e?.code==="EPERM"}}async function q$e(t){try{let e=await Uc.readFile(lR(t),"utf8"),r=JSON.parse(e);return typeof r.pid!="number"||typeof r.startedAt!="string"||typeof r.realmUrl!="string"?null:r}catch{return null}}async function Sse(t,e){await Uc.mkdir(t,{recursive:!0});let r=await q$e(t),n=!1;if(r&&cR(r.pid))return{ok:!1,existing:r};r&&(n=!0);let s={pid:process.pid,startedAt:new Date().toISOString(),realmUrl:e};return await Uc.writeFile(lR(t),JSON.stringify(s,null,2)+`
|
|
2942
2942
|
`),{ok:!0,staleOverwrote:n}}async function MS(t){try{await Uc.unlink(lR(t))}catch(e){if(e?.code!=="ENOENT")throw e}}var jc=We(require("fs/promises")),Ise=We(require("os")),uR=We(require("path"));function vse(){return uR.join(Ise.homedir(),".boxel-cli")}function xse(){return uR.join(vse(),"watch-processes.json")}async function wse(){try{let t=await jc.readFile(xse(),"utf8"),e=JSON.parse(t);return Array.isArray(e?.processes)?{processes:e.processes.filter(n=>typeof n?.pid=="number"&&typeof n?.workspace=="string"&&typeof n?.startedAt=="string")}:{processes:[]}}catch{return{processes:[]}}}async function pR(t){await jc.mkdir(vse(),{recursive:!0});let e=xse(),r=`${e}.${process.pid}.tmp`;await jc.writeFile(r,JSON.stringify(t,null,2)+`
|
|
2943
2943
|
`),await jc.rename(r,e)}async function Bse(){let t=await wse(),e=t.processes.filter(r=>cR(r.pid));return e.length!==t.processes.length&&await pR({processes:e}),{processes:e}}async function Tse(t){let r=(await Bse()).processes.filter(n=>n.pid!==process.pid);r.push({pid:process.pid,workspace:t,startedAt:new Date().toISOString()}),await pR({processes:r})}async function Dse(){let t=await wse(),e=t.processes.filter(r=>r.pid!==process.pid);e.length!==t.processes.length&&await pR({processes:e})}async function fR(){return(await Bse()).processes}var dR=class extends ni{name;debounceMs;overwriteLocal;claudeSkills;checkpointManager;lastKnownMtimes=new Map;pendingChanges=new Map;debounceTimer=null;isShutdown=!1;constructor(e,r,n){super({realmUrl:e.realmUrl,localDir:e.localDir},r),this.debounceMs=n.debounceMs,this.overwriteLocal=n.overwriteLocal??!1,this.claudeSkills=n.claudeSkills??!0,this.checkpointManager=new tn(e.localDir),this.name=G$e(this.normalizedRealmUrl)}async sync(){await this.poll(),await this.flushPending()}async getRemoteMtimes(){let e=`${this.normalizedRealmUrl}_mtimes`,r=await this.authenticator.authedRealmFetch(e,{headers:{Accept:"application/vnd.api+json"}});if(!r.ok)throw new Error(`_mtimes fetch failed for ${this.normalizedRealmUrl}: ${r.status} ${r.statusText}`);let n=await r.json(),s=new Map;for(let[i,o]of Object.entries(n.data?.attributes?.mtimes??{}))s.set(i.replace(this.normalizedRealmUrl,""),o);return s}get localDir(){return this.options.localDir}get realmUrl(){return this.normalizedRealmUrl}get pendingCount(){return this.pendingChanges.size}async initialize(){await this.getRemoteMtimes(),await this.checkpointManager.isInitialized()||await this.checkpointManager.init();let e=await Da(this.options.localDir);if(e&&e.realmUrl===this.normalizedRealmUrl&&e.remoteMtimes)for(let[r,n]of Object.entries(e.remoteMtimes))this.lastKnownMtimes.set(r,n);await this.reconcileSkills()}async reconcileSkills(){await mh({realmUrl:this.normalizedRealmUrl,localDir:this.options.localDir,enabled:this.claudeSkills})}async poll(){let e=await this.getRemoteMtimes(),r=!1;for(let[n,s]of e){if(kr(n))continue;let i=this.lastKnownMtimes.get(n);i===void 0?this.recordPending(n,{status:"added",mtime:s})&&(r=!0):s>i&&this.recordPending(n,{status:"modified",mtime:s})&&(r=!0)}for(let n of this.lastKnownMtimes.keys())kr(n)||e.has(n)||this.pendingChanges.get(n)?.status!=="deleted"&&(this.pendingChanges.set(n,{status:"deleted",mtime:0}),r=!0);return r}async flushPending(){if(this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.pendingChanges.size===0)return{pulled:[],deleted:[],skipped:[],checkpoint:null};let e=new Map(this.pendingChanges);this.pendingChanges.clear();let r=[],n=[],s=[],i=[],o=null;if(!this.overwriteLocal){let c=await Da(this.options.localDir);c&&c.realmUrl===this.normalizedRealmUrl&&(o=c)}for(let[c,u]of e){let p=US.join(this.options.localDir,c);if(!this.overwriteLocal&&await this.localDivergesFromManifest(p,c,o,u.status)){s.push(c);continue}if(u.status==="deleted"){try{await Pse.unlink(p)}catch(f){if(f.code!=="ENOENT")throw f}n.push(c),i.push({file:c,status:"deleted"})}else await this.downloadFile(c,p),r.push(c),i.push({file:c,status:u.status})}let a=new Set(s);for(let[c,u]of e)a.has(c)||(u.status==="deleted"?this.lastKnownMtimes.delete(c):this.lastKnownMtimes.set(c,u.mtime));i.some(c=>c.file.startsWith("skills/"))&&await this.reconcileSkills();let l=null;return i.length>0&&(await this.persistManifest(r,n),l=await this.checkpointManager.createCheckpoint("remote",i)),{pulled:r,deleted:n,skipped:s,checkpoint:l}}async localDivergesFromManifest(e,r,n,s){let i;try{i=await si(e)}catch(a){if(a.code!=="ENOENT")throw a;return s==="deleted"?!1:n?.files[r]!==void 0}let o=n?.files[r];return o===void 0?!0:i!==o}scheduleFlush(e){this.isShutdown||(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(async()=>{this.debounceTimer=null;try{let r=await this.flushPending();e?.(r)}catch(r){console.error(`${W}[${this.name}] Error applying changes:${v}`,r)}},this.debounceMs))}shutdown(){this.isShutdown=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}recordPending(e,r){let n=this.pendingChanges.get(e);return n&&n.mtime===r.mtime?!1:(this.pendingChanges.set(e,r),!0)}async persistManifest(e,r){let n=await Da(this.options.localDir),s=n&&n.realmUrl===this.normalizedRealmUrl?n.files:null,i=s?{...s}:{};for(let l of r)delete i[l];for(let l of e){let c=US.join(this.options.localDir,l);try{i[l]=await si(c)}catch(u){if(u.code!=="ENOENT")throw u}}let o={};for(let[l,c]of this.lastKnownMtimes)c!==0&&(o[l]=c);let a={realmUrl:this.normalizedRealmUrl,files:i};Object.keys(o).length>0&&(a.remoteMtimes=o),await Mc(this.options.localDir,a)}};async function H$e(t,e={}){if(t.length===0)return{watchers:[],error:"No realms provided to watch."};let r=e.intervalMs??3e4,n=e.debounceMs??5e3,s=e.quiet??!1,i=e.overwriteLocal??!1;if(!Number.isFinite(r)||r<=0)return{watchers:[],error:"`intervalMs` must be a positive number."};if(!Number.isFinite(n)||n<0)return{watchers:[],error:"`debounceMs` must be a non-negative number."};let o;if(e.authenticator)o=e.authenticator;else{let E=Ln({realmUrl:t[0].realmUrl,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager});if(!E.ok)return{watchers:[],error:E.error};o=E.authenticator}let a=[];for(let E of t){let b=await Sse(E.localDir,E.realmUrl);if(!b.ok){for(let I of a)await MS(I);return{watchers:[],error:$$e(E.localDir,b.existing)}}b.staleOverwrote&&!s&&console.log(`${te}[${jS()}] overwrote stale lock at ${E.localDir}${v}`),a.push(E.localDir)}let l=[];for(let E of t){let b=new dR(E,o,{debounceMs:n,overwriteLocal:i,claudeSkills:e.claudeSkills});try{await b.initialize()}catch(I){for(let w of l)w.shutdown();for(let w of a)await MS(w);return{watchers:[],error:`Failed to initialize watch on ${E.realmUrl}: ${I instanceof Error?I.message:String(I)}`}}l.push(b)}if(!s){console.log(`${Ye}\u21C5 Watching ${l.length} realm${l.length>1?"s":""}:${v}`);for(let E of l)console.log(` ${E.name} ${te}\u2192${v} ${E.localDir}`);console.log(` ${te}Interval: ${r/1e3}s, Debounce: ${n/1e3}s${v}`),console.log(` ${te}Press Ctrl+C to stop${v}
|
|
2944
2944
|
`)}let c=async()=>{await Promise.all(l.map(async E=>{try{await E.poll()&&(s||console.log(`${te}[${jS()}]${v} [${E.name}] ${ot}\u26A1 ${E.pendingCount} change(s) detected${v}`),E.scheduleFlush(I=>{s||V$e(E.name,I)}))}catch(b){console.error(`${W}[${E.name}] poll error:${v}`,b instanceof Error?b.message:b)}}))},u=!1,p=null,f=()=>{u||(p=setTimeout(async()=>{p=null,!u&&(await c(),f())},r))};try{await Tse(t.map(E=>E.localDir).join(", "))}catch{}let d=()=>{},A=new Promise(E=>{d=E}),h=null,m=null,g=async()=>{if(!u){u=!0,p!==null&&(clearTimeout(p),p=null);for(let E of l)E.shutdown();h&&process.off("SIGINT",h),m&&process.off("SIGTERM",m);for(let E of a)try{await MS(E)}catch{}try{await Dse()}catch{}d()}};return e.signal?e.signal.aborted?g():e.signal.addEventListener("abort",()=>void g(),{once:!0}):(h=()=>{s||console.log(`
|
|
2945
2945
|
${Ye}\u21C5 Watch stopped${v}`),g()},m=h,process.on("SIGINT",h),process.on("SIGTERM",m)),u||await Promise.race([(async()=>{await c(),f()})().catch(()=>{}),A]),await A,{watchers:l}}function $$e(t,e){return`A boxel realm watch process is already active for ${t} (pid ${e.pid}, started ${e.startedAt}). Stop it before starting a new one, or remove ${US.join(t,".boxel-watch.lock")} if it's stale.`}function V$e(t,e){let r=e.pulled.length+e.deleted.length;if(r>0&&(console.log(`${te}[${jS()}]${v} [${t}] ${he}applied ${r} change(s)${v} (${e.pulled.length} pulled, ${e.deleted.length} deleted)`),e.checkpoint)){let n=e.checkpoint.isMajor?"[MAJOR]":"[minor]";console.log(` ${te}Checkpoint:${v} ${e.checkpoint.shortHash} ${n} ${e.checkpoint.message}`)}for(let n of e.skipped)console.log(`${te}[${jS()}]${v} [${t}] ${ot}\u26A0 skipped ${n}: local diverges from sync manifest (rerun with --overwrite-local to discard, or \`boxel realm sync\` to reconcile)${v}`)}function G$e(t){return t.replace(/\/$/,"").split("/").slice(-2).join("/")}function jS(){return new Date().toLocaleTimeString()}function Y$e(t){return e=>{let r=Number.parseFloat(e);if(!Number.isFinite(r)||r<=0)throw new hR.InvalidArgumentError(`${t} must be a positive number.`);return r}}function W$e(t){return e=>{let r=Number.parseFloat(e);if(!Number.isFinite(r)||r<0)throw new hR.InvalidArgumentError(`${t} must be a non-negative number.`);return r}}function _se(t){t.command("start").description("Start watching a Boxel realm for server-side changes and pull them into a local directory").argument("<realm-url>","The URL of the realm to watch (e.g., https://app.boxel.ai/demo/)").argument("<local-dir>","The local directory to write changes into").option("-i, --interval <seconds>","Polling interval in seconds",Y$e("--interval"),30).option("-d, --debounce <seconds>","Seconds to wait after a burst of changes before applying them",W$e("--debounce"),5).option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--overwrite-local","Overwrite local files when the remote changes. Default: skip + warn when the local copy diverges from the sync manifest.").option("--no-claude-skills","Skip mirroring the realm's skills/ directory into the checkout's .claude/skills/ (env: BOXEL_DISABLE_CLAUDE_SKILLS_SYNC=1)").action(async(e,r,n)=>{let s=await mr(n.realmSecretSeed===!0),i=await H$e([{realmUrl:e,localDir:r}],{intervalMs:n.interval*1e3,debounceMs:n.debounce*1e3,realmSecretSeed:s,overwriteLocal:n.overwriteLocal===!0,claudeSkills:n.claudeSkills});i.error&&(console.error(`${W}Error:${v} ${i.error}`),process.exit(1))})}var AR=require("child_process");var J$e=200;function K$e(t){return new Promise(e=>setTimeout(e,t))}function Nse(t){try{if(process.platform==="win32")try{process.kill(t)}catch{(0,AR.execSync)(`taskkill /PID ${t} /F`,{stdio:"ignore"})}else process.kill(t,"SIGINT");return{ok:!0,alreadyGone:!1}}catch(e){return e?.code==="ESRCH"?{ok:!0,alreadyGone:!0}:{ok:!1,alreadyGone:!1}}}function z$e(){if(process.platform==="win32")return[];let t;try{t=(0,AR.execSync)('ps aux | grep -E "(tsx[[:space:]].*src/index\\.ts[[:space:]]+realm[[:space:]]+watch[[:space:]]+start|[[:space:]]boxel[[:space:]]+realm[[:space:]]+watch[[:space:]]+start|node[[:space:]].*boxel[[:space:]]+realm[[:space:]]+watch[[:space:]]+start)" | grep -v grep | grep -v "[[:space:]]stop"',{encoding:"utf8"}).trim()}catch{return[]}if(!t)return[];let e=[],r=new Set;for(let n of t.split(`
|
|
2946
2946
|
`)){if(!n)continue;let s=n.trim().split(/\s+/),i=Number.parseInt(s[1]??"",10);if(!Number.isFinite(i)||r.has(i))continue;r.add(i);let o=".",a=n.match(/\bstart\s+\S+\s+(\S+)/);a&&a[1]&&!a[1].startsWith("-")&&(o=a[1]),e.push({pid:i,workspace:o})}return e}async function X$e(){let t=[],e=[],r=new Set,n=await fR();for(let s of n){if(s.pid===process.pid)continue;r.add(s.pid);let i=Nse(s.pid),o={pid:s.pid,workspace:s.workspace};i.ok?t.push(o):e.push(o)}for(let s of z$e()){if(s.pid===process.pid||r.has(s.pid))continue;r.add(s.pid);let i=Nse(s.pid),o={pid:s.pid,workspace:s.workspace};i.ok?t.push(o):e.push(o)}return t.length>0&&(await K$e(J$e),await fR()),{stopped:t,failed:e}}function Z$e(t){if(t.stopped.length===0&&t.failed.length===0){console.log("No running watch processes found.");return}for(let e of t.stopped)console.log(` ${te}\u21C5${v} Stopped: boxel realm watch ${e.workspace} (PID ${e.pid})`);for(let e of t.failed)console.log(` ${W}\xD7${v} Failed to stop: boxel realm watch ${e.workspace} (PID ${e.pid})`);if(t.stopped.length>0){let e=t.stopped.length>1?"es":"";console.log(`
|
|
2947
2947
|
${he}\u2713 Stopped ${t.stopped.length} process${e}${v}`)}}function kse(t){t.command("stop").description("Stop all running boxel realm watch processes").action(async()=>{let e=await X$e();Z$e(e)})}function Qse(t){let e=t.command("watch").description("Watch a Boxel realm; subcommands manage watch processes");_se(e),kse(e)}function Rse(t){let e=t.command("realm").description("Manage realms on the realm server");une(e),pne(e),dne(e),_ne(e),kne(e),Fne(e),Lne(e),Une(e),zne(e),ise(e),use(e),fse(e),dse(e);let r=yse(e);gse(r),Gne(e),bse(e),Qse(e)}async function Mse(t,e,r){let{url:n,response:s}=await fh(t,"data-keys",e,r);if(!s.ok){let i=await s.text().catch(()=>"");throw new Error(`${r} ${n} answered HTTP ${s.status}: ${i.slice(0,300)}`)}return s.json()}async function mR(t){return Mse(t,"_data-keys","GET")}async function eVe(t){let{started:e,pass:r}=await Mse(t,`_data-keys/reseal?currentKeyId=${encodeURIComponent(t.currentKeyId)}`,"POST"),n=Date.now()+(t.timeoutMs??60*60*1e3),s=await mR(t),i=o=>o.currentKeyId===t.currentKeyId&&(o.rowsToReseal===0||o.pass.startedAt===r.startedAt&&!o.pass.running);for(;t.wait&&!i(s);){if(Date.now()>n)throw new Error(`the re-seal pass did not finish in time; ${s.rowsToReseal} rows were left. Run status to see where it stands`);await new Promise(o=>setTimeout(o,t.pollIntervalMs??2e3)),s=await mR(t)}return{started:e,status:s}}function Ose(t){console.log(`Current data key: ${t.currentKeyId}`),console.log(`Loaded data keys: ${t.loadedKeyIds.join(", ")}`),t.columns.length===0&&console.log("No table seals its secrets with the helper.");for(let{field:r,rowsByKeyId:n}of t.columns){let s=Object.entries(n).map(([i,o])=>`${i}=${o}`).join(", ");console.log(` ${r}: ${s||"no sealed rows"}`)}console.log(`Rows left to re-seal: ${t.rowsToReseal}`),console.log(`Retirable data keys: ${t.retirableKeyIds.join(", ")||"none"}`),t.unloadedKeyIds.length>0&&console.log(`${ot}Rows reference data keys this server has not loaded: ${t.unloadedKeyIds.join(", ")}${v}`);let{pass:e}=t;if(e.running)console.log(`Re-seal pass: running since ${e.startedAt}`);else if(e.error)console.log(`${ot}Re-seal pass failed: ${e.error}${v}`);else if(e.report){console.log(`Re-seal pass: finished ${e.finishedAt}${e.report.interrupted?" (interrupted)":""}`);for(let r of e.report.columns)console.log(` ${r.field}: resealed=${r.resealed} changedConcurrently=${r.changedConcurrently} unopenable=${r.unopenable}`)}else console.log("Re-seal pass: none has run on this server")}async function Fse(t){let e=await mr(!0);if(!e)throw new Error("A realm secret seed is required");return{realmServerUrl:t.realmServer,realmSecretSeed:e}}async function Lse(t){try{await t()}catch(e){console.error(`Error: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}}function Use(t){let e=t.command("data-keys").description("Rotate the data key that seals stored secrets: report where a rotation stands and re-seal stored rows under the current data key");e.command("status").description("Report the loaded data keys, the rows each sealed, the keys that can be retired, and the re-seal pass").requiredOption("--realm-server <url>","The realm server to ask").option("--json","Output JSON").action(async r=>Lse(async()=>{let n=await mR(await Fse(r));r.json?Fe.output(JSON.stringify(n,null,2)):Ose(n)})),e.command("reseal").description("Start a background pass that re-seals every stored row under the current data key. Safe to run again: it resumes where a stopped pass left off and changes nothing once every row is under the current key").requiredOption("--realm-server <url>","The realm server to run it on").requiredOption("--current-key <key-id>","The data key every server should have as current (status shows it); a server whose current key differs refuses").option("--wait","Wait for the pass to finish and report it").option("--json","Output JSON").action(async r=>Lse(async()=>{let{started:n,status:s}=await eVe({...await Fse(r),currentKeyId:r.currentKey,wait:r.wait});r.json?Fe.output(JSON.stringify({started:n,...s},null,2)):(console.log(n?`${he}Started a re-seal pass.${v}`:"A re-seal pass is already running on this server."),Ose(s)),r.wait&&s.rowsToReseal>0&&(process.exitCode=1)}))}var $se=require("fs/promises");async function ry(t,e,r,n){let{url:s,response:i}=await fh(t,"system-keys",e,r,n);if(!i.ok){let o=await i.text().catch(()=>""),a=o.slice(0,300);try{let l=JSON.parse(o)?.errors;Array.isArray(l)&&l.length>0&&(a=l.join("; "))}catch{}throw new Error(`${r} ${s} answered HTTP ${i.status}: ${a}`)}return i.json()}async function Vse(t){return(await ry(t,"_system-keys","GET")).keys}async function tVe(t,e){return ry(t,`_system-keys/${encodeURIComponent(e)}`,"GET")}async function rVe(t,e){return(await ry(t,"_system-keys","POST",e)).key}async function nVe(t,e,r){return(await ry(t,`_system-keys/${encodeURIComponent(e)}`,"PATCH",r)).key}async function sVe(t,e,r){return(await ry(t,`_system-keys/${encodeURIComponent(e)}`,"DELETE",r)).deleted}async function gR(t,e){if(e.id&&e.destination)throw new Error("Name the key with --id or --destination, not both");if(e.id)return e.id;if(!e.destination)throw new Error("Name the key with --id or --destination");let r;try{r=new URL(e.destination).href}catch{throw new Error(`${e.destination} is not a URL`)}let n=(await Vse(t)).find(s=>s.destination===r);if(!n)throw new Error(`No system key has the destination ${r}`);return n.id}function jse(t){return t.replace(/\r?\n$/,"")}async function qse(t,e={}){let r=e.input??process.stdin;if(t.stdin&&t.keyFile)throw new Error("Pass --stdin or --key-file, not both");let n;if(t.keyFile)n=jse(await(0,$se.readFile)(t.keyFile,"utf8"));else if(t.stdin){let s=[];for await(let i of r)s.push(Buffer.isBuffer(i)?i:Buffer.from(i));n=jse(Buffer.concat(s).toString("utf8"))}else if(r.isTTY)n=await Zu("Key value: ",{revealLast:4,input:r,output:e.output});else throw new Error("Cannot prompt for the key value: stdin is not a terminal. Pass --stdin or --key-file");if(!n)throw new Error("The key value is empty");return n}async function yR(t,{stdinUsed:e}){if(t!==void 0){if(!t.trim())throw new Error("The operator note is empty");return t}if(e||!process.stdin.isTTY)throw new Error("Pass --note: the operator note, recorded in the key history, says who made the change and why. A name in it is recorded as given, not verified");let r=await To("Operator note (who and why; a name here is recorded as given, not verified): ");if(!r)throw new Error("The operator note is empty");return r}function qS(t){console.log(`${t.destination}`),console.log(` id: ${t.id}`),console.log(` auth: ${t.authMethod}${t.paramName?` (${t.paramName})`:""}`),console.log(` credit strategy: ${t.creditStrategy}`),console.log(` streaming: ${t.supportsStreaming?"yes":"no"}`),console.log(` value: ${t.hasValue?t.keyId?`sealed under data key ${t.keyId}`:"in plain text only, until the backfill seals it":"none"}`),console.log(` updated: ${t.updatedAt}`)}function iVe(t){if(t.length===0){console.log(" history: none recorded");return}console.log(" history:");for(let e of t)console.log(` ${e.changedAt} ${e.action}: ${e.note}`),console.log(` from ${e.clientAddress??"an unknown address"}, token signed ${e.tokenIssuedAt??"at an unknown time"}`)}async function Zg(t){let e=await mr(!0);if(!e)throw new Error("A realm secret seed is required");return{realmServerUrl:t.realmServer,realmSecretSeed:e}}async function ey(t){try{await t()}catch(e){console.error(`Error: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}}function ty(t,e,r){t?Fe.output(JSON.stringify(e,null,2)):r()}var Eh={id:"The key, by its id",destination:"The key, by its destination URL"};function Hse(t){return t.option("--stdin","Read the key value from stdin").option("--key-file <path>","Read the key value from a file").option("--note <text>","The operator note recorded with the change: who made it and why (prompted for when omitted). A name in it is recorded as given, not verified")}function Gse(t){let e=t.command("keys").description("Manage the realm server's system keys: the platform's own vendor keys that the proxy attaches. No command shows a value");e.command("list").description("List the system keys, without their values").requiredOption("--realm-server <url>","The realm server to ask").option("--json","Output JSON").action(async r=>ey(async()=>{let n=await Vse(await Zg(r));ty(r.json,n,()=>{n.length===0&&console.log("No system keys."),n.forEach(qS)})})),e.command("show").description("Show one system key and its recent history, without its value").requiredOption("--realm-server <url>","The realm server to ask").option("--id <id>",Eh.id).option("--destination <url>",Eh.destination).option("--json","Output JSON").action(async r=>ey(async()=>{let n=await Zg(r),s=await tVe(n,await gR(n,r));ty(r.json,s,()=>{qS(s.key),iVe(s.history)})})),Hse(e.command("add").description("Add a system key for a destination that has none. The value is typed at a masked prompt, or read with --stdin or --key-file").requiredOption("--realm-server <url>","The realm server to change").requiredOption("--destination <url>","The URL the key is sent to; requests under it get the key").requiredOption("--credit-strategy <strategy>","How calls are charged: openrouter or none").option("--auth <method>","Where the key goes: header or url-parameter","header").option("--param-name <name>","The header (default Authorization) or URL parameter (default key) that carries the key. A header always carries it as a Bearer token").option("--streaming","The destination supports streamed responses")).option("--json","Output JSON").action(async r=>ey(async()=>{if(!["openrouter","none"].includes(r.creditStrategy))throw new Error("--credit-strategy must be openrouter or none");if(!["header","url-parameter"].includes(r.auth))throw new Error("--auth must be header or url-parameter");let n=await Zg(r),s=await qse(r),i=await yR(r.note,{stdinUsed:!!r.stdin}),o=await rVe(n,{destination:r.destination,authMethod:r.auth,paramName:r.paramName,creditStrategy:r.creditStrategy,supportsStreaming:!!r.streaming,value:s,note:i});ty(r.json,o,()=>{console.log(`${he}Added the system key.${v}`),qS(o)})})),Hse(e.command("replace").description("Replace a system key's value, keeping its destination and settings").requiredOption("--realm-server <url>","The realm server to change").option("--id <id>",Eh.id).option("--destination <url>",Eh.destination)).option("--json","Output JSON").action(async r=>ey(async()=>{let n=await Zg(r),s=await gR(n,r),i=await qse(r),o=await yR(r.note,{stdinUsed:!!r.stdin}),a=await nVe(n,s,{value:i,note:o});ty(r.json,a,()=>{console.log(`${he}Replaced the system key.${v}`),qS(a)})})),e.command("delete").description("Delete a system key; the proxy stops serving its destination").requiredOption("--realm-server <url>","The realm server to change").option("--id <id>",Eh.id).option("--destination <url>",Eh.destination).option("--note <text>","The operator note recorded with the change: who made it and why (prompted for when omitted). A name in it is recorded as given, not verified").option("--json","Output JSON").action(async r=>ey(async()=>{let n=await Zg(r),s=await gR(n,r),i=await yR(r.note,{stdinUsed:!1}),o=await sVe(n,s,{note:i});ty(r.json,o,()=>{console.log(`${he}Deleted the system key for ${o.destination}.${v}`)})}))}var wi=require("fs");var oVe="/tmp/boxel-diagnostic-render.json",ER=["isolated","embedded","fitted","atom"];function aVe(t,e,{format:r="isolated",clearCache:n=!1}={}){let s=e.endsWith(".json")?e:`${e}.json`,i={cardRender:!0,...n?{clearCache:n}:{}};return`${t.endsWith("/")?t:`${t}/`}render/${encodeURIComponent(s)}/1/${encodeURIComponent(JSON.stringify(i))}/html/${r}/0`}async function lVe(t,e){let r=e.format??"isolated";if(!ER.includes(r))throw new Error(`--format must be one of ${ER.join(", ")}`);if(!e.note.trim())throw new Error("The operator note is empty");let{url:n,response:s}=await fh(t,"diagnostic-render","_diagnostic-render-token","POST",{card:e.card,note:e.note,...e.realmOnly?{realmOnly:!0}:{}});if(!s.ok){let o=await s.text().catch(()=>""),a=o.slice(0,300);try{let l=JSON.parse(o)?.errors;Array.isArray(l)&&l.length>0&&(a=l.join("; "))}catch{}throw new Error(`POST ${n} answered HTTP ${s.status}: ${a}`)}let i=await s.json();return{...i,renderURL:aVe(i.hostURL,i.card,{format:r,clearCache:e.clearCache})}}function cVe(t,e){let r=(0,wi.openSync)(t,wi.constants.O_WRONLY|wi.constants.O_CREAT|wi.constants.O_TRUNC|wi.constants.O_NOFOLLOW,384);try{(0,wi.fchmodSync)(r,384),(0,wi.writeSync)(r,`${JSON.stringify(e,null,2)}
|
|
2948
|
-
`)}finally{(0,wi.closeSync)(r)}}function Yse(t){t.command("render-token").description("Issue a read-only diagnostic session for rendering a live card in a browser as the indexer does, and write it with the card's render URL to a file").argument("<card-url>","The card to render").requiredOption("--note <text>","Who is asking and why, at most 300 characters. The server logs it with the mint and every use of the session. A name in it is recorded as given, not verified").option("--realm-server <url>","The realm server that holds the card (default: the card URL's origin)").option("--realm-only","Cover only the card's own realm, not every realm its owner may read").option("--format <format>",`The render format: ${ER.join(", ")}`,"isolated").option("--clear-cache","Have the render drop its loader cache before it starts").option("--output <path>","Where to write the render URL and session",oVe).option("--no-output","Write no file").option("--json","Print everything the file holds, the session included, as JSON").action(async(e,r)=>{try{let n=await mr(!0);if(!n)throw new Error("A realm secret seed is required");let s=await lVe({realmServerUrl:r.realmServer??new URL(e).origin,realmSecretSeed:n},{card:e,note:r.note,realmOnly:r.realmOnly,format:r.format,clearCache:r.clearCache});if(r.output&&cVe(r.output,s),r.json){Fe.output(JSON.stringify(s,null,2));return}console.log(`${he}Issued diagnostic session ${s.id}.${v}`),console.log(` reads as: ${s.user}`),console.log(` covers: ${s.scope==="realm"?`its realm alone (${s.realm})`:`every realm the owner may read (${s.realms.length} at the mint)`}`),console.log(` expires: ${s.expiresAt}`),console.log(` render URL: ${s.renderURL}`),r.output&&console.log(` written to: ${r.output}`)}catch(n){console.error(`Error: ${n instanceof Error?n.message:String(n)}`),process.exit(1)}})}function Wse(t){let e=t.command("realm-server",{hidden:!0}).description("Operate a realm server with its realm secret seed (env: BOXEL_REALM_SECRET_SEED)");Use(e),Gse(e),Yse(e)}async function uVe(t,e,r){let n=r?.profileManager??Re();if(!n.getActiveProfile())return{ok:!1,error:ct};if(kr(e))return{ok:!1,error:`Cannot delete protected file: ${e}`};let i=
|
|
2948
|
+
`)}finally{(0,wi.closeSync)(r)}}function Yse(t){t.command("render-token").description("Issue a read-only diagnostic session for rendering a live card in a browser as the indexer does, and write it with the card's render URL to a file").argument("<card-url>","The card to render").requiredOption("--note <text>","Who is asking and why, at most 300 characters. The server logs it with the mint and every use of the session. A name in it is recorded as given, not verified").option("--realm-server <url>","The realm server that holds the card (default: the card URL's origin)").option("--realm-only","Cover only the card's own realm, not every realm its owner may read").option("--format <format>",`The render format: ${ER.join(", ")}`,"isolated").option("--clear-cache","Have the render drop its loader cache before it starts").option("--output <path>","Where to write the render URL and session",oVe).option("--no-output","Write no file").option("--json","Print everything the file holds, the session included, as JSON").action(async(e,r)=>{try{let n=await mr(!0);if(!n)throw new Error("A realm secret seed is required");let s=await lVe({realmServerUrl:r.realmServer??new URL(e).origin,realmSecretSeed:n},{card:e,note:r.note,realmOnly:r.realmOnly,format:r.format,clearCache:r.clearCache});if(r.output&&cVe(r.output,s),r.json){Fe.output(JSON.stringify(s,null,2));return}console.log(`${he}Issued diagnostic session ${s.id}.${v}`),console.log(` reads as: ${s.user}`),console.log(` covers: ${s.scope==="realm"?`its realm alone (${s.realm})`:`every realm the owner may read (${s.realms.length} at the mint)`}`),console.log(` expires: ${s.expiresAt}`),console.log(` render URL: ${s.renderURL}`),r.output&&console.log(` written to: ${r.output}`)}catch(n){console.error(`Error: ${n instanceof Error?n.message:String(n)}`),process.exit(1)}})}function Wse(t){let e=t.command("realm-server",{hidden:!0}).description("Operate a realm server with its realm secret seed (env: BOXEL_REALM_SECRET_SEED)");Use(e),Gse(e),Yse(e)}async function uVe(t,e,r){let n=r?.profileManager??Re();if(!n.getActiveProfile())return{ok:!1,error:ct};if(kr(e))return{ok:!1,error:`Cannot delete protected file: ${e}`};let i=dt(t,{profileManager:n});if(!i.ok)return{ok:!1,error:i.error};t=i.url;let o=new URL(e,ce(t)).href,a;try{a=await n.authedRealmFetch(o,{method:"DELETE",headers:{Accept:Ur.CardSource}})}catch(l){return{ok:!1,error:l instanceof Error?l.message:String(l)}}if(!a.ok){let l=await a.text().catch(()=>"(no body)");return{ok:!1,error:`HTTP ${a.status}: ${l.slice(0,300)}`}}return{ok:!0}}function Jse(t){t.command("delete").description("Delete a file from a realm").argument("<path>","Realm-relative file path to delete").requiredOption("--realm <realm-url>","The realm URL to delete from").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await uVe(r.realm,e)}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}r.json?Fe.output(JSON.stringify(n,null,2)):n.ok?console.log(`${te}Deleted:${v} ${e}`):console.error(`${W}Error:${v} ${n.error}`),n.ok||process.exit(1)})}function pVe(t,e){let r=vre(t);return r?e?{ok:!1,error:"Pass either a full @cardstack/ identifier as <path> or --realm with a realm-relative path, not both"}:{ok:!0,...r}:e?{ok:!0,realm:e,path:t}:{ok:!1,error:"--realm is required unless <path> is a full @cardstack/ identifier"}}async function bR(t,e,r){let n=dt(t,{profileManager:r?.profileManager});if(!n.ok)return{ok:!1,error:n.error};t=n.url;let s=Ln({realmUrl:t,realmSecretSeed:r?.realmSecretSeed,profileManager:r?.profileManager,authenticator:r?.authenticator});if(!s.ok)return{ok:!1,error:s.error};let i=s.authenticator,o=new URL(e,ce(t)).href,a;try{a=await i.authedRealmFetch(o,{method:"GET",headers:{Accept:Ur.CardSource}})}catch(p){return{ok:!1,error:p instanceof Error?p.message:String(p)}}if(!a.ok){let p=await a.text().catch(()=>"(no body)");return{ok:!1,status:a.status,error:`HTTP ${a.status}: ${p.slice(0,300)}`}}let l=a.headers.get("content-type");if(l?qg(l):Ta(e)){let p=new Uint8Array(await a.arrayBuffer());return{ok:!0,status:a.status,bytes:p}}let u=await a.text();return{ok:!0,status:a.status,content:u}}function Kse(t){t.command("read").description("Read a file from a realm").argument("<path>","Realm-relative file path (e.g., hello-world.json, Cards/my-card.gts), or a full @cardstack/ identifier (e.g., @cardstack/catalog/hello.gts) in which case --realm is omitted").option("--realm <realm-url>","The realm URL or @cardstack/<realm>/ identifier to read from (required unless <path> is a full @cardstack/ identifier)").option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint a JWT locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--json","Output raw JSON response").action(async(e,r)=>{let n=pVe(e,r.realm);n.ok||(console.error(`${W}Error:${v} ${n.error}`),process.exit(1));let s;try{let i=await mr(r.realmSecretSeed===!0);s=await bR(n.realm,n.path,{realmSecretSeed:i})}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json){let i={ok:s.ok,status:s.status,error:s.error};s.content!==void 0&&(i.content=s.content),s.bytes!==void 0&&(i.bytesBase64=Buffer.from(s.bytes.buffer,s.bytes.byteOffset,s.bytes.byteLength).toString("base64")),Fe.output(JSON.stringify(i,null,2))}else s.ok?s.bytes!==void 0?process.stdout.write(s.bytes):Fe.output(s.content??""):(console.error(`${te}Status:${v} ${s.status??"(no status)"}`),console.error(`${W}Error:${v} ${s.error}`));s.ok||process.exit(1)})}var CR="// touched for re-index";async function fVe(t,e,r){let n=r?.profileManager??Re();if(!n.getActiveProfile())return{ok:!1,touched:[],skipped:[],error:ct};let i=dt(t,{profileManager:n});if(!i.ok)return{ok:!1,touched:[],skipped:[],error:i.error};t=i.url;let o;if(r?.all){if(e.length>0)return{ok:!1,touched:[],skipped:[],error:"Cannot pass file paths together with --all"};let c=await $p(t,{profileManager:n});if(c.error)return{ok:!1,touched:[],skipped:[],error:c.error};o=c.filenames.filter(u=>(u.endsWith(".json")||u.endsWith(".gts"))&&!kr(u))}else{if(e.length===0)return{ok:!1,touched:[],skipped:[],error:"No file paths provided. Pass paths or use --all."};o=e}let a=[],l=[];for(let c of o){if(!c.endsWith(".json")&&!c.endsWith(".gts")){l.push({path:c,reason:"unsupported extension"});continue}if(kr(c)){l.push({path:c,reason:"protected file"});continue}let u=await bR(t,c,{profileManager:n});if(!u.ok||u.content==null){l.push({path:c,reason:u.error??"read failed"});continue}if(r?.dryRun){a.push(c);continue}let p=c.endsWith(".json")?dVe(u.content):AVe(u.content),f=await Hg(t,c,p,{profileManager:n});if(!f.ok){l.push({path:c,reason:f.error??"write failed"});continue}a.push(c)}return{ok:l.length===0,touched:a,skipped:l}}function dVe(t){try{let e=JSON.parse(t);if(e?.data)return e.data.meta={...e.data.meta??{},_touched:Date.now()},JSON.stringify(e,null,2)+`
|
|
2949
2949
|
`}catch{}return hVe(t)}function hVe(t){return t.endsWith(`
|
|
2950
2950
|
|
|
2951
2951
|
`)?t.slice(0,-1):t+`
|
|
@@ -2957,9 +2957,9 @@ ${CR}
|
|
|
2957
2957
|
`:t+`
|
|
2958
2958
|
`+CR+`
|
|
2959
2959
|
`}function zse(t){t.command("touch").description("Force realm re-indexing of one or more files by making a semantically-neutral edit. --all touches every .json/.gts in the realm without confirmation; use with care.").argument("[paths...]","Realm-relative file path(s) to touch (omit when using --all)").requiredOption("--realm <realm-url>","The realm URL to touch files in").option("--all","Touch every .json and .gts file in the realm").option("--dry-run","Print files that would be touched without writing").option("--json","Output raw JSON response").action(async(e,r)=>{let n;try{n=await fVe(r.realm,e,{all:r.all,dryRun:r.dryRun})}catch(s){console.error(`${W}Error:${v} ${s instanceof Error?s.message:String(s)}`),process.exit(1)}if(r.json)console.log(JSON.stringify(n,null,2));else if(n.error)console.error(`${W}Error:${v} ${n.error}`);else{let s=r.dryRun?`${te}[dry-run]${v} `:"";for(let o of n.touched)console.log(`${s}${he}touched${v} ${o}`);for(let{path:o,reason:a}of n.skipped)console.log(`${W}skipped${v} ${o} ${te}(${a})${v}`);let i=r.dryRun?"would touch":"touched";console.log(`
|
|
2960
|
-
${te}${i} ${n.touched.length} file(s)${n.skipped.length>0?`, skipped ${n.skipped.length}`:""}${v}`)}n.ok||process.exit(1)})}function Xse(t){let e=t.command("file").description("Read, write, and manage files in a realm");Jse(e),Fre(e),Ore(e),Kse(e),zse(e),Rre(e)}function IR(t){let e=t.getActiveProfile();if(!e)throw new Error(ct);return e}function Zse(t){return new Date(t).toLocaleString()}async function mVe(t={}){let e=t.profileManager??Re(),{profile:r}=IR(e),n=await ure({realmServerUrl:r.realmServerUrl,...t.openBrowserFn?{openBrowserFn:t.openBrowserFn}:{},username:Fc(r.matrixUserId),...t.timeout?{timeoutMs:Number(t.timeout)*1e3}:{}});if(n.userId!==r.matrixUserId)throw await Lg(r.realmServerUrl,n.token).catch(()=>{}),new Error(`The browser signed in ${n.userId}, but this profile is ${r.matrixUserId}. Run it again and sign in as ${r.matrixUserId}.`);e.setSecureSession(n),console.log(`${he}Signed in to manage keys${v} as ${n.userId} until ${Zse(n.expiresAt)}.`)}async function gVe(t={}){let e=t.profileManager??Re(),{profile:r}=IR(e),n=e.getSecureSession();n&&await Lg(r.realmServerUrl,n.token),e.clearSecureSession(),console.log("Signed out of managing keys.")}function yVe(t={}){let e=t.profileManager??Re();IR(e);let r=e.getSecureSession();console.log(r?`Signed in to manage keys as ${r.userId} until ${Zse(r.expiresAt)}.`:`Not signed in to manage keys. ${te}Run \`boxel keys sign-in\`.${v}`)}async function SR(t){try{await t()}catch(e){console.error(`${W}Error:${v} ${e?.message??e}`),process.exitCode=1}}function eie(t){let e=t.command("keys").description("Manage your own keys. Changing one needs you to sign in through the browser");e.command("sign-in").description("Sign in to Boxel in the browser, so this CLI can change your keys").option("--timeout <seconds>","How long to wait for the browser").action(r=>SR(()=>mVe(r))),e.command("sign-out").description("End the session this CLI uses to change your keys").action(()=>SR(()=>gVe())),e.command("status").description("Say whether this CLI is signed in to change your keys").action(()=>SR(()=>yVe()))}async function EVe(t,e,r){let n=r?.profileManager??Re(),s=n.getActiveProfile();if(!s)throw new Error("No active profile. Run `boxel profile add` to create one.");let i=ft(e,{profileManager:n});if(!i.ok)return{status:"error",error:i.error};e=i.url;let a=`${s.profile.realmServerUrl.replace(/\/$/,"")}/_run-command`,l={data:{type:"run-command",attributes:{realmURL:e,command:t,commandInput:r?.input??null}}},c;try{c=await n.authedRealmServerFetch(a,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:JSON.stringify(l)})}catch(f){return{status:"error",error:`run-command fetch failed: ${f instanceof Error?f.message:String(f)}`}}if(!c.ok){let f=await c.text().catch(()=>"(no body)");return{status:"error",error:`run-command HTTP ${c.status}: ${f}`}}let u;try{u=await c.json()}catch{return{status:"error",error:`run-command response was not valid JSON (HTTP ${c.status})`}}let p=u.data?.attributes;return{status:p?.status??"error",result:p?.cardResultString??null,error:p?.error??null}}function tie(t){t.command("run-command").description("Execute a host command on the realm server via the prerenderer").argument("<command-specifier>","Command module path (e.g. @cardstack/boxel-host/commands/get-card-type-schema/default)").requiredOption("--realm <realm-url>","The realm URL context for the command").option("--input <json>","JSON string of command input").option("--json","Output raw JSON response").action(async(e,r)=>{let n;if(r.input)try{let i=JSON.parse(r.input);(typeof i!="object"||i===null||Array.isArray(i))&&(console.error(`${W}Error:${v} --input must be a JSON object, got ${Array.isArray(i)?"array":typeof i}`),process.exit(1)),n=i}catch{console.error(`${W}Error:${v} --input is not valid JSON: ${r.input}`),process.exit(1)}let s;try{s=await EVe(e,r.realm,{input:n})}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json)Fe.output(JSON.stringify(s,null,2));else{if(console.log(`${te}Status:${v} ${bVe(s.status)}${s.status}${v}`),s.result){console.log(`${te}Result:${v}`);try{Fe.output(JSON.stringify(JSON.parse(s.result),null,2))}catch{Fe.output(s.result)}}s.error&&console.error(`${W}Error:${v} ${s.error}`)}(s.status==="error"||s.status==="unusable")&&process.exit(1)})}function bVe(t){switch(t){case"ready":return he;case"error":return W;default:return Ye}}var nie=require("node:crypto"),Wp=require("node:fs"),xR=require("node:path");var vR=120,CVe=5,SVe="capture-manifest.json",IVe={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","application/pdf":"pdf"};function HS(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function bl(t){return{ok:!1,captures:[],error:t}}function vVe(t){return HS(t)&&Array.isArray(t.captures)?t.captures.map(e=>HS(e)&&typeof e.name=="string"?e.name:null):[null]}function sie(t){return t.replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"")||"card"}async function xVe(t,e={}){let r;if(e.specPath){if(t)return bl("Provide either a card URL or --spec, not both");if(e.captureSpec)return bl("Capture flags cannot be combined with --spec; put the overrides in the spec file");let f=wVe(e.specPath);if("error"in f)return bl(f.error);r=f.jobs}else{if(!t)return bl("A card URL is required (or pass --spec <file>)");r=[{card:t,format:e.format??"isolated",captureSpec:e.captureSpec??null}]}for(let f of r){let d=ft(f.card,{profileManager:e.profileManager});if(!d.ok)return bl(d.error);let A=d.url.replace(/\.json$/,"");try{new URL(A)}catch{return bl(`Not a valid card URL: ${f.card}`)}f.card=A}let n=e.realm?ce(e.realm):void 0,s=Ln({realmUrl:n??r[0].card,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager,authenticator:e.authenticator});if(!s.ok)return bl(s.error);let i=s.authenticator,o=e.serverFetch;if(!o)if(e.realmSecretSeed){let f=n??r[0].card,d;try{d=e.asUser??ph(f);let h=`${yl(f)} ${e.asUser??ph(f)}`;for(let m of r)if(`${yl(m.card)} ${e.asUser??ph(m.card)}`!==h)return bl("Seed mode authorizes one realm owner per invocation, but the --spec cards span more than one realm server or owner. Pass --as-user for a shared identity, or split the spec by realm.")}catch(h){return bl(`${h instanceof Error?h.message:String(h)} \u2014 pass --as-user`)}let A=mS(e.realmSecretSeed,d);o=async(h,m)=>{let g=new Headers(m?.headers);return g.set("Authorization",A),fetch(h,{...m,headers:g})}}else if(s.mode==="injected")o=(f,d)=>i.authedRealmFetch(f,d);else{let f=e.profileManager??Re();o=(d,A)=>f.authedRealmServerFetch(d,A)}let a=e.out??".";e.urlOnly||(0,Wp.mkdirSync)(a,{recursive:!0});let l=new Set,c=[],u={};for(let f of r){let d=await BVe(f,{authenticator:i,serverFetch:o,realmFlag:n,realmServerUrl:e.realmServerUrl,urlOnly:e.urlOnly===!0,outDir:a,usedFileNames:l,maxWaitMs:e.maxWaitMs??vR*1e3,sleep:e.sleep??(A=>new Promise(h=>setTimeout(h,A)))});c.push(...d.entries),d.regions!==void 0&&(u[f.card]=d.regions)}let p={ok:c.every(f=>f.status==="ok"),captures:c,...Object.keys(u).length?{regions:u}:{}};if(e.specPath&&!e.urlOnly){let f=(0,xR.join)(a,SVe);(0,Wp.writeFileSync)(f,JSON.stringify(p,null,2)),p.manifestPath=f}return p}function wVe(t){let e;try{e=JSON.parse((0,Wp.readFileSync)(t,"utf8"))}catch(s){return{error:`Could not read --spec file ${t}: ${s instanceof Error?s.message:String(s)}`}}let r=Array.isArray(e)?e:[e];if(r.length===0)return{error:`--spec file ${t} contains no entries`};let n=[];for(let[s,i]of r.entries()){if(!HS(i)||typeof i.card!="string")return{error:`--spec entry ${s} must be an object with a "card" URL`};n.push({card:i.card,format:typeof i.format=="string"?i.format:"isolated",captureSpec:i.captureSpec??null})}return{jobs:n}}async function BVe(t,e){let r=f=>({entries:vVe(t.captureSpec).map(d=>({card:t.card,name:d,status:"error",url:null,error:f}))}),n;if(e.realmFlag){if(!t.card.startsWith(e.realmFlag))return r(`Card is not within --realm ${e.realmFlag}`);n=e.realmFlag}else{let f;try{f=await e.authenticator.authedRealmFetch(`${t.card}.json`,{headers:{Accept:"application/vnd.card+source"}})}catch(h){return r(Ah(h))}let d=await f.text().catch(()=>"");if(!f.ok)return r(`Could not load card (HTTP ${f.status}): ${d.slice(0,200)}`);let A=f.headers.get("x-boxel-realm-url");if(!A)return r("Could not determine the realm: response carries no x-boxel-realm-url header (pass --realm)");n=ce(A)}let s=`${e.realmServerUrl?ce(e.realmServerUrl):yl(t.card)}_capture`,i=JSON.stringify({data:{type:"capture",attributes:{realmURL:n,cardId:t.card,format:t.format,includeBase64:!e.urlOnly,captureSpec:t.captureSpec??null}}}),o=Date.now(),a;for(;;){try{a=await e.serverFetch(s,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:i})}catch(A){return r(Ah(A))}if(a.status!==503)break;await a.text().catch(()=>"");let f=Number.parseInt(a.headers.get("retry-after")??"",10);(!Number.isFinite(f)||f<=0)&&(f=CVe);let d=Date.now()-o;if(d+f*1e3>e.maxWaitMs)return r(`Server busy: gave up after ${Math.round(d/1e3)}s (raise --max-wait or retry later)`);console.error(`Server busy; retrying ${t.card} in ${f}s\u2026`),await e.sleep(f*1e3)}let l=await a.text().catch(()=>"");if(!a.ok)return r(`HTTP ${a.status}: ${l.slice(0,300)}`);let c;try{let f=JSON.parse(l);c=HS(f?.data?.attributes)?f.data.attributes:void 0}catch{return r("Invalid JSON response from server")}if(!c)return r("Malformed response: missing data.attributes");if(c.status!=="ready")return r(c.error?String(c.error):`Capture failed (status: ${String(c.status??"unknown")})`);let u=Array.isArray(c.captures)?c.captures:c.base64!=null||c.width!=null?[{name:null,url:null,width:c.width??null,height:c.height??null,deviceScaleFactor:null,base64:c.base64}]:[];if(u.length===0)return r("Response contained no captures");let p;if(e.urlOnly)p=u.map(f=>f.url?{card:t.card,name:f.name??null,status:"ok",url:f.url,width:f.width??null,height:f.height??null,deviceScaleFactor:f.deviceScaleFactor??null}:{card:t.card,name:f.name??null,status:"error",url:null,error:"No served URL for this capture: the server returns URLs only for captures it persists (canonical specs)"});else{let f=typeof c.contentType=="string"?c.contentType:"image/png",d=IVe[f]??"png",A=t.card.startsWith(n)?t.card.slice(n.length):new URL(t.card).pathname.replace(/^\//,"");p=[];for(let h of u)p.push(await TVe(t,h,{ctx:e,baseName:sie(A),extension:d}))}return{entries:p,...c.regions!==void 0?{regions:c.regions}:{}}}async function TVe(t,e,{ctx:r,baseName:n,extension:s}){let i=e.name??null,o={card:t.card,name:i,url:e.url??null,width:e.width??null,height:e.height??null,deviceScaleFactor:e.deviceScaleFactor??null},a;if(typeof e.base64=="string"&&e.base64.length>0)a=Buffer.from(e.base64,"base64");else if(e.url){let p;try{p=await r.authenticator.authedRealmFetch(e.url)}catch(f){return{...o,status:"error",error:Ah(f)}}if(!p.ok)return await p.text().catch(()=>""),{...o,status:"error",error:`Download failed (HTTP ${p.status}): ${e.url}`};a=Buffer.from(await p.arrayBuffer())}else return{...o,status:"error",error:"Capture carried neither image data nor a served URL"};let l=i?`${n}--${sie(i)}`:n,c=`${l}.${s}`;for(let p=2;r.usedFileNames.has(c);p++)c=`${l}-${p}.${s}`;r.usedFileNames.add(c);let u=(0,xR.join)(r.outDir,c);return(0,Wp.writeFileSync)(u,a),{...o,status:"ok",file:u,sha256:(0,nie.createHash)("sha256").update(a).digest("hex")}}function DVe(t){let e={};return t.viewport&&(e.viewport=t.viewport),t.envelope&&(e.envelope=t.envelope),t.dsf!==void 0&&(e.deviceScaleFactor=t.dsf),t.clip&&(e.clip=t.clip),t.target&&(e.target=t.target),t.fullPage&&(e.fullPage=!0),Object.keys(e).length?e:null}function rie(t){return e=>{let r=/^(\d+)x(\d+)$/i.exec(e.trim());if(!r)throw new Error(`${t} must be WxH (e.g. 800x600)`);return{width:Number(r[1]),height:Number(r[2])}}}function PVe(t){let e=Number(t);if(!Number.isFinite(e)||e<=0)throw new Error("--dsf must be a positive number");return e}function _Ve(t){let e=t.split(",").map(o=>Number(o.trim()));if(e.length!==4||e.some(o=>!Number.isFinite(o)))throw new Error("--clip must be x,y,w,h (e.g. 0,0,400,300)");let[r,n,s,i]=e;return{x:r,y:n,width:s,height:i}}function NVe(t){let e=Number.parseInt(t,10);if(!Number.isFinite(e)||e<0||String(e)!==t.trim())throw new Error("--max-wait must be a non-negative integer (seconds)");return e}function iie(t){t.command("capture").alias("screenshot").description("Capture a card via the realm server: writes image or PDF files (or prints served URLs) plus a per-capture manifest").argument("[card-url]","Card instance URL or @cardstack/<realm>/<path> identifier (omit when using --spec)").option("--format <format>","Render format: isolated, embedded, or fitted (fitted requires --envelope)","isolated").option("--viewport <WxH>","Render viewport in CSS pixels, e.g. 800x600",rie("--viewport")).option("--envelope <WxH>","Parent box a fitted card lays out into, in CSS pixels, e.g. 400x300",rie("--envelope")).option("--dsf <n>","Device scale factor (e.g. 2 doubles the physical pixel density)",PVe).option("--clip <x,y,w,h>","Capture only this CSS-pixel rectangle",_Ve).option("--target <selector>","Capture the element matching this CSS selector (requires a realm server that supports target captures; older servers reject it with a named 400)").option("--full-page","Capture the full scrollable page height").option("--out <dir>","Directory to write image files into (default: current directory)").option("--spec <file>","JSON batch spec \u2014 an entry or array of {card, format?, captureSpec?}; one request per card, writes capture-manifest.json into --out").option("--url-only","Print served capture URLs without downloading image bytes").option("--realm <realm-url>","Realm URL containing the card (skips realm auto-discovery)").option("--max-wait <seconds>","Total time to keep retrying while the server is busy",NVe,vR).option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint tokens locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--as-user <matrix-id>","Matrix id to authorize as in seed mode (defaults to the owner derived from the card URL)").option("--json","Output the capture manifest as JSON").action(async(e,r)=>{try{let n=await mr(r.realmSecretSeed===!0),s=await xVe(e,{format:r.format,captureSpec:DVe(r),specPath:r.spec,out:r.out,urlOnly:r.urlOnly,realm:r.realm,maxWaitMs:(r.maxWait??vR)*1e3,realmSecretSeed:n,asUser:r.asUser});if(r.json){Fe.output(JSON.stringify(s,null,2)),s.ok||process.exit(1);return}s.error&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1));for(let i of s.captures){let o=i.name?`${i.card} [${i.name}]`:i.card;if(i.status!=="ok")console.error(`${W}\u2717 ${o}:${v} ${i.error}`);else if(r.urlOnly)Fe.output(i.url);else{let a=i.width!=null&&i.height!=null?` (${i.width}\xD7${i.height})`:"";console.log(`${he}\u2713${v} ${o} \u2192 ${Ye}${i.file}${v}${a}`)}}s.manifestPath&&console.log(`Manifest: ${Ye}${s.manifestPath}${v}`),s.ok||process.exit(1)}catch(n){let s=n instanceof Error?n.message:String(n);console.error(`${W}Error:${v} ${s}`),process.exit(1)}})}var Cve=require("node:path");var Ave=require("node:child_process"),ca=require("node:fs"),mve=require("node:http"),bt=require("node:path");var z7=require("node:fs"),K7=require("node:path");var uve=We(wn(),1),pve=We(KEe(),1);function zEe(t){let e=t.types;function r(s){return s.startsWith("./")||s.startsWith("../")||s.startsWith("/")||s.includes("://")}function n(s){let i=s[0];if(!e.isExpression(i))throw new Error("Dynamic import with spread or placeholder arguments is not supported");let o;if(e.isStringLiteral(i)&&r(i.value)){let a=e.newExpression(e.identifier("URL"),[i,e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("url"))]);o=e.memberExpression(a,e.identifier("href"))}else o=i;return e.callExpression(e.memberExpression(e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("loader")),e.identifier("import")),[o,...s.slice(1).filter(a=>e.isExpression(a))])}return{visitor:{CallExpression(s){let i=s.get("callee");i.node.type==="Identifier"&&i.node.name==="fetch"?i.replaceWith(e.memberExpression(e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("loader")),e.identifier("fetch"))):i.node.type==="Import"&&s.replaceWith(n(s.node.arguments))}}}}var fve=We(q8(),1);var ZEe=We(kf()),rr=We(ze()),ebe=We(N3()),tbe={task:null,restartableTask:"restartable",dropTask:"drop",keepLatestTask:"keepLatest",enqueueTask:"enqueue"};function G3t(t){if(t.node&&t.node.type==="Identifier"){let e=t.scope.getBinding(t.node.name);if(e&&e.kind==="module"){let{node:r,parent:n}=e.path;return{source:n.source.value,isNamespace:r.type==="ImportNamespaceSpecifier",isDefault:r.type==="ImportDefaultSpecifier",isNamed:r.type==="ImportSpecifier",name:r.type==="ImportSpecifier"&&r.imported.name}}}}function Y3t(t){return t.isNamed&&t.source==="ember-concurrency"&&t.name in tbe}function W3t(t){let e;return(e=G3t(t))?Y3t(e)&&e.name:!1}var XEe={ClassProperty(t,e){let r=t.node.value;if(r&&r.type==="CallExpression"){let n=W3t(t.get("value.callee"));if(!n)return;let s=t.get(`value.arguments.${r.arguments.length-1}`);if(!s&&!s.node)return;let i=s.node;i&&i.type==="ArrowFunctionExpression"&&i.async&&J3t(s,e,n)}}};function J3t(t,e,r){if(t&&t.node.async&&(0,rr.isArrowFunctionExpression)(t)){let n=t.node.body;n.type!=="BlockStatement"&&(n=(0,rr.blockStatement)([(0,rr.returnStatement)(n)]));let s=(0,rr.functionExpression)(t.node.id,t.node.params,n,!0),i=(0,rr.arrowFunctionExpression)([],(0,rr.objectExpression)([(0,rr.objectProperty)((0,rr.identifier)("context"),(0,rr.thisExpression)()),(0,rr.objectProperty)((0,rr.identifier)("generator"),s)]));e._buildTaskImport||(e._buildTaskImport=(0,ebe.addNamed)(e.root,"buildTask","ember-concurrency/-private/async-arrow-runtime"));let o=t.parentPath.node.arguments;o[0]&&o[0].type==="ThisExpression"&&o.shift();let a=z3t(t),l;switch(o.length){case 1:l=(0,rr.nullLiteral)();break;case 2:l=o[0];break;default:throw new Error(`The task() syntax you're using for the task named ${a} is incorrect.`)}let c=tbe[r],u=(0,rr.callExpression)((0,rr.identifier)(e._buildTaskImport.name),[i,l,(0,rr.stringLiteral)(a),c?(0,rr.stringLiteral)(c):(0,rr.nullLiteral)()]);t.parentPath.replaceWith(u)[0].traverse({FunctionExpression(f){f.node.generator&&f.traverse(K3t)}})}}var K3t={Function(t){t.skip()},AwaitExpression(t){t.replaceWith((0,rr.yieldExpression)(t.get("argument").node))}};function z3t(t){let e=t.parentPath.parentPath;return e&&e.node.type==="ClassProperty"?e.node.key.name:null}var rbe=(0,ZEe.declare)(t=>(t.assertVersion(7),{name:"transform-ember-concurrency-async-function-tasks",visitor:{Program(e,r){r.root=e,e.traverse({ClassDeclaration(n,s){n.traverse(XEe,s)},ClassExpression(n,s){n.traverse(XEe,s)}},r)}}}));var dve=We(xSe(),1);var wSe="dt7948";var nj={},hT={};Object.defineProperty(hT,"__esModule",{value:!0});hT.sanitize=void 0;function R9t(t){let e=t.replace(new RegExp(`(?<!^)(?:${BSe.source})([a-z])`,"g"),(r,n)=>n.toUpperCase());return e=e.replace(new RegExp(BSe.source,"g"),""),e}hT.sanitize=R9t;var BSe=new RegExp("^[^a-zA-Z_$]|(?<=.)[^a-zA-Z_$0-9]");Object.defineProperty(nj,"__esModule",{value:!0});var NSe=nj.ImportUtil=void 0,O9t=hT,rj=class{constructor(e,r){this.babel=e,this.program=r,this.t=e.types}removeImport(e,r){for(let n of this.program.get("body")){if(!PSe(n,e))continue;let s=n.get("specifiers").find(i=>DSe(i,r));s&&(n.node.specifiers.length===1?n.remove():s.remove())}}removeAllImports(e){for(let r of this.program.get("body"))PSe(r,e)&&r.remove()}import(e,r,n,s){return this.unreferencedImport(e,r,n,TSe(s,n,dT(e)))}unreferencedImport(e,r,n,s){var i;let o=n==="*",l=!(n==="default")&&!o,c=this.findImportFrom(r),u=c?.node.specifiers.find(d=>d.type==="ImportNamespaceSpecifier");if(!(c?.node.specifiers.find(d=>d.type==="ImportSpecifier")&&o||u&&l||u&&o)&&c){let d=c.get("specifiers").find(A=>DSe(A,n));return d&&((i=e.scope.getBinding(d.node.local.name))===null||i===void 0?void 0:i.kind)==="module"?this.t.identifier(d.node.local.name):this.addSpecifier(e,c,n,s)}else{let d=this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(r)));return this.addSpecifier(e,d,n,s)}}importForSideEffect(e){this.findImportFrom(e)||this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(e)))}replaceWith(e,r){return this.mutate(n=>(e.replaceWith(r(n)),e),dT(e))}insertAfter(e,r){return this.mutate(n=>e.insertAfter(r(n))[0],dT(e))}insertBefore(e,r){return this.mutate(n=>e.insertBefore(r(n))[0],dT(e))}mutate(e,r){let n=new Map,s={import:(a,l,c)=>{let u=this.t.identifier("__babel_import_util_placeholder__");return n.set(u,{moduleSpecifier:a,exportedName:l,nameHint:c}),u}},i=a=>{if(!a.isIdentifier())return;let l=n.get(a.node);if(l){let c=this.unreferencedImport(a,l.moduleSpecifier,l.exportedName,TSe(l.nameHint,l.exportedName,r));a.replaceWith(c);let u=a.scope.getBinding(c.name);if(!u)throw new Error("bug: this is supposed to never happen");u.reference(a)}},o=e(s);return i(o),this.babel.traverse(o.node,{ReferencedIdentifier:a=>{i(a)}},o.scope,{},o),o}addSpecifier(e,r,n,s){let i=this.t.identifier(F9t(e,s)),o=this.buildSpecifier(n,i),a;return o.type==="ImportDefaultSpecifier"?(r.node.specifiers.unshift(o),a=r.get("specifiers.0")):(r.node.specifiers.push(o),a=r.get(`specifiers.${r.node.specifiers.length-1}`)),r.scope.registerBinding("module",a),i}buildSpecifier(e,r){switch(e){case"default":return this.t.importDefaultSpecifier(r);case"*":return this.t.importNamespaceSpecifier(r);default:return this.t.importSpecifier(r,this.t.identifier(e))}}findImportFrom(e){for(let r of this.program.get("body"))if(r.isImportDeclaration()&&r.node.source.value===e&&r.node.importKind!=="type")return r}insertAfterExistingImports(e){let r;for(let[n,s]of this.program.node.body.entries())s.type==="ImportDeclaration"&&(r=n);return r==null?(this.program.node.body.unshift(e),this.program.get("body.0")):(this.program.node.body.splice(r+1,0,e),this.program.get(`body.${r+1}`))}};NSe=nj.ImportUtil=rj;function F9t(t,e){let r=e,n=0;for(;t.scope.hasBinding(r);)r=`${e}${n++}`;return r}function L9t(t){return t.type==="StringLiteral"?t.value:t.name}function TSe(t,e,r){return t?(0,O9t.sanitize)(t):e==="default"||e==="*"?r??"a":e}function dT(t){return t?.isIdentifier()?t.node.name:t?t.scope.generateUidIdentifierBasedOnNode(t.node).name:void 0}function DSe(t,e){switch(e){case"default":return t.isImportDefaultSpecifier();case"*":return t.isImportNamespaceSpecifier();default:return t.isImportSpecifier()&&L9t(t.node.imported)===e}}function PSe(t,e){return t.isImportDeclaration()&&t.get("source").node.value===e}function _Se(t){let e=t.types;return{Program(r,n){n.currentClassBodies=[],n.currentObjectExpressions=[],n.optsWithDefaults={runtime:"globals",runEarly:!1,...n.opts},n.util=new NSe(t,r),n.runtime=(s,i)=>{let{runtime:o}=n.optsWithDefaults;return o==="globals"?e.memberExpression(e.identifier(wSe),e.identifier(i)):s.import(o.import,i)}},ClassBody:{enter(r,n){n.currentClassBodies.unshift(r.node)},exit(r,n){n.currentClassBodies[0]===r.node&&n.currentClassBodies.shift()}},ClassExpression(r,n){let s=r.get("decorators");Array.isArray(s)&&s.length>0&&n.util.replaceWith(r,i=>{let o=e.callExpression(n.runtime(i,"c"),[r.node,e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]);for(let a of s)a.remove();return o})},ClassDeclaration(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i=o=>e.callExpression(n.runtime(o,"c"),[e.classExpression(r.node.id,r.node.superClass,r.node.body,[]),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]);if(r.parentPath.isExportDefaultDeclaration()){let o=r.node.id;o?(n.util.insertBefore(r.parentPath,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))])),r.parentPath.replaceWith(e.exportDefaultDeclaration(o))):n.util.replaceWith(r.parentPath,a=>e.exportDefaultDeclaration(i(a)))}else if(r.parentPath.isExportNamedDeclaration()){let o=r.node.id;if(!o)throw new Error("bug: expected a class name is required in this context");n.util.insertBefore(r.parentPath,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))])),r.parentPath.replaceWith(e.exportNamedDeclaration(null,[e.exportSpecifier(o,o)]))}else{let o=r.node.id;if(!o)throw new Error("bug: expected a class name is required in this context");n.util.replaceWith(r,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))]))}}},ClassProperty(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i;r.node.static?i=e.thisExpression():i=e.memberExpression(e.thisExpression(),e.identifier("prototype"));let o=[i,ib(e,r.node.key),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))];r.node.value&&o.push(e.functionExpression(null,[],e.blockStatement([e.returnStatement(r.node.value)]))),n.util.insertBefore(r,a=>e.staticBlock([e.expressionStatement(e.callExpression(n.runtime(a,"g"),o))])),n.util.insertBefore(r,a=>e.classPrivateProperty(e.privateName(e.identifier(M9t(n,U9t(r.node.key)))),e.sequenceExpression([e.callExpression(n.runtime(a,"i"),[e.thisExpression(),ib(e,r.node.key)]),e.unaryExpression("void",e.numericLiteral(0),!0)]))),r.remove()}},ClassMethod(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i;r.node.static?i=e.thisExpression():i=e.memberExpression(e.thisExpression(),e.identifier("prototype")),n.util.insertAfter(r,o=>e.staticBlock([e.expressionStatement(e.callExpression(n.runtime(o,"n"),[i,ib(e,r.node.key),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]))]));for(let o of s)o.remove()}},ObjectExpression:{enter(r,n){n.currentObjectExpressions.unshift({node:r.node,decorated:[]})},exit(r,n){var s;if(((s=n.currentObjectExpressions[0])==null?void 0:s.node)!==r.node)return;let{decorated:i}=n.currentObjectExpressions.shift();i.length>0&&n.util.replaceWith(r,o=>e.callExpression(n.runtime(o,"p"),[r.node,e.arrayExpression(i.map(([a,l,c])=>e.arrayExpression([e.stringLiteral(a),l,e.arrayExpression(c)])))]))}},ObjectProperty(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){if(n.currentObjectExpressions.length===0)throw new Error("bug in decorator-transforms: didn't expect to see ObjectProperty outside ObjectExpression");let i=r.node.key;if(i.type==="PrivateName")throw new Error("cannot decorate private field");n.currentObjectExpressions[0].decorated.push(["field",ib(e,i),s.slice().reverse().map(o=>o.node.expression)]);for(let o of s)o.remove()}},ObjectMethod(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){if(n.currentObjectExpressions.length===0)throw new Error("bug in decorator-transforms: didn't expect to see ObjectMethod outside ObjectExpression");let i=r.node.key;n.currentObjectExpressions[0].decorated.push(["method",ib(e,i),s.slice().reverse().map(o=>o.node.expression)]);for(let o of s)o.remove()}}}}function kSe(t){let e=_Se(t);return{manipulateOptions(r,n){n.plugins.push("decorators-legacy")},pre(r){this.opts.runEarly&&(t.traverse(r.ast,_Se(t),r.scope,this),e=void 0)},get visitor(){return e??{}}}}function M9t(t,e){let r=t.currentClassBodies[0];if(!r)throw new Error("bug: no current class body around our class field decorator");let n=new Set;for(let i of r.body)(i.type==="ClassPrivateProperty"||i.type==="ClassPrivateMethod"||i.type==="ClassAccessorProperty")&&i.key.type==="PrivateName"&&n.add(i.key.id.name);let s=e;for(;n.has(s);)s=s+"_";return s}function U9t(t){return t.type==="Identifier"?t.name:t.type==="BigIntLiteral"||t.type==="NumericLiteral"?`_${t.value}`:t.type==="StringLiteral"?"_"+t.value.replace(/[^a-zA-Z]/g,""):"_"}function ib(t,e){return e.type==="Identifier"?t.stringLiteral(e.name):e}var j7={};Wu(j7,{_buildCompileOptions:()=>tve,_preprocess:()=>k7,_print:()=>P7,precompile:()=>U7});function sj(){return Object.create(null)}var za=Object.assign,QSe=console;function j9t(t,e="unexpected unreachable branch"){throw QSe.log("unreachable",t),QSe.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var rt={Append:1,TrustingAppend:2,Comment:3,Modifier:4,Block:6,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54},rd={class:0,id:1,value:2,name:3,type:4,style:5,href:6},AT={div:0,span:1,p:2,a:3},ij=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Uu(t,e){var r=e&&e.loc,n,s,i,o;r&&(n=r.start.line,s=r.end.line,i=r.start.column,o=r.end.column,t+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,t),l=0;l<ij.length;l++)this[ij[l]]=a[ij[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Uu);try{r&&(this.lineNumber=n,this.endLineNumber=s,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=i,this.endColumn=o))}catch{}}Uu.prototype=new Error;function ab(){this.parents=[]}ab.prototype={constructor:ab,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!ab.prototype[r.type])throw new Uu('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new Uu(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new Uu("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||e)return e;if(e!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:CT,Decorator:CT,BlockStatement:RSe,DecoratorBlock:RSe,PartialStatement:OSe,PartialBlockStatement:function(t){OSe.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:CT,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function CT(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function RSe(t){CT.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function OSe(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Xa(t){t===void 0&&(t={}),this.options=t}Xa.prototype=new ab;Xa.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,s=0,i=n.length;s<i;s++){var o=n[s],a=this.accept(o);if(a){var l=Ej(n,s,r),c=bj(n,s,r),u=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&sd(n,s,!0),a.open&&Lu(n,s,!0),e&&f&&(sd(n,s),Lu(n,s)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[s-1].original)[1])),e&&u&&(sd((o.program||o.inverse).body),Lu(n,s)),e&&p&&(sd(n,s),Lu((o.inverse||o.program).body))}}return t};Xa.prototype.BlockStatement=Xa.prototype.DecoratorBlock=Xa.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,s=r;if(r&&r.chained)for(n=r.body[0].program;s.chained;)s=s.body[s.body.length-1].program;var i={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:bj(e.body),closeStandalone:Ej((n||e).body)};if(t.openStrip.close&&sd(e.body,null,!0),r){var o=t.inverseStrip;o.open&&Lu(e.body,null,!0),o.close&&sd(n.body,null,!0),t.closeStrip.open&&Lu(s.body,null,!0),!this.options.ignoreStandalone&&Ej(e.body)&&bj(n.body)&&(Lu(e.body),sd(n.body))}else t.closeStrip.open&&Lu(e.body,null,!0);return i};Xa.prototype.Decorator=Xa.prototype.MustacheStatement=function(t){return t.strip};Xa.prototype.PartialStatement=Xa.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Ej(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],s=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function bj(t,e,r){e===void 0&&(e=-1);var n=t[e+1],s=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function sd(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var s=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function Lu(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var s=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}var mT=function(){var t=function(tt,J,ee,Z){for(ee=ee||{},Z=tt.length;Z--;ee[tt[Z]]=J);return ee},e=[2,52],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,53,57,61],s=[1,44],i=[1,40],o=[1,43],a=[1,33],l=[1,34],c=[1,35],u=[1,36],p=[1,37],f=[1,42],d=[1,46],A=[14,15,19,29,34,39,44,47,48,53,57,61],h=[14,15,19,29,34,44,47,48,53,57,61],m=[15,18],g=[14,15,19,29,34,47,48,53,57,61],E=[33,67,73,75,84,85,86,87,88,89],b=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],I=[1,62],w=[1,63],L=[23,33,56,68,73,79],U=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],q=[2,51],V=[1,64],ie=[67,73,75,77,84,85,86,87,88,89],re=[56,67,73,75,84,85,86,87,88,89],Ie=[1,75],Ze=[1,76],je=[1,83],Ct=[33,67,73,75,79,84,85,86,87,88,89],Mt=[23,67,73,75,84,85,86,87,88,89],qt=[67,68,73,75,84,85,86,87,88,89],Ht=[33,79],sr=[1,134],Jn=[73,81],Kn={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,2],[76,0],[76,2],[80,1],[80,2]],performAction:function(J,ee,Z,G,de,R,Kr){var F=R.length-1;switch(de){case 1:return R[F-1];case 2:this.$=G.prepareProgram(R[F]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 28:case 29:case 30:case 31:case 38:case 39:case 46:case 47:this.$=R[F];break;case 9:this.$={type:"CommentStatement",value:G.stripComment(R[F]),strip:G.stripFlags(R[F],R[F]),loc:G.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:R[F],value:R[F],loc:G.locInfo(this._$)};break;case 11:this.$=G.prepareRawBlock(R[F-2],R[F-1],R[F],this._$);break;case 12:this.$={path:R[F-3],params:R[F-2],hash:R[F-1]};break;case 13:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!1,this._$);break;case 14:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!0,this._$);break;case 15:this.$={open:R[F-5],path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 16:case 17:this.$={path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 18:this.$={strip:G.stripFlags(R[F-1],R[F-1]),program:R[F]};break;case 19:var Qn=G.prepareBlock(R[F-2],R[F-1],R[F],R[F],!1,this._$),ws=G.prepareProgram([Qn],R[F-1].loc);ws.chained=!0,this.$={strip:R[F-2].strip,program:ws,chain:!0};break;case 21:this.$={path:R[F-1],strip:G.stripFlags(R[F-2],R[F])};break;case 22:this.$=G.prepareMustache(G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"}),[],void 0,R[F-2],G.stripFlags(R[F-2],R[F]),this._$);break;case 23:case 24:this.$=G.prepareMustache(R[F-3],R[F-2],R[F-1],R[F-4],G.stripFlags(R[F-4],R[F]),this._$);break;case 25:this.$={type:"PartialStatement",name:R[F-3],params:R[F-2],hash:R[F-1],indent:"",strip:G.stripFlags(R[F-4],R[F]),loc:G.locInfo(this._$)};break;case 26:this.$=G.preparePartialBlock(R[F-2],R[F-1],R[F],this._$);break;case 27:this.$={path:R[F-3],params:R[F-2],hash:R[F-1],strip:G.stripFlags(R[F-4],R[F])};break;case 32:this.$=G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 33:this.$={type:"SubExpression",path:R[F-3],params:R[F-2],hash:R[F-1],loc:G.locInfo(this._$)};break;case 34:this.$={type:"Hash",pairs:R[F],loc:G.locInfo(this._$)};break;case 35:this.$={type:"HashPair",key:G.id(R[F-2]),value:R[F],loc:G.locInfo(this._$)};break;case 36:this.$=G.syntax.square(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 37:this.$=G.id(R[F-1]);break;case 40:this.$={type:"StringLiteral",value:R[F],original:R[F],loc:G.locInfo(this._$)};break;case 41:this.$={type:"NumberLiteral",value:Number(R[F]),original:Number(R[F]),loc:G.locInfo(this._$)};break;case 42:this.$={type:"BooleanLiteral",value:R[F]==="true",original:R[F]==="true",loc:G.locInfo(this._$)};break;case 43:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:G.locInfo(this._$)};break;case 44:this.$={type:"NullLiteral",original:null,value:null,loc:G.locInfo(this._$)};break;case 45:this.$=G.preparePath(!0,!1,R[F],this._$);break;case 48:this.$=G.preparePath(!1,R[F-2],R[F],this._$);break;case 49:this.$=G.preparePath(!1,!1,R[F],this._$);break;case 50:R[F-2].push({part:G.id(R[F]),original:R[F],separator:R[F-1]}),this.$=R[F-2];break;case 51:this.$=[{part:G.id(R[F]),original:R[F]}];break;case 52:case 54:case 56:case 64:case 70:case 76:case 84:case 88:case 92:case 96:case 100:case 106:this.$=[];break;case 53:case 55:case 57:case 65:case 71:case 77:case 85:case 89:case 93:case 97:case 101:case 105:case 107:case 109:R[F-1].push(R[F]);break;case 104:case 108:this.$=[R[F]];break}},table:[t([5,14,15,19,29,34,48,53,57,61],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,60:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],53:[1,14],57:[1,18],61:[1,24]}),{1:[2,1]},t(n,[2,53]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:28,49:25,50:26,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:45,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(A,e,{6:3,4:47}),t(h,e,{6:3,4:48}),t(m,[2,54],{17:49}),{20:28,50:50,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:51}),t([5,14,15,18,19,29,34,39,44,47,48,53,57,61],[2,10]),{20:52,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:54,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:55,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:56,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,57]},t(E,[2,84],{51:58}),t([23,33,56,68,79],[2,34],{72:59,73:[1,60]}),t(b,[2,28]),t(b,[2,29],{91:61,92:I,93:w}),t(L,[2,104]),t(b,[2,38]),t(b,[2,39]),t(b,[2,40]),t(b,[2,41]),t(b,[2,42]),t(b,[2,43]),t(b,[2,44]),t(U,[2,30]),t(U,[2,31]),t([23,33,56,67,68,73,75,79,84,85,86,87,88,89,92,93],q,{74:V}),t(b,[2,49],{91:65,92:I,93:w}),{73:d,90:66},t(ie,[2,106],{76:67}),{20:28,49:68,50:69,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(re,[2,88],{54:70}),t(U,q),{25:71,38:73,39:Ie,43:74,44:Ze,45:72,47:[2,60]},{28:77,43:78,44:Ze,47:[2,62]},{13:80,15:r,18:[1,79]},t(E,[2,92],{58:81}),{26:82,47:je},t(Ct,[2,64],{30:84}),{91:61,92:I,93:w},t(Ct,[2,70],{35:85}),t(Mt,[2,56],{21:86}),t(E,[2,96],{62:87}),t(n,[2,22]),{20:28,33:[2,86],49:90,50:89,52:88,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(L,[2,105]),{74:V},{73:d,90:91},{73:[2,46]},{73:[2,47]},{20:28,50:92,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{73:[1,93]},t(b,[2,45],{91:65,92:I,93:w}),{20:28,50:95,64:29,65:38,66:39,67:s,73:d,75:o,77:[1,94],82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{68:[1,96]},t(qt,[2,100],{69:97}),{20:28,49:100,50:99,55:98,56:[2,90],64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{26:101,47:je},{47:[2,61]},t(A,e,{6:3,4:102}),{47:[2,20]},{20:103,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:104}),{26:105,47:je},{47:[2,63]},t(n,[2,11]),t(m,[2,55]),{20:28,33:[2,94],49:108,50:107,59:106,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(n,[2,26]),{20:109,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(Ht,[2,66],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,31:110,50:111,49:112,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(Ht,[2,72],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,36:113,50:114,49:115,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),{20:28,22:116,23:[2,58],49:118,50:117,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,33:[2,98],49:121,50:120,63:119,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,122]},t(E,[2,85]),{33:[2,87]},t(b,[2,48],{91:65,92:I,93:w}),t(L,[2,35]),t(U,[2,50]),t(U,[2,36]),t(ie,[2,107]),t(U,[2,32]),{20:28,49:125,50:124,64:29,65:38,66:39,67:s,68:[2,102],70:123,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{56:[1,126]},t(re,[2,89]),{56:[2,91]},t(n,[2,13]),{38:73,39:Ie,43:74,44:Ze,45:128,46:127,47:[2,82]},t(Ct,[2,76],{40:129}),{47:[2,18]},t(n,[2,14]),{33:[1,130]},t(E,[2,93]),{33:[2,95]},{33:[1,131]},{32:132,33:[2,68],78:133,79:sr},t(Ct,[2,65]),t(Ht,[2,67]),{33:[2,74],37:135,78:136,79:sr},t(Ct,[2,71]),t(Ht,[2,73]),{23:[1,137]},t(Mt,[2,57]),{23:[2,59]},{33:[1,138]},t(E,[2,97]),{33:[2,99]},t(n,[2,23]),{68:[1,139]},t(qt,[2,101]),{68:[2,103]},t(n,[2,24]),{47:[2,19]},{47:[2,83]},t(Ht,[2,78],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,41:140,50:141,49:142,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(n,[2,25]),t(n,[2,21]),{33:[1,143]},{33:[2,69]},{73:[1,145],80:144},{33:[1,146]},{33:[2,75]},t(m,[2,12]),t(g,[2,27]),t(U,[2,33]),{33:[2,80],42:147,78:148,79:sr},t(Ct,[2,77]),t(Ht,[2,79]),t(A,[2,15]),{73:[1,150],81:[1,149]},t(Jn,[2,108]),t(h,[2,16]),{33:[1,151]},{33:[2,81]},{33:[2,37]},t(Jn,[2,109]),t(A,[2,17])],defaultActions:{4:[2,1],62:[2,46],63:[2,47],72:[2,61],74:[2,20],78:[2,63],90:[2,87],100:[2,91],104:[2,18],108:[2,95],118:[2,59],121:[2,99],125:[2,103],127:[2,19],128:[2,83],133:[2,69],136:[2,75],148:[2,81],149:[2,37]},parseError:function(J,ee){if(ee.recoverable)this.trace(J);else{var Z=new Error(J);throw Z.hash=ee,Z}},parse:function(J){var ee=this,Z=[0],G=[null],de=[],R=this.table,Kr="",F=0,Qn=0,ws=2,ua=1,me=de.slice.call(arguments,1),K=Object.create(this.lexer),Qe={yy:{}};for(var $t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$t)&&(Qe.yy[$t]=this.yy[$t]);K.setInput(J,Qe.yy),Qe.yy.lexer=K,Qe.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var Ar=K.yylloc;de.push(Ar);var Cr=K.options&&K.options.ranges;typeof Qe.yy.parseError=="function"?this.parseError=Qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var un=function(){var Mr;return Mr=K.lex()||ua,typeof Mr!="number"&&(Mr=ee.symbols_[Mr]||Mr),Mr},St,Rt,pt,pn,ir={},fs,Vt,fn,dn;;){if(Rt=Z[Z.length-1],this.defaultActions[Rt]?pt=this.defaultActions[Rt]:((St===null||typeof St>"u")&&(St=un()),pt=R[Rt]&&R[Rt][St]),typeof pt>"u"||!pt.length||!pt[0]){var Dn="";dn=[];for(fs in R[Rt])this.terminals_[fs]&&fs>ws&&dn.push("'"+this.terminals_[fs]+"'");K.showPosition?Dn="Parse error on line "+(F+1)+`:
|
|
2960
|
+
${te}${i} ${n.touched.length} file(s)${n.skipped.length>0?`, skipped ${n.skipped.length}`:""}${v}`)}n.ok||process.exit(1)})}function Xse(t){let e=t.command("file").description("Read, write, and manage files in a realm");Jse(e),Fre(e),Ore(e),Kse(e),zse(e),Rre(e)}function IR(t){let e=t.getActiveProfile();if(!e)throw new Error(ct);return e}function Zse(t){return new Date(t).toLocaleString()}async function mVe(t={}){let e=t.profileManager??Re(),{profile:r}=IR(e),n=await ure({realmServerUrl:r.realmServerUrl,...t.openBrowserFn?{openBrowserFn:t.openBrowserFn}:{},username:Fc(r.matrixUserId),...t.timeout?{timeoutMs:Number(t.timeout)*1e3}:{}});if(n.userId!==r.matrixUserId)throw await Lg(r.realmServerUrl,n.token).catch(()=>{}),new Error(`The browser signed in ${n.userId}, but this profile is ${r.matrixUserId}. Run it again and sign in as ${r.matrixUserId}.`);e.setSecureSession(n),console.log(`${he}Signed in to manage keys${v} as ${n.userId} until ${Zse(n.expiresAt)}.`)}async function gVe(t={}){let e=t.profileManager??Re(),{profile:r}=IR(e),n=e.getSecureSession();n&&await Lg(r.realmServerUrl,n.token),e.clearSecureSession(),console.log("Signed out of managing keys.")}function yVe(t={}){let e=t.profileManager??Re();IR(e);let r=e.getSecureSession();console.log(r?`Signed in to manage keys as ${r.userId} until ${Zse(r.expiresAt)}.`:`Not signed in to manage keys. ${te}Run \`boxel keys sign-in\`.${v}`)}async function SR(t){try{await t()}catch(e){console.error(`${W}Error:${v} ${e?.message??e}`),process.exitCode=1}}function eie(t){let e=t.command("keys").description("Manage your own keys. Changing one needs you to sign in through the browser");e.command("sign-in").description("Sign in to Boxel in the browser, so this CLI can change your keys").option("--timeout <seconds>","How long to wait for the browser").action(r=>SR(()=>mVe(r))),e.command("sign-out").description("End the session this CLI uses to change your keys").action(()=>SR(()=>gVe())),e.command("status").description("Say whether this CLI is signed in to change your keys").action(()=>SR(()=>yVe()))}async function EVe(t,e,r){let n=r?.profileManager??Re(),s=n.getActiveProfile();if(!s)throw new Error("No active profile. Run `boxel profile add` to create one.");let i=dt(e,{profileManager:n});if(!i.ok)return{status:"error",error:i.error};e=i.url;let a=`${s.profile.realmServerUrl.replace(/\/$/,"")}/_run-command`,l={data:{type:"run-command",attributes:{realmURL:e,command:t,commandInput:r?.input??null}}},c;try{c=await n.authedRealmServerFetch(a,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:JSON.stringify(l)})}catch(f){return{status:"error",error:`run-command fetch failed: ${f instanceof Error?f.message:String(f)}`}}if(!c.ok){let f=await c.text().catch(()=>"(no body)");return{status:"error",error:`run-command HTTP ${c.status}: ${f}`}}let u;try{u=await c.json()}catch{return{status:"error",error:`run-command response was not valid JSON (HTTP ${c.status})`}}let p=u.data?.attributes;return{status:p?.status??"error",result:p?.cardResultString??null,error:p?.error??null}}function tie(t){t.command("run-command").description("Execute a host command on the realm server via the prerenderer").argument("<command-specifier>","Command module path (e.g. @cardstack/boxel-host/commands/get-card-type-schema/default)").requiredOption("--realm <realm-url>","The realm URL context for the command").option("--input <json>","JSON string of command input").option("--json","Output raw JSON response").action(async(e,r)=>{let n;if(r.input)try{let i=JSON.parse(r.input);(typeof i!="object"||i===null||Array.isArray(i))&&(console.error(`${W}Error:${v} --input must be a JSON object, got ${Array.isArray(i)?"array":typeof i}`),process.exit(1)),n=i}catch{console.error(`${W}Error:${v} --input is not valid JSON: ${r.input}`),process.exit(1)}let s;try{s=await EVe(e,r.realm,{input:n})}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json)Fe.output(JSON.stringify(s,null,2));else{if(console.log(`${te}Status:${v} ${bVe(s.status)}${s.status}${v}`),s.result){console.log(`${te}Result:${v}`);try{Fe.output(JSON.stringify(JSON.parse(s.result),null,2))}catch{Fe.output(s.result)}}s.error&&console.error(`${W}Error:${v} ${s.error}`)}(s.status==="error"||s.status==="unusable")&&process.exit(1)})}function bVe(t){switch(t){case"ready":return he;case"error":return W;default:return Ye}}var nie=require("node:crypto"),Wp=require("node:fs"),xR=require("node:path");var vR=120,CVe=5,SVe="capture-manifest.json",IVe={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","application/pdf":"pdf"};function HS(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function bl(t){return{ok:!1,captures:[],error:t}}function vVe(t){return HS(t)&&Array.isArray(t.captures)?t.captures.map(e=>HS(e)&&typeof e.name=="string"?e.name:null):[null]}function sie(t){return t.replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"")||"card"}async function xVe(t,e={}){let r;if(e.specPath){if(t)return bl("Provide either a card URL or --spec, not both");if(e.captureSpec)return bl("Capture flags cannot be combined with --spec; put the overrides in the spec file");let f=wVe(e.specPath);if("error"in f)return bl(f.error);r=f.jobs}else{if(!t)return bl("A card URL is required (or pass --spec <file>)");r=[{card:t,format:e.format??"isolated",captureSpec:e.captureSpec??null}]}for(let f of r){let d=dt(f.card,{profileManager:e.profileManager});if(!d.ok)return bl(d.error);let A=d.url.replace(/\.json$/,"");try{new URL(A)}catch{return bl(`Not a valid card URL: ${f.card}`)}f.card=A}let n=e.realm?ce(e.realm):void 0,s=Ln({realmUrl:n??r[0].card,realmSecretSeed:e.realmSecretSeed,profileManager:e.profileManager,authenticator:e.authenticator});if(!s.ok)return bl(s.error);let i=s.authenticator,o=e.serverFetch;if(!o)if(e.realmSecretSeed){let f=n??r[0].card,d;try{d=e.asUser??ph(f);let h=`${yl(f)} ${e.asUser??ph(f)}`;for(let m of r)if(`${yl(m.card)} ${e.asUser??ph(m.card)}`!==h)return bl("Seed mode authorizes one realm owner per invocation, but the --spec cards span more than one realm server or owner. Pass --as-user for a shared identity, or split the spec by realm.")}catch(h){return bl(`${h instanceof Error?h.message:String(h)} \u2014 pass --as-user`)}let A=mS(e.realmSecretSeed,d);o=async(h,m)=>{let g=new Headers(m?.headers);return g.set("Authorization",A),fetch(h,{...m,headers:g})}}else if(s.mode==="injected")o=(f,d)=>i.authedRealmFetch(f,d);else{let f=e.profileManager??Re();o=(d,A)=>f.authedRealmServerFetch(d,A)}let a=e.out??".";e.urlOnly||(0,Wp.mkdirSync)(a,{recursive:!0});let l=new Set,c=[],u={};for(let f of r){let d=await BVe(f,{authenticator:i,serverFetch:o,realmFlag:n,realmServerUrl:e.realmServerUrl,urlOnly:e.urlOnly===!0,outDir:a,usedFileNames:l,maxWaitMs:e.maxWaitMs??vR*1e3,sleep:e.sleep??(A=>new Promise(h=>setTimeout(h,A)))});c.push(...d.entries),d.regions!==void 0&&(u[f.card]=d.regions)}let p={ok:c.every(f=>f.status==="ok"),captures:c,...Object.keys(u).length?{regions:u}:{}};if(e.specPath&&!e.urlOnly){let f=(0,xR.join)(a,SVe);(0,Wp.writeFileSync)(f,JSON.stringify(p,null,2)),p.manifestPath=f}return p}function wVe(t){let e;try{e=JSON.parse((0,Wp.readFileSync)(t,"utf8"))}catch(s){return{error:`Could not read --spec file ${t}: ${s instanceof Error?s.message:String(s)}`}}let r=Array.isArray(e)?e:[e];if(r.length===0)return{error:`--spec file ${t} contains no entries`};let n=[];for(let[s,i]of r.entries()){if(!HS(i)||typeof i.card!="string")return{error:`--spec entry ${s} must be an object with a "card" URL`};n.push({card:i.card,format:typeof i.format=="string"?i.format:"isolated",captureSpec:i.captureSpec??null})}return{jobs:n}}async function BVe(t,e){let r=f=>({entries:vVe(t.captureSpec).map(d=>({card:t.card,name:d,status:"error",url:null,error:f}))}),n;if(e.realmFlag){if(!t.card.startsWith(e.realmFlag))return r(`Card is not within --realm ${e.realmFlag}`);n=e.realmFlag}else{let f;try{f=await e.authenticator.authedRealmFetch(`${t.card}.json`,{headers:{Accept:"application/vnd.card+source"}})}catch(h){return r(Ah(h))}let d=await f.text().catch(()=>"");if(!f.ok)return r(`Could not load card (HTTP ${f.status}): ${d.slice(0,200)}`);let A=f.headers.get("x-boxel-realm-url");if(!A)return r("Could not determine the realm: response carries no x-boxel-realm-url header (pass --realm)");n=ce(A)}let s=`${e.realmServerUrl?ce(e.realmServerUrl):yl(t.card)}_capture`,i=JSON.stringify({data:{type:"capture",attributes:{realmURL:n,cardId:t.card,format:t.format,includeBase64:!e.urlOnly,captureSpec:t.captureSpec??null}}}),o=Date.now(),a;for(;;){try{a=await e.serverFetch(s,{method:"POST",headers:{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"},body:i})}catch(A){return r(Ah(A))}if(a.status!==503)break;await a.text().catch(()=>"");let f=Number.parseInt(a.headers.get("retry-after")??"",10);(!Number.isFinite(f)||f<=0)&&(f=CVe);let d=Date.now()-o;if(d+f*1e3>e.maxWaitMs)return r(`Server busy: gave up after ${Math.round(d/1e3)}s (raise --max-wait or retry later)`);console.error(`Server busy; retrying ${t.card} in ${f}s\u2026`),await e.sleep(f*1e3)}let l=await a.text().catch(()=>"");if(!a.ok)return r(`HTTP ${a.status}: ${l.slice(0,300)}`);let c;try{let f=JSON.parse(l);c=HS(f?.data?.attributes)?f.data.attributes:void 0}catch{return r("Invalid JSON response from server")}if(!c)return r("Malformed response: missing data.attributes");if(c.status!=="ready")return r(c.error?String(c.error):`Capture failed (status: ${String(c.status??"unknown")})`);let u=Array.isArray(c.captures)?c.captures:c.base64!=null||c.width!=null?[{name:null,url:null,width:c.width??null,height:c.height??null,deviceScaleFactor:null,base64:c.base64}]:[];if(u.length===0)return r("Response contained no captures");let p;if(e.urlOnly)p=u.map(f=>f.url?{card:t.card,name:f.name??null,status:"ok",url:f.url,width:f.width??null,height:f.height??null,deviceScaleFactor:f.deviceScaleFactor??null}:{card:t.card,name:f.name??null,status:"error",url:null,error:"No served URL for this capture: the server returns URLs only for captures it persists (canonical specs)"});else{let f=typeof c.contentType=="string"?c.contentType:"image/png",d=IVe[f]??"png",A=t.card.startsWith(n)?t.card.slice(n.length):new URL(t.card).pathname.replace(/^\//,"");p=[];for(let h of u)p.push(await TVe(t,h,{ctx:e,baseName:sie(A),extension:d}))}return{entries:p,...c.regions!==void 0?{regions:c.regions}:{}}}async function TVe(t,e,{ctx:r,baseName:n,extension:s}){let i=e.name??null,o={card:t.card,name:i,url:e.url??null,width:e.width??null,height:e.height??null,deviceScaleFactor:e.deviceScaleFactor??null},a;if(typeof e.base64=="string"&&e.base64.length>0)a=Buffer.from(e.base64,"base64");else if(e.url){let p;try{p=await r.authenticator.authedRealmFetch(e.url)}catch(f){return{...o,status:"error",error:Ah(f)}}if(!p.ok)return await p.text().catch(()=>""),{...o,status:"error",error:`Download failed (HTTP ${p.status}): ${e.url}`};a=Buffer.from(await p.arrayBuffer())}else return{...o,status:"error",error:"Capture carried neither image data nor a served URL"};let l=i?`${n}--${sie(i)}`:n,c=`${l}.${s}`;for(let p=2;r.usedFileNames.has(c);p++)c=`${l}-${p}.${s}`;r.usedFileNames.add(c);let u=(0,xR.join)(r.outDir,c);return(0,Wp.writeFileSync)(u,a),{...o,status:"ok",file:u,sha256:(0,nie.createHash)("sha256").update(a).digest("hex")}}function DVe(t){let e={};return t.viewport&&(e.viewport=t.viewport),t.envelope&&(e.envelope=t.envelope),t.dsf!==void 0&&(e.deviceScaleFactor=t.dsf),t.clip&&(e.clip=t.clip),t.target&&(e.target=t.target),t.fullPage&&(e.fullPage=!0),Object.keys(e).length?e:null}function rie(t){return e=>{let r=/^(\d+)x(\d+)$/i.exec(e.trim());if(!r)throw new Error(`${t} must be WxH (e.g. 800x600)`);return{width:Number(r[1]),height:Number(r[2])}}}function PVe(t){let e=Number(t);if(!Number.isFinite(e)||e<=0)throw new Error("--dsf must be a positive number");return e}function _Ve(t){let e=t.split(",").map(o=>Number(o.trim()));if(e.length!==4||e.some(o=>!Number.isFinite(o)))throw new Error("--clip must be x,y,w,h (e.g. 0,0,400,300)");let[r,n,s,i]=e;return{x:r,y:n,width:s,height:i}}function NVe(t){let e=Number.parseInt(t,10);if(!Number.isFinite(e)||e<0||String(e)!==t.trim())throw new Error("--max-wait must be a non-negative integer (seconds)");return e}function iie(t){t.command("capture").alias("screenshot").description("Capture a card via the realm server: writes image or PDF files (or prints served URLs) plus a per-capture manifest").argument("[card-url]","Card instance URL or @cardstack/<realm>/<path> identifier (omit when using --spec)").option("--format <format>","Render format: isolated, embedded, or fitted (fitted requires --envelope)","isolated").option("--viewport <WxH>","Render viewport in CSS pixels, e.g. 800x600",rie("--viewport")).option("--envelope <WxH>","Parent box a fitted card lays out into, in CSS pixels, e.g. 400x300",rie("--envelope")).option("--dsf <n>","Device scale factor (e.g. 2 doubles the physical pixel density)",PVe).option("--clip <x,y,w,h>","Capture only this CSS-pixel rectangle",_Ve).option("--target <selector>","Capture the element matching this CSS selector (requires a realm server that supports target captures; older servers reject it with a named 400)").option("--full-page","Capture the full scrollable page height").option("--out <dir>","Directory to write image files into (default: current directory)").option("--spec <file>","JSON batch spec \u2014 an entry or array of {card, format?, captureSpec?}; one request per card, writes capture-manifest.json into --out").option("--url-only","Print served capture URLs without downloading image bytes").option("--realm <realm-url>","Realm URL containing the card (skips realm auto-discovery)").option("--max-wait <seconds>","Total time to keep retrying while the server is busy",NVe,vR).option("--realm-secret-seed","Administrative auth: prompt for a realm secret seed and mint tokens locally instead of using a Matrix profile (env: BOXEL_REALM_SECRET_SEED)").option("--as-user <matrix-id>","Matrix id to authorize as in seed mode (defaults to the owner derived from the card URL)").option("--json","Output the capture manifest as JSON").action(async(e,r)=>{try{let n=await mr(r.realmSecretSeed===!0),s=await xVe(e,{format:r.format,captureSpec:DVe(r),specPath:r.spec,out:r.out,urlOnly:r.urlOnly,realm:r.realm,maxWaitMs:(r.maxWait??vR)*1e3,realmSecretSeed:n,asUser:r.asUser});if(r.json){Fe.output(JSON.stringify(s,null,2)),s.ok||process.exit(1);return}s.error&&(console.error(`${W}Error:${v} ${s.error}`),process.exit(1));for(let i of s.captures){let o=i.name?`${i.card} [${i.name}]`:i.card;if(i.status!=="ok")console.error(`${W}\u2717 ${o}:${v} ${i.error}`);else if(r.urlOnly)Fe.output(i.url);else{let a=i.width!=null&&i.height!=null?` (${i.width}\xD7${i.height})`:"";console.log(`${he}\u2713${v} ${o} \u2192 ${Ye}${i.file}${v}${a}`)}}s.manifestPath&&console.log(`Manifest: ${Ye}${s.manifestPath}${v}`),s.ok||process.exit(1)}catch(n){let s=n instanceof Error?n.message:String(n);console.error(`${W}Error:${v} ${s}`),process.exit(1)}})}var Cve=require("node:path");var Ave=require("node:child_process"),ca=require("node:fs"),mve=require("node:http"),pt=require("node:path");var z7=require("node:fs"),K7=require("node:path");var uve=We(wn(),1),pve=We(KEe(),1);function zEe(t){let e=t.types;function r(s){return s.startsWith("./")||s.startsWith("../")||s.startsWith("/")||s.includes("://")}function n(s){let i=s[0];if(!e.isExpression(i))throw new Error("Dynamic import with spread or placeholder arguments is not supported");let o;if(e.isStringLiteral(i)&&r(i.value)){let a=e.newExpression(e.identifier("URL"),[i,e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("url"))]);o=e.memberExpression(a,e.identifier("href"))}else o=i;return e.callExpression(e.memberExpression(e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("loader")),e.identifier("import")),[o,...s.slice(1).filter(a=>e.isExpression(a))])}return{visitor:{CallExpression(s){let i=s.get("callee");i.node.type==="Identifier"&&i.node.name==="fetch"?i.replaceWith(e.memberExpression(e.memberExpression(e.metaProperty(e.identifier("import"),e.identifier("meta")),e.identifier("loader")),e.identifier("fetch"))):i.node.type==="Import"&&s.replaceWith(n(s.node.arguments))}}}}var fve=We(q8(),1);var ZEe=We(kf()),rr=We(ze()),ebe=We(N3()),tbe={task:null,restartableTask:"restartable",dropTask:"drop",keepLatestTask:"keepLatest",enqueueTask:"enqueue"};function G3t(t){if(t.node&&t.node.type==="Identifier"){let e=t.scope.getBinding(t.node.name);if(e&&e.kind==="module"){let{node:r,parent:n}=e.path;return{source:n.source.value,isNamespace:r.type==="ImportNamespaceSpecifier",isDefault:r.type==="ImportDefaultSpecifier",isNamed:r.type==="ImportSpecifier",name:r.type==="ImportSpecifier"&&r.imported.name}}}}function Y3t(t){return t.isNamed&&t.source==="ember-concurrency"&&t.name in tbe}function W3t(t){let e;return(e=G3t(t))?Y3t(e)&&e.name:!1}var XEe={ClassProperty(t,e){let r=t.node.value;if(r&&r.type==="CallExpression"){let n=W3t(t.get("value.callee"));if(!n)return;let s=t.get(`value.arguments.${r.arguments.length-1}`);if(!s&&!s.node)return;let i=s.node;i&&i.type==="ArrowFunctionExpression"&&i.async&&J3t(s,e,n)}}};function J3t(t,e,r){if(t&&t.node.async&&(0,rr.isArrowFunctionExpression)(t)){let n=t.node.body;n.type!=="BlockStatement"&&(n=(0,rr.blockStatement)([(0,rr.returnStatement)(n)]));let s=(0,rr.functionExpression)(t.node.id,t.node.params,n,!0),i=(0,rr.arrowFunctionExpression)([],(0,rr.objectExpression)([(0,rr.objectProperty)((0,rr.identifier)("context"),(0,rr.thisExpression)()),(0,rr.objectProperty)((0,rr.identifier)("generator"),s)]));e._buildTaskImport||(e._buildTaskImport=(0,ebe.addNamed)(e.root,"buildTask","ember-concurrency/-private/async-arrow-runtime"));let o=t.parentPath.node.arguments;o[0]&&o[0].type==="ThisExpression"&&o.shift();let a=z3t(t),l;switch(o.length){case 1:l=(0,rr.nullLiteral)();break;case 2:l=o[0];break;default:throw new Error(`The task() syntax you're using for the task named ${a} is incorrect.`)}let c=tbe[r],u=(0,rr.callExpression)((0,rr.identifier)(e._buildTaskImport.name),[i,l,(0,rr.stringLiteral)(a),c?(0,rr.stringLiteral)(c):(0,rr.nullLiteral)()]);t.parentPath.replaceWith(u)[0].traverse({FunctionExpression(f){f.node.generator&&f.traverse(K3t)}})}}var K3t={Function(t){t.skip()},AwaitExpression(t){t.replaceWith((0,rr.yieldExpression)(t.get("argument").node))}};function z3t(t){let e=t.parentPath.parentPath;return e&&e.node.type==="ClassProperty"?e.node.key.name:null}var rbe=(0,ZEe.declare)(t=>(t.assertVersion(7),{name:"transform-ember-concurrency-async-function-tasks",visitor:{Program(e,r){r.root=e,e.traverse({ClassDeclaration(n,s){n.traverse(XEe,s)},ClassExpression(n,s){n.traverse(XEe,s)}},r)}}}));var dve=We(xSe(),1);var wSe="dt7948";var nj={},hT={};Object.defineProperty(hT,"__esModule",{value:!0});hT.sanitize=void 0;function R9t(t){let e=t.replace(new RegExp(`(?<!^)(?:${BSe.source})([a-z])`,"g"),(r,n)=>n.toUpperCase());return e=e.replace(new RegExp(BSe.source,"g"),""),e}hT.sanitize=R9t;var BSe=new RegExp("^[^a-zA-Z_$]|(?<=.)[^a-zA-Z_$0-9]");Object.defineProperty(nj,"__esModule",{value:!0});var NSe=nj.ImportUtil=void 0,O9t=hT,rj=class{constructor(e,r){this.babel=e,this.program=r,this.t=e.types}removeImport(e,r){for(let n of this.program.get("body")){if(!PSe(n,e))continue;let s=n.get("specifiers").find(i=>DSe(i,r));s&&(n.node.specifiers.length===1?n.remove():s.remove())}}removeAllImports(e){for(let r of this.program.get("body"))PSe(r,e)&&r.remove()}import(e,r,n,s){return this.unreferencedImport(e,r,n,TSe(s,n,dT(e)))}unreferencedImport(e,r,n,s){var i;let o=n==="*",l=!(n==="default")&&!o,c=this.findImportFrom(r),u=c?.node.specifiers.find(d=>d.type==="ImportNamespaceSpecifier");if(!(c?.node.specifiers.find(d=>d.type==="ImportSpecifier")&&o||u&&l||u&&o)&&c){let d=c.get("specifiers").find(A=>DSe(A,n));return d&&((i=e.scope.getBinding(d.node.local.name))===null||i===void 0?void 0:i.kind)==="module"?this.t.identifier(d.node.local.name):this.addSpecifier(e,c,n,s)}else{let d=this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(r)));return this.addSpecifier(e,d,n,s)}}importForSideEffect(e){this.findImportFrom(e)||this.insertAfterExistingImports(this.t.importDeclaration([],this.t.stringLiteral(e)))}replaceWith(e,r){return this.mutate(n=>(e.replaceWith(r(n)),e),dT(e))}insertAfter(e,r){return this.mutate(n=>e.insertAfter(r(n))[0],dT(e))}insertBefore(e,r){return this.mutate(n=>e.insertBefore(r(n))[0],dT(e))}mutate(e,r){let n=new Map,s={import:(a,l,c)=>{let u=this.t.identifier("__babel_import_util_placeholder__");return n.set(u,{moduleSpecifier:a,exportedName:l,nameHint:c}),u}},i=a=>{if(!a.isIdentifier())return;let l=n.get(a.node);if(l){let c=this.unreferencedImport(a,l.moduleSpecifier,l.exportedName,TSe(l.nameHint,l.exportedName,r));a.replaceWith(c);let u=a.scope.getBinding(c.name);if(!u)throw new Error("bug: this is supposed to never happen");u.reference(a)}},o=e(s);return i(o),this.babel.traverse(o.node,{ReferencedIdentifier:a=>{i(a)}},o.scope,{},o),o}addSpecifier(e,r,n,s){let i=this.t.identifier(F9t(e,s)),o=this.buildSpecifier(n,i),a;return o.type==="ImportDefaultSpecifier"?(r.node.specifiers.unshift(o),a=r.get("specifiers.0")):(r.node.specifiers.push(o),a=r.get(`specifiers.${r.node.specifiers.length-1}`)),r.scope.registerBinding("module",a),i}buildSpecifier(e,r){switch(e){case"default":return this.t.importDefaultSpecifier(r);case"*":return this.t.importNamespaceSpecifier(r);default:return this.t.importSpecifier(r,this.t.identifier(e))}}findImportFrom(e){for(let r of this.program.get("body"))if(r.isImportDeclaration()&&r.node.source.value===e&&r.node.importKind!=="type")return r}insertAfterExistingImports(e){let r;for(let[n,s]of this.program.node.body.entries())s.type==="ImportDeclaration"&&(r=n);return r==null?(this.program.node.body.unshift(e),this.program.get("body.0")):(this.program.node.body.splice(r+1,0,e),this.program.get(`body.${r+1}`))}};NSe=nj.ImportUtil=rj;function F9t(t,e){let r=e,n=0;for(;t.scope.hasBinding(r);)r=`${e}${n++}`;return r}function L9t(t){return t.type==="StringLiteral"?t.value:t.name}function TSe(t,e,r){return t?(0,O9t.sanitize)(t):e==="default"||e==="*"?r??"a":e}function dT(t){return t?.isIdentifier()?t.node.name:t?t.scope.generateUidIdentifierBasedOnNode(t.node).name:void 0}function DSe(t,e){switch(e){case"default":return t.isImportDefaultSpecifier();case"*":return t.isImportNamespaceSpecifier();default:return t.isImportSpecifier()&&L9t(t.node.imported)===e}}function PSe(t,e){return t.isImportDeclaration()&&t.get("source").node.value===e}function _Se(t){let e=t.types;return{Program(r,n){n.currentClassBodies=[],n.currentObjectExpressions=[],n.optsWithDefaults={runtime:"globals",runEarly:!1,...n.opts},n.util=new NSe(t,r),n.runtime=(s,i)=>{let{runtime:o}=n.optsWithDefaults;return o==="globals"?e.memberExpression(e.identifier(wSe),e.identifier(i)):s.import(o.import,i)}},ClassBody:{enter(r,n){n.currentClassBodies.unshift(r.node)},exit(r,n){n.currentClassBodies[0]===r.node&&n.currentClassBodies.shift()}},ClassExpression(r,n){let s=r.get("decorators");Array.isArray(s)&&s.length>0&&n.util.replaceWith(r,i=>{let o=e.callExpression(n.runtime(i,"c"),[r.node,e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]);for(let a of s)a.remove();return o})},ClassDeclaration(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i=o=>e.callExpression(n.runtime(o,"c"),[e.classExpression(r.node.id,r.node.superClass,r.node.body,[]),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]);if(r.parentPath.isExportDefaultDeclaration()){let o=r.node.id;o?(n.util.insertBefore(r.parentPath,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))])),r.parentPath.replaceWith(e.exportDefaultDeclaration(o))):n.util.replaceWith(r.parentPath,a=>e.exportDefaultDeclaration(i(a)))}else if(r.parentPath.isExportNamedDeclaration()){let o=r.node.id;if(!o)throw new Error("bug: expected a class name is required in this context");n.util.insertBefore(r.parentPath,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))])),r.parentPath.replaceWith(e.exportNamedDeclaration(null,[e.exportSpecifier(o,o)]))}else{let o=r.node.id;if(!o)throw new Error("bug: expected a class name is required in this context");n.util.replaceWith(r,a=>e.variableDeclaration("const",[e.variableDeclarator(o,i(a))]))}}},ClassProperty(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i;r.node.static?i=e.thisExpression():i=e.memberExpression(e.thisExpression(),e.identifier("prototype"));let o=[i,ib(e,r.node.key),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))];r.node.value&&o.push(e.functionExpression(null,[],e.blockStatement([e.returnStatement(r.node.value)]))),n.util.insertBefore(r,a=>e.staticBlock([e.expressionStatement(e.callExpression(n.runtime(a,"g"),o))])),n.util.insertBefore(r,a=>e.classPrivateProperty(e.privateName(e.identifier(M9t(n,U9t(r.node.key)))),e.sequenceExpression([e.callExpression(n.runtime(a,"i"),[e.thisExpression(),ib(e,r.node.key)]),e.unaryExpression("void",e.numericLiteral(0),!0)]))),r.remove()}},ClassMethod(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){let i;r.node.static?i=e.thisExpression():i=e.memberExpression(e.thisExpression(),e.identifier("prototype")),n.util.insertAfter(r,o=>e.staticBlock([e.expressionStatement(e.callExpression(n.runtime(o,"n"),[i,ib(e,r.node.key),e.arrayExpression(s.slice().reverse().map(a=>a.node.expression))]))]));for(let o of s)o.remove()}},ObjectExpression:{enter(r,n){n.currentObjectExpressions.unshift({node:r.node,decorated:[]})},exit(r,n){var s;if(((s=n.currentObjectExpressions[0])==null?void 0:s.node)!==r.node)return;let{decorated:i}=n.currentObjectExpressions.shift();i.length>0&&n.util.replaceWith(r,o=>e.callExpression(n.runtime(o,"p"),[r.node,e.arrayExpression(i.map(([a,l,c])=>e.arrayExpression([e.stringLiteral(a),l,e.arrayExpression(c)])))]))}},ObjectProperty(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){if(n.currentObjectExpressions.length===0)throw new Error("bug in decorator-transforms: didn't expect to see ObjectProperty outside ObjectExpression");let i=r.node.key;if(i.type==="PrivateName")throw new Error("cannot decorate private field");n.currentObjectExpressions[0].decorated.push(["field",ib(e,i),s.slice().reverse().map(o=>o.node.expression)]);for(let o of s)o.remove()}},ObjectMethod(r,n){let s=r.get("decorators");if(Array.isArray(s)&&s.length>0){if(n.currentObjectExpressions.length===0)throw new Error("bug in decorator-transforms: didn't expect to see ObjectMethod outside ObjectExpression");let i=r.node.key;n.currentObjectExpressions[0].decorated.push(["method",ib(e,i),s.slice().reverse().map(o=>o.node.expression)]);for(let o of s)o.remove()}}}}function kSe(t){let e=_Se(t);return{manipulateOptions(r,n){n.plugins.push("decorators-legacy")},pre(r){this.opts.runEarly&&(t.traverse(r.ast,_Se(t),r.scope,this),e=void 0)},get visitor(){return e??{}}}}function M9t(t,e){let r=t.currentClassBodies[0];if(!r)throw new Error("bug: no current class body around our class field decorator");let n=new Set;for(let i of r.body)(i.type==="ClassPrivateProperty"||i.type==="ClassPrivateMethod"||i.type==="ClassAccessorProperty")&&i.key.type==="PrivateName"&&n.add(i.key.id.name);let s=e;for(;n.has(s);)s=s+"_";return s}function U9t(t){return t.type==="Identifier"?t.name:t.type==="BigIntLiteral"||t.type==="NumericLiteral"?`_${t.value}`:t.type==="StringLiteral"?"_"+t.value.replace(/[^a-zA-Z]/g,""):"_"}function ib(t,e){return e.type==="Identifier"?t.stringLiteral(e.name):e}var j7={};Wu(j7,{_buildCompileOptions:()=>tve,_preprocess:()=>k7,_print:()=>P7,precompile:()=>U7});function sj(){return Object.create(null)}var za=Object.assign,QSe=console;function j9t(t,e="unexpected unreachable branch"){throw QSe.log("unreachable",t),QSe.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var rt={Append:1,TrustingAppend:2,Comment:3,Modifier:4,Block:6,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54},rd={class:0,id:1,value:2,name:3,type:4,style:5,href:6},AT={div:0,span:1,p:2,a:3},ij=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Uu(t,e){var r=e&&e.loc,n,s,i,o;r&&(n=r.start.line,s=r.end.line,i=r.start.column,o=r.end.column,t+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,t),l=0;l<ij.length;l++)this[ij[l]]=a[ij[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Uu);try{r&&(this.lineNumber=n,this.endLineNumber=s,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=i,this.endColumn=o))}catch{}}Uu.prototype=new Error;function ab(){this.parents=[]}ab.prototype={constructor:ab,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!ab.prototype[r.type])throw new Uu('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new Uu(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new Uu("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||e)return e;if(e!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:CT,Decorator:CT,BlockStatement:RSe,DecoratorBlock:RSe,PartialStatement:OSe,PartialBlockStatement:function(t){OSe.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:CT,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function CT(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function RSe(t){CT.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function OSe(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Xa(t){t===void 0&&(t={}),this.options=t}Xa.prototype=new ab;Xa.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,s=0,i=n.length;s<i;s++){var o=n[s],a=this.accept(o);if(a){var l=Ej(n,s,r),c=bj(n,s,r),u=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&sd(n,s,!0),a.open&&Lu(n,s,!0),e&&f&&(sd(n,s),Lu(n,s)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[s-1].original)[1])),e&&u&&(sd((o.program||o.inverse).body),Lu(n,s)),e&&p&&(sd(n,s),Lu((o.inverse||o.program).body))}}return t};Xa.prototype.BlockStatement=Xa.prototype.DecoratorBlock=Xa.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,s=r;if(r&&r.chained)for(n=r.body[0].program;s.chained;)s=s.body[s.body.length-1].program;var i={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:bj(e.body),closeStandalone:Ej((n||e).body)};if(t.openStrip.close&&sd(e.body,null,!0),r){var o=t.inverseStrip;o.open&&Lu(e.body,null,!0),o.close&&sd(n.body,null,!0),t.closeStrip.open&&Lu(s.body,null,!0),!this.options.ignoreStandalone&&Ej(e.body)&&bj(n.body)&&(Lu(e.body),sd(n.body))}else t.closeStrip.open&&Lu(e.body,null,!0);return i};Xa.prototype.Decorator=Xa.prototype.MustacheStatement=function(t){return t.strip};Xa.prototype.PartialStatement=Xa.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Ej(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],s=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function bj(t,e,r){e===void 0&&(e=-1);var n=t[e+1],s=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(s||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function sd(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var s=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function Lu(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var s=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}var mT=function(){var t=function(tt,J,ee,Z){for(ee=ee||{},Z=tt.length;Z--;ee[tt[Z]]=J);return ee},e=[2,52],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,53,57,61],s=[1,44],i=[1,40],o=[1,43],a=[1,33],l=[1,34],c=[1,35],u=[1,36],p=[1,37],f=[1,42],d=[1,46],A=[14,15,19,29,34,39,44,47,48,53,57,61],h=[14,15,19,29,34,44,47,48,53,57,61],m=[15,18],g=[14,15,19,29,34,47,48,53,57,61],E=[33,67,73,75,84,85,86,87,88,89],b=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],I=[1,62],w=[1,63],L=[23,33,56,68,73,79],U=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],q=[2,51],V=[1,64],ie=[67,73,75,77,84,85,86,87,88,89],re=[56,67,73,75,84,85,86,87,88,89],Ie=[1,75],Ze=[1,76],je=[1,83],Ct=[33,67,73,75,79,84,85,86,87,88,89],Mt=[23,67,73,75,84,85,86,87,88,89],qt=[67,68,73,75,84,85,86,87,88,89],Ht=[33,79],sr=[1,134],Jn=[73,81],Kn={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,2],[76,0],[76,2],[80,1],[80,2]],performAction:function(J,ee,Z,G,de,R,Kr){var F=R.length-1;switch(de){case 1:return R[F-1];case 2:this.$=G.prepareProgram(R[F]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 28:case 29:case 30:case 31:case 38:case 39:case 46:case 47:this.$=R[F];break;case 9:this.$={type:"CommentStatement",value:G.stripComment(R[F]),strip:G.stripFlags(R[F],R[F]),loc:G.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:R[F],value:R[F],loc:G.locInfo(this._$)};break;case 11:this.$=G.prepareRawBlock(R[F-2],R[F-1],R[F],this._$);break;case 12:this.$={path:R[F-3],params:R[F-2],hash:R[F-1]};break;case 13:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!1,this._$);break;case 14:this.$=G.prepareBlock(R[F-3],R[F-2],R[F-1],R[F],!0,this._$);break;case 15:this.$={open:R[F-5],path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 16:case 17:this.$={path:R[F-4],params:R[F-3],hash:R[F-2],blockParams:R[F-1],strip:G.stripFlags(R[F-5],R[F])};break;case 18:this.$={strip:G.stripFlags(R[F-1],R[F-1]),program:R[F]};break;case 19:var Qn=G.prepareBlock(R[F-2],R[F-1],R[F],R[F],!1,this._$),ws=G.prepareProgram([Qn],R[F-1].loc);ws.chained=!0,this.$={strip:R[F-2].strip,program:ws,chain:!0};break;case 21:this.$={path:R[F-1],strip:G.stripFlags(R[F-2],R[F])};break;case 22:this.$=G.prepareMustache(G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"}),[],void 0,R[F-2],G.stripFlags(R[F-2],R[F]),this._$);break;case 23:case 24:this.$=G.prepareMustache(R[F-3],R[F-2],R[F-1],R[F-4],G.stripFlags(R[F-4],R[F]),this._$);break;case 25:this.$={type:"PartialStatement",name:R[F-3],params:R[F-2],hash:R[F-1],indent:"",strip:G.stripFlags(R[F-4],R[F]),loc:G.locInfo(this._$)};break;case 26:this.$=G.preparePartialBlock(R[F-2],R[F-1],R[F],this._$);break;case 27:this.$={path:R[F-3],params:R[F-2],hash:R[F-1],strip:G.stripFlags(R[F-4],R[F])};break;case 32:this.$=G.syntax.hash(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 33:this.$={type:"SubExpression",path:R[F-3],params:R[F-2],hash:R[F-1],loc:G.locInfo(this._$)};break;case 34:this.$={type:"Hash",pairs:R[F],loc:G.locInfo(this._$)};break;case 35:this.$={type:"HashPair",key:G.id(R[F-2]),value:R[F],loc:G.locInfo(this._$)};break;case 36:this.$=G.syntax.square(R[F-1],G.locInfo(this._$),{yy:G,syntax:"expr"});break;case 37:this.$=G.id(R[F-1]);break;case 40:this.$={type:"StringLiteral",value:R[F],original:R[F],loc:G.locInfo(this._$)};break;case 41:this.$={type:"NumberLiteral",value:Number(R[F]),original:Number(R[F]),loc:G.locInfo(this._$)};break;case 42:this.$={type:"BooleanLiteral",value:R[F]==="true",original:R[F]==="true",loc:G.locInfo(this._$)};break;case 43:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:G.locInfo(this._$)};break;case 44:this.$={type:"NullLiteral",original:null,value:null,loc:G.locInfo(this._$)};break;case 45:this.$=G.preparePath(!0,!1,R[F],this._$);break;case 48:this.$=G.preparePath(!1,R[F-2],R[F],this._$);break;case 49:this.$=G.preparePath(!1,!1,R[F],this._$);break;case 50:R[F-2].push({part:G.id(R[F]),original:R[F],separator:R[F-1]}),this.$=R[F-2];break;case 51:this.$=[{part:G.id(R[F]),original:R[F]}];break;case 52:case 54:case 56:case 64:case 70:case 76:case 84:case 88:case 92:case 96:case 100:case 106:this.$=[];break;case 53:case 55:case 57:case 65:case 71:case 77:case 85:case 89:case 93:case 97:case 101:case 105:case 107:case 109:R[F-1].push(R[F]);break;case 104:case 108:this.$=[R[F]];break}},table:[t([5,14,15,19,29,34,48,53,57,61],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,60:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],53:[1,14],57:[1,18],61:[1,24]}),{1:[2,1]},t(n,[2,53]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:28,49:25,50:26,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:45,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(A,e,{6:3,4:47}),t(h,e,{6:3,4:48}),t(m,[2,54],{17:49}),{20:28,50:50,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:51}),t([5,14,15,18,19,29,34,39,44,47,48,53,57,61],[2,10]),{20:52,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:54,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:55,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,50:56,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,57]},t(E,[2,84],{51:58}),t([23,33,56,68,79],[2,34],{72:59,73:[1,60]}),t(b,[2,28]),t(b,[2,29],{91:61,92:I,93:w}),t(L,[2,104]),t(b,[2,38]),t(b,[2,39]),t(b,[2,40]),t(b,[2,41]),t(b,[2,42]),t(b,[2,43]),t(b,[2,44]),t(U,[2,30]),t(U,[2,31]),t([23,33,56,67,68,73,75,79,84,85,86,87,88,89,92,93],q,{74:V}),t(b,[2,49],{91:65,92:I,93:w}),{73:d,90:66},t(ie,[2,106],{76:67}),{20:28,49:68,50:69,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(re,[2,88],{54:70}),t(U,q),{25:71,38:73,39:Ie,43:74,44:Ze,45:72,47:[2,60]},{28:77,43:78,44:Ze,47:[2,62]},{13:80,15:r,18:[1,79]},t(E,[2,92],{58:81}),{26:82,47:je},t(Ct,[2,64],{30:84}),{91:61,92:I,93:w},t(Ct,[2,70],{35:85}),t(Mt,[2,56],{21:86}),t(E,[2,96],{62:87}),t(n,[2,22]),{20:28,33:[2,86],49:90,50:89,52:88,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(L,[2,105]),{74:V},{73:d,90:91},{73:[2,46]},{73:[2,47]},{20:28,50:92,64:29,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{73:[1,93]},t(b,[2,45],{91:65,92:I,93:w}),{20:28,50:95,64:29,65:38,66:39,67:s,73:d,75:o,77:[1,94],82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{68:[1,96]},t(qt,[2,100],{69:97}),{20:28,49:100,50:99,55:98,56:[2,90],64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{26:101,47:je},{47:[2,61]},t(A,e,{6:3,4:102}),{47:[2,20]},{20:103,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(g,e,{6:3,4:104}),{26:105,47:je},{47:[2,63]},t(n,[2,11]),t(m,[2,55]),{20:28,33:[2,94],49:108,50:107,59:106,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(n,[2,26]),{20:109,64:53,65:38,66:39,67:s,73:d,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},t(Ht,[2,66],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,31:110,50:111,49:112,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(Ht,[2,72],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,36:113,50:114,49:115,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),{20:28,22:116,23:[2,58],49:118,50:117,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{20:28,33:[2,98],49:121,50:120,63:119,64:29,65:38,66:39,67:s,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{33:[1,122]},t(E,[2,85]),{33:[2,87]},t(b,[2,48],{91:65,92:I,93:w}),t(L,[2,35]),t(U,[2,50]),t(U,[2,36]),t(ie,[2,107]),t(U,[2,32]),{20:28,49:125,50:124,64:29,65:38,66:39,67:s,68:[2,102],70:123,71:27,72:30,73:i,75:o,82:31,83:32,84:a,85:l,86:c,87:u,88:p,89:f,90:41},{56:[1,126]},t(re,[2,89]),{56:[2,91]},t(n,[2,13]),{38:73,39:Ie,43:74,44:Ze,45:128,46:127,47:[2,82]},t(Ct,[2,76],{40:129}),{47:[2,18]},t(n,[2,14]),{33:[1,130]},t(E,[2,93]),{33:[2,95]},{33:[1,131]},{32:132,33:[2,68],78:133,79:sr},t(Ct,[2,65]),t(Ht,[2,67]),{33:[2,74],37:135,78:136,79:sr},t(Ct,[2,71]),t(Ht,[2,73]),{23:[1,137]},t(Mt,[2,57]),{23:[2,59]},{33:[1,138]},t(E,[2,97]),{33:[2,99]},t(n,[2,23]),{68:[1,139]},t(qt,[2,101]),{68:[2,103]},t(n,[2,24]),{47:[2,19]},{47:[2,83]},t(Ht,[2,78],{71:27,20:28,64:29,72:30,82:31,83:32,65:38,66:39,90:41,41:140,50:141,49:142,67:s,73:i,75:o,84:a,85:l,86:c,87:u,88:p,89:f}),t(n,[2,25]),t(n,[2,21]),{33:[1,143]},{33:[2,69]},{73:[1,145],80:144},{33:[1,146]},{33:[2,75]},t(m,[2,12]),t(g,[2,27]),t(U,[2,33]),{33:[2,80],42:147,78:148,79:sr},t(Ct,[2,77]),t(Ht,[2,79]),t(A,[2,15]),{73:[1,150],81:[1,149]},t(Jn,[2,108]),t(h,[2,16]),{33:[1,151]},{33:[2,81]},{33:[2,37]},t(Jn,[2,109]),t(A,[2,17])],defaultActions:{4:[2,1],62:[2,46],63:[2,47],72:[2,61],74:[2,20],78:[2,63],90:[2,87],100:[2,91],104:[2,18],108:[2,95],118:[2,59],121:[2,99],125:[2,103],127:[2,19],128:[2,83],133:[2,69],136:[2,75],148:[2,81],149:[2,37]},parseError:function(J,ee){if(ee.recoverable)this.trace(J);else{var Z=new Error(J);throw Z.hash=ee,Z}},parse:function(J){var ee=this,Z=[0],G=[null],de=[],R=this.table,Kr="",F=0,Qn=0,ws=2,ua=1,me=de.slice.call(arguments,1),K=Object.create(this.lexer),Qe={yy:{}};for(var $t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$t)&&(Qe.yy[$t]=this.yy[$t]);K.setInput(J,Qe.yy),Qe.yy.lexer=K,Qe.yy.parser=this,typeof K.yylloc>"u"&&(K.yylloc={});var Ar=K.yylloc;de.push(Ar);var Cr=K.options&&K.options.ranges;typeof Qe.yy.parseError=="function"?this.parseError=Qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var un=function(){var Mr;return Mr=K.lex()||ua,typeof Mr!="number"&&(Mr=ee.symbols_[Mr]||Mr),Mr},St,Rt,ft,pn,ir={},fs,Vt,fn,dn;;){if(Rt=Z[Z.length-1],this.defaultActions[Rt]?ft=this.defaultActions[Rt]:((St===null||typeof St>"u")&&(St=un()),ft=R[Rt]&&R[Rt][St]),typeof ft>"u"||!ft.length||!ft[0]){var Dn="";dn=[];for(fs in R[Rt])this.terminals_[fs]&&fs>ws&&dn.push("'"+this.terminals_[fs]+"'");K.showPosition?Dn="Parse error on line "+(F+1)+`:
|
|
2961
2961
|
`+K.showPosition()+`
|
|
2962
|
-
Expecting `+dn.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dn="Parse error on line "+(F+1)+": Unexpected "+(St==ua?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Dn,{text:K.match,token:this.terminals_[St]||St,line:K.yylineno,loc:Ar,expected:dn})}if(
|
|
2962
|
+
Expecting `+dn.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Dn="Parse error on line "+(F+1)+": Unexpected "+(St==ua?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Dn,{text:K.match,token:this.terminals_[St]||St,line:K.yylineno,loc:Ar,expected:dn})}if(ft[0]instanceof Array&&ft.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+St);switch(ft[0]){case 1:Z.push(St),G.push(K.yytext),de.push(K.yylloc),Z.push(ft[1]),St=null,Qn=K.yyleng,Kr=K.yytext,F=K.yylineno,Ar=K.yylloc;break;case 2:if(Vt=this.productions_[ft[1]][1],ir.$=G[G.length-Vt],ir._$={first_line:de[de.length-(Vt||1)].first_line,last_line:de[de.length-1].last_line,first_column:de[de.length-(Vt||1)].first_column,last_column:de[de.length-1].last_column},Cr&&(ir._$.range=[de[de.length-(Vt||1)].range[0],de[de.length-1].range[1]]),pn=this.performAction.apply(ir,[Kr,Qn,F,Qe.yy,ft[1],G,de].concat(me)),typeof pn<"u")return pn;Vt&&(Z=Z.slice(0,-1*Vt*2),G=G.slice(0,-1*Vt),de=de.slice(0,-1*Vt)),Z.push(this.productions_[ft[1]][0]),G.push(ir.$),de.push(ir._$),fn=R[Z[Z.length-2]][Z[Z.length-1]],Z.push(fn);break;case 3:return!0}}return!0}},cn=function(){var tt={EOF:1,parseError:function(ee,Z){if(this.yy.parser)this.yy.parser.parseError(ee,Z);else throw new Error(ee)},setInput:function(J,ee){return this.yy=ee||this.yy||{},this._input=J,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var ee=J.match(/(?:\r\n?|\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var ee=J.length,Z=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var G=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Z.length-1&&(this.yylineno-=Z.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Z?(Z.length===G.length?this.yylloc.first_column:0)+G[G.length-Z.length].length-Z[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
2963
2963
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),ee=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
|
|
2964
2964
|
`+ee+"^"},test_match:function(J,ee){var Z,G,de;if(this.options.backtrack_lexer&&(de={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(de.yylloc.range=this.yylloc.range.slice(0))),G=J[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(J[0].length),this.matched+=J[0],Z=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Z)return Z;if(this._backtrack){for(var R in de)this[R]=de[R];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,ee,Z,G;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),R=0;R<de.length;R++)if(Z=this._input.match(this.rules[de[R]]),Z&&(!ee||Z[0].length>ee[0].length)){if(ee=Z,G=R,this.options.backtrack_lexer){if(J=this.test_match(Z,de[R]),J!==!1)return J;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(J=this.test_match(ee,de[G]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
2965
2965
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ee=this.next();return ee||this.lex()},begin:function(ee){this.conditionStack.push(ee)},popState:function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},pushState:function(ee){this.begin(ee)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ee,Z,G,de){function R(Kr,F){return Z.yytext=Z.yytext.substring(Kr,Z.yyleng-F+Kr)}switch(G){case 0:if(Z.yytext.slice(-2)==="\\\\"?(R(0,1),this.begin("mu")):Z.yytext.slice(-1)==="\\"?(R(0,1),this.begin("emu")):this.begin("mu"),Z.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(R(5,9),18);case 5:return 15;case 6:return this.popState(),14;case 7:return 67;case 8:return 68;case 9:if(ee.syntax.square==="string")this.unput(Z.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;case 18:return this.popState(),44;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(Z.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;case 33:return this.popState(),33;case 34:return Z.yytext=R(1,2).replace(/\\"/g,'"'),84;case 35:return Z.yytext=R(1,2).replace(/\\'/g,"'"),84;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return Z.yytext=Z.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return tt}();Kn.lexer=cn;function Ut(){this.yy={}}return Ut.prototype=Kn,Kn.Parser=Ut,new Ut}(),q9t=function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function Gr(){this.padding=0}Gr.prototype=new ab;Gr.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
@@ -3012,9 +3012,9 @@ Error caused by`,e.loc))}return null}},Ojt={Append:"an append statement",Block:"
|
|
|
3012
3012
|
/></svg>
|
|
3013
3013
|
</template>;
|
|
3014
3014
|
export default IconComponent;
|
|
3015
|
-
`,J7;function j7t(){return J7||(J7=W7(U7t,"/@cardstack/boxel-icons/v1/icons/icon-stub.gts")),J7}async function q7t(){try{return(await import("@playwright/test")).chromium}catch(t){let e=t instanceof Error?t.message:String(t);throw new Error(`Could not load @playwright/test (${e}). Reinstall \`@cardstack/boxel-cli\` (Playwright ships as a runtime dependency) and run \`npx playwright install chromium\` once to fetch the browser binary.`)}}async function gve(t,e){let r=e?.profileManager??Re(),n=r.getActiveProfile();if(!n)return c2(ct);let s=
|
|
3015
|
+
`,J7;function j7t(){return J7||(J7=W7(U7t,"/@cardstack/boxel-icons/v1/icons/icon-stub.gts")),J7}async function q7t(){try{return(await import("@playwright/test")).chromium}catch(t){let e=t instanceof Error?t.message:String(t);throw new Error(`Could not load @playwright/test (${e}). Reinstall \`@cardstack/boxel-cli\` (Playwright ships as a runtime dependency) and run \`npx playwright install chromium\` once to fetch the browser binary.`)}}async function gve(t,e){let r=e?.profileManager??Re(),n=r.getActiveProfile();if(!n)return c2(ct);let s=dt(t,{profileManager:r});if(!s.ok)return c2(s.error);t=s.url;let i=ce(t),o=ce(e?.hostAppUrl??n.profile.realmServerUrl),a;try{let l=await $p(i,{profileManager:r});if(l.error)return c2(`Failed to discover test files: ${l.error}`);a=l.filenames.filter(c=>c.endsWith(".test.gts"))}catch(l){return c2(`Failed to discover test files: ${l instanceof Error?l.message:String(l)}`)}if(a.length===0)return{status:"failed",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:[],failures:[],errorMessage:"No `*.test.gts` files found in the realm. Every implementation Issue must ship with at least one test file."};try{let{qunitResults:l,durationMs:c}=await Eve({pm:r,targetRealm:i,hostAppUrl:o,hostDistDir:e?.hostDistDir,debug:e?.debug});return{...bve(l),durationMs:c,testFiles:a}}catch(l){let c=l instanceof Error?l.message:String(l);return{status:"error",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:a,failures:[],errorMessage:c}}}async function yve(t){let e=(0,pt.resolve)(t.workspaceDir),r=H7t(e);if(r.length===0)return{status:"failed",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:[],failures:[],errorMessage:`No \`*.test.gts\` files found in ${e}. Every implementation Issue must ship with at least one test file.`};let{baseDir:n,skillsDir:s,pretuiDir:i}=$7t(t.bundledRealmsDir);try{let{qunitResults:o,durationMs:a}=await Eve({pm:Re(),targetRealm:"__local__:workspace",hostAppUrl:"__local__:",hostDistDir:t.hostDistDir,debug:t.debug,realmMounts:[{prefix:"workspace",root:e},{prefix:"base",root:n},{prefix:"skills",root:s},{prefix:"pretui",root:i}]});return{...bve(o),durationMs:a,testFiles:r}}catch(o){return{status:"error",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:r,failures:[],errorMessage:o instanceof Error?o.message:String(o)}}}function H7t(t){let e=[],r=n=>{let s;try{s=(0,z7.readdirSync)(n,{withFileTypes:!0})}catch{return}for(let i of s){if(i.name==="node_modules"||i.name.startsWith("."))continue;let o=(0,pt.join)(n,i.name);i.isDirectory()?r(o):i.isFile()&&i.name.endsWith(".test.gts")&&e.push(o.slice(t.length+1))}};return r(t),e.sort()}function $7t(t){if(t)return{baseDir:(0,pt.join)(t,"base"),skillsDir:(0,pt.join)(t,"skills"),pretuiDir:(0,pt.join)(t,"pretui")};let e=dh(__dirname),r=(0,pt.join)(e,"bundled-realms");if(hve((0,pt.join)(r,"base")))return{baseDir:(0,pt.join)(r,"base"),skillsDir:(0,pt.join)(r,"skills"),pretuiDir:(0,pt.join)(r,"pretui")};let n=(0,pt.resolve)(e,".."),s=(0,pt.join)(n,"base"),i=(0,pt.join)(n,"skills-realm","contents"),o=(0,pt.join)(n,"pretui");if(!hve(s))throw new Error(`Could not locate base realm: ${r}/base does not exist and sibling ${s} is also missing. Run \`pnpm build\` in packages/boxel-cli to populate the bundled realms.`);return{baseDir:s,skillsDir:i,pretuiDir:o}}function hve(t){try{return(0,ca.statSync)(t).isDirectory()}catch{return!1}}async function Eve(t){let e=Date.now(),r,n;try{let s=t.hostDistDir??Y7t();if(!X7((0,pt.join)(s,"tests","index.html")))throw new Error(`Host app dist not found at ${s}. Build the host app (e.g., \`pnpm --filter @cardstack/host build\`) or set TEST_HARNESS_HOST_DIST_PACKAGE_DIR.`);let{url:i,server:o,setHtml:a,realmURL:l}=await G7t({hostDistDir:s,...t.realmMounts?{realmMounts:t.realmMounts}:{}});n=o;let c=t.realmMounts?l("workspace"):t.targetRealm,u=t.realmMounts?i+"/":t.hostAppUrl,p=V7t({assetServerUrl:i,hostDistDir:s,realmProxyUrl:u});a(p),r=await(await q7t()).launch({headless:!0});let d=await r.newPage();t.debug&&(d.on("console",b=>{process.stderr.write(`[browser ${b.type()}] ${b.text()}
|
|
3016
3016
|
`)}),d.on("pageerror",b=>{process.stderr.write(`[browser pageerror] ${b.message}
|
|
3017
|
-
`)}));let A=await j7t();if(await d.route("**/@cardstack/boxel-icons/v1/icons/*.js",b=>b.fulfill({status:200,contentType:"application/javascript",headers:{"Access-Control-Allow-Origin":"*"},body:A})),!t.realmMounts){let b=t.authorization??t.pm.getRealmToken(c);if(b){let I=new URL(c).origin;await d.route(`${I}/**`,w=>{let L={...w.request().headers(),Authorization:b};w.continue({headers:L})})}}let h=encodeURIComponent(c),m=`${i}?liveTest=true&realmURL=${h}&hidepassed`;await d.goto(m,{waitUntil:"domcontentloaded"});let g=t.timeoutMs??3e5;try{await d.waitForFunction(()=>window.__qunitResults?.runEnd!==null,null,{timeout:g})}catch(b){throw b instanceof Error&&b.name==="TimeoutError"?new Error(`QUnit suite did not reach runEnd within ${g}ms`,{cause:b}):b}return{qunitResults:await d.evaluate(()=>window.__qunitResults),durationMs:Date.now()-e}}finally{r&&await r.close().catch(()=>{}),n&&n.close()}}function V7t(t){let e=t.assetServerUrl.replace(/\/$/,""),r=t.realmProxyUrl.replace(/\/$/,""),n=(0,
|
|
3017
|
+
`)}));let A=await j7t();if(await d.route("**/@cardstack/boxel-icons/v1/icons/*.js",b=>b.fulfill({status:200,contentType:"application/javascript",headers:{"Access-Control-Allow-Origin":"*"},body:A})),!t.realmMounts){let b=t.authorization??t.pm.getRealmToken(c);if(b){let I=new URL(c).origin;await d.route(`${I}/**`,w=>{let L={...w.request().headers(),Authorization:b};w.continue({headers:L})})}}let h=encodeURIComponent(c),m=`${i}?liveTest=true&realmURL=${h}&hidepassed`;await d.goto(m,{waitUntil:"domcontentloaded"});let g=t.timeoutMs??3e5;try{await d.waitForFunction(()=>window.__qunitResults?.runEnd!==null,null,{timeout:g})}catch(b){throw b instanceof Error&&b.name==="TimeoutError"?new Error(`QUnit suite did not reach runEnd within ${g}ms`,{cause:b}):b}return{qunitResults:await d.evaluate(()=>window.__qunitResults),durationMs:Date.now()-e}}finally{r&&await r.close().catch(()=>{}),n&&n.close()}}function V7t(t){let e=t.assetServerUrl.replace(/\/$/,""),r=t.realmProxyUrl.replace(/\/$/,""),n=(0,pt.resolve)(t.hostDistDir,"tests","index.html"),s;try{s=(0,ca.readFileSync)(n,"utf8")}catch{throw new Error(`Could not read host test page at ${n}. Build the host app with test support.`)}let i=(s.match(/<meta[^>]+>/g)??[]).filter(c=>!c.includes("charset")&&!c.includes("viewport")).map(c=>{if(!c.includes("config/environment"))return c;let u=c.match(/content="([^"]+)"/);if(!u)return c;try{let p=JSON.parse(decodeURIComponent(u[1]));p.resolvedBaseRealmURL&&(p.resolvedBaseRealmURL=`${r}/base/`),p.resolvedSkillsRealmURL&&(p.resolvedSkillsRealmURL=`${r}/skills/`),p.resolvedPretuiRealmURL&&(p.resolvedPretuiRealmURL=`${r}/pretui/`),p.resolvedOpenRouterRealmURL&&(p.resolvedOpenRouterRealmURL=`${r}/openrouter/`),p.realmServerURL&&(p.realmServerURL=`${r}/`);let f=encodeURIComponent(JSON.stringify(p));return c.replace(/content="[^"]+"/,`content="${f}"`)}catch{return c}}),o=(s.match(/<script[^>]*src="[^"]*"[^>]*><\/script>/g)??[]).filter(c=>!c.includes("testem.js")&&!c.includes("ember-cli-live-reload")).map(c=>c.replace(/src="\/([^"]*)"/g,`src="${e}/$1"`)),a=(s.match(/<link[^>]*rel="stylesheet"[^>]*>/g)??[]).map(c=>c.replace(/href="\/([^"]*)"/g,`href="${e}/$1"`)),l=(s.match(/<script type="module">[^]*?<\/script>/g)??[]).map(c=>c.replace(/from '\/([^']*)'/g,`from '${e}/$1'`));return`<!DOCTYPE html>
|
|
3018
3018
|
<html>
|
|
3019
3019
|
<head>
|
|
3020
3020
|
<meta charset="utf-8">
|
|
@@ -3062,7 +3062,7 @@ export default IconComponent;
|
|
|
3062
3062
|
${o.join(`
|
|
3063
3063
|
`)}
|
|
3064
3064
|
</body>
|
|
3065
|
-
</html>`}async function G7t(t){let e={".js":"application/javascript",".css":"text/css",".map":"application/json",".html":"text/html",".wasm":"application/wasm",".svg":"image/svg+xml",".png":"image/png",".woff2":"font/woff2",".woff":"font/woff",".ttf":"font/ttf"},r=(0,
|
|
3065
|
+
</html>`}async function G7t(t){let e={".js":"application/javascript",".css":"text/css",".map":"application/json",".html":"text/html",".wasm":"application/wasm",".svg":"image/svg+xml",".png":"image/png",".woff2":"font/woff2",".woff":"font/woff",".ttf":"font/ttf"},r=(0,pt.resolve)(t.hostDistDir),n=["",".gts",".ts",".json"],s=new Map;for(let p of t.realmMounts??[])s.set(p.prefix,{prefix:p.prefix,root:(0,pt.resolve)(p.root)});function i(p){return{"Access-Control-Allow-Origin":"*","X-Boxel-Realm-Url":p,"X-Boxel-Realm-Public-Readable":"true","Access-Control-Expose-Headers":"X-Boxel-Realm-Url,X-Boxel-Realm-Public-Readable"}}let o=new Map,a="",l=p=>{a=p};function c(p,f){for(let d of n){let A=(0,pt.resolve)(p,f+d);if(!(A!==p&&!A.startsWith(p+K7.sep)))try{if((0,ca.statSync)(A).isFile())return A}catch{}}return null}function u(p,f,d,A){let h;try{h=(0,z7.readdirSync)((0,pt.join)(p,f),{withFileTypes:!0})}catch{return}for(let m of h){if(m.name==="node_modules"||m.name.startsWith("."))continue;let g=f?`${f}/${m.name}`:m.name,E=(0,pt.join)(p,g),b;try{b=(0,ca.statSync)(E)}catch{continue}b.isDirectory()?u(p,g,d,A):b.isFile()&&(A[`${d}${g}`]=Math.floor(b.mtimeMs))}}return new Promise((p,f)=>{let d=(0,mve.createServer)(async(A,h)=>{let m=(A.url??"/").split("?")[0];if(A.method==="OPTIONS"){h.writeHead(204,{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, HEAD, OPTIONS","Access-Control-Allow-Headers":"*"}),h.end();return}if(m==="/"){h.writeHead(200,{"Content-Type":"text/html","Access-Control-Allow-Origin":"*"}),h.end(a);return}let g=m.replace(/^\/+/,"").split("/"),E=g[0]??"",b=s.get(E);if(b){let L=g.slice(1).join("/"),U=`http://127.0.0.1:${d.address().port}/${b.prefix}/`;if(L==="_mtimes"){let je={};u(b.root,"",U,je),h.writeHead(200,{"Content-Type":"application/vnd.api+json",...i(U)}),h.end(JSON.stringify({data:{id:U,type:"mtimes",attributes:{mtimes:je}}}));return}let q=(0,pt.normalize)(L).split(K7.sep).join("/");if(q.startsWith("..")||q.startsWith("/")){h.writeHead(403,i(U)),h.end("Forbidden");return}let V=c(b.root,q);if(!V){h.writeHead(404,i(U)),h.end("Not found");return}let ie=(0,ca.statSync)(V),re=V.match(/\.[^.]+$/)?.[0]??"",Ie=re===".gts"||re===".ts",Ze=new Date(ie.mtimeMs).toUTCString();if(Ie){let je=o.get(V);if(!je||je.mtimeMs!==ie.mtimeMs){let Ct=(0,ca.readFileSync)(V,"utf8");try{je={mtimeMs:ie.mtimeMs,body:await W7(Ct,"/"+q)}}catch(Mt){let qt=Mt instanceof Error?Mt.message:String(Mt);h.writeHead(500,{"Content-Type":"text/plain",...i(U)}),h.end(`transpile failed: ${qt}`);return}o.set(V,je)}h.writeHead(200,{"Content-Type":"application/javascript","Last-Modified":Ze,"X-Boxel-Cli-Transpiled":"1",...i(U)}),h.end(je.body);return}try{h.writeHead(200,{"Content-Type":e[re]??"application/octet-stream","Last-Modified":Ze,...i(U)}),h.end((0,ca.readFileSync)(V))}catch{h.writeHead(404,i(U)),h.end("Not found")}return}let I=(0,pt.normalize)(m.slice(1));if(I.startsWith("..")||I.startsWith("/")){h.writeHead(403),h.end("Forbidden");return}let w=(0,pt.resolve)(r,I);if(!w.startsWith(r)){h.writeHead(403),h.end("Forbidden");return}try{let L=(0,ca.readFileSync)(w),U=w.match(/\.[^.]+$/)?.[0]??"",q=e[U]??"application/octet-stream";h.writeHead(200,{"Content-Type":q,"Access-Control-Allow-Origin":"*"}),h.end(L)}catch{h.writeHead(404),h.end("Not found")}});d.on("error",f),d.listen(0,"127.0.0.1",()=>{let A=d.address();if(!A||typeof A=="string"){f(new Error("Failed to start test page server"));return}let h=`http://127.0.0.1:${A.port}`;p({url:h,server:d,setHtml:l,realmURL:m=>{if(!s.has(m))throw new Error(`Unknown realm mount prefix: ${m}`);return`${h}/${m}/`}})})})}function X7(t){try{return(0,ca.statSync)(t).isFile()}catch{return!1}}function Y7t(){if(process.env.TEST_HARNESS_HOST_DIST_PACKAGE_DIR)return(0,pt.join)((0,pt.resolve)(process.env.TEST_HARNESS_HOST_DIST_PACKAGE_DIR),"dist");let t=dh(__dirname),e=(0,pt.join)(t,"bundled-test-harness");if(X7((0,pt.join)(e,"tests","index.html")))return e;let r=W7t();return r?(0,pt.join)(r,"dist"):(0,pt.join)((0,pt.resolve)(t,".."),"host","dist")}function W7t(){let t=dh(__dirname),e=(0,pt.resolve)(t,".."),r=(0,pt.resolve)(e,".."),n=(0,pt.join)(e,"host"),s=J7t(r),i=s&&s!==r?(0,pt.resolve)(s,"packages","host"):void 0,o=[process.env.TEST_HARNESS_HOST_DIST_PACKAGE_DIR,n,i].filter(l=>!!l).map(l=>(0,pt.resolve)(l)),a=new Set;for(let l of o)if(!a.has(l)&&(a.add(l),X7((0,pt.join)(l,"dist","index.html"))))return l}function J7t(t){let e=(0,Ave.spawnSync)("git",["rev-parse","--path-format=absolute","--git-common-dir"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(e.status!==0)return;let r=e.stdout.trim();if(r.endsWith(`${(0,pt.join)(".git")}`))return(0,pt.dirname)(r)}function bve(t){if(!t.runEnd)return{status:"error",passedCount:0,failedCount:0,skippedCount:0,failures:[],errorMessage:"QUnit did not complete \u2014 runEnd event was not received"};let e=0,r=0,n=0,s=[];for(let o of t.tests)if(o.status==="failed"){r+=1;let a=o.errors[0];s.push({testName:o.name,module:o.module||"default",message:a?.message??"Test failed",...a?.stack?{stackTrace:a.stack.slice(0,500)}:{}})}else o.status==="skipped"||o.status==="todo"?n+=1:e+=1;let i;return t.tests.length===0?i="error":r>0||e===0&&n>0?i="failed":i="passed",{status:i,passedCount:e,failedCount:r,skippedCount:n,failures:s}}function c2(t){return{status:"error",passedCount:0,failedCount:0,skippedCount:0,durationMs:0,testFiles:[],failures:[],errorMessage:t}}function Sve(t){t.command("test").description("Run every `*.test.gts` file in a workspace directory in a headless Chromium driven against the host app. Defaults to serving cards from the local workspace (cwd or [path]) via an in-process transpiling server; pass `--realm <url>` to test cards already on a remote realm instead.").argument("[path]","Local workspace directory to test (defaults to cwd). Ignored when --realm is set.").option("--realm <realm-url>","Test against a remote realm URL instead of the local workspace. Modules are fetched from the realm-server.").option("--host-app-url <url>","Host app URL (compat proxy). Defaults to the local module server in local mode, or the active profile's realm-server URL in --realm mode.").option("--host-dist-dir <path>","Override the host app dist directory used to build the test page.").option("--debug","Stream browser console output to stderr").option("--json","Output structured JSON result").action(async(e,r)=>{let n;try{if(r.realm)n=await gve(r.realm,{...r.hostAppUrl?{hostAppUrl:r.hostAppUrl}:{},...r.hostDistDir?{hostDistDir:r.hostDistDir}:{},...r.debug?{debug:!0}:{}});else{let i=(0,Cve.resolve)(e??process.cwd());n=await yve({workspaceDir:i,...r.hostDistDir?{hostDistDir:r.hostDistDir}:{},...r.debug?{debug:!0}:{}})}}catch(i){console.error(`${W}Error:${v} ${i instanceof Error?i.message:String(i)}`),process.exit(1)}if(r.json){Fe.output(JSON.stringify(n,null,2)),n.status!=="passed"&&process.exit(1);return}if(n.errorMessage&&console.error(`${W}Error:${v} ${n.errorMessage}`),n.testFiles.length===0){console.log(`${te}No .test.gts files found in the realm.${v}`),n.status!=="passed"&&process.exit(1);return}if(n.failures.length>0)for(let i of n.failures)console.log(`
|
|
3066
3066
|
${W}FAIL${v} ${te}${i.module}${v} \u203A ${i.testName}`),console.log(` ${i.message}`),i.stackTrace&&console.log(` ${te}${i.stackTrace.split(`
|
|
3067
3067
|
`).slice(0,3).join(`
|
|
3068
3068
|
`)}${v}`);let s=n.status==="passed"?he:n.status==="failed"?W:W;console.log(`
|