@maildeno/editor 0.4.5 → 0.4.6
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/CHANGELOG.md +41 -0
- package/dist/DatePicker-6dMK-shv.js +5639 -0
- package/dist/DatePicker-CEm1DPgG.js +5640 -0
- package/dist/HealthIndicator-Ch5Ck0BL.js +1954 -0
- package/dist/HealthIndicator-Dr5vMr1T.js +1953 -0
- package/dist/PreviewCanvas-CG52GC5m.js +667 -0
- package/dist/PreviewCanvas-CjOrVIGt.js +668 -0
- package/dist/RichTextEditor-DaaHuVox.js +13487 -0
- package/dist/RichTextEditor-DoWpYF0R.js +13432 -0
- package/dist/RowPreviewChildren-DQoyExvw.js +4 -0
- package/dist/RowPreviewChildren-yl3aB7hb.js +4 -0
- package/dist/RowPreviewLegacyComponent-CHxbwy9l.js +454 -0
- package/dist/RowPreviewLegacyComponent-Dv7OCys4.js +454 -0
- package/dist/RowPreviewRow-Bizr4PTf.js +86 -0
- package/dist/RowPreviewRow-CLhz0YQ5.js +86 -0
- package/dist/SavedRowsPanel-C0DkAzHi.js +611 -0
- package/dist/SavedRowsPanel-Cp3gADrK.js +610 -0
- package/dist/babel-Bmz1GpKj.js +7218 -0
- package/dist/editor.css +1 -2
- package/dist/element-CRfWpZos.js +40842 -0
- package/dist/element.js +2 -2
- package/dist/estree-C5xyFN_T.js +4831 -0
- package/dist/html-Dc_r73Xn.js +3062 -0
- package/dist/index-BlYp4vAp.js +34092 -0
- package/dist/index.js +14 -48471
- package/dist/init.js +94 -82
- package/dist/standalone-Yv8gSIWN.js +2336 -0
- package/package.json +2 -2
- package/dist/RowPreviewLegacyComponent-3QuwvWmT.js +0 -402
- package/dist/RowPreviewLegacyComponent-DVxrCJ14.js +0 -402
- package/dist/RowPreviewRow-0pEQLmS4.js +0 -80
- package/dist/RowPreviewRow-Eum1wh1W.js +0 -80
- package/dist/adapters/index.d.ts +0 -38
- package/dist/babel-DV7WPQI0.js +0 -10043
- package/dist/baseStyles.d.ts +0 -13
- package/dist/blocks/canvasStyleHelpers.d.ts +0 -17
- package/dist/blocks/definitions/anchor.d.ts +0 -2
- package/dist/blocks/definitions/button.d.ts +0 -2
- package/dist/blocks/definitions/divider.d.ts +0 -2
- package/dist/blocks/definitions/heading.d.ts +0 -2
- package/dist/blocks/definitions/image.d.ts +0 -2
- package/dist/blocks/definitions/list.d.ts +0 -2
- package/dist/blocks/definitions/menu.d.ts +0 -2
- package/dist/blocks/definitions/paragraph.d.ts +0 -2
- package/dist/blocks/definitions/socials.d.ts +0 -2
- package/dist/blocks/definitions/spacer.d.ts +0 -2
- package/dist/blocks/definitions/video.d.ts +0 -2
- package/dist/blocks/index.d.ts +0 -8
- package/dist/brand.d.ts +0 -15
- package/dist/components/DesktopOnlyNotice.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/assistant/AssistantPanel.vue.d.ts +0 -37
- package/dist/components/features/emailBuilder/blocks/AnchorBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ButtonBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/DividerBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/HeadingBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ImageBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ListBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/MenuBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ParagraphBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/SocialsBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/SpacerBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/VideoBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/canvas/Canvas.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/canvas/CanvasColumn.vue.d.ts +0 -49
- package/dist/components/features/emailBuilder/canvas/CanvasComponent.vue.d.ts +0 -56
- package/dist/components/features/emailBuilder/canvas/CanvasElement.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/canvas/CanvasRow.vue.d.ts +0 -49
- package/dist/components/features/emailBuilder/canvas/CanvasRowSpacer.vue.d.ts +0 -40
- package/dist/components/features/emailBuilder/health/HealthIndicator.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/layout/Header.vue.d.ts +0 -54
- package/dist/components/features/emailBuilder/layout/SendEmail.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/layout/SidebarLeft.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/layout/SidebarRight.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/AnchorPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ButtonPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/DividerPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/HeadingPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ImagePanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ListPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/MenuPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ParagraphPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/RowColumnPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/RowPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/RowSpacerPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/SocialsPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/SpacerPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/VideoPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/shared/DeviceTabs.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/shared/LinkFieldMergeTags.vue.d.ts +0 -31
- package/dist/components/features/emailBuilder/panels/shared/OverrideBadge.vue.d.ts +0 -9
- package/dist/components/features/emailBuilder/panels/shared/PreviewBadge.vue.d.ts +0 -11
- package/dist/components/features/emailBuilder/panels/shared/TextFieldMergeTags.vue.d.ts +0 -25
- package/dist/components/features/emailBuilder/panels/ui/BoxStylingSection.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/panels/ui/PropertyAlignment.vue.d.ts +0 -30
- package/dist/components/features/emailBuilder/panels/ui/PropertyColor.vue.d.ts +0 -75
- package/dist/components/features/emailBuilder/panels/ui/PropertyGradientColor.vue.d.ts +0 -27
- package/dist/components/features/emailBuilder/panels/ui/PropertyNumberSlider.vue.d.ts +0 -74
- package/dist/components/features/emailBuilder/panels/ui/PropertySection.vue.d.ts +0 -17
- package/dist/components/features/emailBuilder/panels/ui/PropertySelect.vue.d.ts +0 -74
- package/dist/components/features/emailBuilder/panels/ui/PropertyTextStyle.vue.d.ts +0 -52
- package/dist/components/features/emailBuilder/panels/ui/PropertyTextStylePanel.vue.d.ts +0 -72
- package/dist/components/features/emailBuilder/panels/ui/PropertyToggle.vue.d.ts +0 -45
- package/dist/components/features/emailBuilder/panels/ui/PropertyVisibility.vue.d.ts +0 -32
- package/dist/components/features/emailBuilder/panels/ui/SpacingControl.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/ui/color-picker/AlphaSlider.vue.d.ts +0 -28
- package/dist/components/features/emailBuilder/panels/ui/color-picker/ColorPickerPanel.vue.d.ts +0 -31
- package/dist/components/features/emailBuilder/panels/ui/color-picker/HueSlider.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/ui/color-picker/RecentColors.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/panels/ui/color-picker/SVPanel.vue.d.ts +0 -39
- package/dist/components/features/emailBuilder/panels/ui/visibility-rule/Rule.vue.d.ts +0 -28
- package/dist/components/features/emailBuilder/preview/PreviewScreen.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/preview/ui/PreviewCanvas.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/preview/ui/PreviewCapabilityBadges.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientCard.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientList.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientPicker.vue.d.ts +0 -16
- package/dist/components/features/emailBuilder/preview/ui/PreviewComponent.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/preview/ui/PreviewDetailView.vue.d.ts +0 -41
- package/dist/components/features/emailBuilder/preview/ui/PreviewRendered.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/product/RowPreview.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/product/RowPreviewChildren.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/product/RowPreviewRow.vue.d.ts +0 -9
- package/dist/components/features/emailBuilder/product/SavedRowsPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/product/SavedTemplatesPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/product/VersionHistoryPanel.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/sidebar/SidebarBlockButton.vue.d.ts +0 -35
- package/dist/components/features/emailBuilder/tabs/GeneralTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/LayoutTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/content/ContentTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/content/LayersPanel.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/tabs/general/MergeTagsTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/StylesTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/VisibilityTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/VisibilityWrapESPTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/merge-tags/LinkTagTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/merge-tags/MergeTagTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/ui/LinkInputDialog.vue.d.ts +0 -17
- package/dist/components/features/emailBuilder/ui/canvas/CanvasRowDropZone.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/ui/canvas/DropZone.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/canvas/Loader.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/ui/layers-panel/ComponentIcon.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/ui/layers-panel/LayerColumnChildren.vue.d.ts +0 -42
- package/dist/components/features/emailBuilder/ui/layers-panel/LayerDropLine.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/ui/renderers/AnchorRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/DividerRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/HeadingRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ImageRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ListRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/MenuRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ParagraphRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/SocialsRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/SpacerRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/VideoRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/rich-text-editor/RichTextEditor.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/MergeTagPicker.vue.d.ts +0 -18
- package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/RichTextColorPicker.vue.d.ts +0 -15
- package/dist/components/features/emailBuilder/ui/visibility/SupportBadge.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/visibility/VisibilityPopover.vue.d.ts +0 -45
- package/dist/components/ui/ConfirmDialog.vue.d.ts +0 -3
- package/dist/components/ui/Icon.vue.d.ts +0 -33
- package/dist/components/ui/InfoDialog.vue.d.ts +0 -12
- package/dist/components/ui/Loading.vue.d.ts +0 -6
- package/dist/components/ui/ShadowSafeToast.vue.d.ts +0 -3
- package/dist/components/ui/primitives/Button.vue.d.ts +0 -23
- package/dist/components/ui/primitives/DatePicker.vue.d.ts +0 -16
- package/dist/components/ui/primitives/Dialog.vue.d.ts +0 -34
- package/dist/components/ui/primitives/InputText.vue.d.ts +0 -29
- package/dist/components/ui/primitives/Message.vue.d.ts +0 -20
- package/dist/components/ui/primitives/Select.vue.d.ts +0 -22
- package/dist/composables/emailBuilder/components/useComponentStyleEditor.d.ts +0 -72
- package/dist/composables/emailBuilder/components/useProductRowActions.d.ts +0 -3
- package/dist/composables/emailBuilder/components/useProductRows.d.ts +0 -59
- package/dist/composables/emailBuilder/components/useSystemRows.d.ts +0 -22
- package/dist/composables/emailBuilder/core/config/componentConfig.d.ts +0 -29
- package/dist/composables/emailBuilder/core/link-tags/useLinkTagInsert.d.ts +0 -13
- package/dist/composables/emailBuilder/core/merge-tags/mergeTagDefinitions.d.ts +0 -64
- package/dist/composables/emailBuilder/core/merge-tags/resolveMergeTags.d.ts +0 -27
- package/dist/composables/emailBuilder/core/ui/useLayerHoverScroll.d.ts +0 -20
- package/dist/composables/emailBuilder/core/ui/useLayoutDrag.d.ts +0 -85
- package/dist/composables/emailBuilder/core/ui/useRichTextEditors.d.ts +0 -6
- package/dist/composables/emailBuilder/core/ui/visibilityBadgeHelpers.d.ts +0 -22
- package/dist/composables/emailBuilder/core/useEmailBuilder.d.ts +0 -292
- package/dist/composables/emailBuilder/core/useEmailBuilderDefault.d.ts +0 -507
- package/dist/composables/emailBuilder/core/useEmailBuilderOperations.d.ts +0 -31
- package/dist/composables/emailBuilder/core/useEmailBuilderVisibility.d.ts +0 -31
- package/dist/composables/emailBuilder/export/actions/download.d.ts +0 -24
- package/dist/composables/emailBuilder/export/generators/html.d.ts +0 -3
- package/dist/composables/emailBuilder/export/generators/mjml.d.ts +0 -6
- package/dist/composables/emailBuilder/export/generators/react-email.d.ts +0 -61
- package/dist/composables/emailBuilder/export/helpers/generatorHelpers.d.ts +0 -53
- package/dist/composables/emailBuilder/export/logic/reactLogicWrapper.d.ts +0 -31
- package/dist/composables/emailBuilder/export/merge-tags/mergeTagMapper.d.ts +0 -42
- package/dist/composables/emailBuilder/export/merge-tags/reactMergeTagMapper.d.ts +0 -26
- package/dist/composables/emailBuilder/export/shared/containers.d.ts +0 -18
- package/dist/composables/emailBuilder/export/shared/styles.d.ts +0 -12
- package/dist/composables/emailBuilder/export/shared/tagIdentifier.d.ts +0 -1
- package/dist/composables/emailBuilder/export/targets/htmlExport.d.ts +0 -20
- package/dist/composables/emailBuilder/export/targets/jsonExport.d.ts +0 -28
- package/dist/composables/emailBuilder/export/targets/mjmlExport.d.ts +0 -19
- package/dist/composables/emailBuilder/export/targets/reactEmailExport.d.ts +0 -20
- package/dist/composables/emailBuilder/export/targets/templateSnapshot.d.ts +0 -24
- package/dist/composables/emailBuilder/export/transformers/espWrapper.d.ts +0 -2
- package/dist/composables/emailBuilder/export/transformers/formatting.d.ts +0 -3
- package/dist/composables/emailBuilder/export/transformers/minify.d.ts +0 -33
- package/dist/composables/emailBuilder/export/transformers/tagMapper.d.ts +0 -29
- package/dist/composables/emailBuilder/export/types/export.d.ts +0 -24
- package/dist/composables/emailBuilder/export/useEmailExportEngine.d.ts +0 -63
- package/dist/composables/emailBuilder/export/useEmailExportMobileStyles.d.ts +0 -3
- package/dist/composables/emailBuilder/export/useExportSettings.d.ts +0 -5
- package/dist/composables/emailBuilder/health/accessibilityChecker.d.ts +0 -64
- package/dist/composables/emailBuilder/health/healthIndicator.d.ts +0 -19
- package/dist/composables/emailBuilder/history/useEmailBuilderHistory.d.ts +0 -26
- package/dist/composables/emailBuilder/history/useHistory.d.ts +0 -16
- package/dist/composables/emailBuilder/preview/useClientPreview.d.ts +0 -127
- package/dist/composables/emailBuilder/transform/pipeline/hydrate.d.ts +0 -54
- package/dist/composables/emailBuilder/types/emailBuilder.d.ts +0 -79
- package/dist/composables/system/useColor.d.ts +0 -26
- package/dist/composables/system/useDeviceDetection.d.ts +0 -5
- package/dist/composables/system/useGoogleFonts.d.ts +0 -11
- package/dist/composables/system/useImageUpload.d.ts +0 -23
- package/dist/composables/system/useSavedRowsPanel.d.ts +0 -35
- package/dist/composables/ui/useConfirm.d.ts +0 -33
- package/dist/composables/ui/useInfoDialog.d.ts +0 -22
- package/dist/composables/ui/useTeleportTarget.d.ts +0 -49
- package/dist/composables/ui/useToast.d.ts +0 -32
- package/dist/devStyleMirror.d.ts +0 -20
- package/dist/documentScopedStyles.d.ts +0 -39
- package/dist/element-Dq6bmt2l.js +0 -48454
- package/dist/estree-DY9POgc0.js +0 -8195
- package/dist/html-wb0gSX1o.js +0 -7273
- package/dist/lightDom.d.ts +0 -30
- package/dist/shadowStyles.d.ts +0 -8
- package/dist/standalone-DHvJ30Td.js +0 -3554
- package/dist/utils/generateId.d.ts +0 -1
- package/dist/utils/shadowDom.d.ts +0 -30
- package/dist/vue.runtime.esm-bundler-CsdyQceJ.js +0 -6118
|
@@ -0,0 +1,3062 @@
|
|
|
1
|
+
var gn = Object.defineProperty;
|
|
2
|
+
var qt = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var fn = (e, t, r) => t in e ? gn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var u = (e, t, r) => fn(e, typeof t != "symbol" ? t + "" : t, r), Ze = (e, t, r) => t.has(e) || qt("Cannot " + r);
|
|
7
|
+
var I = (e, t, r) => (Ze(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Xe = (e, t, r) => t.has(e) ? qt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), It = (e, t, r, n) => (Ze(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), Mt = (e, t, r) => (Ze(e, t, "access private method"), r);
|
|
8
|
+
var dr = Object.defineProperty, mr = (e) => {
|
|
9
|
+
throw TypeError(e);
|
|
10
|
+
}, vn = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, gr = (e, t) => {
|
|
11
|
+
for (var r in t) dr(e, r, { get: t[r], enumerable: !0 });
|
|
12
|
+
}, Pt = (e, t, r) => vn(e, typeof t != "symbol" ? t + "" : t, r), Cn = (e, t, r) => t.has(e) || mr("Cannot " + r), qe = (e, t, r) => (Cn(e, t, "read from private field"), r ? r.call(e) : t.get(e)), _n = (e, t, r) => t.has(e) ? mr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Sn = {};
|
|
13
|
+
gr(Sn, { languages: () => wo, options: () => Ao, parsers: () => cn, printers: () => ru });
|
|
14
|
+
var vt = (e, t) => (r, n, ...a) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, a), kn = String.prototype.replaceAll ?? function(e, t) {
|
|
15
|
+
return e.global ? this.replace(e, t) : this.split(e).join(t);
|
|
16
|
+
}, bn = vt("replaceAll", function() {
|
|
17
|
+
if (typeof this == "string") return kn;
|
|
18
|
+
}), x = bn;
|
|
19
|
+
function wn(e) {
|
|
20
|
+
return this[e < 0 ? this.length + e : e];
|
|
21
|
+
}
|
|
22
|
+
var yn = vt("at", function() {
|
|
23
|
+
if (Array.isArray(this) || typeof this == "string") return wn;
|
|
24
|
+
}), te = yn, An = () => {
|
|
25
|
+
}, xn = An, fr = "string", vr = "array", Cr = "cursor", Ct = "indent", _t = "align", _r = "trim", St = "group", kt = "fill", bt = "if-break", wt = "indent-if-break", Sr = "line-suffix", kr = "line-suffix-boundary", re = "line", br = "label", yt = "break-parent", wr = /* @__PURE__ */ new Set([Cr, Ct, _t, _r, St, kt, bt, wt, Sr, kr, re, br, yt]);
|
|
26
|
+
function yr(e, t, r) {
|
|
27
|
+
if (!e.has(t)) {
|
|
28
|
+
let n = r(t);
|
|
29
|
+
e.set(t, n);
|
|
30
|
+
}
|
|
31
|
+
return e.get(t);
|
|
32
|
+
}
|
|
33
|
+
function En(e) {
|
|
34
|
+
if (typeof e == "string") return fr;
|
|
35
|
+
if (Array.isArray(e)) return vr;
|
|
36
|
+
if (!e) return;
|
|
37
|
+
let { type: t } = e;
|
|
38
|
+
if (wr.has(t)) return t;
|
|
39
|
+
}
|
|
40
|
+
var Ar = En, Dn = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
|
|
41
|
+
function Tn(e) {
|
|
42
|
+
let t = e === null ? "null" : typeof e;
|
|
43
|
+
if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
|
|
44
|
+
Expected it to be 'string' or 'object'.`;
|
|
45
|
+
if (Ar(e)) throw new Error("doc is valid.");
|
|
46
|
+
let r = Object.prototype.toString.call(e);
|
|
47
|
+
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
|
48
|
+
let n = Dn([...wr].map((a) => `'${a}'`));
|
|
49
|
+
return `Unexpected doc.type '${e.type}'.
|
|
50
|
+
Expected it to be ${n}.`;
|
|
51
|
+
}
|
|
52
|
+
var Bn = class extends Error {
|
|
53
|
+
constructor(t) {
|
|
54
|
+
super(Tn(t));
|
|
55
|
+
u(this, "name", "InvalidDocError");
|
|
56
|
+
this.doc = t;
|
|
57
|
+
}
|
|
58
|
+
}, Ln = Bn;
|
|
59
|
+
function xr(e, t) {
|
|
60
|
+
if (typeof e == "string") return t(e);
|
|
61
|
+
let r = /* @__PURE__ */ new Map();
|
|
62
|
+
return n(e);
|
|
63
|
+
function n(i) {
|
|
64
|
+
return yr(r, i, a);
|
|
65
|
+
}
|
|
66
|
+
function a(i) {
|
|
67
|
+
switch (Ar(i)) {
|
|
68
|
+
case vr:
|
|
69
|
+
return t(i.map(n));
|
|
70
|
+
case kt:
|
|
71
|
+
return t({ ...i, parts: i.parts.map(n) });
|
|
72
|
+
case bt:
|
|
73
|
+
return t({ ...i, breakContents: n(i.breakContents), flatContents: n(i.flatContents) });
|
|
74
|
+
case St: {
|
|
75
|
+
let { expandedStates: s, contents: o } = i;
|
|
76
|
+
return s ? (s = s.map(n), o = s[0]) : o = n(o), t({ ...i, contents: o, expandedStates: s });
|
|
77
|
+
}
|
|
78
|
+
case _t:
|
|
79
|
+
case Ct:
|
|
80
|
+
case wt:
|
|
81
|
+
case br:
|
|
82
|
+
case Sr:
|
|
83
|
+
return t({ ...i, contents: n(i.contents) });
|
|
84
|
+
case fr:
|
|
85
|
+
case Cr:
|
|
86
|
+
case _r:
|
|
87
|
+
case kr:
|
|
88
|
+
case re:
|
|
89
|
+
case yt:
|
|
90
|
+
return t(i);
|
|
91
|
+
default:
|
|
92
|
+
throw new Ln(i);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function F(e, t = Hn) {
|
|
97
|
+
return xr(e, (r) => typeof r == "string" ? ne(t, r.split(`
|
|
98
|
+
`)) : r);
|
|
99
|
+
}
|
|
100
|
+
var Fn = xn;
|
|
101
|
+
function N(e) {
|
|
102
|
+
return { type: Ct, contents: e };
|
|
103
|
+
}
|
|
104
|
+
function Nn(e, t) {
|
|
105
|
+
return { type: _t, contents: t, n: e };
|
|
106
|
+
}
|
|
107
|
+
function qn(e) {
|
|
108
|
+
return Nn(Number.NEGATIVE_INFINITY, e);
|
|
109
|
+
}
|
|
110
|
+
var ye = { type: yt };
|
|
111
|
+
function Er(e) {
|
|
112
|
+
return { type: kt, parts: e };
|
|
113
|
+
}
|
|
114
|
+
function y(e, t = {}) {
|
|
115
|
+
return Fn(t.expandedStates), { type: St, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
|
|
116
|
+
}
|
|
117
|
+
function ke(e, t = "", r = {}) {
|
|
118
|
+
return { type: bt, breakContents: e, flatContents: t, groupId: r.groupId };
|
|
119
|
+
}
|
|
120
|
+
function In(e, t) {
|
|
121
|
+
return { type: wt, contents: e, groupId: t.groupId, negate: t.negate };
|
|
122
|
+
}
|
|
123
|
+
function ne(e, t) {
|
|
124
|
+
let r = [];
|
|
125
|
+
for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
|
|
126
|
+
return r;
|
|
127
|
+
}
|
|
128
|
+
var b = { type: re }, A = { type: re, soft: !0 }, Mn = { type: re, hard: !0 }, k = [Mn, ye], Pn = { type: re, hard: !0, literal: !0 }, Hn = [Pn, ye], Dr = Object.freeze({ character: "'", codePoint: 39 }), Tr = Object.freeze({ character: '"', codePoint: 34 }), Rn = Object.freeze({ preferred: Dr, alternate: Tr }), Un = Object.freeze({ preferred: Tr, alternate: Dr });
|
|
129
|
+
function Vn(e, t) {
|
|
130
|
+
let { preferred: r, alternate: n } = t === !0 || t === "'" ? Rn : Un, { length: a } = e, i = 0, s = 0;
|
|
131
|
+
for (let o = 0; o < a; o++) {
|
|
132
|
+
let l = e.charCodeAt(o);
|
|
133
|
+
l === r.codePoint ? i++ : l === n.codePoint && s++;
|
|
134
|
+
}
|
|
135
|
+
return (i > s ? n : r).character;
|
|
136
|
+
}
|
|
137
|
+
function On(e) {
|
|
138
|
+
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
139
|
+
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
140
|
+
}
|
|
141
|
+
var D, ze, Br, hr, zn = (hr = class {
|
|
142
|
+
constructor(e) {
|
|
143
|
+
Xe(this, ze);
|
|
144
|
+
Xe(this, D);
|
|
145
|
+
It(this, D, new Set(e));
|
|
146
|
+
}
|
|
147
|
+
getLeadingWhitespaceCount(e) {
|
|
148
|
+
let t = I(this, D), r = 0;
|
|
149
|
+
for (let n = 0; n < e.length && t.has(e.charAt(n)); n++) r++;
|
|
150
|
+
return r;
|
|
151
|
+
}
|
|
152
|
+
getTrailingWhitespaceCount(e) {
|
|
153
|
+
let t = I(this, D), r = 0;
|
|
154
|
+
for (let n = e.length - 1; n >= 0 && t.has(e.charAt(n)); n--) r++;
|
|
155
|
+
return r;
|
|
156
|
+
}
|
|
157
|
+
getLeadingWhitespace(e) {
|
|
158
|
+
let t = this.getLeadingWhitespaceCount(e);
|
|
159
|
+
return e.slice(0, t);
|
|
160
|
+
}
|
|
161
|
+
getTrailingWhitespace(e) {
|
|
162
|
+
let t = this.getTrailingWhitespaceCount(e);
|
|
163
|
+
return e.slice(e.length - t);
|
|
164
|
+
}
|
|
165
|
+
hasLeadingWhitespace(e) {
|
|
166
|
+
return I(this, D).has(e.charAt(0));
|
|
167
|
+
}
|
|
168
|
+
hasTrailingWhitespace(e) {
|
|
169
|
+
return I(this, D).has(te(0, e, -1));
|
|
170
|
+
}
|
|
171
|
+
trimStart(e) {
|
|
172
|
+
let t = this.getLeadingWhitespaceCount(e);
|
|
173
|
+
return e.slice(t);
|
|
174
|
+
}
|
|
175
|
+
trimEnd(e) {
|
|
176
|
+
let t = this.getTrailingWhitespaceCount(e);
|
|
177
|
+
return e.slice(0, e.length - t);
|
|
178
|
+
}
|
|
179
|
+
trim(e) {
|
|
180
|
+
return this.trimEnd(this.trimStart(e));
|
|
181
|
+
}
|
|
182
|
+
split(e, t = !1) {
|
|
183
|
+
let r = `[${On([...I(this, D)].join(""))}]+`, n = new RegExp(t ? `(${r})` : r);
|
|
184
|
+
return e.split(n);
|
|
185
|
+
}
|
|
186
|
+
hasWhitespaceCharacter(e) {
|
|
187
|
+
let t = I(this, D);
|
|
188
|
+
return Array.prototype.some.call(e, (r) => t.has(r));
|
|
189
|
+
}
|
|
190
|
+
hasNonWhitespaceCharacter(e) {
|
|
191
|
+
let t = I(this, D);
|
|
192
|
+
return Array.prototype.some.call(e, (r) => !t.has(r));
|
|
193
|
+
}
|
|
194
|
+
isWhitespaceOnly(e) {
|
|
195
|
+
let t = I(this, D);
|
|
196
|
+
return Array.prototype.every.call(e, (r) => t.has(r));
|
|
197
|
+
}
|
|
198
|
+
dedentString(e) {
|
|
199
|
+
let t = Mt(this, ze, Br).call(this, e);
|
|
200
|
+
return t === 0 ? e : e.split(`
|
|
201
|
+
`).map((r) => r.slice(t)).join(`
|
|
202
|
+
`);
|
|
203
|
+
}
|
|
204
|
+
}, D = new WeakMap(), ze = new WeakSet(), Br = function(e) {
|
|
205
|
+
let t = Number.POSITIVE_INFINITY;
|
|
206
|
+
for (let r of e.split(`
|
|
207
|
+
`)) {
|
|
208
|
+
if (r.length === 0) continue;
|
|
209
|
+
let n = this.getLeadingWhitespaceCount(r);
|
|
210
|
+
if (n === 0) return 0;
|
|
211
|
+
r.length !== n && n < t && (t = n);
|
|
212
|
+
}
|
|
213
|
+
return t === Number.POSITIVE_INFINITY ? 0 : t;
|
|
214
|
+
}, hr), $n = zn, Wn = [" ", `
|
|
215
|
+
`, "\f", "\r", " "], jn = new $n(Wn), B = jn, Gn = class extends Error {
|
|
216
|
+
constructor(t, r, n = "type") {
|
|
217
|
+
super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);
|
|
218
|
+
u(this, "name", "UnexpectedNodeError");
|
|
219
|
+
this.node = t;
|
|
220
|
+
}
|
|
221
|
+
}, Kn = Gn;
|
|
222
|
+
function Ae(e, t = !0) {
|
|
223
|
+
return [N([A, e]), t ? A : ""];
|
|
224
|
+
}
|
|
225
|
+
function ae(e, t) {
|
|
226
|
+
let r = e.type === "NGRoot" ? e.node.type === "NGMicrosyntax" && e.node.body.length === 1 && e.node.body[0].type === "NGMicrosyntaxExpression" ? e.node.body[0].expression : e.node : e.type === "JsExpressionRoot" ? e.node : e;
|
|
227
|
+
return r && (r.type === "ObjectExpression" || r.type === "ArrayExpression" || (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression" || t.parser === "__ng_binding" || t.parser === "__ng_directive") && (r.type === "TemplateLiteral" || r.type === "StringLiteral"));
|
|
228
|
+
}
|
|
229
|
+
async function L(e, t, r, n) {
|
|
230
|
+
r = { __isInHtmlAttribute: !0, __embeddedInHtml: !0, ...r };
|
|
231
|
+
let a = !0;
|
|
232
|
+
n && (r.__onHtmlBindingRoot = (s, o) => {
|
|
233
|
+
a = n(s, o);
|
|
234
|
+
});
|
|
235
|
+
let i = await t(e, r, t);
|
|
236
|
+
return a ? y(i) : Ae(i);
|
|
237
|
+
}
|
|
238
|
+
function Jn(e, t, r, n) {
|
|
239
|
+
let { node: a } = r, i = n.originalText.slice(a.sourceSpan.start.offset, a.sourceSpan.end.offset);
|
|
240
|
+
return /^\s*$/.test(i) ? "" : L(i, e, { parser: "__ng_directive", __isInHtmlAttribute: !1 }, ae);
|
|
241
|
+
}
|
|
242
|
+
var Yn = Jn, Qn = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), xe = Qn, Zn = Array.prototype.toReversed ?? function() {
|
|
243
|
+
return [...this].reverse();
|
|
244
|
+
}, Xn = vt("toReversed", function() {
|
|
245
|
+
if (Array.isArray(this)) return Zn;
|
|
246
|
+
}), ea = Xn;
|
|
247
|
+
function ta() {
|
|
248
|
+
var n, a, i, s, o;
|
|
249
|
+
let e = globalThis, t = (n = e.process) == null ? void 0 : n.platform;
|
|
250
|
+
if (typeof t == "string") return t.startsWith("win");
|
|
251
|
+
let r = (i = (a = e.Deno) == null ? void 0 : a.build) == null ? void 0 : i.os;
|
|
252
|
+
return typeof r == "string" ? r === "windows" : ((o = (s = e.navigator) == null ? void 0 : s.platform) == null ? void 0 : o.startsWith("Win")) ?? !1;
|
|
253
|
+
}
|
|
254
|
+
var ra = ta();
|
|
255
|
+
function Lr(e) {
|
|
256
|
+
if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
|
|
257
|
+
return e;
|
|
258
|
+
}
|
|
259
|
+
function na(e) {
|
|
260
|
+
return e = Lr(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
|
|
261
|
+
}
|
|
262
|
+
function aa(e) {
|
|
263
|
+
e = Lr(e);
|
|
264
|
+
let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
|
|
265
|
+
return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
|
|
266
|
+
}
|
|
267
|
+
function ia(e) {
|
|
268
|
+
return ra ? aa(e) : na(e);
|
|
269
|
+
}
|
|
270
|
+
var sa = (e) => String(e).split(/[/\\]/).pop(), oa = (e) => String(e).startsWith("file:");
|
|
271
|
+
function ua(e) {
|
|
272
|
+
return Array.isArray(e) && e.length > 0;
|
|
273
|
+
}
|
|
274
|
+
var $e = ua;
|
|
275
|
+
function Ht(e, t) {
|
|
276
|
+
if (!t) return;
|
|
277
|
+
let r = sa(t).toLowerCase();
|
|
278
|
+
return e.find(({ filenames: n }) => n == null ? void 0 : n.some((a) => a.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n == null ? void 0 : n.some((a) => r.endsWith(a)));
|
|
279
|
+
}
|
|
280
|
+
function la(e, t) {
|
|
281
|
+
if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r == null ? void 0 : r.includes(t)) ?? e.find(({ extensions: r }) => r == null ? void 0 : r.includes(`.${t}`));
|
|
282
|
+
}
|
|
283
|
+
var et = void 0;
|
|
284
|
+
function Rt(e, t) {
|
|
285
|
+
if (t) {
|
|
286
|
+
if (oa(t)) try {
|
|
287
|
+
t = ia(t);
|
|
288
|
+
} catch {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (typeof t == "string") return e.find(({ isSupported: r }) => r == null ? void 0 : r({ filepath: t }));
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
function ca(e, t) {
|
|
295
|
+
var n;
|
|
296
|
+
let r = ea(0, e.plugins).flatMap((a) => a.languages ?? []);
|
|
297
|
+
return (n = la(r, t.language) ?? Ht(r, t.physicalFile) ?? Ht(r, t.file) ?? Rt(r, t.physicalFile) ?? Rt(r, t.file) ?? (et == null ? void 0 : et(r, t.physicalFile))) == null ? void 0 : n.parsers[0];
|
|
298
|
+
}
|
|
299
|
+
var At = ca, Fr = Symbol.for("PRETTIER_IS_FRONT_MATTER");
|
|
300
|
+
function pa(e) {
|
|
301
|
+
return !!(e != null && e[Fr]);
|
|
302
|
+
}
|
|
303
|
+
var We = pa;
|
|
304
|
+
function ha(e) {
|
|
305
|
+
return x(0, e, /[^\n]/g, " ");
|
|
306
|
+
}
|
|
307
|
+
var Nr = ha, le = 3;
|
|
308
|
+
function da(e) {
|
|
309
|
+
let t = e.slice(0, le);
|
|
310
|
+
if (t !== "---" && t !== "+++") return;
|
|
311
|
+
let r = e.indexOf(`
|
|
312
|
+
`, le);
|
|
313
|
+
if (r === -1) return;
|
|
314
|
+
let n = e.slice(le, r).trim(), a = e.indexOf(`
|
|
315
|
+
${t}`, r), i = n;
|
|
316
|
+
if (i || (i = t === "+++" ? "toml" : "yaml"), a === -1 && t === "---" && i === "yaml" && (a = e.indexOf(`
|
|
317
|
+
...`, r)), a === -1) return;
|
|
318
|
+
let s = a + 1 + le, o = e.charAt(s + 1);
|
|
319
|
+
if (!/\s?/.test(o)) return;
|
|
320
|
+
let l = e.slice(0, s), c;
|
|
321
|
+
return { language: i, explicitLanguage: n || null, value: e.slice(r + 1, a), startDelimiter: t, endDelimiter: l.slice(-le), raw: l, start: { line: 1, column: 0, index: 0 }, end: { index: l.length, get line() {
|
|
322
|
+
return c ?? (c = l.split(`
|
|
323
|
+
`)), c.length;
|
|
324
|
+
}, get column() {
|
|
325
|
+
return c ?? (c = l.split(`
|
|
326
|
+
`)), te(0, c, -1).length;
|
|
327
|
+
} }, [Fr]: !0 };
|
|
328
|
+
}
|
|
329
|
+
function ma(e) {
|
|
330
|
+
let t = da(e);
|
|
331
|
+
return t ? { frontMatter: t, get content() {
|
|
332
|
+
let { raw: r } = t;
|
|
333
|
+
return Nr(r) + e.slice(r.length);
|
|
334
|
+
} } : { content: e };
|
|
335
|
+
}
|
|
336
|
+
var ga = ma, fa = "inline", Ut = { area: "none", base: "none", basefont: "none", datalist: "none", head: "none", link: "none", meta: "none", noembed: "none", noframes: "none", param: "block", rp: "none", script: "block", style: "none", template: "inline", title: "none", html: "block", body: "block", address: "block", blockquote: "block", center: "block", dialog: "block", div: "block", figure: "block", figcaption: "block", footer: "block", form: "block", header: "block", hr: "block", legend: "block", listing: "block", main: "block", p: "block", plaintext: "block", pre: "block", search: "block", xmp: "block", slot: "contents", ruby: "ruby", rt: "ruby-text", article: "block", aside: "block", h1: "block", h2: "block", h3: "block", h4: "block", h5: "block", h6: "block", hgroup: "block", nav: "block", section: "block", dir: "block", dd: "block", dl: "block", dt: "block", menu: "block", ol: "block", ul: "block", li: "list-item", table: "table", caption: "table-caption", colgroup: "table-column-group", col: "table-column", thead: "table-header-group", tbody: "table-row-group", tfoot: "table-footer-group", tr: "table-row", td: "table-cell", th: "table-cell", input: "inline-block", button: "inline-block", fieldset: "block", details: "block", summary: "block", marquee: "inline-block", option: "block", optgroup: "block", select: "inline-block", source: "block", track: "block", meter: "inline-block", progress: "inline-block", object: "inline-block", video: "inline-block", audio: "inline-block" }, va = "normal", Vt = { listing: "pre", plaintext: "pre", pre: "pre", xmp: "pre", nobr: "nowrap", table: "initial", textarea: "pre-wrap" };
|
|
337
|
+
function Ca(e) {
|
|
338
|
+
return e.kind === "element" && !e.hasExplicitNamespace && !["html", "svg"].includes(e.namespace);
|
|
339
|
+
}
|
|
340
|
+
var Ee = Ca, _a = (e) => x(0, e, /^[\t\f\r ]*\n/g, ""), qr = (e) => _a(B.trimEnd(e)), Sa = (e) => {
|
|
341
|
+
let t = e, r = B.getLeadingWhitespace(t);
|
|
342
|
+
r && (t = t.slice(r.length));
|
|
343
|
+
let n = B.getTrailingWhitespace(t);
|
|
344
|
+
return n && (t = t.slice(0, -n.length)), { leadingWhitespace: r, trailingWhitespace: n, text: t };
|
|
345
|
+
};
|
|
346
|
+
function Ir(e, t) {
|
|
347
|
+
return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete || $(e) && e.children.some((r) => r.kind !== "text" && r.kind !== "interpolation") || Et(e, t) && !P(e, t) && e.kind !== "interpolation");
|
|
348
|
+
}
|
|
349
|
+
function je(e) {
|
|
350
|
+
return e.kind === "attribute" || !e.parent || !e.prev ? !1 : ka(e.prev);
|
|
351
|
+
}
|
|
352
|
+
function ka(e) {
|
|
353
|
+
return e.kind === "comment" && e.value.trim() === "prettier-ignore";
|
|
354
|
+
}
|
|
355
|
+
function T(e) {
|
|
356
|
+
return e.kind === "text" || e.kind === "comment";
|
|
357
|
+
}
|
|
358
|
+
function P(e, t) {
|
|
359
|
+
return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" || Ee(e) && (e.name === "script" || e.name === "style"));
|
|
360
|
+
}
|
|
361
|
+
function ba(e, t) {
|
|
362
|
+
return e.children && !P(e, t);
|
|
363
|
+
}
|
|
364
|
+
function wa(e, t) {
|
|
365
|
+
return P(e, t) || e.kind === "interpolation" || Mr(e);
|
|
366
|
+
}
|
|
367
|
+
function Mr(e) {
|
|
368
|
+
return zr(e).startsWith("pre");
|
|
369
|
+
}
|
|
370
|
+
function ya(e, t) {
|
|
371
|
+
var a, i;
|
|
372
|
+
let r = n();
|
|
373
|
+
if (r && !e.prev && ((i = (a = e.parent) == null ? void 0 : a.tagDefinition) != null && i.ignoreFirstLf)) return e.kind === "interpolation";
|
|
374
|
+
return r;
|
|
375
|
+
function n() {
|
|
376
|
+
return We(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.prev && (e.prev.kind === "text" || e.prev.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : $(e.parent) ? !0 : !(!e.prev && (e.parent.kind === "root" || $(e) && e.parent || P(e.parent, t) || Ge(e.parent, t) || !Na(e.parent.cssDisplay)) || e.prev && !Ma(e.prev.cssDisplay));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function Aa(e, t) {
|
|
380
|
+
return We(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.next && (e.next.kind === "text" || e.next.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : $(e.parent) ? !0 : !(!e.next && (e.parent.kind === "root" || $(e) && e.parent || P(e.parent, t) || Ge(e.parent, t) || !qa(e.parent.cssDisplay)) || e.next && !Ia(e.next.cssDisplay));
|
|
381
|
+
}
|
|
382
|
+
function xa(e, t) {
|
|
383
|
+
return Pa(e.cssDisplay) && !P(e, t);
|
|
384
|
+
}
|
|
385
|
+
function Ie(e) {
|
|
386
|
+
return We(e) || e.next && e.sourceSpan.end && e.sourceSpan.end.line + 1 < e.next.sourceSpan.start.line;
|
|
387
|
+
}
|
|
388
|
+
function Ea(e) {
|
|
389
|
+
return Pr(e) || e.kind === "element" && e.children.length > 0 && (["body", "script", "style"].includes(e.name) || e.children.some((t) => Ta(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" && Rr(e.firstChild) && (!e.lastChild.isTrailingSpaceSensitive || Ur(e.lastChild));
|
|
390
|
+
}
|
|
391
|
+
function Pr(e) {
|
|
392
|
+
return e.kind === "element" && e.children.length > 0 && (["html", "head", "ul", "ol", "select"].includes(e.name) || e.cssDisplay.startsWith("table") && e.cssDisplay !== "table-cell");
|
|
393
|
+
}
|
|
394
|
+
function tt(e) {
|
|
395
|
+
return Vr(e) || e.prev && Da(e.prev) || Hr(e);
|
|
396
|
+
}
|
|
397
|
+
function Da(e) {
|
|
398
|
+
return Vr(e) || e.kind === "element" && e.fullName === "br" || Hr(e);
|
|
399
|
+
}
|
|
400
|
+
function Hr(e) {
|
|
401
|
+
return Rr(e) && Ur(e);
|
|
402
|
+
}
|
|
403
|
+
function Rr(e) {
|
|
404
|
+
return e.hasLeadingSpaces && (e.prev ? e.prev.sourceSpan.end.line < e.sourceSpan.start.line : e.parent.kind === "root" || e.parent.startSourceSpan.end.line < e.sourceSpan.start.line);
|
|
405
|
+
}
|
|
406
|
+
function Ur(e) {
|
|
407
|
+
return e.hasTrailingSpaces && (e.next ? e.next.sourceSpan.start.line > e.sourceSpan.end.line : e.parent.kind === "root" || e.parent.endSourceSpan && e.parent.endSourceSpan.start.line > e.sourceSpan.end.line);
|
|
408
|
+
}
|
|
409
|
+
function Vr(e) {
|
|
410
|
+
switch (e.kind) {
|
|
411
|
+
case "ieConditionalComment":
|
|
412
|
+
case "comment":
|
|
413
|
+
case "directive":
|
|
414
|
+
return !0;
|
|
415
|
+
case "element":
|
|
416
|
+
return ["script", "select"].includes(e.name);
|
|
417
|
+
}
|
|
418
|
+
return !1;
|
|
419
|
+
}
|
|
420
|
+
function xt(e) {
|
|
421
|
+
return e.lastChild ? xt(e.lastChild) : e;
|
|
422
|
+
}
|
|
423
|
+
function Ta(e) {
|
|
424
|
+
var t;
|
|
425
|
+
return (t = e.children) == null ? void 0 : t.some((r) => r.kind !== "text");
|
|
426
|
+
}
|
|
427
|
+
function Or(e) {
|
|
428
|
+
if (e) switch (e) {
|
|
429
|
+
case "module":
|
|
430
|
+
case "text/javascript":
|
|
431
|
+
case "text/babel":
|
|
432
|
+
case "text/jsx":
|
|
433
|
+
case "application/javascript":
|
|
434
|
+
return "babel";
|
|
435
|
+
case "application/x-typescript":
|
|
436
|
+
return "typescript";
|
|
437
|
+
case "text/markdown":
|
|
438
|
+
return "markdown";
|
|
439
|
+
case "text/html":
|
|
440
|
+
return "html";
|
|
441
|
+
case "text/x-handlebars-template":
|
|
442
|
+
return "glimmer";
|
|
443
|
+
default:
|
|
444
|
+
if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules") return "json";
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function Ba(e, t) {
|
|
448
|
+
let { name: r, attrMap: n } = e;
|
|
449
|
+
if (r !== "script" || xe(n, "src")) return;
|
|
450
|
+
let { type: a, lang: i } = e.attrMap;
|
|
451
|
+
return !i && !a ? "babel" : At(t, { language: i }) ?? Or(a);
|
|
452
|
+
}
|
|
453
|
+
function La(e, t) {
|
|
454
|
+
if (!Et(e, t)) return;
|
|
455
|
+
let { attrMap: r } = e;
|
|
456
|
+
if (xe(r, "src")) return;
|
|
457
|
+
let { type: n, lang: a } = r;
|
|
458
|
+
return At(t, { language: a }) ?? Or(n);
|
|
459
|
+
}
|
|
460
|
+
function Fa(e, t) {
|
|
461
|
+
if (e.name === "style") {
|
|
462
|
+
let { lang: r } = e.attrMap;
|
|
463
|
+
return r ? At(t, { language: r }) : "css";
|
|
464
|
+
}
|
|
465
|
+
if (e.name === "mj-style" && t.parser === "mjml") return "css";
|
|
466
|
+
}
|
|
467
|
+
function Ot(e, t) {
|
|
468
|
+
return Ba(e, t) ?? Fa(e, t) ?? La(e, t);
|
|
469
|
+
}
|
|
470
|
+
function De(e) {
|
|
471
|
+
return e === "block" || e === "list-item" || e.startsWith("table");
|
|
472
|
+
}
|
|
473
|
+
function Na(e) {
|
|
474
|
+
return !De(e) && e !== "inline-block";
|
|
475
|
+
}
|
|
476
|
+
function qa(e) {
|
|
477
|
+
return !De(e) && e !== "inline-block";
|
|
478
|
+
}
|
|
479
|
+
function Ia(e) {
|
|
480
|
+
return !De(e);
|
|
481
|
+
}
|
|
482
|
+
function Ma(e) {
|
|
483
|
+
return !De(e);
|
|
484
|
+
}
|
|
485
|
+
function Pa(e) {
|
|
486
|
+
return !De(e) && e !== "inline-block";
|
|
487
|
+
}
|
|
488
|
+
function $(e) {
|
|
489
|
+
return zr(e).startsWith("pre");
|
|
490
|
+
}
|
|
491
|
+
function Ha(e, t) {
|
|
492
|
+
let r = e;
|
|
493
|
+
for (; r; ) {
|
|
494
|
+
if (t(r)) return !0;
|
|
495
|
+
r = r.parent;
|
|
496
|
+
}
|
|
497
|
+
return !1;
|
|
498
|
+
}
|
|
499
|
+
function Ra(e, t) {
|
|
500
|
+
var n;
|
|
501
|
+
if (ie(e, t)) return "block";
|
|
502
|
+
if (((n = e.prev) == null ? void 0 : n.kind) === "comment") {
|
|
503
|
+
let a = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);
|
|
504
|
+
if (a) return a[1];
|
|
505
|
+
}
|
|
506
|
+
let r = !1;
|
|
507
|
+
if (e.kind === "element" && e.namespace === "svg") if (Ha(e, (a) => a.fullName === "svg:foreignObject")) r = !0;
|
|
508
|
+
else return e.name === "svg" ? "inline-block" : "block";
|
|
509
|
+
switch (t.htmlWhitespaceSensitivity) {
|
|
510
|
+
case "strict":
|
|
511
|
+
return "inline";
|
|
512
|
+
case "ignore":
|
|
513
|
+
return "block";
|
|
514
|
+
default:
|
|
515
|
+
if (e.kind === "element" && (!e.namespace || r || Ee(e)) && xe(Ut, e.name)) return Ut[e.name];
|
|
516
|
+
}
|
|
517
|
+
return fa;
|
|
518
|
+
}
|
|
519
|
+
function zr(e) {
|
|
520
|
+
return e.kind === "element" && (!e.namespace || Ee(e)) && xe(Vt, e.name) ? Vt[e.name] : va;
|
|
521
|
+
}
|
|
522
|
+
function $r(e) {
|
|
523
|
+
return x(0, x(0, e, "'", "'"), """, '"');
|
|
524
|
+
}
|
|
525
|
+
function E(e) {
|
|
526
|
+
return $r(e.value);
|
|
527
|
+
}
|
|
528
|
+
var Ua = /* @__PURE__ */ new Set(["template", "style", "script"]);
|
|
529
|
+
function Ge(e, t) {
|
|
530
|
+
return ie(e, t) && !Ua.has(e.fullName);
|
|
531
|
+
}
|
|
532
|
+
function ie(e, t) {
|
|
533
|
+
return t.parser === "vue" && e.kind === "element" && e.parent.kind === "root" && e.fullName.toLowerCase() !== "html";
|
|
534
|
+
}
|
|
535
|
+
function Et(e, t) {
|
|
536
|
+
return ie(e, t) && (Ge(e, t) || e.attrMap.lang && e.attrMap.lang !== "html");
|
|
537
|
+
}
|
|
538
|
+
function Va(e) {
|
|
539
|
+
let t = e.fullName;
|
|
540
|
+
return t.charAt(0) === "#" || t === "slot-scope" || t === "v-slot" || t.startsWith("v-slot:");
|
|
541
|
+
}
|
|
542
|
+
function Oa(e, t) {
|
|
543
|
+
let r = e.parent;
|
|
544
|
+
if (!ie(r, t)) return !1;
|
|
545
|
+
let n = r.fullName, a = e.fullName;
|
|
546
|
+
return n === "script" && a === "setup" || n === "style" && a === "vars";
|
|
547
|
+
}
|
|
548
|
+
function Wr(e, t = e.value) {
|
|
549
|
+
return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? F(t) : F(B.dedentString(qr(t)), k) : ne(b, B.split(t));
|
|
550
|
+
}
|
|
551
|
+
function jr(e, t) {
|
|
552
|
+
return ie(e, t) && e.name === "script";
|
|
553
|
+
}
|
|
554
|
+
function za(e) {
|
|
555
|
+
let { valueSpan: t, value: r } = e;
|
|
556
|
+
return t.end.offset - t.start.offset === r.length + 2;
|
|
557
|
+
}
|
|
558
|
+
function Gr(e, t) {
|
|
559
|
+
if (za(e)) return !1;
|
|
560
|
+
let { value: r } = e;
|
|
561
|
+
return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r) || t.parser === "lwc" && r.startsWith("{") && r.endsWith("}");
|
|
562
|
+
}
|
|
563
|
+
var Kr = /\{\{(.+?)\}\}/s, $a = ({ node: { value: e } }) => Kr.test(e);
|
|
564
|
+
async function Wa(e, t, r) {
|
|
565
|
+
let n = E(r.node), a = [];
|
|
566
|
+
for (let [i, s] of n.split(Kr).entries()) if (i % 2 === 0) a.push(F(s));
|
|
567
|
+
else try {
|
|
568
|
+
a.push(y(["{{", N([b, await L(s, e, { parser: "__ng_interpolation", __isInHtmlInterpolation: !0 })]), b, "}}"]));
|
|
569
|
+
} catch {
|
|
570
|
+
a.push("{{", F(s), "}}");
|
|
571
|
+
}
|
|
572
|
+
return a;
|
|
573
|
+
}
|
|
574
|
+
var rt = (e) => (t, r, n) => L(E(n.node), t, { parser: e }, ae), ja = [{ test(e) {
|
|
575
|
+
let t = e.node.fullName;
|
|
576
|
+
return t.startsWith("(") && t.endsWith(")") || t.startsWith("on-");
|
|
577
|
+
}, print: rt("__ng_action") }, { test(e) {
|
|
578
|
+
let t = e.node.fullName;
|
|
579
|
+
return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)?-/.test(t) || /^ng-(?:if|show|hide|class|style)$/.test(t);
|
|
580
|
+
}, print: rt("__ng_binding") }, { test: (e) => e.node.fullName.startsWith("*"), print: rt("__ng_directive") }, { test: (e) => /^i18n(?:-.+)?$/.test(e.node.fullName), print: Ga }, { test: $a, print: Wa }].map(({ test: e, print: t }) => ({ test: (r, n) => n.parser === "angular" && e(r), print: t }));
|
|
581
|
+
function Ga(e, t, { node: r }) {
|
|
582
|
+
let n = E(r);
|
|
583
|
+
return Ae(Er(Wr(r, n.trim())), !n.includes("@@"));
|
|
584
|
+
}
|
|
585
|
+
var Ka = ja, Ja = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), Ya = (e, t, r) => x(0, E(r.node).trim(), /\s+/g, " "), Qa = ["onabort", "onafterprint", "onauxclick", "onbeforeinput", "onbeforematch", "onbeforeprint", "onbeforetoggle", "onbeforeunload", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncommand", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncopy", "oncuechange", "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onoffline", "ononline", "onpagehide", "onpagereveal", "onpageshow", "onpageswap", "onpaste", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onscrollend", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwheel"], Za = new Set(Qa), Xa = ({ node: e }, t) => Za.has(e.fullName) && !t.parentParser && !e.value.includes("{{"), ei = (e, t, r) => L(E(r.node), e, { parser: "babel", __isHtmlInlineEventHandler: !0 }, () => !1);
|
|
586
|
+
function ti(e) {
|
|
587
|
+
let t = [];
|
|
588
|
+
for (let r of e.split(";")) {
|
|
589
|
+
if (r = B.trim(r), !r) continue;
|
|
590
|
+
let [n, ...a] = B.split(r);
|
|
591
|
+
t.push({ name: n, value: a });
|
|
592
|
+
}
|
|
593
|
+
return t;
|
|
594
|
+
}
|
|
595
|
+
var ri = ti, ni = ({ node: e }, t) => e.fullName === "allow" && !t.parentParser && e.parent.fullName === "iframe" && !e.value.includes("{{");
|
|
596
|
+
function ai(e, t, r) {
|
|
597
|
+
let { node: n } = r, a = ri(E(n));
|
|
598
|
+
return a.length === 0 ? [""] : Ae(a.map(({ name: i, value: s }, o) => [[i, ...s].join(" "), o === a.length - 1 ? ke(";") : [";", b]]));
|
|
599
|
+
}
|
|
600
|
+
function zt(e) {
|
|
601
|
+
return e === " " || e === `
|
|
602
|
+
` || e === "\f" || e === "\r" || e === " ";
|
|
603
|
+
}
|
|
604
|
+
var ii = /^[ \t\n\r\u000c]+/, si = /^[, \t\n\r\u000c]+/, oi = /^[^ \t\n\r\u000c]+/, ui = /[,]+$/, $t = /^\d+$/, li = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
|
|
605
|
+
function ci(e) {
|
|
606
|
+
let t = e.length, r, n, a, i, s, o = 0, l;
|
|
607
|
+
function c(h) {
|
|
608
|
+
let C, f = h.exec(e.substring(o));
|
|
609
|
+
if (f) return [C] = f, o += C.length, C;
|
|
610
|
+
}
|
|
611
|
+
let p = [];
|
|
612
|
+
for (; ; ) {
|
|
613
|
+
if (c(si), o >= t) {
|
|
614
|
+
if (p.length === 0) throw new Error("Must contain one or more image candidate strings.");
|
|
615
|
+
return p;
|
|
616
|
+
}
|
|
617
|
+
l = o, r = c(oi), n = [], r.slice(-1) === "," ? (r = r.replace(ui, ""), g()) : v();
|
|
618
|
+
}
|
|
619
|
+
function v() {
|
|
620
|
+
for (c(ii), a = "", i = "in descriptor"; ; ) {
|
|
621
|
+
if (s = e.charAt(o), i === "in descriptor") if (zt(s)) a && (n.push(a), a = "", i = "after descriptor");
|
|
622
|
+
else if (s === ",") {
|
|
623
|
+
o += 1, a && n.push(a), g();
|
|
624
|
+
return;
|
|
625
|
+
} else if (s === "(") a += s, i = "in parens";
|
|
626
|
+
else if (s === "") {
|
|
627
|
+
a && n.push(a), g();
|
|
628
|
+
return;
|
|
629
|
+
} else a += s;
|
|
630
|
+
else if (i === "in parens") if (s === ")") a += s, i = "in descriptor";
|
|
631
|
+
else if (s === "") {
|
|
632
|
+
n.push(a), g();
|
|
633
|
+
return;
|
|
634
|
+
} else a += s;
|
|
635
|
+
else if (i === "after descriptor" && !zt(s)) if (s === "") {
|
|
636
|
+
g();
|
|
637
|
+
return;
|
|
638
|
+
} else i = "in descriptor", o -= 1;
|
|
639
|
+
o += 1;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
function g() {
|
|
643
|
+
let h = !1, C, f, S, q, U = {}, H, Ne, J, ue, Qe;
|
|
644
|
+
for (q = 0; q < n.length; q++) H = n[q], Ne = H[H.length - 1], J = H.substring(0, H.length - 1), ue = parseInt(J, 10), Qe = parseFloat(J), $t.test(J) && Ne === "w" ? ((C || f) && (h = !0), ue === 0 ? h = !0 : C = ue) : li.test(J) && Ne === "x" ? ((C || f || S) && (h = !0), Qe < 0 ? h = !0 : f = Qe) : $t.test(J) && Ne === "h" ? ((S || f) && (h = !0), ue === 0 ? h = !0 : S = ue) : h = !0;
|
|
645
|
+
if (!h) U.source = { value: r, startOffset: l }, C && (U.width = { value: C }), f && (U.density = { value: f }), S && (U.height = { value: S }), p.push(U);
|
|
646
|
+
else throw new Error(`Invalid srcset descriptor found in "${e}" at "${H}".`);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
var pi = ci, hi = (e) => e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"), Jr = { width: "w", height: "h", density: "x" }, di = Object.keys(Jr);
|
|
650
|
+
function mi(e, t, r) {
|
|
651
|
+
let n = E(r.node), a = pi(n), i = di.filter((h) => a.some((C) => xe(C, h)));
|
|
652
|
+
if (i.length > 1) throw new Error("Mixed descriptor in srcset is not supported");
|
|
653
|
+
let [s] = i, o = Jr[s], l = a.map((h) => h.source.value), c = Math.max(...l.map((h) => h.length)), p = a.map((h) => h[s] ? String(h[s].value) : ""), v = p.map((h) => {
|
|
654
|
+
let C = h.indexOf(".");
|
|
655
|
+
return C === -1 ? h.length : C;
|
|
656
|
+
}), g = Math.max(...v);
|
|
657
|
+
return Ae(ne([",", b], l.map((h, C) => {
|
|
658
|
+
let f = [h], S = p[C];
|
|
659
|
+
if (S) {
|
|
660
|
+
let q = c - h.length + 1, U = g - v[C], H = " ".repeat(q + U);
|
|
661
|
+
f.push(ke(H, " "), S + o);
|
|
662
|
+
}
|
|
663
|
+
return f;
|
|
664
|
+
})));
|
|
665
|
+
}
|
|
666
|
+
var gi = ({ node: e }, t) => e.fullName === "style" && !t.parentParser && !e.value.includes("{{"), fi = async (e, t, r) => Ae(await e(E(r.node), { parser: "css", __isHTMLStyleAttribute: !0 })), vi = /* @__PURE__ */ new WeakMap();
|
|
667
|
+
function Ci(e, t) {
|
|
668
|
+
return yr(vi, e.root, (r) => r.children.some((n) => jr(n, t) && ["ts", "typescript"].includes(n.attrMap.lang)));
|
|
669
|
+
}
|
|
670
|
+
var se = Ci;
|
|
671
|
+
function _i(e, t, r) {
|
|
672
|
+
let n = E(r.node);
|
|
673
|
+
return L(`type T<${n}> = any`, e, { parser: "babel-ts", __isEmbeddedTypescriptGenericParameters: !0 }, ae);
|
|
674
|
+
}
|
|
675
|
+
function Si(e, t, r, n) {
|
|
676
|
+
let a = E(r.node), i = se(r, n) ? "babel-ts" : "babel";
|
|
677
|
+
return L(`function _(${a}) {}`, e, { parser: i, __isVueBindings: !0 });
|
|
678
|
+
}
|
|
679
|
+
async function ki(e, t, r, n) {
|
|
680
|
+
let a = E(r.node), { left: i, operator: s, right: o } = bi(a), l = se(r, n);
|
|
681
|
+
return [y(await L(`function _(${i}) {}`, e, { parser: l ? "babel-ts" : "babel", __isVueForBindingLeft: !0 })), " ", s, " ", await L(o, e, { parser: l ? "__ts_expression" : "__js_expression" })];
|
|
682
|
+
}
|
|
683
|
+
function bi(e) {
|
|
684
|
+
let t = /(.*?)\s+(in|of)\s+(.*)/s, r = e.match(t);
|
|
685
|
+
if (!r) return;
|
|
686
|
+
let n = { for: r[3].trim() };
|
|
687
|
+
if (!n.for) return;
|
|
688
|
+
let a = /,([^,\]}]*)(?:,([^,\]}]*))?$/, i = /^\(|\)$/g, s = x(0, r[1].trim(), i, ""), o = s.match(a);
|
|
689
|
+
o ? (n.alias = s.replace(a, ""), n.iterator1 = o[1].trim(), o[2] && (n.iterator2 = o[2].trim())) : n.alias = s;
|
|
690
|
+
let l = [n.alias, n.iterator1, n.iterator2];
|
|
691
|
+
if (!l.some((c, p) => !c && (p === 0 || l.slice(p + 1).some(Boolean)))) return { left: l.filter(Boolean).join(","), operator: r[2], right: n.for };
|
|
692
|
+
}
|
|
693
|
+
var wi = [{ test: (e) => e.node.fullName === "v-for", print: ki }, { test: (e, t) => e.node.fullName === "generic" && jr(e.parent, t), print: _i }, { test: ({ node: e }, t) => Va(e) || Oa(e, t), print: Si }, { test(e) {
|
|
694
|
+
let t = e.node.fullName;
|
|
695
|
+
return t.startsWith("@") || t.startsWith("v-on:");
|
|
696
|
+
}, print: yi }, { test(e) {
|
|
697
|
+
let t = e.node.fullName;
|
|
698
|
+
return t.startsWith(":") || t.startsWith(".") || t.startsWith("v-bind:");
|
|
699
|
+
}, print: Ai }, { test: (e) => e.node.fullName.startsWith("v-"), print: Yr }].map(({ test: e, print: t }) => ({ test: (r, n) => n.parser === "vue" && e(r, n), print: t }));
|
|
700
|
+
async function yi(e, t, r, n) {
|
|
701
|
+
var s;
|
|
702
|
+
try {
|
|
703
|
+
return await Yr(e, t, r, n);
|
|
704
|
+
} catch (o) {
|
|
705
|
+
if (((s = o.cause) == null ? void 0 : s.code) !== "BABEL_PARSER_SYNTAX_ERROR") throw o;
|
|
706
|
+
}
|
|
707
|
+
let a = E(r.node), i = se(r, n) ? "__vue_ts_event_binding" : "__vue_event_binding";
|
|
708
|
+
return L(a, e, { parser: i }, ae);
|
|
709
|
+
}
|
|
710
|
+
function Ai(e, t, r, n) {
|
|
711
|
+
let a = E(r.node), i = se(r, n) ? "__vue_ts_expression" : "__vue_expression";
|
|
712
|
+
return L(a, e, { parser: i }, ae);
|
|
713
|
+
}
|
|
714
|
+
function Yr(e, t, r, n) {
|
|
715
|
+
let a = E(r.node), i = se(r, n) ? "__ts_expression" : "__js_expression";
|
|
716
|
+
return L(a, e, { parser: i }, ae);
|
|
717
|
+
}
|
|
718
|
+
var xi = wi, Ei = [{ test: hi, print: mi }, { test: gi, print: fi }, { test: Xa, print: ei }, { test: Ja, print: Ya }, { test: ni, print: ai }, ...xi, ...Ka].map(({ test: e, print: t }) => ({ test: e, print: Ti(t) }));
|
|
719
|
+
function Di(e, t) {
|
|
720
|
+
var a;
|
|
721
|
+
let { node: r } = e, { value: n } = r;
|
|
722
|
+
if (n) return Gr(r, t) ? [r.rawName, "=", n] : (a = Ei.find(({ test: i }) => i(e, t))) == null ? void 0 : a.print;
|
|
723
|
+
}
|
|
724
|
+
function Ti(e) {
|
|
725
|
+
return async (t, r, n, a) => {
|
|
726
|
+
let i = await e(t, r, n, a);
|
|
727
|
+
if (i) return i = xr(i, (s) => typeof s == "string" ? x(0, s, '"', """) : s), [n.node.rawName, '="', y(i), '"'];
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
var Bi = Di, X = (e) => e.sourceSpan.start.offset, Ke = (e) => e.sourceSpan.end.offset;
|
|
731
|
+
function st(e, t) {
|
|
732
|
+
return [e.isSelfClosing ? "" : Li(e, t), fe(e, t)];
|
|
733
|
+
}
|
|
734
|
+
function Li(e, t) {
|
|
735
|
+
return e.lastChild && ee(e.lastChild) ? "" : [Fi(e, t), Dt(e, t)];
|
|
736
|
+
}
|
|
737
|
+
function fe(e, t) {
|
|
738
|
+
return (e.next ? j(e.next) : Be(e.parent)) ? "" : [Te(e, t), W(e, t)];
|
|
739
|
+
}
|
|
740
|
+
function Fi(e, t) {
|
|
741
|
+
return Be(e) ? Te(e.lastChild, t) : "";
|
|
742
|
+
}
|
|
743
|
+
function W(e, t) {
|
|
744
|
+
return ee(e) ? Dt(e.parent, t) : Je(e) ? Tt(e.next, t) : "";
|
|
745
|
+
}
|
|
746
|
+
function Dt(e, t) {
|
|
747
|
+
if (Qr(e, t)) return "";
|
|
748
|
+
switch (e.kind) {
|
|
749
|
+
case "ieConditionalComment":
|
|
750
|
+
return "<!";
|
|
751
|
+
case "element":
|
|
752
|
+
if (e.hasHtmComponentClosingTag) return "<//";
|
|
753
|
+
default:
|
|
754
|
+
return `</${e.rawName}`;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
function Te(e, t) {
|
|
758
|
+
if (Qr(e, t)) return "";
|
|
759
|
+
switch (e.kind) {
|
|
760
|
+
case "ieConditionalComment":
|
|
761
|
+
case "ieConditionalEndComment":
|
|
762
|
+
return "[endif]-->";
|
|
763
|
+
case "ieConditionalStartComment":
|
|
764
|
+
return "]><!-->";
|
|
765
|
+
case "interpolation":
|
|
766
|
+
return "}}";
|
|
767
|
+
case "angularIcuExpression":
|
|
768
|
+
return "}";
|
|
769
|
+
case "element":
|
|
770
|
+
if (e.isSelfClosing) return "/>";
|
|
771
|
+
default:
|
|
772
|
+
return ">";
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function Qr(e, t) {
|
|
776
|
+
return !e.isSelfClosing && !e.endSourceSpan && (je(e) || Ir(e.parent, t));
|
|
777
|
+
}
|
|
778
|
+
function j(e) {
|
|
779
|
+
return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !T(e.prev) && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
780
|
+
}
|
|
781
|
+
function Be(e) {
|
|
782
|
+
var t;
|
|
783
|
+
return ((t = e.lastChild) == null ? void 0 : t.isTrailingSpaceSensitive) && !e.lastChild.hasTrailingSpaces && !T(xt(e.lastChild)) && !$(e);
|
|
784
|
+
}
|
|
785
|
+
function ee(e) {
|
|
786
|
+
return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && T(xt(e));
|
|
787
|
+
}
|
|
788
|
+
function Je(e) {
|
|
789
|
+
return e.next && !T(e.next) && T(e) && e.isTrailingSpaceSensitive && !e.hasTrailingSpaces;
|
|
790
|
+
}
|
|
791
|
+
function Ni(e) {
|
|
792
|
+
let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);
|
|
793
|
+
return t ? t[1] ? t[1].split(/\s+/) : !0 : !1;
|
|
794
|
+
}
|
|
795
|
+
function Ye(e) {
|
|
796
|
+
return !e.prev && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
797
|
+
}
|
|
798
|
+
function qi(e, t, r) {
|
|
799
|
+
var C;
|
|
800
|
+
let { node: n } = e, { attrs: a = [], startTagComments: i = [] } = n;
|
|
801
|
+
if (a.length === 0 && i.length === 0) return n.isSelfClosing ? " " : "";
|
|
802
|
+
let s = ((C = n.prev) == null ? void 0 : C.kind) === "comment" && Ni(n.prev.value), o = typeof s == "boolean" ? () => s : Array.isArray(s) ? (f) => s.includes(f.rawName) : () => !1, l = ["attrs", "startTagComments"].filter((f) => $e(n[f])), c = l.flatMap((f) => e.map(({ node: S }) => ({ loc: X(S), printed: S.kind === "attribute" && o(S) ? F(t.originalText.slice(X(S), Ke(S))) : r() }), f));
|
|
803
|
+
l.length > 1 && c.sort((f, S) => f.loc - S.loc);
|
|
804
|
+
let p = n.kind === "element" && n.fullName === "script" && a.length === 1 && a[0].fullName === "src" && n.children.length === 0 && i.length === 0, v = i.some((f) => f.type === "single"), g = v || t.singleAttributePerLine && a.length > 1 && !ie(n, t) ? k : b, h = [N([p ? " " : v ? k : b, ne(g, c.map(({ printed: f }) => f))])];
|
|
805
|
+
return n.firstChild && Ye(n.firstChild) || n.isSelfClosing && Be(n.parent) || p ? h.push(n.isSelfClosing ? " " : "") : h.push(t.bracketSameLine ? n.isSelfClosing ? " " : "" : n.isSelfClosing ? b : A), h;
|
|
806
|
+
}
|
|
807
|
+
function Ii(e) {
|
|
808
|
+
return e.firstChild && Ye(e.firstChild) ? "" : Bt(e);
|
|
809
|
+
}
|
|
810
|
+
function ot(e, t, r) {
|
|
811
|
+
let { node: n } = e;
|
|
812
|
+
return [ve(n, t), qi(e, t, r), n.isSelfClosing ? "" : Ii(n)];
|
|
813
|
+
}
|
|
814
|
+
function ve(e, t) {
|
|
815
|
+
return e.prev && Je(e.prev) ? "" : [G(e, t), Tt(e, t)];
|
|
816
|
+
}
|
|
817
|
+
function G(e, t) {
|
|
818
|
+
return Ye(e) ? Bt(e.parent) : j(e) ? Te(e.prev, t) : "";
|
|
819
|
+
}
|
|
820
|
+
var Wt = "<!doctype";
|
|
821
|
+
function Tt(e, t) {
|
|
822
|
+
switch (e.kind) {
|
|
823
|
+
case "ieConditionalComment":
|
|
824
|
+
case "ieConditionalStartComment":
|
|
825
|
+
return `<!--[if ${e.condition}`;
|
|
826
|
+
case "ieConditionalEndComment":
|
|
827
|
+
return "<!--<!";
|
|
828
|
+
case "interpolation":
|
|
829
|
+
return "{{";
|
|
830
|
+
case "docType": {
|
|
831
|
+
if (e.value === "html") {
|
|
832
|
+
let { filepath: n } = t;
|
|
833
|
+
if (n && /\.html?$/.test(n)) return Wt;
|
|
834
|
+
}
|
|
835
|
+
let r = X(e);
|
|
836
|
+
return t.originalText.slice(r, r + Wt.length);
|
|
837
|
+
}
|
|
838
|
+
case "angularIcuExpression":
|
|
839
|
+
return "{";
|
|
840
|
+
case "element":
|
|
841
|
+
if (e.condition) return `<!--[if ${e.condition}]><!--><${e.rawName}`;
|
|
842
|
+
default:
|
|
843
|
+
return `<${e.rawName}`;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
function Bt(e) {
|
|
847
|
+
switch (e.kind) {
|
|
848
|
+
case "ieConditionalComment":
|
|
849
|
+
return "]>";
|
|
850
|
+
case "element":
|
|
851
|
+
if (e.condition) return "><!--<![endif]-->";
|
|
852
|
+
default:
|
|
853
|
+
return ">";
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
function Mi(e, t) {
|
|
857
|
+
if (!e.endSourceSpan) return "";
|
|
858
|
+
let r = e.startSourceSpan.end.offset;
|
|
859
|
+
e.firstChild && Ye(e.firstChild) && (r -= Bt(e).length);
|
|
860
|
+
let n = e.endSourceSpan.start.offset;
|
|
861
|
+
return e.lastChild && ee(e.lastChild) ? n += Dt(e, t).length : Be(e) && (n -= Te(e.lastChild, t).length), t.originalText.slice(r, n);
|
|
862
|
+
}
|
|
863
|
+
var Zr = Mi, Pi = /* @__PURE__ */ new Set(["if", "else if", "for", "switch", "case"]);
|
|
864
|
+
function Hi(e, t) {
|
|
865
|
+
let { node: r } = e;
|
|
866
|
+
switch (r.kind) {
|
|
867
|
+
case "element":
|
|
868
|
+
if (P(r, t) || r.kind === "interpolation") return;
|
|
869
|
+
if (!r.isSelfClosing && Et(r, t)) {
|
|
870
|
+
let n = Ot(r, t);
|
|
871
|
+
return n ? async (a, i) => {
|
|
872
|
+
let s = Zr(r, t), o = /^\s*$/.test(s), l = "";
|
|
873
|
+
return o || (l = await a(qr(s), { parser: n, __embeddedInHtml: !0 }), o = l === ""), [G(r, t), y(ot(e, t, i)), o ? "" : k, l, o ? "" : k, st(r, t), W(r, t)];
|
|
874
|
+
} : void 0;
|
|
875
|
+
}
|
|
876
|
+
break;
|
|
877
|
+
case "text":
|
|
878
|
+
if (P(r.parent, t)) {
|
|
879
|
+
let n = Ot(r.parent, t);
|
|
880
|
+
if (n) return async (a) => {
|
|
881
|
+
let i = n === "markdown" ? B.dedentString(r.value.replace(/^[^\S\n]*\n/, "")) : r.value, s = { parser: n, __embeddedInHtml: !0 };
|
|
882
|
+
if (t.parser === "html" && n === "babel") {
|
|
883
|
+
let o = "script", { attrMap: l } = r.parent;
|
|
884
|
+
l && (l.type === "module" || (l.type === "text/babel" || l.type === "text/jsx") && l["data-type"] === "module") && (o = "module"), s.__babelSourceType = o;
|
|
885
|
+
}
|
|
886
|
+
return [ye, G(r, t), await a(i, s), W(r, t)];
|
|
887
|
+
};
|
|
888
|
+
} else if (r.parent.kind === "interpolation") return async (n) => {
|
|
889
|
+
let a = { __isInHtmlInterpolation: !0, __embeddedInHtml: !0 };
|
|
890
|
+
return t.parser === "angular" ? a.parser = "__ng_interpolation" : t.parser === "vue" ? a.parser = se(e, t) ? "__vue_ts_expression" : "__vue_expression" : a.parser = "__js_expression", [N([b, await n(r.value, a)]), r.parent.next && j(r.parent.next) ? " " : b];
|
|
891
|
+
};
|
|
892
|
+
break;
|
|
893
|
+
case "attribute":
|
|
894
|
+
return Bi(e, t);
|
|
895
|
+
case "angularControlFlowBlockParameters":
|
|
896
|
+
return Pi.has(e.parent.name) ? Yn : void 0;
|
|
897
|
+
case "angularLetDeclarationInitializer":
|
|
898
|
+
return (n) => L(r.value, n, { parser: "__ng_binding", __isInHtmlAttribute: !1 });
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
var Ri = Hi, ce = null;
|
|
902
|
+
function Ce(e) {
|
|
903
|
+
if (ce !== null && typeof ce.property) {
|
|
904
|
+
let t = ce;
|
|
905
|
+
return ce = Ce.prototype = null, t;
|
|
906
|
+
}
|
|
907
|
+
return ce = Ce.prototype = e ?? /* @__PURE__ */ Object.create(null), new Ce();
|
|
908
|
+
}
|
|
909
|
+
var Ui = 10;
|
|
910
|
+
for (let e = 0; e <= Ui; e++) Ce();
|
|
911
|
+
function Vi(e) {
|
|
912
|
+
return Ce(e);
|
|
913
|
+
}
|
|
914
|
+
function Oi(e, t = "type") {
|
|
915
|
+
Vi(e);
|
|
916
|
+
function r(n) {
|
|
917
|
+
let a = n[t], i = e[a];
|
|
918
|
+
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
|
|
919
|
+
return i;
|
|
920
|
+
}
|
|
921
|
+
return r;
|
|
922
|
+
}
|
|
923
|
+
var zi = Oi, pe = [["children"]], $i = { root: pe[0], element: ["attrs", "startTagComments", "children"], ieConditionalComment: pe[0], ieConditionalStartComment: [], ieConditionalEndComment: [], interpolation: pe[0], text: pe[0], docType: [], comment: [], attribute: [], startTagComment: [], cdata: [], angularControlFlowBlock: ["children", "parameters"], angularControlFlowBlockParameters: pe[0], angularControlFlowBlockParameter: [], angularLetDeclaration: ["init"], angularLetDeclarationInitializer: [], angularIcuExpression: ["cases"], angularIcuCase: ["expression"] }, Wi = zi($i, "kind"), ji = Wi, Gi = /* @__PURE__ */ new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan", "keySpan", "tagDefinition", "tokens", "valueTokens", "switchValueSourceSpan", "expSourceSpan", "valueSourceSpan"]), Ki = /* @__PURE__ */ new Set(["if", "else if", "for", "switch", "case"]);
|
|
924
|
+
function Xr(e, t, r) {
|
|
925
|
+
var n;
|
|
926
|
+
if (e.kind === "text" || e.kind === "comment") return null;
|
|
927
|
+
if (e.kind === "yaml" && delete t.value, e.kind === "attribute") {
|
|
928
|
+
let { fullName: a, value: i } = e;
|
|
929
|
+
a === "style" || a === "class" || a === "srcset" && (r.fullName === "img" || r.fullName === "source") || a === "allow" && r.fullName === "iframe" || a.startsWith("on") || a.startsWith("@") || a.startsWith(":") || a.startsWith(".") || a.startsWith("#") || a.startsWith("v-") || a === "vars" && r.fullName === "style" || (a === "setup" || a === "generic") && r.fullName === "script" || a === "slot-scope" || a.startsWith("(") || a.startsWith("[") || a.startsWith("*") || a.startsWith("bind") || a.startsWith("i18n") || a.startsWith("on-") || a.startsWith("ng-") || i != null && i.includes("{{") ? delete t.value : i && (t.value = x(0, i, /'|"|'/g, '"'));
|
|
930
|
+
}
|
|
931
|
+
if (e.kind === "docType" && (t.value = x(0, e.value.toLowerCase(), /\s+/g, " ")), e.kind === "angularControlFlowBlock" && ((n = e.parameters) == null ? void 0 : n.children)) for (let a of t.parameters.children) Ki.has(e.name) ? delete a.expression : a.expression = a.expression.trim();
|
|
932
|
+
e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = !0);
|
|
933
|
+
}
|
|
934
|
+
Xr.ignoredProperties = Gi;
|
|
935
|
+
var Ji = "format", Yi = /^\s*<!--\s*@(?:noformat|noprettier)\s*-->/, Qi = /^\s*<!--\s*@(?:format|prettier)\s*-->/, Zi = (e) => Qi.test(e), Xi = (e) => Yi.test(e), es = (e) => `<!-- @${Ji} -->
|
|
936
|
+
|
|
937
|
+
${e}`, ts = /* @__PURE__ */ new Map([["if", /* @__PURE__ */ new Set(["else if", "else"])], ["else if", /* @__PURE__ */ new Set(["else if", "else"])], ["for", /* @__PURE__ */ new Set(["empty"])], ["defer", /* @__PURE__ */ new Set(["placeholder", "error", "loading"])], ["placeholder", /* @__PURE__ */ new Set(["placeholder", "error", "loading"])], ["error", /* @__PURE__ */ new Set(["placeholder", "error", "loading"])], ["loading", /* @__PURE__ */ new Set(["placeholder", "error", "loading"])]]);
|
|
938
|
+
function en(e) {
|
|
939
|
+
let t = Ke(e);
|
|
940
|
+
return e.kind === "element" && !e.endSourceSpan && $e(e.children) ? Math.max(t, en(te(0, e.children, -1))) : t;
|
|
941
|
+
}
|
|
942
|
+
function he(e, t, r) {
|
|
943
|
+
let n = e.node;
|
|
944
|
+
if (je(n)) {
|
|
945
|
+
let a = en(n);
|
|
946
|
+
return [G(n, t), F(B.trimEnd(t.originalText.slice(X(n) + (n.prev && Je(n.prev) ? Tt(n).length : 0), a - (n.next && j(n.next) ? Te(n, t).length : 0)))), W(n, t)];
|
|
947
|
+
}
|
|
948
|
+
return r();
|
|
949
|
+
}
|
|
950
|
+
function Me(e, t) {
|
|
951
|
+
return T(e) && T(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ? tt(t) ? k : b : "" : tt(t) ? k : A : Je(e) && (je(t) || t.firstChild || t.isSelfClosing || t.kind === "element" && t.attrs.length > 0) || e.kind === "element" && e.isSelfClosing && j(t) ? "" : t.kind === "comment" && t.isLeadingSpaceSensitive && !t.hasLeadingSpaces ? A : !t.isLeadingSpaceSensitive || tt(t) || j(t) && e.lastChild && ee(e.lastChild) && e.lastChild.lastChild && ee(e.lastChild.lastChild) ? k : t.hasLeadingSpaces ? b : A;
|
|
952
|
+
}
|
|
953
|
+
function Lt(e, t, r) {
|
|
954
|
+
let { node: n } = e;
|
|
955
|
+
if (Pr(n)) return [ye, ...e.map(() => {
|
|
956
|
+
let i = e.node, s = i.prev ? Me(i.prev, i) : "";
|
|
957
|
+
return [s ? [s, Ie(i.prev) ? k : ""] : "", he(e, t, r)];
|
|
958
|
+
}, "children")];
|
|
959
|
+
let a = n.children.map(() => Symbol(""));
|
|
960
|
+
return e.map(({ node: i, index: s }) => {
|
|
961
|
+
if (T(i)) {
|
|
962
|
+
if (i.prev && T(i.prev)) {
|
|
963
|
+
let h = Me(i.prev, i);
|
|
964
|
+
if (h) return Ie(i.prev) ? [k, k, he(e, t, r)] : [h, he(e, t, r)];
|
|
965
|
+
}
|
|
966
|
+
return he(e, t, r);
|
|
967
|
+
}
|
|
968
|
+
let o = [], l = [], c = [], p = [], v = i.prev ? Me(i.prev, i) : "", g = i.next ? Me(i, i.next) : "";
|
|
969
|
+
return v && (Ie(i.prev) ? o.push(k, k) : v === k ? o.push(k) : T(i.prev) ? l.push(v) : l.push(ke("", A, { groupId: a[s - 1] }))), g && (Ie(i) ? T(i.next) && p.push(k, k) : g === k ? T(i.next) && p.push(k) : c.push(g)), [...o, y([...l, y([he(e, t, r), ...c], { id: a[s] })]), ...p];
|
|
970
|
+
}, "children");
|
|
971
|
+
}
|
|
972
|
+
function rs(e, t, r) {
|
|
973
|
+
let { node: n } = e, a = [];
|
|
974
|
+
ss(e) && a.push("} "), a.push("@", n.name);
|
|
975
|
+
let i = as(n);
|
|
976
|
+
if (n.parameters && (i || a.push(" "), a.push("(", y(r("parameters")), ")")), i) return a.push(";"), a;
|
|
977
|
+
if (!is(n)) {
|
|
978
|
+
a.push(" {");
|
|
979
|
+
let s = tn(n);
|
|
980
|
+
n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, a.push(N([k, Lt(e, t, r)])), s && a.push(k, "}")) : s && a.push("}");
|
|
981
|
+
}
|
|
982
|
+
return y(a, { shouldBreak: !0 });
|
|
983
|
+
}
|
|
984
|
+
function tn(e) {
|
|
985
|
+
var t, r;
|
|
986
|
+
return !(((t = e.next) == null ? void 0 : t.kind) === "angularControlFlowBlock" && ((r = ts.get(e.name)) != null && r.has(e.next.name)));
|
|
987
|
+
}
|
|
988
|
+
var ns = (e) => (e == null ? void 0 : e.kind) === "angularControlFlowBlock" && (e.name === "case" || e.name === "default"), as = (e) => (e == null ? void 0 : e.kind) === "angularControlFlowBlock" && e.name === "default never";
|
|
989
|
+
function is(e) {
|
|
990
|
+
return ns(e) && e.endSourceSpan && e.endSourceSpan.start.offset === e.endSourceSpan.end.offset;
|
|
991
|
+
}
|
|
992
|
+
function ss(e) {
|
|
993
|
+
let { previous: t } = e;
|
|
994
|
+
return (t == null ? void 0 : t.kind) === "angularControlFlowBlock" && !je(t) && !tn(t);
|
|
995
|
+
}
|
|
996
|
+
function os(e, t, r) {
|
|
997
|
+
return [N([A, ne([";", b], e.map(r, "children"))]), A];
|
|
998
|
+
}
|
|
999
|
+
function us(e, t, r) {
|
|
1000
|
+
let { node: n } = e;
|
|
1001
|
+
return [ve(n, t), y([n.switchValue.trim(), ", ", n.type, n.cases.length > 0 ? [",", N([b, ne(b, e.map(r, "cases"))])] : "", A]), fe(n, t)];
|
|
1002
|
+
}
|
|
1003
|
+
function ls(e, t, r) {
|
|
1004
|
+
let { node: n } = e;
|
|
1005
|
+
return [n.value, " {", y([N([A, e.map(({ node: a, isLast: i }) => {
|
|
1006
|
+
let s = [r()];
|
|
1007
|
+
return a.kind === "text" && (a.hasLeadingSpaces && s.unshift(b), a.hasTrailingSpaces && !i && s.push(b)), s;
|
|
1008
|
+
}, "expression")]), A]), "}"];
|
|
1009
|
+
}
|
|
1010
|
+
function cs(e, t, r) {
|
|
1011
|
+
let { node: n } = e;
|
|
1012
|
+
if (Ir(n, t)) return [G(n, t), y(ot(e, t, r)), F(Zr(n, t)), ...st(n, t), W(n, t)];
|
|
1013
|
+
let a = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, i = Symbol("element-attr-group-id"), s = (p) => y([y(ot(e, t, r), { id: i }), p, st(n, t)]);
|
|
1014
|
+
if (n.children.length === 0) return s(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? b : "");
|
|
1015
|
+
let o = (p) => a ? In(p, { groupId: i }) : (P(n, t) || Ge(n, t)) && n.parent.kind === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? p : N(p), l = () => a ? ke(A, "", { groupId: i }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? b : n.firstChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? qn(A) : A, c = () => (n.next ? j(n.next) : Be(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : $(n) && ee(n.lastChild) ? "" : a ? ke(A, "", { groupId: i }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? b : (n.lastChild.kind === "comment" || n.lastChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`).test(n.lastChild.value) ? "" : A;
|
|
1016
|
+
return s([Ea(n) ? ye : "", o([l(), Lt(e, t, r)]), c()]);
|
|
1017
|
+
}
|
|
1018
|
+
function ps(e) {
|
|
1019
|
+
let { node: { value: t, type: r } } = e;
|
|
1020
|
+
return r === "single" ? `//${t.trimEnd()}` : ["/*", F(t), "*/"];
|
|
1021
|
+
}
|
|
1022
|
+
var hs = (function(e) {
|
|
1023
|
+
return e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA", e;
|
|
1024
|
+
})({});
|
|
1025
|
+
function oe(e, t = !0) {
|
|
1026
|
+
if (e[0] != ":") return [null, e];
|
|
1027
|
+
let r = e.indexOf(":", 1);
|
|
1028
|
+
if (r === -1) {
|
|
1029
|
+
if (t) throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
|
|
1030
|
+
return [null, e];
|
|
1031
|
+
}
|
|
1032
|
+
return [e.slice(1, r), e.slice(r + 1)];
|
|
1033
|
+
}
|
|
1034
|
+
function jt(e) {
|
|
1035
|
+
return oe(e)[1] === "ng-container";
|
|
1036
|
+
}
|
|
1037
|
+
function Gt(e) {
|
|
1038
|
+
return oe(e)[1] === "ng-content";
|
|
1039
|
+
}
|
|
1040
|
+
function Ue(e) {
|
|
1041
|
+
return e === null ? null : oe(e)[0];
|
|
1042
|
+
}
|
|
1043
|
+
function _e(e, t) {
|
|
1044
|
+
return e ? `:${e}:${t}` : t;
|
|
1045
|
+
}
|
|
1046
|
+
var Ve, ds = "math", ut = () => /* @__PURE__ */ Object.create(null);
|
|
1047
|
+
function ms() {
|
|
1048
|
+
return Ve || (Ve = ut(), R(1, void 0, [["iframe", ["srcdoc"]], ["*", ["innerHTML", "outerHTML"]]]), R(2, void 0, [["*", ["style"]]]), R(4, void 0, [["*", ["formAction"]], ["area", ["href"]], ["a", ["href", "xlink:href"]], ["form", ["action"]], ["img", ["src"]], ["video", ["src"]]]), R(4, ds, [["*", ["href", "xlink:href"]]]), R(5, void 0, [["base", ["href"]], ["embed", ["src"]], ["frame", ["src"]], ["iframe", ["src"]], ["link", ["href"]], ["object", ["codebase", "data"]]]), R(4, "svg", [["a", ["href", "xlink:href"]]]), R(6, "svg", [["animate", ["attributeName", "values", "to", "from"]], ["set", ["to", "attributeName"]], ["animateMotion", ["attributeName"]], ["animateTransform", ["attributeName"]]]), R(6, void 0, [["unknown", ["attributeName", "values", "to", "from", "sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]], ["iframe", ["sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]]]), Ve);
|
|
1049
|
+
}
|
|
1050
|
+
function R(e, t, r) {
|
|
1051
|
+
let n = t ?? "";
|
|
1052
|
+
for (let [i, s] of r) {
|
|
1053
|
+
let o = i.toLowerCase();
|
|
1054
|
+
for (let l of s) {
|
|
1055
|
+
var a;
|
|
1056
|
+
let c = l.toLowerCase(), p = (a = Ve)[c] ?? (a[c] = ut()), v = p[n] ?? (p[n] = ut());
|
|
1057
|
+
v[o] = e;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
function gs(e, t, r) {
|
|
1062
|
+
let n = ms()[t.toLowerCase()];
|
|
1063
|
+
if (!n) return 0;
|
|
1064
|
+
let a = e.toLowerCase(), i;
|
|
1065
|
+
if (r) {
|
|
1066
|
+
let s = n[r];
|
|
1067
|
+
s && (i = s[a] ?? s["*"]);
|
|
1068
|
+
}
|
|
1069
|
+
if (i === void 0) {
|
|
1070
|
+
let s = n[""];
|
|
1071
|
+
s && (i = s[a] ?? s["*"]);
|
|
1072
|
+
}
|
|
1073
|
+
return i ?? 0;
|
|
1074
|
+
}
|
|
1075
|
+
var Kt = { name: "custom-elements" }, Jt = { name: "no-errors-schema" }, fs = /-+([a-z0-9])/g;
|
|
1076
|
+
function vs(e) {
|
|
1077
|
+
return e.replace(fs, (...t) => t[1].toUpperCase());
|
|
1078
|
+
}
|
|
1079
|
+
var Cs = class {
|
|
1080
|
+
}, _s = "boolean", Ss = "number", ks = "string", bs = "object";
|
|
1081
|
+
function Pe(e) {
|
|
1082
|
+
let [t, r] = oe(e.toLowerCase(), !1);
|
|
1083
|
+
return t === "svg" || t === "math" ? `:${t}:${r}` : r;
|
|
1084
|
+
}
|
|
1085
|
+
var ws = ["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,!credentialless,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "selectedcontent^[HTMLElement]|", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "search^[HTMLELement]|", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"], rn = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex", "aria-activedescendant": "ariaActiveDescendantElement", "aria-atomic": "ariaAtomic", "aria-autocomplete": "ariaAutoComplete", "aria-busy": "ariaBusy", "aria-checked": "ariaChecked", "aria-colcount": "ariaColCount", "aria-colindex": "ariaColIndex", "aria-colindextext": "ariaColIndexText", "aria-colspan": "ariaColSpan", "aria-controls": "ariaControlsElements", "aria-current": "ariaCurrent", "aria-describedby": "ariaDescribedByElements", "aria-description": "ariaDescription", "aria-details": "ariaDetailsElements", "aria-disabled": "ariaDisabled", "aria-errormessage": "ariaErrorMessageElements", "aria-expanded": "ariaExpanded", "aria-flowto": "ariaFlowToElements", "aria-haspopup": "ariaHasPopup", "aria-hidden": "ariaHidden", "aria-invalid": "ariaInvalid", "aria-keyshortcuts": "ariaKeyShortcuts", "aria-label": "ariaLabel", "aria-labelledby": "ariaLabelledByElements", "aria-level": "ariaLevel", "aria-live": "ariaLive", "aria-modal": "ariaModal", "aria-multiline": "ariaMultiLine", "aria-multiselectable": "ariaMultiSelectable", "aria-orientation": "ariaOrientation", "aria-owns": "ariaOwnsElements", "aria-placeholder": "ariaPlaceholder", "aria-posinset": "ariaPosInSet", "aria-pressed": "ariaPressed", "aria-readonly": "ariaReadOnly", "aria-required": "ariaRequired", "aria-roledescription": "ariaRoleDescription", "aria-rowcount": "ariaRowCount", "aria-rowindex": "ariaRowIndex", "aria-rowindextext": "ariaRowIndexText", "aria-rowspan": "ariaRowSpan", "aria-selected": "ariaSelected", "aria-setsize": "ariaSetSize", "aria-sort": "ariaSort", "aria-valuemax": "ariaValueMax", "aria-valuemin": "ariaValueMin", "aria-valuenow": "ariaValueNow", "aria-valuetext": "ariaValueText" })), ys = Array.from(rn).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), As = class extends Cs {
|
|
1086
|
+
constructor() {
|
|
1087
|
+
super();
|
|
1088
|
+
u(this, "_schema", /* @__PURE__ */ new Map());
|
|
1089
|
+
u(this, "_eventSchema", /* @__PURE__ */ new Map());
|
|
1090
|
+
ws.forEach((t) => {
|
|
1091
|
+
let r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), [a, i] = t.split("|"), s = i.split(","), [o, l] = a.split("^");
|
|
1092
|
+
o.split(",").forEach((p) => {
|
|
1093
|
+
this._schema.set(p.toLowerCase(), r), this._eventSchema.set(p.toLowerCase(), n);
|
|
1094
|
+
});
|
|
1095
|
+
let c = l && this._schema.get(l.toLowerCase());
|
|
1096
|
+
if (c) {
|
|
1097
|
+
for (let [p, v] of c) r.set(p, v);
|
|
1098
|
+
for (let p of this._eventSchema.get(l.toLowerCase())) n.add(p);
|
|
1099
|
+
}
|
|
1100
|
+
s.forEach((p) => {
|
|
1101
|
+
if (p.length > 0) switch (p[0]) {
|
|
1102
|
+
case "*":
|
|
1103
|
+
n.add(p.substring(1));
|
|
1104
|
+
break;
|
|
1105
|
+
case "!":
|
|
1106
|
+
r.set(p.substring(1), _s);
|
|
1107
|
+
break;
|
|
1108
|
+
case "#":
|
|
1109
|
+
r.set(p.substring(1), Ss);
|
|
1110
|
+
break;
|
|
1111
|
+
case "%":
|
|
1112
|
+
r.set(p.substring(1), bs);
|
|
1113
|
+
break;
|
|
1114
|
+
default:
|
|
1115
|
+
r.set(p, ks);
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
hasProperty(t, r, n) {
|
|
1121
|
+
if (n.some((i) => i.name === Jt.name)) return !0;
|
|
1122
|
+
let a = Pe(t);
|
|
1123
|
+
if (a.includes("-")) {
|
|
1124
|
+
if (jt(a) || Gt(a)) return !1;
|
|
1125
|
+
if (n.some((i) => i.name === Kt.name)) return !0;
|
|
1126
|
+
}
|
|
1127
|
+
return (this._schema.get(a) || this._schema.get("unknown")).has(r);
|
|
1128
|
+
}
|
|
1129
|
+
hasElement(t, r) {
|
|
1130
|
+
if (r.some((a) => a.name === Jt.name)) return !0;
|
|
1131
|
+
let n = Pe(t);
|
|
1132
|
+
return n.includes("-") && (jt(n) || Gt(n) || r.some((a) => a.name === Kt.name)) ? !0 : this._schema.has(n);
|
|
1133
|
+
}
|
|
1134
|
+
securityContext(t, r, n) {
|
|
1135
|
+
n && (r = this.getMappedPropName(r));
|
|
1136
|
+
let [a, i] = oe(t, !1);
|
|
1137
|
+
return gs(i, r, a);
|
|
1138
|
+
}
|
|
1139
|
+
getMappedPropName(t) {
|
|
1140
|
+
return rn.get(t) ?? t;
|
|
1141
|
+
}
|
|
1142
|
+
getDefaultComponentElementName() {
|
|
1143
|
+
return "ng-component";
|
|
1144
|
+
}
|
|
1145
|
+
validateProperty(t) {
|
|
1146
|
+
return t.toLowerCase().startsWith("on") ? { error: !0, msg: `Binding to event property '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...
|
|
1147
|
+
If '${t}' is a directive input, make sure the directive is imported by the current module.` } : { error: !1 };
|
|
1148
|
+
}
|
|
1149
|
+
validateAttribute(t) {
|
|
1150
|
+
return t.toLowerCase().startsWith("on") ? { error: !0, msg: `Binding to event attribute '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...` } : { error: !1 };
|
|
1151
|
+
}
|
|
1152
|
+
allKnownElementNames() {
|
|
1153
|
+
return Array.from(this._schema.keys());
|
|
1154
|
+
}
|
|
1155
|
+
allKnownAttributesOfElement(t) {
|
|
1156
|
+
let r = Pe(t), n = this._schema.get(r) || this._schema.get("unknown");
|
|
1157
|
+
return Array.from(n.keys()).map((a) => ys.get(a) ?? a);
|
|
1158
|
+
}
|
|
1159
|
+
allKnownEventsOfElement(t) {
|
|
1160
|
+
let r = Pe(t);
|
|
1161
|
+
return Array.from(this._eventSchema.get(r) ?? []);
|
|
1162
|
+
}
|
|
1163
|
+
normalizeAnimationStyleProperty(t) {
|
|
1164
|
+
return vs(t);
|
|
1165
|
+
}
|
|
1166
|
+
normalizeAnimationStyleValue(t, r, n) {
|
|
1167
|
+
let a = "", i = n.toString().trim(), s = null;
|
|
1168
|
+
if (xs(t) && n !== 0 && n !== "0") if (typeof n == "number") a = "px";
|
|
1169
|
+
else {
|
|
1170
|
+
let o = n.match(/^[+-]?[\d\.]+([a-z]*)$/);
|
|
1171
|
+
o && o[1].length == 0 && (s = `Please provide a CSS unit value for ${r}:${n}`);
|
|
1172
|
+
}
|
|
1173
|
+
return { error: s, value: i + a };
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
function xs(e) {
|
|
1177
|
+
switch (e) {
|
|
1178
|
+
case "width":
|
|
1179
|
+
case "height":
|
|
1180
|
+
case "minWidth":
|
|
1181
|
+
case "minHeight":
|
|
1182
|
+
case "maxWidth":
|
|
1183
|
+
case "maxHeight":
|
|
1184
|
+
case "left":
|
|
1185
|
+
case "top":
|
|
1186
|
+
case "bottom":
|
|
1187
|
+
case "right":
|
|
1188
|
+
case "fontSize":
|
|
1189
|
+
case "outlineWidth":
|
|
1190
|
+
case "outlineOffset":
|
|
1191
|
+
case "paddingTop":
|
|
1192
|
+
case "paddingLeft":
|
|
1193
|
+
case "paddingBottom":
|
|
1194
|
+
case "paddingRight":
|
|
1195
|
+
case "marginTop":
|
|
1196
|
+
case "marginLeft":
|
|
1197
|
+
case "marginBottom":
|
|
1198
|
+
case "marginRight":
|
|
1199
|
+
case "borderRadius":
|
|
1200
|
+
case "borderWidth":
|
|
1201
|
+
case "borderTopWidth":
|
|
1202
|
+
case "borderLeftWidth":
|
|
1203
|
+
case "borderRightWidth":
|
|
1204
|
+
case "borderBottomWidth":
|
|
1205
|
+
case "textIndent":
|
|
1206
|
+
return !0;
|
|
1207
|
+
default:
|
|
1208
|
+
return !1;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
var m = class {
|
|
1212
|
+
constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r = 2, closedByParent: n = !1, isVoid: a = !1, ignoreFirstLf: i = !1, preventNamespaceInheritance: s = !1, canSelfClose: o = !1 } = {}) {
|
|
1213
|
+
u(this, "closedByChildren", {});
|
|
1214
|
+
u(this, "contentType");
|
|
1215
|
+
u(this, "closedByParent", !1);
|
|
1216
|
+
u(this, "implicitNamespacePrefix");
|
|
1217
|
+
u(this, "isVoid");
|
|
1218
|
+
u(this, "ignoreFirstLf");
|
|
1219
|
+
u(this, "canSelfClose");
|
|
1220
|
+
u(this, "preventNamespaceInheritance");
|
|
1221
|
+
e && e.length > 0 && e.forEach((l) => this.closedByChildren[l] = !0), this.isVoid = a, this.closedByParent = n || a, this.implicitNamespacePrefix = t || null, this.contentType = r, this.ignoreFirstLf = i, this.preventNamespaceInheritance = s, this.canSelfClose = o ?? a;
|
|
1222
|
+
}
|
|
1223
|
+
isClosedByChild(e) {
|
|
1224
|
+
return this.isVoid || e.toLowerCase() in this.closedByChildren;
|
|
1225
|
+
}
|
|
1226
|
+
getContentType(e) {
|
|
1227
|
+
return typeof this.contentType == "object" ? (e === void 0 ? void 0 : this.contentType[e]) ?? this.contentType.default : this.contentType;
|
|
1228
|
+
}
|
|
1229
|
+
}, Yt, de;
|
|
1230
|
+
function lt(e) {
|
|
1231
|
+
return de || (Yt = new m({ canSelfClose: !0 }), de = Object.assign(/* @__PURE__ */ Object.create(null), { base: new m({ isVoid: !0 }), meta: new m({ isVoid: !0 }), area: new m({ isVoid: !0 }), embed: new m({ isVoid: !0 }), link: new m({ isVoid: !0 }), img: new m({ isVoid: !0 }), input: new m({ isVoid: !0 }), param: new m({ isVoid: !0 }), hr: new m({ isVoid: !0 }), br: new m({ isVoid: !0 }), source: new m({ isVoid: !0 }), track: new m({ isVoid: !0 }), wbr: new m({ isVoid: !0 }), p: new m({ closedByChildren: ["address", "article", "aside", "blockquote", "div", "dl", "fieldset", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "main", "nav", "ol", "p", "pre", "section", "table", "ul"], closedByParent: !0 }), thead: new m({ closedByChildren: ["tbody", "tfoot"] }), tbody: new m({ closedByChildren: ["tbody", "tfoot"], closedByParent: !0 }), tfoot: new m({ closedByChildren: ["tbody"], closedByParent: !0 }), tr: new m({ closedByChildren: ["tr"], closedByParent: !0 }), td: new m({ closedByChildren: ["td", "th"], closedByParent: !0 }), th: new m({ closedByChildren: ["td", "th"], closedByParent: !0 }), col: new m({ isVoid: !0 }), svg: new m({ implicitNamespacePrefix: "svg" }), foreignObject: new m({ implicitNamespacePrefix: "svg", preventNamespaceInheritance: !0 }), math: new m({ implicitNamespacePrefix: "math" }), li: new m({ closedByChildren: ["li"], closedByParent: !0 }), dt: new m({ closedByChildren: ["dt", "dd"] }), dd: new m({ closedByChildren: ["dt", "dd"], closedByParent: !0 }), rb: new m({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: !0 }), rt: new m({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: !0 }), rtc: new m({ closedByChildren: ["rb", "rtc", "rp"], closedByParent: !0 }), rp: new m({ closedByChildren: ["rb", "rt", "rtc", "rp"], closedByParent: !0 }), optgroup: new m({ closedByChildren: ["optgroup"], closedByParent: !0 }), option: new m({ closedByChildren: ["option", "optgroup"], closedByParent: !0 }), pre: new m({ ignoreFirstLf: !0 }), listing: new m({ ignoreFirstLf: !0 }), style: new m({ contentType: 0 }), script: new m({ contentType: 0 }), title: new m({ contentType: { default: 1, svg: 2 } }), textarea: new m({ contentType: 1, ignoreFirstLf: !0 }) }), new As().allKnownElementNames().forEach((t) => {
|
|
1232
|
+
!de[t] && Ue(t) === null && (de[t] = new m({ canSelfClose: !1 }));
|
|
1233
|
+
})), de[e] ?? Yt;
|
|
1234
|
+
}
|
|
1235
|
+
var ct = class nn {
|
|
1236
|
+
constructor(t, r, n, a) {
|
|
1237
|
+
u(this, "file");
|
|
1238
|
+
u(this, "offset");
|
|
1239
|
+
u(this, "line");
|
|
1240
|
+
u(this, "col");
|
|
1241
|
+
this.file = t, this.offset = r, this.line = n, this.col = a;
|
|
1242
|
+
}
|
|
1243
|
+
toString() {
|
|
1244
|
+
return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;
|
|
1245
|
+
}
|
|
1246
|
+
moveBy(t) {
|
|
1247
|
+
let r = this.file.content, n = r.length, a = this.offset, i = this.line, s = this.col;
|
|
1248
|
+
for (; a > 0 && t < 0; ) if (a--, t++, r.charCodeAt(a) == 10) {
|
|
1249
|
+
i--;
|
|
1250
|
+
let o = r.substring(0, a - 1).lastIndexOf(`
|
|
1251
|
+
`);
|
|
1252
|
+
s = o > 0 ? a - o : a;
|
|
1253
|
+
} else s--;
|
|
1254
|
+
for (; a < n && t > 0; ) {
|
|
1255
|
+
let o = r.charCodeAt(a);
|
|
1256
|
+
a++, t--, o == 10 ? (i++, s = 0) : s++;
|
|
1257
|
+
}
|
|
1258
|
+
return new nn(this.file, a, i, s);
|
|
1259
|
+
}
|
|
1260
|
+
getContext(t, r) {
|
|
1261
|
+
let n = this.file.content, a = this.offset;
|
|
1262
|
+
if (a != null) {
|
|
1263
|
+
a > n.length - 1 && (a = n.length - 1);
|
|
1264
|
+
let i = a, s = 0, o = 0;
|
|
1265
|
+
for (; s < t && a > 0 && (a--, s++, !(n[a] == `
|
|
1266
|
+
` && ++o == r)); ) ;
|
|
1267
|
+
for (s = 0, o = 0; s < t && i < n.length - 1 && (i++, s++, !(n[i] == `
|
|
1268
|
+
` && ++o == r)); ) ;
|
|
1269
|
+
return { before: n.substring(a, this.offset), after: n.substring(this.offset, i + 1) };
|
|
1270
|
+
}
|
|
1271
|
+
return null;
|
|
1272
|
+
}
|
|
1273
|
+
}, an = class {
|
|
1274
|
+
constructor(e, t) {
|
|
1275
|
+
u(this, "content");
|
|
1276
|
+
u(this, "url");
|
|
1277
|
+
this.content = e, this.url = t;
|
|
1278
|
+
}
|
|
1279
|
+
}, d = class {
|
|
1280
|
+
constructor(e, t, r = e, n = null) {
|
|
1281
|
+
u(this, "start");
|
|
1282
|
+
u(this, "end");
|
|
1283
|
+
u(this, "fullStart");
|
|
1284
|
+
u(this, "details");
|
|
1285
|
+
this.start = e, this.end = t, this.fullStart = r, this.details = n;
|
|
1286
|
+
}
|
|
1287
|
+
toString() {
|
|
1288
|
+
return this.start.file.content.substring(this.start.offset, this.end.offset);
|
|
1289
|
+
}
|
|
1290
|
+
}, Es = (function(e) {
|
|
1291
|
+
return e[e.WARNING = 0] = "WARNING", e[e.ERROR = 1] = "ERROR", e;
|
|
1292
|
+
})({}), Q = class extends Error {
|
|
1293
|
+
constructor(t, r, n = 1, a) {
|
|
1294
|
+
super(r);
|
|
1295
|
+
u(this, "span");
|
|
1296
|
+
u(this, "msg");
|
|
1297
|
+
u(this, "level");
|
|
1298
|
+
u(this, "relatedError");
|
|
1299
|
+
this.span = t, this.msg = r, this.level = n, this.relatedError = a, Object.setPrototypeOf(this, new.target.prototype);
|
|
1300
|
+
}
|
|
1301
|
+
contextualMessage() {
|
|
1302
|
+
let t = this.span.start.getContext(100, 3);
|
|
1303
|
+
return t ? `${this.msg} ("${t.before}[${Es[this.level]} ->]${t.after}")` : this.msg;
|
|
1304
|
+
}
|
|
1305
|
+
toString() {
|
|
1306
|
+
let t = this.span.details ? `, ${this.span.details}` : "";
|
|
1307
|
+
return `${this.contextualMessage()}: ${this.span.start}${t}`;
|
|
1308
|
+
}
|
|
1309
|
+
}, K = class {
|
|
1310
|
+
constructor(e, t) {
|
|
1311
|
+
u(this, "sourceSpan");
|
|
1312
|
+
u(this, "i18n");
|
|
1313
|
+
this.sourceSpan = e, this.i18n = t;
|
|
1314
|
+
}
|
|
1315
|
+
}, Ds = class extends K {
|
|
1316
|
+
constructor(t, r, n, a) {
|
|
1317
|
+
super(r, a);
|
|
1318
|
+
u(this, "value");
|
|
1319
|
+
u(this, "tokens");
|
|
1320
|
+
u(this, "kind", "text");
|
|
1321
|
+
this.value = t, this.tokens = n;
|
|
1322
|
+
}
|
|
1323
|
+
visit(t, r) {
|
|
1324
|
+
return t.visitText(this, r);
|
|
1325
|
+
}
|
|
1326
|
+
}, Ts = class extends K {
|
|
1327
|
+
constructor(t, r, n, a) {
|
|
1328
|
+
super(r, a);
|
|
1329
|
+
u(this, "value");
|
|
1330
|
+
u(this, "tokens");
|
|
1331
|
+
u(this, "kind", "cdata");
|
|
1332
|
+
this.value = t, this.tokens = n;
|
|
1333
|
+
}
|
|
1334
|
+
visit(t, r) {
|
|
1335
|
+
return t.visitCdata(this, r);
|
|
1336
|
+
}
|
|
1337
|
+
}, Bs = class extends K {
|
|
1338
|
+
constructor(t, r, n, a, i, s) {
|
|
1339
|
+
super(a, s);
|
|
1340
|
+
u(this, "switchValue");
|
|
1341
|
+
u(this, "type");
|
|
1342
|
+
u(this, "cases");
|
|
1343
|
+
u(this, "switchValueSourceSpan");
|
|
1344
|
+
u(this, "kind", "expansion");
|
|
1345
|
+
this.switchValue = t, this.type = r, this.cases = n, this.switchValueSourceSpan = i;
|
|
1346
|
+
}
|
|
1347
|
+
visit(t, r) {
|
|
1348
|
+
return t.visitExpansion(this, r);
|
|
1349
|
+
}
|
|
1350
|
+
}, Ls = class {
|
|
1351
|
+
constructor(e, t, r, n, a) {
|
|
1352
|
+
u(this, "value");
|
|
1353
|
+
u(this, "expression");
|
|
1354
|
+
u(this, "sourceSpan");
|
|
1355
|
+
u(this, "valueSourceSpan");
|
|
1356
|
+
u(this, "expSourceSpan");
|
|
1357
|
+
u(this, "kind", "expansionCase");
|
|
1358
|
+
this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n, this.expSourceSpan = a;
|
|
1359
|
+
}
|
|
1360
|
+
visit(e, t) {
|
|
1361
|
+
return e.visitExpansionCase(this, t);
|
|
1362
|
+
}
|
|
1363
|
+
}, Fs = class extends K {
|
|
1364
|
+
constructor(t, r, n, a, i, s, o) {
|
|
1365
|
+
super(n, o);
|
|
1366
|
+
u(this, "name");
|
|
1367
|
+
u(this, "value");
|
|
1368
|
+
u(this, "keySpan");
|
|
1369
|
+
u(this, "valueSpan");
|
|
1370
|
+
u(this, "valueTokens");
|
|
1371
|
+
u(this, "kind", "attribute");
|
|
1372
|
+
this.name = t, this.value = r, this.keySpan = a, this.valueSpan = i, this.valueTokens = s;
|
|
1373
|
+
}
|
|
1374
|
+
visit(t, r) {
|
|
1375
|
+
return t.visitAttribute(this, r);
|
|
1376
|
+
}
|
|
1377
|
+
get nameSpan() {
|
|
1378
|
+
return this.keySpan;
|
|
1379
|
+
}
|
|
1380
|
+
}, Ns = class {
|
|
1381
|
+
constructor(e, t, r) {
|
|
1382
|
+
u(this, "value");
|
|
1383
|
+
u(this, "type");
|
|
1384
|
+
u(this, "sourceSpan");
|
|
1385
|
+
u(this, "kind", "startTagComment");
|
|
1386
|
+
this.value = e, this.type = t, this.sourceSpan = r;
|
|
1387
|
+
}
|
|
1388
|
+
visit(e, t) {
|
|
1389
|
+
return e.visitStartTagComment ? e.visitStartTagComment(this, t) : void 0;
|
|
1390
|
+
}
|
|
1391
|
+
}, V = class extends K {
|
|
1392
|
+
constructor(t, r, n, a, i, s, o, l = null, c = null, p, v, g = []) {
|
|
1393
|
+
super(s, v);
|
|
1394
|
+
u(this, "name");
|
|
1395
|
+
u(this, "attrs");
|
|
1396
|
+
u(this, "directives");
|
|
1397
|
+
u(this, "children");
|
|
1398
|
+
u(this, "isSelfClosing");
|
|
1399
|
+
u(this, "startSourceSpan");
|
|
1400
|
+
u(this, "endSourceSpan");
|
|
1401
|
+
u(this, "nameSpan");
|
|
1402
|
+
u(this, "isVoid");
|
|
1403
|
+
u(this, "comments");
|
|
1404
|
+
u(this, "kind", "element");
|
|
1405
|
+
this.name = t, this.attrs = r, this.directives = n, this.children = a, this.isSelfClosing = i, this.startSourceSpan = o, this.endSourceSpan = l, this.nameSpan = c, this.isVoid = p, this.comments = g;
|
|
1406
|
+
}
|
|
1407
|
+
visit(t, r) {
|
|
1408
|
+
return t.visitElement(this, r);
|
|
1409
|
+
}
|
|
1410
|
+
}, qs = class {
|
|
1411
|
+
constructor(e, t) {
|
|
1412
|
+
u(this, "value");
|
|
1413
|
+
u(this, "sourceSpan");
|
|
1414
|
+
u(this, "kind", "comment");
|
|
1415
|
+
this.value = e, this.sourceSpan = t;
|
|
1416
|
+
}
|
|
1417
|
+
visit(e, t) {
|
|
1418
|
+
return e.visitComment(this, t);
|
|
1419
|
+
}
|
|
1420
|
+
}, Is = class {
|
|
1421
|
+
constructor(e, t) {
|
|
1422
|
+
u(this, "value");
|
|
1423
|
+
u(this, "sourceSpan");
|
|
1424
|
+
u(this, "kind", "docType");
|
|
1425
|
+
this.value = e, this.sourceSpan = t;
|
|
1426
|
+
}
|
|
1427
|
+
visit(e, t) {
|
|
1428
|
+
return e.visitDocType(this, t);
|
|
1429
|
+
}
|
|
1430
|
+
}, Y = class extends K {
|
|
1431
|
+
constructor(t, r, n, a, i, s, o = null, l) {
|
|
1432
|
+
super(a, l);
|
|
1433
|
+
u(this, "name");
|
|
1434
|
+
u(this, "parameters");
|
|
1435
|
+
u(this, "children");
|
|
1436
|
+
u(this, "nameSpan");
|
|
1437
|
+
u(this, "startSourceSpan");
|
|
1438
|
+
u(this, "endSourceSpan");
|
|
1439
|
+
u(this, "kind", "block");
|
|
1440
|
+
this.name = t, this.parameters = r, this.children = n, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = o;
|
|
1441
|
+
}
|
|
1442
|
+
visit(t, r) {
|
|
1443
|
+
return t.visitBlock(this, r);
|
|
1444
|
+
}
|
|
1445
|
+
}, M = class extends K {
|
|
1446
|
+
constructor(t, r, n, a, i, s, o, l, c, p = null, v, g = []) {
|
|
1447
|
+
super(l, v);
|
|
1448
|
+
u(this, "componentName");
|
|
1449
|
+
u(this, "tagName");
|
|
1450
|
+
u(this, "fullName");
|
|
1451
|
+
u(this, "attrs");
|
|
1452
|
+
u(this, "directives");
|
|
1453
|
+
u(this, "children");
|
|
1454
|
+
u(this, "isSelfClosing");
|
|
1455
|
+
u(this, "startSourceSpan");
|
|
1456
|
+
u(this, "endSourceSpan");
|
|
1457
|
+
u(this, "comments");
|
|
1458
|
+
u(this, "kind", "component");
|
|
1459
|
+
this.componentName = t, this.tagName = r, this.fullName = n, this.attrs = a, this.directives = i, this.children = s, this.isSelfClosing = o, this.startSourceSpan = c, this.endSourceSpan = p, this.comments = g;
|
|
1460
|
+
}
|
|
1461
|
+
visit(t, r) {
|
|
1462
|
+
return t.visitComponent(this, r);
|
|
1463
|
+
}
|
|
1464
|
+
}, Ms = class {
|
|
1465
|
+
constructor(e, t, r, n, a = null) {
|
|
1466
|
+
u(this, "name");
|
|
1467
|
+
u(this, "attrs");
|
|
1468
|
+
u(this, "sourceSpan");
|
|
1469
|
+
u(this, "startSourceSpan");
|
|
1470
|
+
u(this, "endSourceSpan");
|
|
1471
|
+
u(this, "kind", "directive");
|
|
1472
|
+
this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n, this.endSourceSpan = a;
|
|
1473
|
+
}
|
|
1474
|
+
visit(e, t) {
|
|
1475
|
+
return e.visitDirective(this, t);
|
|
1476
|
+
}
|
|
1477
|
+
}, Qt = class {
|
|
1478
|
+
constructor(e, t) {
|
|
1479
|
+
u(this, "expression");
|
|
1480
|
+
u(this, "sourceSpan");
|
|
1481
|
+
u(this, "kind", "blockParameter");
|
|
1482
|
+
u(this, "startSourceSpan", null);
|
|
1483
|
+
u(this, "endSourceSpan", null);
|
|
1484
|
+
this.expression = e, this.sourceSpan = t;
|
|
1485
|
+
}
|
|
1486
|
+
visit(e, t) {
|
|
1487
|
+
return e.visitBlockParameter(this, t);
|
|
1488
|
+
}
|
|
1489
|
+
}, Zt = class {
|
|
1490
|
+
constructor(e, t, r, n, a) {
|
|
1491
|
+
u(this, "name");
|
|
1492
|
+
u(this, "value");
|
|
1493
|
+
u(this, "sourceSpan");
|
|
1494
|
+
u(this, "nameSpan");
|
|
1495
|
+
u(this, "valueSpan");
|
|
1496
|
+
u(this, "kind", "letDeclaration");
|
|
1497
|
+
u(this, "startSourceSpan", null);
|
|
1498
|
+
u(this, "endSourceSpan", null);
|
|
1499
|
+
this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n, this.valueSpan = a;
|
|
1500
|
+
}
|
|
1501
|
+
visit(e, t) {
|
|
1502
|
+
return e.visitLetDeclaration(this, t);
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
function sn(e, t, r = null) {
|
|
1506
|
+
let n = [], a = e.visit ? (i) => e.visit(i, r) || i.visit(e, r) : (i) => i.visit(e, r);
|
|
1507
|
+
return t.forEach((i) => {
|
|
1508
|
+
let s = a(i);
|
|
1509
|
+
s && n.push(s);
|
|
1510
|
+
}), n;
|
|
1511
|
+
}
|
|
1512
|
+
var Ps = class {
|
|
1513
|
+
constructor() {
|
|
1514
|
+
}
|
|
1515
|
+
visitElement(e, t) {
|
|
1516
|
+
this.visitChildren(t, (r) => {
|
|
1517
|
+
r(e.attrs), r(e.directives), r(e.comments), r(e.children);
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
visitAttribute(e, t) {
|
|
1521
|
+
}
|
|
1522
|
+
visitStartTagComment(e, t) {
|
|
1523
|
+
}
|
|
1524
|
+
visitText(e, t) {
|
|
1525
|
+
}
|
|
1526
|
+
visitCdata(e, t) {
|
|
1527
|
+
}
|
|
1528
|
+
visitComment(e, t) {
|
|
1529
|
+
}
|
|
1530
|
+
visitDocType(e, t) {
|
|
1531
|
+
}
|
|
1532
|
+
visitExpansion(e, t) {
|
|
1533
|
+
return this.visitChildren(t, (r) => {
|
|
1534
|
+
r(e.cases);
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
visitExpansionCase(e, t) {
|
|
1538
|
+
}
|
|
1539
|
+
visitBlock(e, t) {
|
|
1540
|
+
this.visitChildren(t, (r) => {
|
|
1541
|
+
r(e.parameters), r(e.children);
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
visitBlockParameter(e, t) {
|
|
1545
|
+
}
|
|
1546
|
+
visitLetDeclaration(e, t) {
|
|
1547
|
+
}
|
|
1548
|
+
visitComponent(e, t) {
|
|
1549
|
+
this.visitChildren(t, (r) => {
|
|
1550
|
+
r(e.attrs), r(e.comments), r(e.children);
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
visitDirective(e, t) {
|
|
1554
|
+
this.visitChildren(t, (r) => {
|
|
1555
|
+
r(e.attrs);
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
visitChildren(e, t) {
|
|
1559
|
+
let r = [], n = this;
|
|
1560
|
+
function a(i) {
|
|
1561
|
+
i && r.push(sn(n, i, e));
|
|
1562
|
+
}
|
|
1563
|
+
return t(a), Array.prototype.concat.apply([], r);
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
function Oe(e) {
|
|
1567
|
+
return e >= 9 && e <= 32 || e == 160;
|
|
1568
|
+
}
|
|
1569
|
+
function Le(e) {
|
|
1570
|
+
return 48 <= e && e <= 57;
|
|
1571
|
+
}
|
|
1572
|
+
function be(e) {
|
|
1573
|
+
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
1574
|
+
}
|
|
1575
|
+
function Hs(e) {
|
|
1576
|
+
return e >= 97 && e <= 102 || e >= 65 && e <= 70 || Le(e);
|
|
1577
|
+
}
|
|
1578
|
+
function Se(e) {
|
|
1579
|
+
return e === 10 || e === 13;
|
|
1580
|
+
}
|
|
1581
|
+
function Xt(e) {
|
|
1582
|
+
return 48 <= e && e <= 55;
|
|
1583
|
+
}
|
|
1584
|
+
function nt(e) {
|
|
1585
|
+
return e === 39 || e === 34 || e === 96;
|
|
1586
|
+
}
|
|
1587
|
+
var we = { AElig: "Æ", AMP: "&", amp: "&", Aacute: "Á", Abreve: "Ă", Acirc: "Â", Acy: "А", Afr: "𝔄", Agrave: "À", Alpha: "Α", Amacr: "Ā", And: "⩓", Aogon: "Ą", Aopf: "𝔸", ApplyFunction: "", af: "", Aring: "Å", angst: "Å", Ascr: "𝒜", Assign: "≔", colone: "≔", coloneq: "≔", Atilde: "Ã", Auml: "Ä", Backslash: "∖", setminus: "∖", setmn: "∖", smallsetminus: "∖", ssetmn: "∖", Barv: "⫧", Barwed: "⌆", doublebarwedge: "⌆", Bcy: "Б", Because: "∵", becaus: "∵", because: "∵", Bernoullis: "ℬ", Bscr: "ℬ", bernou: "ℬ", Beta: "Β", Bfr: "𝔅", Bopf: "𝔹", Breve: "˘", breve: "˘", Bumpeq: "≎", HumpDownHump: "≎", bump: "≎", CHcy: "Ч", COPY: "©", copy: "©", Cacute: "Ć", Cap: "⋒", CapitalDifferentialD: "ⅅ", DD: "ⅅ", Cayleys: "ℭ", Cfr: "ℭ", Ccaron: "Č", Ccedil: "Ç", Ccirc: "Ĉ", Cconint: "∰", Cdot: "Ċ", Cedilla: "¸", cedil: "¸", CenterDot: "·", centerdot: "·", middot: "·", Chi: "Χ", CircleDot: "⊙", odot: "⊙", CircleMinus: "⊖", ominus: "⊖", CirclePlus: "⊕", oplus: "⊕", CircleTimes: "⊗", otimes: "⊗", ClockwiseContourIntegral: "∲", cwconint: "∲", CloseCurlyDoubleQuote: "”", rdquo: "”", rdquor: "”", CloseCurlyQuote: "’", rsquo: "’", rsquor: "’", Colon: "∷", Proportion: "∷", Colone: "⩴", Congruent: "≡", equiv: "≡", Conint: "∯", DoubleContourIntegral: "∯", ContourIntegral: "∮", conint: "∮", oint: "∮", Copf: "ℂ", complexes: "ℂ", Coproduct: "∐", coprod: "∐", CounterClockwiseContourIntegral: "∳", awconint: "∳", Cross: "⨯", Cscr: "𝒞", Cup: "⋓", CupCap: "≍", asympeq: "≍", DDotrahd: "⤑", DJcy: "Ђ", DScy: "Ѕ", DZcy: "Џ", Dagger: "‡", ddagger: "‡", Darr: "↡", Dashv: "⫤", DoubleLeftTee: "⫤", Dcaron: "Ď", Dcy: "Д", Del: "∇", nabla: "∇", Delta: "Δ", Dfr: "𝔇", DiacriticalAcute: "´", acute: "´", DiacriticalDot: "˙", dot: "˙", DiacriticalDoubleAcute: "˝", dblac: "˝", DiacriticalGrave: "`", grave: "`", DiacriticalTilde: "˜", tilde: "˜", Diamond: "⋄", diam: "⋄", diamond: "⋄", DifferentialD: "ⅆ", dd: "ⅆ", Dopf: "𝔻", Dot: "¨", DoubleDot: "¨", die: "¨", uml: "¨", DotDot: "⃜", DotEqual: "≐", doteq: "≐", esdot: "≐", DoubleDownArrow: "⇓", Downarrow: "⇓", dArr: "⇓", DoubleLeftArrow: "⇐", Leftarrow: "⇐", lArr: "⇐", DoubleLeftRightArrow: "⇔", Leftrightarrow: "⇔", hArr: "⇔", iff: "⇔", DoubleLongLeftArrow: "⟸", Longleftarrow: "⟸", xlArr: "⟸", DoubleLongLeftRightArrow: "⟺", Longleftrightarrow: "⟺", xhArr: "⟺", DoubleLongRightArrow: "⟹", Longrightarrow: "⟹", xrArr: "⟹", DoubleRightArrow: "⇒", Implies: "⇒", Rightarrow: "⇒", rArr: "⇒", DoubleRightTee: "⊨", vDash: "⊨", DoubleUpArrow: "⇑", Uparrow: "⇑", uArr: "⇑", DoubleUpDownArrow: "⇕", Updownarrow: "⇕", vArr: "⇕", DoubleVerticalBar: "∥", par: "∥", parallel: "∥", shortparallel: "∥", spar: "∥", DownArrow: "↓", ShortDownArrow: "↓", darr: "↓", downarrow: "↓", DownArrowBar: "⤓", DownArrowUpArrow: "⇵", duarr: "⇵", DownBreve: "̑", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVector: "↽", leftharpoondown: "↽", lhard: "↽", DownLeftVectorBar: "⥖", DownRightTeeVector: "⥟", DownRightVector: "⇁", rhard: "⇁", rightharpoondown: "⇁", DownRightVectorBar: "⥗", DownTee: "⊤", top: "⊤", DownTeeArrow: "↧", mapstodown: "↧", Dscr: "𝒟", Dstrok: "Đ", ENG: "Ŋ", ETH: "Ð", Eacute: "É", Ecaron: "Ě", Ecirc: "Ê", Ecy: "Э", Edot: "Ė", Efr: "𝔈", Egrave: "È", Element: "∈", in: "∈", isin: "∈", isinv: "∈", Emacr: "Ē", EmptySmallSquare: "◻", EmptyVerySmallSquare: "▫", Eogon: "Ę", Eopf: "𝔼", Epsilon: "Ε", Equal: "⩵", EqualTilde: "≂", eqsim: "≂", esim: "≂", Equilibrium: "⇌", rightleftharpoons: "⇌", rlhar: "⇌", Escr: "ℰ", expectation: "ℰ", Esim: "⩳", Eta: "Η", Euml: "Ë", Exists: "∃", exist: "∃", ExponentialE: "ⅇ", ee: "ⅇ", exponentiale: "ⅇ", Fcy: "Ф", Ffr: "𝔉", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", blacksquare: "▪", squarf: "▪", squf: "▪", Fopf: "𝔽", ForAll: "∀", forall: "∀", Fouriertrf: "ℱ", Fscr: "ℱ", GJcy: "Ѓ", GT: ">", gt: ">", Gamma: "Γ", Gammad: "Ϝ", Gbreve: "Ğ", Gcedil: "Ģ", Gcirc: "Ĝ", Gcy: "Г", Gdot: "Ġ", Gfr: "𝔊", Gg: "⋙", ggg: "⋙", Gopf: "𝔾", GreaterEqual: "≥", ge: "≥", geq: "≥", GreaterEqualLess: "⋛", gel: "⋛", gtreqless: "⋛", GreaterFullEqual: "≧", gE: "≧", geqq: "≧", GreaterGreater: "⪢", GreaterLess: "≷", gl: "≷", gtrless: "≷", GreaterSlantEqual: "⩾", geqslant: "⩾", ges: "⩾", GreaterTilde: "≳", gsim: "≳", gtrsim: "≳", Gscr: "𝒢", Gt: "≫", NestedGreaterGreater: "≫", gg: "≫", HARDcy: "Ъ", Hacek: "ˇ", caron: "ˇ", Hat: "^", Hcirc: "Ĥ", Hfr: "ℌ", Poincareplane: "ℌ", HilbertSpace: "ℋ", Hscr: "ℋ", hamilt: "ℋ", Hopf: "ℍ", quaternions: "ℍ", HorizontalLine: "─", boxh: "─", Hstrok: "Ħ", HumpEqual: "≏", bumpe: "≏", bumpeq: "≏", IEcy: "Е", IJlig: "IJ", IOcy: "Ё", Iacute: "Í", Icirc: "Î", Icy: "И", Idot: "İ", Ifr: "ℑ", Im: "ℑ", image: "ℑ", imagpart: "ℑ", Igrave: "Ì", Imacr: "Ī", ImaginaryI: "ⅈ", ii: "ⅈ", Int: "∬", Integral: "∫", int: "∫", Intersection: "⋂", bigcap: "⋂", xcap: "⋂", InvisibleComma: "", ic: "", InvisibleTimes: "", it: "", Iogon: "Į", Iopf: "𝕀", Iota: "Ι", Iscr: "ℐ", imagline: "ℐ", Itilde: "Ĩ", Iukcy: "І", Iuml: "Ï", Jcirc: "Ĵ", Jcy: "Й", Jfr: "𝔍", Jopf: "𝕁", Jscr: "𝒥", Jsercy: "Ј", Jukcy: "Є", KHcy: "Х", KJcy: "Ќ", Kappa: "Κ", Kcedil: "Ķ", Kcy: "К", Kfr: "𝔎", Kopf: "𝕂", Kscr: "𝒦", LJcy: "Љ", LT: "<", lt: "<", Lacute: "Ĺ", Lambda: "Λ", Lang: "⟪", Laplacetrf: "ℒ", Lscr: "ℒ", lagran: "ℒ", Larr: "↞", twoheadleftarrow: "↞", Lcaron: "Ľ", Lcedil: "Ļ", Lcy: "Л", LeftAngleBracket: "⟨", lang: "⟨", langle: "⟨", LeftArrow: "←", ShortLeftArrow: "←", larr: "←", leftarrow: "←", slarr: "←", LeftArrowBar: "⇤", larrb: "⇤", LeftArrowRightArrow: "⇆", leftrightarrows: "⇆", lrarr: "⇆", LeftCeiling: "⌈", lceil: "⌈", LeftDoubleBracket: "⟦", lobrk: "⟦", LeftDownTeeVector: "⥡", LeftDownVector: "⇃", dharl: "⇃", downharpoonleft: "⇃", LeftDownVectorBar: "⥙", LeftFloor: "⌊", lfloor: "⌊", LeftRightArrow: "↔", harr: "↔", leftrightarrow: "↔", LeftRightVector: "⥎", LeftTee: "⊣", dashv: "⊣", LeftTeeArrow: "↤", mapstoleft: "↤", LeftTeeVector: "⥚", LeftTriangle: "⊲", vartriangleleft: "⊲", vltri: "⊲", LeftTriangleBar: "⧏", LeftTriangleEqual: "⊴", ltrie: "⊴", trianglelefteq: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVector: "↿", uharl: "↿", upharpoonleft: "↿", LeftUpVectorBar: "⥘", LeftVector: "↼", leftharpoonup: "↼", lharu: "↼", LeftVectorBar: "⥒", LessEqualGreater: "⋚", leg: "⋚", lesseqgtr: "⋚", LessFullEqual: "≦", lE: "≦", leqq: "≦", LessGreater: "≶", lessgtr: "≶", lg: "≶", LessLess: "⪡", LessSlantEqual: "⩽", leqslant: "⩽", les: "⩽", LessTilde: "≲", lesssim: "≲", lsim: "≲", Lfr: "𝔏", Ll: "⋘", Lleftarrow: "⇚", lAarr: "⇚", Lmidot: "Ŀ", LongLeftArrow: "⟵", longleftarrow: "⟵", xlarr: "⟵", LongLeftRightArrow: "⟷", longleftrightarrow: "⟷", xharr: "⟷", LongRightArrow: "⟶", longrightarrow: "⟶", xrarr: "⟶", Lopf: "𝕃", LowerLeftArrow: "↙", swarr: "↙", swarrow: "↙", LowerRightArrow: "↘", searr: "↘", searrow: "↘", Lsh: "↰", lsh: "↰", Lstrok: "Ł", Lt: "≪", NestedLessLess: "≪", ll: "≪", Map: "⤅", Mcy: "М", MediumSpace: " ", Mellintrf: "ℳ", Mscr: "ℳ", phmmat: "ℳ", Mfr: "𝔐", MinusPlus: "∓", mnplus: "∓", mp: "∓", Mopf: "𝕄", Mu: "Μ", NJcy: "Њ", Nacute: "Ń", Ncaron: "Ň", Ncedil: "Ņ", Ncy: "Н", NegativeMediumSpace: "", NegativeThickSpace: "", NegativeThinSpace: "", NegativeVeryThinSpace: "", ZeroWidthSpace: "", NewLine: `
|
|
1588
|
+
`, Nfr: "𝔑", NoBreak: "", NonBreakingSpace: " ", nbsp: " ", Nopf: "ℕ", naturals: "ℕ", Not: "⫬", NotCongruent: "≢", nequiv: "≢", NotCupCap: "≭", NotDoubleVerticalBar: "∦", npar: "∦", nparallel: "∦", nshortparallel: "∦", nspar: "∦", NotElement: "∉", notin: "∉", notinva: "∉", NotEqual: "≠", ne: "≠", NotEqualTilde: "≂̸", nesim: "≂̸", NotExists: "∄", nexist: "∄", nexists: "∄", NotGreater: "≯", ngt: "≯", ngtr: "≯", NotGreaterEqual: "≱", nge: "≱", ngeq: "≱", NotGreaterFullEqual: "≧̸", ngE: "≧̸", ngeqq: "≧̸", NotGreaterGreater: "≫̸", nGtv: "≫̸", NotGreaterLess: "≹", ntgl: "≹", NotGreaterSlantEqual: "⩾̸", ngeqslant: "⩾̸", nges: "⩾̸", NotGreaterTilde: "≵", ngsim: "≵", NotHumpDownHump: "≎̸", nbump: "≎̸", NotHumpEqual: "≏̸", nbumpe: "≏̸", NotLeftTriangle: "⋪", nltri: "⋪", ntriangleleft: "⋪", NotLeftTriangleBar: "⧏̸", NotLeftTriangleEqual: "⋬", nltrie: "⋬", ntrianglelefteq: "⋬", NotLess: "≮", nless: "≮", nlt: "≮", NotLessEqual: "≰", nle: "≰", nleq: "≰", NotLessGreater: "≸", ntlg: "≸", NotLessLess: "≪̸", nLtv: "≪̸", NotLessSlantEqual: "⩽̸", nleqslant: "⩽̸", nles: "⩽̸", NotLessTilde: "≴", nlsim: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", NotPrecedes: "⊀", npr: "⊀", nprec: "⊀", NotPrecedesEqual: "⪯̸", npre: "⪯̸", npreceq: "⪯̸", NotPrecedesSlantEqual: "⋠", nprcue: "⋠", NotReverseElement: "∌", notni: "∌", notniva: "∌", NotRightTriangle: "⋫", nrtri: "⋫", ntriangleright: "⋫", NotRightTriangleBar: "⧐̸", NotRightTriangleEqual: "⋭", nrtrie: "⋭", ntrianglerighteq: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", nsqsube: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", nsqsupe: "⋣", NotSubset: "⊂⃒", nsubset: "⊂⃒", vnsub: "⊂⃒", NotSubsetEqual: "⊈", nsube: "⊈", nsubseteq: "⊈", NotSucceeds: "⊁", nsc: "⊁", nsucc: "⊁", NotSucceedsEqual: "⪰̸", nsce: "⪰̸", nsucceq: "⪰̸", NotSucceedsSlantEqual: "⋡", nsccue: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", nsupset: "⊃⃒", vnsup: "⊃⃒", NotSupersetEqual: "⊉", nsupe: "⊉", nsupseteq: "⊉", NotTilde: "≁", nsim: "≁", NotTildeEqual: "≄", nsime: "≄", nsimeq: "≄", NotTildeFullEqual: "≇", ncong: "≇", NotTildeTilde: "≉", nap: "≉", napprox: "≉", NotVerticalBar: "∤", nmid: "∤", nshortmid: "∤", nsmid: "∤", Nscr: "𝒩", Ntilde: "Ñ", Nu: "Ν", OElig: "Œ", Oacute: "Ó", Ocirc: "Ô", Ocy: "О", Odblac: "Ő", Ofr: "𝔒", Ograve: "Ò", Omacr: "Ō", Omega: "Ω", ohm: "Ω", Omicron: "Ο", Oopf: "𝕆", OpenCurlyDoubleQuote: "“", ldquo: "“", OpenCurlyQuote: "‘", lsquo: "‘", Or: "⩔", Oscr: "𝒪", Oslash: "Ø", Otilde: "Õ", Otimes: "⨷", Ouml: "Ö", OverBar: "‾", oline: "‾", OverBrace: "⏞", OverBracket: "⎴", tbrk: "⎴", OverParenthesis: "⏜", PartialD: "∂", part: "∂", Pcy: "П", Pfr: "𝔓", Phi: "Φ", Pi: "Π", PlusMinus: "±", plusmn: "±", pm: "±", Popf: "ℙ", primes: "ℙ", Pr: "⪻", Precedes: "≺", pr: "≺", prec: "≺", PrecedesEqual: "⪯", pre: "⪯", preceq: "⪯", PrecedesSlantEqual: "≼", prcue: "≼", preccurlyeq: "≼", PrecedesTilde: "≾", precsim: "≾", prsim: "≾", Prime: "″", Product: "∏", prod: "∏", Proportional: "∝", prop: "∝", propto: "∝", varpropto: "∝", vprop: "∝", Pscr: "𝒫", Psi: "Ψ", QUOT: '"', quot: '"', Qfr: "𝔔", Qopf: "ℚ", rationals: "ℚ", Qscr: "𝒬", RBarr: "⤐", drbkarow: "⤐", REG: "®", circledR: "®", reg: "®", Racute: "Ŕ", Rang: "⟫", Rarr: "↠", twoheadrightarrow: "↠", Rarrtl: "⤖", Rcaron: "Ř", Rcedil: "Ŗ", Rcy: "Р", Re: "ℜ", Rfr: "ℜ", real: "ℜ", realpart: "ℜ", ReverseElement: "∋", SuchThat: "∋", ni: "∋", niv: "∋", ReverseEquilibrium: "⇋", leftrightharpoons: "⇋", lrhar: "⇋", ReverseUpEquilibrium: "⥯", duhar: "⥯", Rho: "Ρ", RightAngleBracket: "⟩", rang: "⟩", rangle: "⟩", RightArrow: "→", ShortRightArrow: "→", rarr: "→", rightarrow: "→", srarr: "→", RightArrowBar: "⇥", rarrb: "⇥", RightArrowLeftArrow: "⇄", rightleftarrows: "⇄", rlarr: "⇄", RightCeiling: "⌉", rceil: "⌉", RightDoubleBracket: "⟧", robrk: "⟧", RightDownTeeVector: "⥝", RightDownVector: "⇂", dharr: "⇂", downharpoonright: "⇂", RightDownVectorBar: "⥕", RightFloor: "⌋", rfloor: "⌋", RightTee: "⊢", vdash: "⊢", RightTeeArrow: "↦", map: "↦", mapsto: "↦", RightTeeVector: "⥛", RightTriangle: "⊳", vartriangleright: "⊳", vrtri: "⊳", RightTriangleBar: "⧐", RightTriangleEqual: "⊵", rtrie: "⊵", trianglerighteq: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVector: "↾", uharr: "↾", upharpoonright: "↾", RightUpVectorBar: "⥔", RightVector: "⇀", rharu: "⇀", rightharpoonup: "⇀", RightVectorBar: "⥓", Ropf: "ℝ", reals: "ℝ", RoundImplies: "⥰", Rrightarrow: "⇛", rAarr: "⇛", Rscr: "ℛ", realine: "ℛ", Rsh: "↱", rsh: "↱", RuleDelayed: "⧴", SHCHcy: "Щ", SHcy: "Ш", SOFTcy: "Ь", Sacute: "Ś", Sc: "⪼", Scaron: "Š", Scedil: "Ş", Scirc: "Ŝ", Scy: "С", Sfr: "𝔖", ShortUpArrow: "↑", UpArrow: "↑", uarr: "↑", uparrow: "↑", Sigma: "Σ", SmallCircle: "∘", compfn: "∘", Sopf: "𝕊", Sqrt: "√", radic: "√", Square: "□", squ: "□", square: "□", SquareIntersection: "⊓", sqcap: "⊓", SquareSubset: "⊏", sqsub: "⊏", sqsubset: "⊏", SquareSubsetEqual: "⊑", sqsube: "⊑", sqsubseteq: "⊑", SquareSuperset: "⊐", sqsup: "⊐", sqsupset: "⊐", SquareSupersetEqual: "⊒", sqsupe: "⊒", sqsupseteq: "⊒", SquareUnion: "⊔", sqcup: "⊔", Sscr: "𝒮", Star: "⋆", sstarf: "⋆", Sub: "⋐", Subset: "⋐", SubsetEqual: "⊆", sube: "⊆", subseteq: "⊆", Succeeds: "≻", sc: "≻", succ: "≻", SucceedsEqual: "⪰", sce: "⪰", succeq: "⪰", SucceedsSlantEqual: "≽", sccue: "≽", succcurlyeq: "≽", SucceedsTilde: "≿", scsim: "≿", succsim: "≿", Sum: "∑", sum: "∑", Sup: "⋑", Supset: "⋑", Superset: "⊃", sup: "⊃", supset: "⊃", SupersetEqual: "⊇", supe: "⊇", supseteq: "⊇", THORN: "Þ", TRADE: "™", trade: "™", TSHcy: "Ћ", TScy: "Ц", Tab: " ", Tau: "Τ", Tcaron: "Ť", Tcedil: "Ţ", Tcy: "Т", Tfr: "𝔗", Therefore: "∴", there4: "∴", therefore: "∴", Theta: "Θ", ThickSpace: " ", ThinSpace: " ", thinsp: " ", Tilde: "∼", sim: "∼", thicksim: "∼", thksim: "∼", TildeEqual: "≃", sime: "≃", simeq: "≃", TildeFullEqual: "≅", cong: "≅", TildeTilde: "≈", ap: "≈", approx: "≈", asymp: "≈", thickapprox: "≈", thkap: "≈", Topf: "𝕋", TripleDot: "⃛", tdot: "⃛", Tscr: "𝒯", Tstrok: "Ŧ", Uacute: "Ú", Uarr: "↟", Uarrocir: "⥉", Ubrcy: "Ў", Ubreve: "Ŭ", Ucirc: "Û", Ucy: "У", Udblac: "Ű", Ufr: "𝔘", Ugrave: "Ù", Umacr: "Ū", UnderBar: "_", lowbar: "_", UnderBrace: "⏟", UnderBracket: "⎵", bbrk: "⎵", UnderParenthesis: "⏝", Union: "⋃", bigcup: "⋃", xcup: "⋃", UnionPlus: "⊎", uplus: "⊎", Uogon: "Ų", Uopf: "𝕌", UpArrowBar: "⤒", UpArrowDownArrow: "⇅", udarr: "⇅", UpDownArrow: "↕", updownarrow: "↕", varr: "↕", UpEquilibrium: "⥮", udhar: "⥮", UpTee: "⊥", bot: "⊥", bottom: "⊥", perp: "⊥", UpTeeArrow: "↥", mapstoup: "↥", UpperLeftArrow: "↖", nwarr: "↖", nwarrow: "↖", UpperRightArrow: "↗", nearr: "↗", nearrow: "↗", Upsi: "ϒ", upsih: "ϒ", Upsilon: "Υ", Uring: "Ů", Uscr: "𝒰", Utilde: "Ũ", Uuml: "Ü", VDash: "⊫", Vbar: "⫫", Vcy: "В", Vdash: "⊩", Vdashl: "⫦", Vee: "⋁", bigvee: "⋁", xvee: "⋁", Verbar: "‖", Vert: "‖", VerticalBar: "∣", mid: "∣", shortmid: "∣", smid: "∣", VerticalLine: "|", verbar: "|", vert: "|", VerticalSeparator: "❘", VerticalTilde: "≀", wr: "≀", wreath: "≀", VeryThinSpace: " ", hairsp: " ", Vfr: "𝔙", Vopf: "𝕍", Vscr: "𝒱", Vvdash: "⊪", Wcirc: "Ŵ", Wedge: "⋀", bigwedge: "⋀", xwedge: "⋀", Wfr: "𝔚", Wopf: "𝕎", Wscr: "𝒲", Xfr: "𝔛", Xi: "Ξ", Xopf: "𝕏", Xscr: "𝒳", YAcy: "Я", YIcy: "Ї", YUcy: "Ю", Yacute: "Ý", Ycirc: "Ŷ", Ycy: "Ы", Yfr: "𝔜", Yopf: "𝕐", Yscr: "𝒴", Yuml: "Ÿ", ZHcy: "Ж", Zacute: "Ź", Zcaron: "Ž", Zcy: "З", Zdot: "Ż", Zeta: "Ζ", Zfr: "ℨ", zeetrf: "ℨ", Zopf: "ℤ", integers: "ℤ", Zscr: "𝒵", aacute: "á", abreve: "ă", ac: "∾", mstpos: "∾", acE: "∾̳", acd: "∿", acirc: "â", acy: "а", aelig: "æ", afr: "𝔞", agrave: "à", alefsym: "ℵ", aleph: "ℵ", alpha: "α", amacr: "ā", amalg: "⨿", and: "∧", wedge: "∧", andand: "⩕", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", angle: "∠", ange: "⦤", angmsd: "∡", measuredangle: "∡", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angzarr: "⍼", aogon: "ą", aopf: "𝕒", apE: "⩰", apacir: "⩯", ape: "≊", approxeq: "≊", apid: "≋", apos: "'", aring: "å", ascr: "𝒶", ast: "*", midast: "*", atilde: "ã", auml: "ä", awint: "⨑", bNot: "⫭", backcong: "≌", bcong: "≌", backepsilon: "϶", bepsi: "϶", backprime: "‵", bprime: "‵", backsim: "∽", bsim: "∽", backsimeq: "⋍", bsime: "⋍", barvee: "⊽", barwed: "⌅", barwedge: "⌅", bbrktbrk: "⎶", bcy: "б", bdquo: "„", ldquor: "„", bemptyv: "⦰", beta: "β", beth: "ℶ", between: "≬", twixt: "≬", bfr: "𝔟", bigcirc: "◯", xcirc: "◯", bigodot: "⨀", xodot: "⨀", bigoplus: "⨁", xoplus: "⨁", bigotimes: "⨂", xotime: "⨂", bigsqcup: "⨆", xsqcup: "⨆", bigstar: "★", starf: "★", bigtriangledown: "▽", xdtri: "▽", bigtriangleup: "△", xutri: "△", biguplus: "⨄", xuplus: "⨄", bkarow: "⤍", rbarr: "⤍", blacklozenge: "⧫", lozf: "⧫", blacktriangle: "▴", utrif: "▴", blacktriangledown: "▾", dtrif: "▾", blacktriangleleft: "◂", ltrif: "◂", blacktriangleright: "▸", rtrif: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bnot: "⌐", bopf: "𝕓", bowtie: "⋈", boxDL: "╗", boxDR: "╔", boxDl: "╖", boxDr: "╓", boxH: "═", boxHD: "╦", boxHU: "╩", boxHd: "╤", boxHu: "╧", boxUL: "╝", boxUR: "╚", boxUl: "╜", boxUr: "╙", boxV: "║", boxVH: "╬", boxVL: "╣", boxVR: "╠", boxVh: "╫", boxVl: "╢", boxVr: "╟", boxbox: "⧉", boxdL: "╕", boxdR: "╒", boxdl: "┐", boxdr: "┌", boxhD: "╥", boxhU: "╨", boxhd: "┬", boxhu: "┴", boxminus: "⊟", minusb: "⊟", boxplus: "⊞", plusb: "⊞", boxtimes: "⊠", timesb: "⊠", boxuL: "╛", boxuR: "╘", boxul: "┘", boxur: "└", boxv: "│", boxvH: "╪", boxvL: "╡", boxvR: "╞", boxvh: "┼", boxvl: "┤", boxvr: "├", brvbar: "¦", bscr: "𝒷", bsemi: "⁏", bsol: "\\", bsolb: "⧅", bsolhsub: "⟈", bull: "•", bullet: "•", bumpE: "⪮", cacute: "ć", cap: "∩", capand: "⩄", capbrcup: "⩉", capcap: "⩋", capcup: "⩇", capdot: "⩀", caps: "∩︀", caret: "⁁", ccaps: "⩍", ccaron: "č", ccedil: "ç", ccirc: "ĉ", ccups: "⩌", ccupssm: "⩐", cdot: "ċ", cemptyv: "⦲", cent: "¢", cfr: "𝔠", chcy: "ч", check: "✓", checkmark: "✓", chi: "χ", cir: "○", cirE: "⧃", circ: "ˆ", circeq: "≗", cire: "≗", circlearrowleft: "↺", olarr: "↺", circlearrowright: "↻", orarr: "↻", circledS: "Ⓢ", oS: "Ⓢ", circledast: "⊛", oast: "⊛", circledcirc: "⊚", ocir: "⊚", circleddash: "⊝", odash: "⊝", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", clubs: "♣", clubsuit: "♣", colon: ":", comma: ",", commat: "@", comp: "∁", complement: "∁", congdot: "⩭", copf: "𝕔", copysr: "℗", crarr: "↵", cross: "✗", cscr: "𝒸", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", curlyeqprec: "⋞", cuesc: "⋟", curlyeqsucc: "⋟", cularr: "↶", curvearrowleft: "↶", cularrp: "⤽", cup: "∪", cupbrcap: "⩈", cupcap: "⩆", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curvearrowright: "↷", curarrm: "⤼", curlyvee: "⋎", cuvee: "⋎", curlywedge: "⋏", cuwed: "⋏", curren: "¤", cwint: "∱", cylcty: "⌭", dHar: "⥥", dagger: "†", daleth: "ℸ", dash: "‐", hyphen: "‐", dbkarow: "⤏", rBarr: "⤏", dcaron: "ď", dcy: "д", ddarr: "⇊", downdownarrows: "⇊", ddotseq: "⩷", eDDot: "⩷", deg: "°", delta: "δ", demptyv: "⦱", dfisht: "⥿", dfr: "𝔡", diamondsuit: "♦", diams: "♦", digamma: "ϝ", gammad: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", djcy: "ђ", dlcorn: "⌞", llcorner: "⌞", dlcrop: "⌍", dollar: "$", dopf: "𝕕", doteqdot: "≑", eDot: "≑", dotminus: "∸", minusd: "∸", dotplus: "∔", plusdo: "∔", dotsquare: "⊡", sdotb: "⊡", drcorn: "⌟", lrcorner: "⌟", drcrop: "⌌", dscr: "𝒹", dscy: "ѕ", dsol: "⧶", dstrok: "đ", dtdot: "⋱", dtri: "▿", triangledown: "▿", dwangle: "⦦", dzcy: "џ", dzigrarr: "⟿", eacute: "é", easter: "⩮", ecaron: "ě", ecir: "≖", eqcirc: "≖", ecirc: "ê", ecolon: "≕", eqcolon: "≕", ecy: "э", edot: "ė", efDot: "≒", fallingdotseq: "≒", efr: "𝔢", eg: "⪚", egrave: "è", egs: "⪖", eqslantgtr: "⪖", egsdot: "⪘", el: "⪙", elinters: "⏧", ell: "ℓ", els: "⪕", eqslantless: "⪕", elsdot: "⪗", emacr: "ē", empty: "∅", emptyset: "∅", emptyv: "∅", varnothing: "∅", emsp13: " ", emsp14: " ", emsp: " ", eng: "ŋ", ensp: " ", eogon: "ę", eopf: "𝕖", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", epsilon: "ε", epsiv: "ϵ", straightepsilon: "ϵ", varepsilon: "ϵ", equals: "=", equest: "≟", questeq: "≟", equivDD: "⩸", eqvparsl: "⧥", erDot: "≓", risingdotseq: "≓", erarr: "⥱", escr: "ℯ", eta: "η", eth: "ð", euml: "ë", euro: "€", excl: "!", fcy: "ф", female: "♀", ffilig: "ffi", fflig: "ff", ffllig: "ffl", ffr: "𝔣", filig: "fi", fjlig: "fj", flat: "♭", fllig: "fl", fltns: "▱", fnof: "ƒ", fopf: "𝕗", fork: "⋔", pitchfork: "⋔", forkv: "⫙", fpartint: "⨍", frac12: "½", half: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", sfrown: "⌢", fscr: "𝒻", gEl: "⪌", gtreqqless: "⪌", gacute: "ǵ", gamma: "γ", gap: "⪆", gtrapprox: "⪆", gbreve: "ğ", gcirc: "ĝ", gcy: "г", gdot: "ġ", gescc: "⪩", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", gfr: "𝔤", gimel: "ℷ", gjcy: "ѓ", glE: "⪒", gla: "⪥", glj: "⪤", gnE: "≩", gneqq: "≩", gnap: "⪊", gnapprox: "⪊", gne: "⪈", gneq: "⪈", gnsim: "⋧", gopf: "𝕘", gscr: "ℊ", gsime: "⪎", gsiml: "⪐", gtcc: "⪧", gtcir: "⩺", gtdot: "⋗", gtrdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrarr: "⥸", gvertneqq: "≩︀", gvnE: "≩︀", hardcy: "ъ", harrcir: "⥈", harrw: "↭", leftrightsquigarrow: "↭", hbar: "ℏ", hslash: "ℏ", planck: "ℏ", plankv: "ℏ", hcirc: "ĥ", hearts: "♥", heartsuit: "♥", hellip: "…", mldr: "…", hercon: "⊹", hfr: "𝔥", hksearow: "⤥", searhk: "⤥", hkswarow: "⤦", swarhk: "⤦", hoarr: "⇿", homtht: "∻", hookleftarrow: "↩", larrhk: "↩", hookrightarrow: "↪", rarrhk: "↪", hopf: "𝕙", horbar: "―", hscr: "𝒽", hstrok: "ħ", hybull: "⁃", iacute: "í", icirc: "î", icy: "и", iecy: "е", iexcl: "¡", ifr: "𝔦", igrave: "ì", iiiint: "⨌", qint: "⨌", iiint: "∭", tint: "∭", iinfin: "⧜", iiota: "℩", ijlig: "ij", imacr: "ī", imath: "ı", inodot: "ı", imof: "⊷", imped: "Ƶ", incare: "℅", infin: "∞", infintie: "⧝", intcal: "⊺", intercal: "⊺", intlarhk: "⨗", intprod: "⨼", iprod: "⨼", iocy: "ё", iogon: "į", iopf: "𝕚", iota: "ι", iquest: "¿", iscr: "𝒾", isinE: "⋹", isindot: "⋵", isins: "⋴", isinsv: "⋳", itilde: "ĩ", iukcy: "і", iuml: "ï", jcirc: "ĵ", jcy: "й", jfr: "𝔧", jmath: "ȷ", jopf: "𝕛", jscr: "𝒿", jsercy: "ј", jukcy: "є", kappa: "κ", kappav: "ϰ", varkappa: "ϰ", kcedil: "ķ", kcy: "к", kfr: "𝔨", kgreen: "ĸ", khcy: "х", kjcy: "ќ", kopf: "𝕜", kscr: "𝓀", lAtail: "⤛", lBarr: "⤎", lEg: "⪋", lesseqqgtr: "⪋", lHar: "⥢", lacute: "ĺ", laemptyv: "⦴", lambda: "λ", langd: "⦑", lap: "⪅", lessapprox: "⪅", laquo: "«", larrbfs: "⤟", larrfs: "⤝", larrlp: "↫", looparrowleft: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", leftarrowtail: "↢", lat: "⪫", latail: "⤙", late: "⪭", lates: "⪭︀", lbarr: "⤌", lbbrk: "❲", lbrace: "{", lcub: "{", lbrack: "[", lsqb: "[", lbrke: "⦋", lbrksld: "⦏", lbrkslu: "⦍", lcaron: "ľ", lcedil: "ļ", lcy: "л", ldca: "⤶", ldrdhar: "⥧", ldrushar: "⥋", ldsh: "↲", le: "≤", leq: "≤", leftleftarrows: "⇇", llarr: "⇇", leftthreetimes: "⋋", lthree: "⋋", lescc: "⪨", lesdot: "⩿", lesdoto: "⪁", lesdotor: "⪃", lesg: "⋚︀", lesges: "⪓", lessdot: "⋖", ltdot: "⋖", lfisht: "⥼", lfr: "𝔩", lgE: "⪑", lharul: "⥪", lhblk: "▄", ljcy: "љ", llhard: "⥫", lltri: "◺", lmidot: "ŀ", lmoust: "⎰", lmoustache: "⎰", lnE: "≨", lneqq: "≨", lnap: "⪉", lnapprox: "⪉", lne: "⪇", lneq: "⪇", lnsim: "⋦", loang: "⟬", loarr: "⇽", longmapsto: "⟼", xmap: "⟼", looparrowright: "↬", rarrlp: "↬", lopar: "⦅", lopf: "𝕝", loplus: "⨭", lotimes: "⨴", lowast: "∗", loz: "◊", lozenge: "◊", lpar: "(", lparlt: "⦓", lrhard: "⥭", lrm: "", lrtri: "⊿", lsaquo: "‹", lscr: "𝓁", lsime: "⪍", lsimg: "⪏", lsquor: "‚", sbquo: "‚", lstrok: "ł", ltcc: "⪦", ltcir: "⩹", ltimes: "⋉", ltlarr: "⥶", ltquest: "⩻", ltrPar: "⦖", ltri: "◃", triangleleft: "◃", lurdshar: "⥊", luruhar: "⥦", lvertneqq: "≨︀", lvnE: "≨︀", mDDot: "∺", macr: "¯", strns: "¯", male: "♂", malt: "✠", maltese: "✠", marker: "▮", mcomma: "⨩", mcy: "м", mdash: "—", mfr: "𝔪", mho: "℧", micro: "µ", midcir: "⫰", minus: "−", minusdu: "⨪", mlcp: "⫛", models: "⊧", mopf: "𝕞", mscr: "𝓂", mu: "μ", multimap: "⊸", mumap: "⊸", nGg: "⋙̸", nGt: "≫⃒", nLeftarrow: "⇍", nlArr: "⇍", nLeftrightarrow: "⇎", nhArr: "⇎", nLl: "⋘̸", nLt: "≪⃒", nRightarrow: "⇏", nrArr: "⇏", nVDash: "⊯", nVdash: "⊮", nacute: "ń", nang: "∠⃒", napE: "⩰̸", napid: "≋̸", napos: "ʼn", natur: "♮", natural: "♮", ncap: "⩃", ncaron: "ň", ncedil: "ņ", ncongdot: "⩭̸", ncup: "⩂", ncy: "н", ndash: "–", neArr: "⇗", nearhk: "⤤", nedot: "≐̸", nesear: "⤨", toea: "⤨", nfr: "𝔫", nharr: "↮", nleftrightarrow: "↮", nhpar: "⫲", nis: "⋼", nisd: "⋺", njcy: "њ", nlE: "≦̸", nleqq: "≦̸", nlarr: "↚", nleftarrow: "↚", nldr: "‥", nopf: "𝕟", not: "¬", notinE: "⋹̸", notindot: "⋵̸", notinvb: "⋷", notinvc: "⋶", notnivb: "⋾", notnivc: "⋽", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", nrarr: "↛", nrightarrow: "↛", nrarrc: "⤳̸", nrarrw: "↝̸", nscr: "𝓃", nsub: "⊄", nsubE: "⫅̸", nsubseteqq: "⫅̸", nsup: "⊅", nsupE: "⫆̸", nsupseteqq: "⫆̸", ntilde: "ñ", nu: "ν", num: "#", numero: "№", numsp: " ", nvDash: "⊭", nvHarr: "⤄", nvap: "≍⃒", nvdash: "⊬", nvge: "≥⃒", nvgt: ">⃒", nvinfin: "⧞", nvlArr: "⤂", nvle: "≤⃒", nvlt: "<⃒", nvltrie: "⊴⃒", nvrArr: "⤃", nvrtrie: "⊵⃒", nvsim: "∼⃒", nwArr: "⇖", nwarhk: "⤣", nwnear: "⤧", oacute: "ó", ocirc: "ô", ocy: "о", odblac: "ő", odiv: "⨸", odsold: "⦼", oelig: "œ", ofcir: "⦿", ofr: "𝔬", ogon: "˛", ograve: "ò", ogt: "⧁", ohbar: "⦵", olcir: "⦾", olcross: "⦻", olt: "⧀", omacr: "ō", omega: "ω", omicron: "ο", omid: "⦶", oopf: "𝕠", opar: "⦷", operp: "⦹", or: "∨", vee: "∨", ord: "⩝", order: "ℴ", orderof: "ℴ", oscr: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oslash: "ø", osol: "⊘", otilde: "õ", otimesas: "⨶", ouml: "ö", ovbar: "⌽", para: "¶", parsim: "⫳", parsl: "⫽", pcy: "п", percnt: "%", period: ".", permil: "‰", pertenk: "‱", pfr: "𝔭", phi: "φ", phiv: "ϕ", straightphi: "ϕ", varphi: "ϕ", phone: "☎", pi: "π", piv: "ϖ", varpi: "ϖ", planckh: "ℎ", plus: "+", plusacir: "⨣", pluscir: "⨢", plusdu: "⨥", pluse: "⩲", plussim: "⨦", plustwo: "⨧", pointint: "⨕", popf: "𝕡", pound: "£", prE: "⪳", prap: "⪷", precapprox: "⪷", precnapprox: "⪹", prnap: "⪹", precneqq: "⪵", prnE: "⪵", precnsim: "⋨", prnsim: "⋨", prime: "′", profalar: "⌮", profline: "⌒", profsurf: "⌓", prurel: "⊰", pscr: "𝓅", psi: "ψ", puncsp: " ", qfr: "𝔮", qopf: "𝕢", qprime: "⁗", qscr: "𝓆", quatint: "⨖", quest: "?", rAtail: "⤜", rHar: "⥤", race: "∽̱", racute: "ŕ", raemptyv: "⦳", rangd: "⦒", range: "⦥", raquo: "»", rarrap: "⥵", rarrbfs: "⤠", rarrc: "⤳", rarrfs: "⤞", rarrpl: "⥅", rarrsim: "⥴", rarrtl: "↣", rightarrowtail: "↣", rarrw: "↝", rightsquigarrow: "↝", ratail: "⤚", ratio: "∶", rbbrk: "❳", rbrace: "}", rcub: "}", rbrack: "]", rsqb: "]", rbrke: "⦌", rbrksld: "⦎", rbrkslu: "⦐", rcaron: "ř", rcedil: "ŗ", rcy: "р", rdca: "⤷", rdldhar: "⥩", rdsh: "↳", rect: "▭", rfisht: "⥽", rfr: "𝔯", rharul: "⥬", rho: "ρ", rhov: "ϱ", varrho: "ϱ", rightrightarrows: "⇉", rrarr: "⇉", rightthreetimes: "⋌", rthree: "⋌", ring: "˚", rlm: "", rmoust: "⎱", rmoustache: "⎱", rnmid: "⫮", roang: "⟭", roarr: "⇾", ropar: "⦆", ropf: "𝕣", roplus: "⨮", rotimes: "⨵", rpar: ")", rpargt: "⦔", rppolint: "⨒", rsaquo: "›", rscr: "𝓇", rtimes: "⋊", rtri: "▹", triangleright: "▹", rtriltri: "⧎", ruluhar: "⥨", rx: "℞", sacute: "ś", scE: "⪴", scap: "⪸", succapprox: "⪸", scaron: "š", scedil: "ş", scirc: "ŝ", scnE: "⪶", succneqq: "⪶", scnap: "⪺", succnapprox: "⪺", scnsim: "⋩", succnsim: "⋩", scpolint: "⨓", scy: "с", sdot: "⋅", sdote: "⩦", seArr: "⇘", sect: "§", semi: ";", seswar: "⤩", tosa: "⤩", sext: "✶", sfr: "𝔰", sharp: "♯", shchcy: "щ", shcy: "ш", shy: "", sigma: "σ", sigmaf: "ς", sigmav: "ς", varsigma: "ς", simdot: "⩪", simg: "⪞", simgE: "⪠", siml: "⪝", simlE: "⪟", simne: "≆", simplus: "⨤", simrarr: "⥲", smashp: "⨳", smeparsl: "⧤", smile: "⌣", ssmile: "⌣", smt: "⪪", smte: "⪬", smtes: "⪬︀", softcy: "ь", sol: "/", solb: "⧄", solbar: "⌿", sopf: "𝕤", spades: "♠", spadesuit: "♠", sqcaps: "⊓︀", sqcups: "⊔︀", sscr: "𝓈", star: "☆", sub: "⊂", subset: "⊂", subE: "⫅", subseteqq: "⫅", subdot: "⪽", subedot: "⫃", submult: "⫁", subnE: "⫋", subsetneqq: "⫋", subne: "⊊", subsetneq: "⊊", subplus: "⪿", subrarr: "⥹", subsim: "⫇", subsub: "⫕", subsup: "⫓", sung: "♪", sup1: "¹", sup2: "²", sup3: "³", supE: "⫆", supseteqq: "⫆", supdot: "⪾", supdsub: "⫘", supedot: "⫄", suphsol: "⟉", suphsub: "⫗", suplarr: "⥻", supmult: "⫂", supnE: "⫌", supsetneqq: "⫌", supne: "⊋", supsetneq: "⊋", supplus: "⫀", supsim: "⫈", supsub: "⫔", supsup: "⫖", swArr: "⇙", swnwar: "⤪", szlig: "ß", target: "⌖", tau: "τ", tcaron: "ť", tcedil: "ţ", tcy: "т", telrec: "⌕", tfr: "𝔱", theta: "θ", thetasym: "ϑ", thetav: "ϑ", vartheta: "ϑ", thorn: "þ", times: "×", timesbar: "⨱", timesd: "⨰", topbot: "⌶", topcir: "⫱", topf: "𝕥", topfork: "⫚", tprime: "‴", triangle: "▵", utri: "▵", triangleq: "≜", trie: "≜", tridot: "◬", triminus: "⨺", triplus: "⨹", trisb: "⧍", tritime: "⨻", trpezium: "⏢", tscr: "𝓉", tscy: "ц", tshcy: "ћ", tstrok: "ŧ", uHar: "⥣", uacute: "ú", ubrcy: "ў", ubreve: "ŭ", ucirc: "û", ucy: "у", udblac: "ű", ufisht: "⥾", ufr: "𝔲", ugrave: "ù", uhblk: "▀", ulcorn: "⌜", ulcorner: "⌜", ulcrop: "⌏", ultri: "◸", umacr: "ū", uogon: "ų", uopf: "𝕦", upsi: "υ", upsilon: "υ", upuparrows: "⇈", uuarr: "⇈", urcorn: "⌝", urcorner: "⌝", urcrop: "⌎", uring: "ů", urtri: "◹", uscr: "𝓊", utdot: "⋰", utilde: "ũ", uuml: "ü", uwangle: "⦧", vBar: "⫨", vBarv: "⫩", vangrt: "⦜", varsubsetneq: "⊊︀", vsubne: "⊊︀", varsubsetneqq: "⫋︀", vsubnE: "⫋︀", varsupsetneq: "⊋︀", vsupne: "⊋︀", varsupsetneqq: "⫌︀", vsupnE: "⫌︀", vcy: "в", veebar: "⊻", veeeq: "≚", vellip: "⋮", vfr: "𝔳", vopf: "𝕧", vscr: "𝓋", vzigzag: "⦚", wcirc: "ŵ", wedbar: "⩟", wedgeq: "≙", weierp: "℘", wp: "℘", wfr: "𝔴", wopf: "𝕨", wscr: "𝓌", xfr: "𝔵", xi: "ξ", xnis: "⋻", xopf: "𝕩", xscr: "𝓍", yacute: "ý", yacy: "я", ycirc: "ŷ", ycy: "ы", yen: "¥", yfr: "𝔶", yicy: "ї", yopf: "𝕪", yscr: "𝓎", yucy: "ю", yuml: "ÿ", zacute: "ź", zcaron: "ž", zcy: "з", zdot: "ż", zeta: "ζ", zfr: "𝔷", zhcy: "ж", zigrarr: "⇝", zopf: "𝕫", zscr: "𝓏", zwj: "", zwnj: "" };
|
|
1589
|
+
we.ngsp = "";
|
|
1590
|
+
var Rs = class {
|
|
1591
|
+
constructor(e, t, r) {
|
|
1592
|
+
u(this, "tokens");
|
|
1593
|
+
u(this, "errors");
|
|
1594
|
+
u(this, "nonNormalizedIcuExpressions");
|
|
1595
|
+
this.tokens = e, this.errors = t, this.nonNormalizedIcuExpressions = r;
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
function Us(e, t, r, n = {}) {
|
|
1599
|
+
let a = new js(new an(e, t), r, n);
|
|
1600
|
+
return a.tokenize(), new Rs(Xs(a.tokens), a.errors, a.nonNormalizedIcuExpressions);
|
|
1601
|
+
}
|
|
1602
|
+
var Vs = /\r\n?/g;
|
|
1603
|
+
function O(e) {
|
|
1604
|
+
return `Unexpected character "${e === 0 ? "EOF" : String.fromCharCode(e)}"`;
|
|
1605
|
+
}
|
|
1606
|
+
function er(e) {
|
|
1607
|
+
return `Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`;
|
|
1608
|
+
}
|
|
1609
|
+
function Os(e, t) {
|
|
1610
|
+
return `Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`;
|
|
1611
|
+
}
|
|
1612
|
+
var zs = ["@if", "@else", "@for", "@switch", "@case", "@default", "@empty", "@defer", "@placeholder", "@loading", "@error", "@content"], me = { start: "{{", end: "}}" }, $s = /^default[^\S\r\n]+never/, Ws = /^else[^\S\r\n]+if/, js = class {
|
|
1613
|
+
constructor(e, t, r) {
|
|
1614
|
+
u(this, "_getTagContentType");
|
|
1615
|
+
u(this, "_cursor");
|
|
1616
|
+
u(this, "_tokenizeIcu");
|
|
1617
|
+
u(this, "_leadingTriviaCodePoints");
|
|
1618
|
+
u(this, "_canSelfClose");
|
|
1619
|
+
u(this, "_allowHtmComponentClosingTags");
|
|
1620
|
+
u(this, "_allowStartTagComments");
|
|
1621
|
+
u(this, "_currentTokenStart", null);
|
|
1622
|
+
u(this, "_currentTokenType", null);
|
|
1623
|
+
u(this, "_expansionCaseStack", []);
|
|
1624
|
+
u(this, "_openDirectiveCount", 0);
|
|
1625
|
+
u(this, "_inInterpolation", !1);
|
|
1626
|
+
u(this, "_preserveLineEndings");
|
|
1627
|
+
u(this, "_i18nNormalizeLineEndingsInICUs");
|
|
1628
|
+
u(this, "_fullNameStack", []);
|
|
1629
|
+
u(this, "_tokenizeBlocks");
|
|
1630
|
+
u(this, "_tokenizeLet");
|
|
1631
|
+
u(this, "_selectorlessEnabled");
|
|
1632
|
+
u(this, "tokens", []);
|
|
1633
|
+
u(this, "errors", []);
|
|
1634
|
+
u(this, "nonNormalizedIcuExpressions", []);
|
|
1635
|
+
this._getTagContentType = t, this._tokenizeIcu = r.tokenizeExpansionForms || !1, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((a) => a.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || !1, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || !1, this._allowStartTagComments = r.allowStartTagComments ?? !0;
|
|
1636
|
+
let n = r.range || { endPos: e.content.length, startPos: 0, startLine: 0, startCol: 0 };
|
|
1637
|
+
this._cursor = r.escapedString ? new eo(e, n) : new on(e, n), this._preserveLineEndings = r.preserveLineEndings || !1, this._i18nNormalizeLineEndingsInICUs = r.i18nNormalizeLineEndingsInICUs || !1, this._tokenizeBlocks = r.tokenizeBlocks ?? !0, this._tokenizeLet = r.tokenizeLet ?? !0, this._selectorlessEnabled = r.selectorlessEnabled ?? !1;
|
|
1638
|
+
try {
|
|
1639
|
+
this._cursor.init();
|
|
1640
|
+
} catch (a) {
|
|
1641
|
+
this.handleError(a);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
_processCarriageReturns(e) {
|
|
1645
|
+
return this._preserveLineEndings ? e : e.replace(Vs, `
|
|
1646
|
+
`);
|
|
1647
|
+
}
|
|
1648
|
+
tokenize() {
|
|
1649
|
+
for (; this._cursor.peek() !== 0; ) {
|
|
1650
|
+
let e = this._cursor.clone();
|
|
1651
|
+
try {
|
|
1652
|
+
if (this._attemptCharCode(60)) if (this._attemptCharCode(33)) this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e);
|
|
1653
|
+
else if (this._attemptCharCode(47)) this._consumeTagClose(e);
|
|
1654
|
+
else {
|
|
1655
|
+
let t = this._cursor.clone();
|
|
1656
|
+
this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
|
|
1657
|
+
}
|
|
1658
|
+
else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._isLetStart() ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._isBlockStart() ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(5, 8, () => this._isTextEnd(), () => this._isTagStart());
|
|
1659
|
+
} catch (t) {
|
|
1660
|
+
this.handleError(t);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
this._beginToken(43), this._endToken([]);
|
|
1664
|
+
}
|
|
1665
|
+
_getBlockName() {
|
|
1666
|
+
let e = !1, t = this._cursor.clone();
|
|
1667
|
+
this._attemptCharCodeUntilFn((n) => Oe(n) ? !e : Zs(n) ? (e = !0, !1) : !0);
|
|
1668
|
+
let r = this._cursor.getChars(t).trim();
|
|
1669
|
+
return Ws.test(r) ? r = "else if" : $s.test(r) && (r = "default never"), r;
|
|
1670
|
+
}
|
|
1671
|
+
_consumeBlockStart(e) {
|
|
1672
|
+
this._requireCharCode(64), this._beginToken(26, e);
|
|
1673
|
+
let t = this._endToken([this._getBlockName()]);
|
|
1674
|
+
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(_), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(_);
|
|
1675
|
+
else {
|
|
1676
|
+
t.type = 30;
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
if (t.parts[0] === "default never" && this._attemptCharCode(59)) {
|
|
1680
|
+
this._beginToken(27), this._endToken([]), this._beginToken(28), this._endToken([]);
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
this._attemptCharCode(123) ? (this._beginToken(27), this._endToken([])) : this._isBlockStart() && (t.parts[0] === "case" || t.parts[0] === "default") ? (this._beginToken(27), this._endToken([]), this._beginToken(28), this._endToken([])) : t.type = 30;
|
|
1684
|
+
}
|
|
1685
|
+
_consumeBlockEnd(e) {
|
|
1686
|
+
this._beginToken(28, e), this._endToken([]);
|
|
1687
|
+
}
|
|
1688
|
+
_consumeBlockParameters() {
|
|
1689
|
+
for (this._attemptCharCodeUntilFn(rr); this._cursor.peek() !== 41 && this._cursor.peek() !== 0; ) {
|
|
1690
|
+
this._beginToken(29);
|
|
1691
|
+
let e = this._cursor.clone(), t = null, r = 0;
|
|
1692
|
+
for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null; ) {
|
|
1693
|
+
let n = this._cursor.peek();
|
|
1694
|
+
if (n === 92) this._cursor.advance();
|
|
1695
|
+
else if (n === t) t = null;
|
|
1696
|
+
else if (t === null && nt(n)) t = n;
|
|
1697
|
+
else if (n === 40 && t === null) r++;
|
|
1698
|
+
else if (n === 41 && t === null) {
|
|
1699
|
+
if (r === 0) break;
|
|
1700
|
+
r > 0 && r--;
|
|
1701
|
+
}
|
|
1702
|
+
this._cursor.advance();
|
|
1703
|
+
}
|
|
1704
|
+
this._endToken([this._cursor.getChars(e)]), this._attemptCharCodeUntilFn(rr);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
_consumeLetDeclaration(e) {
|
|
1708
|
+
if (this._requireStr("@let"), this._beginToken(31, e), Oe(this._cursor.peek())) this._attemptCharCodeUntilFn(_);
|
|
1709
|
+
else {
|
|
1710
|
+
let r = this._endToken([this._cursor.getChars(e)]);
|
|
1711
|
+
r.type = 34;
|
|
1712
|
+
return;
|
|
1713
|
+
}
|
|
1714
|
+
let t = this._endToken([this._getLetDeclarationName()]);
|
|
1715
|
+
if (this._attemptCharCodeUntilFn(_), !this._attemptCharCode(61)) {
|
|
1716
|
+
t.type = 34;
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
this._attemptCharCodeUntilFn((r) => _(r) && !Se(r)), this._consumeLetDeclarationValue(), this._cursor.peek() === 59 ? (this._beginToken(33), this._cursor.advance(), this._endToken([])) : (t.type = 34, t.sourceSpan = this._cursor.getSpan(e));
|
|
1720
|
+
}
|
|
1721
|
+
_getLetDeclarationName() {
|
|
1722
|
+
let e = this._cursor.clone(), t = !1;
|
|
1723
|
+
return this._attemptCharCodeUntilFn((r) => be(r) || r === 36 || r === 95 || t && Le(r) ? (t = !0, !1) : !0), this._cursor.getChars(e).trim();
|
|
1724
|
+
}
|
|
1725
|
+
_consumeLetDeclarationValue() {
|
|
1726
|
+
let e = this._cursor.clone();
|
|
1727
|
+
for (this._beginToken(32, e); this._cursor.peek() !== 0; ) {
|
|
1728
|
+
let t = this._cursor.peek();
|
|
1729
|
+
if (t === 59) break;
|
|
1730
|
+
nt(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance();
|
|
1731
|
+
}
|
|
1732
|
+
this._endToken([this._cursor.getChars(e)]);
|
|
1733
|
+
}
|
|
1734
|
+
_tokenizeExpansionForm() {
|
|
1735
|
+
if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0;
|
|
1736
|
+
if (Ys(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0;
|
|
1737
|
+
if (this._cursor.peek() === 125) {
|
|
1738
|
+
if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0;
|
|
1739
|
+
if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0;
|
|
1740
|
+
}
|
|
1741
|
+
return !1;
|
|
1742
|
+
}
|
|
1743
|
+
_beginToken(e, t = this._cursor.clone()) {
|
|
1744
|
+
this._currentTokenStart = t, this._currentTokenType = e;
|
|
1745
|
+
}
|
|
1746
|
+
_endToken(e, t) {
|
|
1747
|
+
if (this._currentTokenStart === null) throw new Q(this._cursor.getSpan(t), "Programming error - attempted to end a token when there was no start to the token");
|
|
1748
|
+
if (this._currentTokenType === null) throw new Q(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
|
|
1749
|
+
let r = { type: this._currentTokenType, parts: e, sourceSpan: (t ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) };
|
|
1750
|
+
return this.tokens.push(r), this._currentTokenStart = null, this._currentTokenType = null, r;
|
|
1751
|
+
}
|
|
1752
|
+
_createError(e, t) {
|
|
1753
|
+
this._isInExpansionForm() && (e += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);
|
|
1754
|
+
let r = new Q(t, e);
|
|
1755
|
+
return this._currentTokenStart = null, this._currentTokenType = null, r;
|
|
1756
|
+
}
|
|
1757
|
+
handleError(e) {
|
|
1758
|
+
if (e instanceof Ft && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof Q) this.errors.push(e);
|
|
1759
|
+
else throw e;
|
|
1760
|
+
}
|
|
1761
|
+
_attemptCharCode(e) {
|
|
1762
|
+
return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1;
|
|
1763
|
+
}
|
|
1764
|
+
_attemptCharCodeCaseInsensitive(e) {
|
|
1765
|
+
return Qs(this._cursor.peek(), e) ? (this._cursor.advance(), !0) : !1;
|
|
1766
|
+
}
|
|
1767
|
+
_requireCharCode(e) {
|
|
1768
|
+
let t = this._cursor.clone();
|
|
1769
|
+
if (!this._attemptCharCode(e)) throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1770
|
+
}
|
|
1771
|
+
_attemptStr(e) {
|
|
1772
|
+
let t = e.length;
|
|
1773
|
+
if (this._cursor.charsLeft() < t) return !1;
|
|
1774
|
+
let r = this._cursor.clone();
|
|
1775
|
+
for (let n = 0; n < t; n++) if (!this._attemptCharCode(e.charCodeAt(n))) return this._cursor = r, !1;
|
|
1776
|
+
return !0;
|
|
1777
|
+
}
|
|
1778
|
+
_attemptStrCaseInsensitive(e) {
|
|
1779
|
+
for (let t = 0; t < e.length; t++) if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t))) return !1;
|
|
1780
|
+
return !0;
|
|
1781
|
+
}
|
|
1782
|
+
_requireStr(e) {
|
|
1783
|
+
let t = this._cursor.clone();
|
|
1784
|
+
if (!this._attemptStr(e)) throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1785
|
+
}
|
|
1786
|
+
_requireStrCaseInsensitive(e) {
|
|
1787
|
+
let t = this._cursor.clone();
|
|
1788
|
+
if (!this._attemptStrCaseInsensitive(e)) throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(t));
|
|
1789
|
+
}
|
|
1790
|
+
_attemptCharCodeUntilFn(e) {
|
|
1791
|
+
for (; !e(this._cursor.peek()); ) this._cursor.advance();
|
|
1792
|
+
}
|
|
1793
|
+
_requireCharCodeUntilFn(e, t) {
|
|
1794
|
+
let r = this._cursor.clone();
|
|
1795
|
+
if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(r));
|
|
1796
|
+
}
|
|
1797
|
+
_attemptUntilChar(e) {
|
|
1798
|
+
for (; this._cursor.peek() !== e; ) this._cursor.advance();
|
|
1799
|
+
}
|
|
1800
|
+
_readChar() {
|
|
1801
|
+
let e = String.fromCodePoint(this._cursor.peek());
|
|
1802
|
+
return this._cursor.advance(), e;
|
|
1803
|
+
}
|
|
1804
|
+
_peekStr(e) {
|
|
1805
|
+
let t = e.length;
|
|
1806
|
+
if (this._cursor.charsLeft() < t) return !1;
|
|
1807
|
+
let r = this._cursor.clone();
|
|
1808
|
+
for (let n = 0; n < t; n++) {
|
|
1809
|
+
if (r.peek() !== e.charCodeAt(n)) return !1;
|
|
1810
|
+
r.advance();
|
|
1811
|
+
}
|
|
1812
|
+
return !0;
|
|
1813
|
+
}
|
|
1814
|
+
_isBlockStart() {
|
|
1815
|
+
return this._cursor.peek() === 64 && zs.some((e) => this._peekStr(e));
|
|
1816
|
+
}
|
|
1817
|
+
_isLetStart() {
|
|
1818
|
+
return this._cursor.peek() === 64 && this._peekStr("@let");
|
|
1819
|
+
}
|
|
1820
|
+
_consumeEntity(e) {
|
|
1821
|
+
this._beginToken(9);
|
|
1822
|
+
let t = this._cursor.clone();
|
|
1823
|
+
if (this._cursor.advance(), this._attemptCharCode(35)) {
|
|
1824
|
+
let r = this._attemptCharCode(120) || this._attemptCharCode(88), n = this._cursor.clone();
|
|
1825
|
+
if (this._attemptCharCodeUntilFn(Ks), this._cursor.peek() != 59) {
|
|
1826
|
+
this._cursor.advance();
|
|
1827
|
+
let i = r ? "hexadecimal" : "decimal";
|
|
1828
|
+
throw this._createError(Os(i, this._cursor.getChars(t)), this._cursor.getSpan());
|
|
1829
|
+
}
|
|
1830
|
+
let a = this._cursor.getChars(n);
|
|
1831
|
+
this._cursor.advance();
|
|
1832
|
+
try {
|
|
1833
|
+
let i = parseInt(a, r ? 16 : 10);
|
|
1834
|
+
this._endToken([String.fromCodePoint(i), this._cursor.getChars(t)]);
|
|
1835
|
+
} catch {
|
|
1836
|
+
throw this._createError(er(this._cursor.getChars(t)), this._cursor.getSpan());
|
|
1837
|
+
}
|
|
1838
|
+
} else {
|
|
1839
|
+
let r = this._cursor.clone();
|
|
1840
|
+
if (this._attemptCharCodeUntilFn(Js), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
|
|
1841
|
+
else {
|
|
1842
|
+
let n = this._cursor.getChars(r);
|
|
1843
|
+
this._cursor.advance();
|
|
1844
|
+
let a = we.hasOwnProperty(n) && we[n];
|
|
1845
|
+
if (!a) throw this._createError(er(n), this._cursor.getSpan(t));
|
|
1846
|
+
this._endToken([a, `&${n};`]);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
_consumeRawText(e, t) {
|
|
1851
|
+
this._beginToken(e ? 6 : 7);
|
|
1852
|
+
let r = [];
|
|
1853
|
+
for (; ; ) {
|
|
1854
|
+
let n = this._cursor.clone(), a = t();
|
|
1855
|
+
if (this._cursor = n, a) break;
|
|
1856
|
+
e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(6), this._beginToken(6)) : r.push(this._readChar());
|
|
1857
|
+
}
|
|
1858
|
+
this._endToken([this._processCarriageReturns(r.join(""))]);
|
|
1859
|
+
}
|
|
1860
|
+
_consumeComment(e) {
|
|
1861
|
+
this._beginToken(10, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("-->")), this._beginToken(11), this._requireStr("-->"), this._endToken([]);
|
|
1862
|
+
}
|
|
1863
|
+
_consumeBogusComment(e) {
|
|
1864
|
+
this._beginToken(10, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(11), this._cursor.advance(), this._endToken([]);
|
|
1865
|
+
}
|
|
1866
|
+
_consumeCdata(e) {
|
|
1867
|
+
this._beginToken(13, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("]]>")), this._beginToken(14), this._requireStr("]]>"), this._endToken([]);
|
|
1868
|
+
}
|
|
1869
|
+
_consumeDocType(e) {
|
|
1870
|
+
this._beginToken(19, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(20), this._cursor.advance(), this._endToken([]);
|
|
1871
|
+
}
|
|
1872
|
+
_consumePrefixAndName(e) {
|
|
1873
|
+
let t = this._cursor.clone(), r = "";
|
|
1874
|
+
for (; this._cursor.peek() !== 58 && !Gs(this._cursor.peek()); ) this._cursor.advance();
|
|
1875
|
+
let n;
|
|
1876
|
+
this._cursor.peek() === 58 ? (r = this._cursor.getChars(t), this._cursor.advance(), n = this._cursor.clone()) : n = t, this._requireCharCodeUntilFn(e, r === "" ? 0 : 1);
|
|
1877
|
+
let a = this._cursor.getChars(n);
|
|
1878
|
+
return [r, a];
|
|
1879
|
+
}
|
|
1880
|
+
_consumeSingleLineComment(e) {
|
|
1881
|
+
let t = this._cursor.clone();
|
|
1882
|
+
this._attemptCharCodeUntilFn((a) => Se(a) || a === 0);
|
|
1883
|
+
let r = this._cursor.clone(), n = r.getChars(t);
|
|
1884
|
+
this._beginToken(12, e), this._endToken([n, "single"], r), this._attemptCharCodeUntilFn(_);
|
|
1885
|
+
}
|
|
1886
|
+
_consumeMultiLineComment(e) {
|
|
1887
|
+
let t = this._cursor.clone();
|
|
1888
|
+
this._attemptCharCodeUntilFn((i) => {
|
|
1889
|
+
if (i === 0) return !0;
|
|
1890
|
+
if (i === 42) {
|
|
1891
|
+
let s = this._cursor.clone();
|
|
1892
|
+
return s.advance(), s.peek() === 47;
|
|
1893
|
+
}
|
|
1894
|
+
return !1;
|
|
1895
|
+
});
|
|
1896
|
+
let r = this._cursor.clone(), n = r.getChars(t), a = r;
|
|
1897
|
+
this._attemptStr("*/") && (a = this._cursor.clone(), this._attemptCharCodeUntilFn(_)), this._beginToken(12, e), this._endToken([n, "multi"], a);
|
|
1898
|
+
}
|
|
1899
|
+
_consumeTagOpen(e) {
|
|
1900
|
+
let t, r, n, a, i = [];
|
|
1901
|
+
try {
|
|
1902
|
+
if (this._selectorlessEnabled && He(this._cursor.peek())) a = this._consumeComponentOpenStart(e), [n, r, t] = a.parts, r && (n += `:${r}`), t && (n += `:${t}`), this._attemptCharCodeUntilFn(_);
|
|
1903
|
+
else {
|
|
1904
|
+
if (!be(this._cursor.peek())) throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(e));
|
|
1905
|
+
a = this._consumeTagOpenStart(e), r = a.parts[0], t = n = a.parts[1], this._attemptCharCodeUntilFn(_);
|
|
1906
|
+
}
|
|
1907
|
+
for (; ; ) {
|
|
1908
|
+
if (this._allowStartTagComments) {
|
|
1909
|
+
let o = this._cursor.clone();
|
|
1910
|
+
if (this._attemptStr("//")) {
|
|
1911
|
+
this._consumeSingleLineComment(o);
|
|
1912
|
+
continue;
|
|
1913
|
+
}
|
|
1914
|
+
if (this._attemptStr("/*")) {
|
|
1915
|
+
this._consumeMultiLineComment(o);
|
|
1916
|
+
continue;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
if (ar(this._cursor.peek())) break;
|
|
1920
|
+
if (this._selectorlessEnabled && this._cursor.peek() === 64) {
|
|
1921
|
+
let o = this._cursor.clone(), l = o.clone();
|
|
1922
|
+
l.advance(), He(l.peek()) && this._consumeDirective(o, l);
|
|
1923
|
+
} else {
|
|
1924
|
+
let o = this._consumeAttribute();
|
|
1925
|
+
i.push(o);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
a.type === 35 ? this._consumeComponentOpenEnd() : this._consumeTagOpenEnd();
|
|
1929
|
+
} catch (o) {
|
|
1930
|
+
if (o instanceof Q) {
|
|
1931
|
+
a ? a.type = a.type === 35 ? 39 : 4 : (this._beginToken(5, e), this._endToken(["<"]));
|
|
1932
|
+
return;
|
|
1933
|
+
}
|
|
1934
|
+
throw o;
|
|
1935
|
+
}
|
|
1936
|
+
if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2) return;
|
|
1937
|
+
let s = this._getTagContentType(t, r, this._fullNameStack.length > 0, i);
|
|
1938
|
+
this._handleFullNameStackForTagOpen(r, t), s === 0 ? this._consumeRawTextWithTagClose(r, a, n, !1) : s === 1 && this._consumeRawTextWithTagClose(r, a, n, !0);
|
|
1939
|
+
}
|
|
1940
|
+
_consumeRawTextWithTagClose(e, t, r, n) {
|
|
1941
|
+
this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(_), !this._attemptStrCaseInsensitive(e && t.type !== 35 ? `${e}:${r}` : r)) ? !1 : (this._attemptCharCodeUntilFn(_), this._attemptCharCode(62))), this._beginToken(t.type === 35 ? 38 : 3), this._requireCharCodeUntilFn((a) => a === 62, 3), this._cursor.advance(), this._endToken(t.parts), this._handleFullNameStackForTagClose(e, r);
|
|
1942
|
+
}
|
|
1943
|
+
_consumeTagOpenStart(e) {
|
|
1944
|
+
this._beginToken(0, e);
|
|
1945
|
+
let t = this._consumePrefixAndName(z);
|
|
1946
|
+
return this._endToken(t);
|
|
1947
|
+
}
|
|
1948
|
+
_consumeComponentOpenStart(e) {
|
|
1949
|
+
this._beginToken(35, e);
|
|
1950
|
+
let t = this._consumeComponentName();
|
|
1951
|
+
return this._endToken(t);
|
|
1952
|
+
}
|
|
1953
|
+
_consumeComponentName() {
|
|
1954
|
+
let e = this._cursor.clone();
|
|
1955
|
+
for (; nr(this._cursor.peek()); ) this._cursor.advance();
|
|
1956
|
+
let t = this._cursor.getChars(e), r = "", n = "";
|
|
1957
|
+
return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(z)), [t, r, n];
|
|
1958
|
+
}
|
|
1959
|
+
_consumeAttribute() {
|
|
1960
|
+
let [e, t] = this._consumeAttributeName(), r;
|
|
1961
|
+
return this._attemptCharCodeUntilFn(_), this._attemptCharCode(61) && (this._attemptCharCodeUntilFn(_), r = this._consumeAttributeValue()), this._attemptCharCodeUntilFn(_), { prefix: e, name: t, value: r };
|
|
1962
|
+
}
|
|
1963
|
+
_consumeAttributeName() {
|
|
1964
|
+
let e = this._cursor.peek();
|
|
1965
|
+
if (e === 39 || e === 34) throw this._createError(O(e), this._cursor.getSpan());
|
|
1966
|
+
this._beginToken(15);
|
|
1967
|
+
let t;
|
|
1968
|
+
if (this._openDirectiveCount > 0) {
|
|
1969
|
+
let n = 0;
|
|
1970
|
+
t = (a) => {
|
|
1971
|
+
if (this._openDirectiveCount > 0) {
|
|
1972
|
+
if (a === 40) n++;
|
|
1973
|
+
else if (a === 41) {
|
|
1974
|
+
if (n === 0) return !0;
|
|
1975
|
+
n--;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
return z(a);
|
|
1979
|
+
};
|
|
1980
|
+
} else if (e === 91) {
|
|
1981
|
+
let n = 0;
|
|
1982
|
+
t = (a) => (a === 91 ? n++ : a === 93 && n--, n <= 0 ? z(a) : Se(a));
|
|
1983
|
+
} else t = z;
|
|
1984
|
+
let r = this._consumePrefixAndName(t);
|
|
1985
|
+
return this._endToken(r), r;
|
|
1986
|
+
}
|
|
1987
|
+
_consumeAttributeValue() {
|
|
1988
|
+
let e;
|
|
1989
|
+
if (this._cursor.peek() === 39 || this._cursor.peek() === 34) {
|
|
1990
|
+
let t = this._cursor.peek();
|
|
1991
|
+
this._consumeQuote(t);
|
|
1992
|
+
let r = () => this._cursor.peek() === t;
|
|
1993
|
+
e = this._consumeWithInterpolation(17, 18, r, r), this._consumeQuote(t);
|
|
1994
|
+
} else {
|
|
1995
|
+
let t = () => z(this._cursor.peek());
|
|
1996
|
+
e = this._consumeWithInterpolation(17, 18, t, t);
|
|
1997
|
+
}
|
|
1998
|
+
return e;
|
|
1999
|
+
}
|
|
2000
|
+
_consumeQuote(e) {
|
|
2001
|
+
this._beginToken(16), this._requireCharCode(e), this._endToken([String.fromCodePoint(e)]);
|
|
2002
|
+
}
|
|
2003
|
+
_consumeTagOpenEnd() {
|
|
2004
|
+
let e = this._attemptCharCode(47) ? 2 : 1;
|
|
2005
|
+
this._beginToken(e), this._requireCharCode(62), this._endToken([]);
|
|
2006
|
+
}
|
|
2007
|
+
_consumeComponentOpenEnd() {
|
|
2008
|
+
let e = this._attemptCharCode(47) ? 37 : 36;
|
|
2009
|
+
this._beginToken(e), this._requireCharCode(62), this._endToken([]);
|
|
2010
|
+
}
|
|
2011
|
+
_consumeTagClose(e) {
|
|
2012
|
+
if (this._selectorlessEnabled) {
|
|
2013
|
+
let t = e.clone();
|
|
2014
|
+
for (; t.peek() !== 62 && !He(t.peek()); ) t.advance();
|
|
2015
|
+
if (He(t.peek())) {
|
|
2016
|
+
this._beginToken(38, e);
|
|
2017
|
+
let r = this._consumeComponentName();
|
|
2018
|
+
this._attemptCharCodeUntilFn(_), this._requireCharCode(62), this._endToken(r);
|
|
2019
|
+
return;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
if (this._beginToken(3, e), this._attemptCharCodeUntilFn(_), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(_), this._requireCharCode(62), this._endToken([]);
|
|
2023
|
+
else {
|
|
2024
|
+
let [t, r] = this._consumePrefixAndName(z);
|
|
2025
|
+
this._attemptCharCodeUntilFn(_), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
_consumeExpansionFormStart() {
|
|
2029
|
+
this._beginToken(21), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(21), this._beginToken(7);
|
|
2030
|
+
let e = this._readUntil(44), t = this._processCarriageReturns(e);
|
|
2031
|
+
if (this._i18nNormalizeLineEndingsInICUs) this._endToken([t]);
|
|
2032
|
+
else {
|
|
2033
|
+
let n = this._endToken([e]);
|
|
2034
|
+
t !== e && this.nonNormalizedIcuExpressions.push(n);
|
|
2035
|
+
}
|
|
2036
|
+
this._requireCharCode(44), this._attemptCharCodeUntilFn(_), this._beginToken(7);
|
|
2037
|
+
let r = this._readUntil(44);
|
|
2038
|
+
this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(_);
|
|
2039
|
+
}
|
|
2040
|
+
_consumeExpansionCaseStart() {
|
|
2041
|
+
this._beginToken(22);
|
|
2042
|
+
let e = this._readUntil(123).trim();
|
|
2043
|
+
this._endToken([e]), this._attemptCharCodeUntilFn(_), this._beginToken(23), this._requireCharCode(123), this._endToken([]), this._attemptCharCodeUntilFn(_), this._expansionCaseStack.push(23);
|
|
2044
|
+
}
|
|
2045
|
+
_consumeExpansionCaseEnd() {
|
|
2046
|
+
this._beginToken(24), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(_), this._expansionCaseStack.pop();
|
|
2047
|
+
}
|
|
2048
|
+
_consumeExpansionFormEnd() {
|
|
2049
|
+
this._beginToken(25), this._requireCharCode(125), this._endToken([]), this._expansionCaseStack.pop();
|
|
2050
|
+
}
|
|
2051
|
+
_consumeWithInterpolation(e, t, r, n) {
|
|
2052
|
+
this._beginToken(e);
|
|
2053
|
+
let a = [];
|
|
2054
|
+
for (; !r(); ) {
|
|
2055
|
+
let s = this._cursor.clone();
|
|
2056
|
+
this._attemptStr(me.start) ? (this._endToken([this._processCarriageReturns(a.join(""))], s), a.length = 0, this._consumeInterpolation(t, s, n), this._beginToken(e)) : this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(a.join(""))]), a.length = 0, this._consumeEntity(e), this._beginToken(e)) : a.push(this._readChar());
|
|
2057
|
+
}
|
|
2058
|
+
this._inInterpolation = !1;
|
|
2059
|
+
let i = this._processCarriageReturns(a.join(""));
|
|
2060
|
+
return this._endToken([i]), i;
|
|
2061
|
+
}
|
|
2062
|
+
_consumeInterpolation(e, t, r) {
|
|
2063
|
+
let n = [];
|
|
2064
|
+
this._beginToken(e, t), n.push(me.start);
|
|
2065
|
+
let a = this._cursor.clone(), i = null, s = !1;
|
|
2066
|
+
for (; this._cursor.peek() !== 0 && (r === null || !r()); ) {
|
|
2067
|
+
let o = this._cursor.clone();
|
|
2068
|
+
if (this._isTagStart()) {
|
|
2069
|
+
this._cursor = o, n.push(this._getProcessedChars(a, o)), this._endToken(n);
|
|
2070
|
+
return;
|
|
2071
|
+
}
|
|
2072
|
+
if (i === null) if (this._attemptStr(me.end)) {
|
|
2073
|
+
n.push(this._getProcessedChars(a, o)), n.push(me.end), this._endToken(n);
|
|
2074
|
+
return;
|
|
2075
|
+
} else this._attemptStr("//") && (s = !0);
|
|
2076
|
+
let l = this._cursor.peek();
|
|
2077
|
+
this._cursor.advance(), l === 92 ? this._cursor.advance() : l === i ? i = null : !s && i === null && nt(l) && (i = l);
|
|
2078
|
+
}
|
|
2079
|
+
n.push(this._getProcessedChars(a, this._cursor)), this._endToken(n);
|
|
2080
|
+
}
|
|
2081
|
+
_consumeDirective(e, t) {
|
|
2082
|
+
for (this._requireCharCode(64), this._cursor.advance(); nr(this._cursor.peek()); ) this._cursor.advance();
|
|
2083
|
+
this._beginToken(40, e);
|
|
2084
|
+
let r = this._cursor.getChars(t);
|
|
2085
|
+
if (this._endToken([r]), this._attemptCharCodeUntilFn(_), this._cursor.peek() === 40) {
|
|
2086
|
+
for (this._openDirectiveCount++, this._beginToken(41), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(_); !ar(this._cursor.peek()) && this._cursor.peek() !== 41; ) this._consumeAttribute();
|
|
2087
|
+
if (this._attemptCharCodeUntilFn(_), this._openDirectiveCount--, this._cursor.peek() !== 41) {
|
|
2088
|
+
if (this._cursor.peek() === 62 || this._cursor.peek() === 47) return;
|
|
2089
|
+
throw this._createError(O(this._cursor.peek()), this._cursor.getSpan(e));
|
|
2090
|
+
}
|
|
2091
|
+
this._beginToken(42), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(_);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
_getProcessedChars(e, t) {
|
|
2095
|
+
return this._processCarriageReturns(t.getChars(e));
|
|
2096
|
+
}
|
|
2097
|
+
_isTextEnd() {
|
|
2098
|
+
return !!(this._isTagStart() || this._cursor.peek() === 0 || this._tokenizeIcu && !this._inInterpolation && (this.isExpansionFormStart() || this._cursor.peek() === 125 && this._isInExpansionCase()) || this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._isBlockStart() || this._isLetStart() || this._cursor.peek() === 125));
|
|
2099
|
+
}
|
|
2100
|
+
_isTagStart() {
|
|
2101
|
+
if (this._cursor.peek() === 60) {
|
|
2102
|
+
let e = this._cursor.clone();
|
|
2103
|
+
e.advance();
|
|
2104
|
+
let t = e.peek();
|
|
2105
|
+
if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33) return !0;
|
|
2106
|
+
}
|
|
2107
|
+
return !1;
|
|
2108
|
+
}
|
|
2109
|
+
_readUntil(e) {
|
|
2110
|
+
let t = this._cursor.clone();
|
|
2111
|
+
return this._attemptUntilChar(e), this._cursor.getChars(t);
|
|
2112
|
+
}
|
|
2113
|
+
_isInExpansion() {
|
|
2114
|
+
return this._isInExpansionCase() || this._isInExpansionForm();
|
|
2115
|
+
}
|
|
2116
|
+
_isInExpansionCase() {
|
|
2117
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 23;
|
|
2118
|
+
}
|
|
2119
|
+
_isInExpansionForm() {
|
|
2120
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 21;
|
|
2121
|
+
}
|
|
2122
|
+
isExpansionFormStart() {
|
|
2123
|
+
if (this._cursor.peek() !== 123) return !1;
|
|
2124
|
+
let e = this._cursor.clone(), t = this._attemptStr(me.start);
|
|
2125
|
+
return this._cursor = e, !t;
|
|
2126
|
+
}
|
|
2127
|
+
_handleFullNameStackForTagOpen(e, t) {
|
|
2128
|
+
let r = _e(e, t);
|
|
2129
|
+
(this._fullNameStack.length === 0 || this._fullNameStack[this._fullNameStack.length - 1] === r) && this._fullNameStack.push(r);
|
|
2130
|
+
}
|
|
2131
|
+
_handleFullNameStackForTagClose(e, t) {
|
|
2132
|
+
let r = _e(e, t);
|
|
2133
|
+
this._fullNameStack.length !== 0 && this._fullNameStack[this._fullNameStack.length - 1] === r && this._fullNameStack.pop();
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
function _(e) {
|
|
2137
|
+
return !Oe(e) || e === 0;
|
|
2138
|
+
}
|
|
2139
|
+
function z(e) {
|
|
2140
|
+
return Oe(e) || e === 62 || e === 60 || e === 47 || e === 39 || e === 34 || e === 61 || e === 0;
|
|
2141
|
+
}
|
|
2142
|
+
function Gs(e) {
|
|
2143
|
+
return (e < 97 || 122 < e) && (e < 65 || 90 < e) && (e < 48 || e > 57);
|
|
2144
|
+
}
|
|
2145
|
+
function Ks(e) {
|
|
2146
|
+
return e === 59 || e === 0 || !Hs(e);
|
|
2147
|
+
}
|
|
2148
|
+
function Js(e) {
|
|
2149
|
+
return e === 59 || e === 0 || !(be(e) || Le(e));
|
|
2150
|
+
}
|
|
2151
|
+
function Ys(e) {
|
|
2152
|
+
return e !== 125;
|
|
2153
|
+
}
|
|
2154
|
+
function Qs(e, t) {
|
|
2155
|
+
return tr(e) === tr(t);
|
|
2156
|
+
}
|
|
2157
|
+
function tr(e) {
|
|
2158
|
+
return e >= 97 && e <= 122 ? e - 97 + 65 : e;
|
|
2159
|
+
}
|
|
2160
|
+
function Zs(e) {
|
|
2161
|
+
return be(e) || Le(e) || e === 95;
|
|
2162
|
+
}
|
|
2163
|
+
function rr(e) {
|
|
2164
|
+
return e !== 59 && _(e);
|
|
2165
|
+
}
|
|
2166
|
+
function He(e) {
|
|
2167
|
+
return e === 95 || e >= 65 && e <= 90;
|
|
2168
|
+
}
|
|
2169
|
+
function nr(e) {
|
|
2170
|
+
return be(e) || Le(e) || e === 95;
|
|
2171
|
+
}
|
|
2172
|
+
function ar(e) {
|
|
2173
|
+
return e === 47 || e === 62 || e === 60 || e === 0;
|
|
2174
|
+
}
|
|
2175
|
+
function Xs(e) {
|
|
2176
|
+
let t = [], r;
|
|
2177
|
+
for (let n = 0; n < e.length; n++) {
|
|
2178
|
+
let a = e[n];
|
|
2179
|
+
r && r.type === 5 && a.type === 5 || r && r.type === 17 && a.type === 17 ? (r.parts[0] += a.parts[0], r.sourceSpan.end = a.sourceSpan.end) : (r = a, t.push(r));
|
|
2180
|
+
}
|
|
2181
|
+
return t;
|
|
2182
|
+
}
|
|
2183
|
+
var on = class pt {
|
|
2184
|
+
constructor(t, r) {
|
|
2185
|
+
u(this, "state");
|
|
2186
|
+
u(this, "file");
|
|
2187
|
+
u(this, "input");
|
|
2188
|
+
u(this, "end");
|
|
2189
|
+
if (t instanceof pt) {
|
|
2190
|
+
this.file = t.file, this.input = t.input, this.end = t.end;
|
|
2191
|
+
let n = t.state;
|
|
2192
|
+
this.state = { peek: n.peek, offset: n.offset, line: n.line, column: n.column };
|
|
2193
|
+
} else {
|
|
2194
|
+
if (!r) throw new Error("Programming error: the range argument must be provided with a file argument.");
|
|
2195
|
+
this.file = t, this.input = t.content, this.end = r.endPos, this.state = { peek: -1, offset: r.startPos, line: r.startLine, column: r.startCol };
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
clone() {
|
|
2199
|
+
return new pt(this);
|
|
2200
|
+
}
|
|
2201
|
+
peek() {
|
|
2202
|
+
return this.state.peek;
|
|
2203
|
+
}
|
|
2204
|
+
charsLeft() {
|
|
2205
|
+
return this.end - this.state.offset;
|
|
2206
|
+
}
|
|
2207
|
+
diff(t) {
|
|
2208
|
+
return this.state.offset - t.state.offset;
|
|
2209
|
+
}
|
|
2210
|
+
advance() {
|
|
2211
|
+
this.advanceState(this.state);
|
|
2212
|
+
}
|
|
2213
|
+
init() {
|
|
2214
|
+
this.updatePeek(this.state);
|
|
2215
|
+
}
|
|
2216
|
+
getSpan(t, r) {
|
|
2217
|
+
t = t || this;
|
|
2218
|
+
let n = t;
|
|
2219
|
+
if (r) for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; ) n === t && (t = t.clone()), t.advance();
|
|
2220
|
+
let a = this.locationFromCursor(t);
|
|
2221
|
+
return new d(a, this.locationFromCursor(this), n !== t ? this.locationFromCursor(n) : a);
|
|
2222
|
+
}
|
|
2223
|
+
getChars(t) {
|
|
2224
|
+
return this.input.substring(t.state.offset, this.state.offset);
|
|
2225
|
+
}
|
|
2226
|
+
charAt(t) {
|
|
2227
|
+
return this.input.charCodeAt(t);
|
|
2228
|
+
}
|
|
2229
|
+
advanceState(t) {
|
|
2230
|
+
if (t.offset >= this.end) throw this.state = t, new Ft('Unexpected character "EOF"', this);
|
|
2231
|
+
let r = this.charAt(t.offset);
|
|
2232
|
+
r === 10 ? (t.line++, t.column = 0) : Se(r) || t.column++, t.offset++, this.updatePeek(t);
|
|
2233
|
+
}
|
|
2234
|
+
updatePeek(t) {
|
|
2235
|
+
t.peek = t.offset >= this.end ? 0 : this.charAt(t.offset);
|
|
2236
|
+
}
|
|
2237
|
+
locationFromCursor(t) {
|
|
2238
|
+
return new ct(t.file, t.state.offset, t.state.line, t.state.column);
|
|
2239
|
+
}
|
|
2240
|
+
}, eo = class ht extends on {
|
|
2241
|
+
constructor(r, n) {
|
|
2242
|
+
var t = (...Fu) => (super(...Fu), u(this, "internalState"), this);
|
|
2243
|
+
r instanceof ht ? (t(r), this.internalState = { ...r.internalState }) : (t(r, n), this.internalState = this.state);
|
|
2244
|
+
}
|
|
2245
|
+
advance() {
|
|
2246
|
+
this.state = this.internalState, super.advance(), this.processEscapeSequence();
|
|
2247
|
+
}
|
|
2248
|
+
init() {
|
|
2249
|
+
super.init(), this.processEscapeSequence();
|
|
2250
|
+
}
|
|
2251
|
+
clone() {
|
|
2252
|
+
return new ht(this);
|
|
2253
|
+
}
|
|
2254
|
+
getChars(r) {
|
|
2255
|
+
let n = r.clone(), a = "";
|
|
2256
|
+
for (; n.internalState.offset < this.internalState.offset; ) a += String.fromCodePoint(n.peek()), n.advance();
|
|
2257
|
+
return a;
|
|
2258
|
+
}
|
|
2259
|
+
processEscapeSequence() {
|
|
2260
|
+
let r = () => this.internalState.peek;
|
|
2261
|
+
if (r() === 92) if (this.internalState = { ...this.state }, this.advanceState(this.internalState), r() === 110) this.state.peek = 10;
|
|
2262
|
+
else if (r() === 114) this.state.peek = 13;
|
|
2263
|
+
else if (r() === 118) this.state.peek = 11;
|
|
2264
|
+
else if (r() === 116) this.state.peek = 9;
|
|
2265
|
+
else if (r() === 98) this.state.peek = 8;
|
|
2266
|
+
else if (r() === 102) this.state.peek = 12;
|
|
2267
|
+
else if (r() === 117) if (this.advanceState(this.internalState), r() === 123) {
|
|
2268
|
+
this.advanceState(this.internalState);
|
|
2269
|
+
let n = this.clone(), a = 0;
|
|
2270
|
+
for (; r() !== 125; ) this.advanceState(this.internalState), a++;
|
|
2271
|
+
this.state.peek = this.decodeHexDigits(n, a);
|
|
2272
|
+
} else {
|
|
2273
|
+
let n = this.clone();
|
|
2274
|
+
this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(n, 4);
|
|
2275
|
+
}
|
|
2276
|
+
else if (r() === 120) {
|
|
2277
|
+
this.advanceState(this.internalState);
|
|
2278
|
+
let n = this.clone();
|
|
2279
|
+
this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(n, 2);
|
|
2280
|
+
} else if (Xt(r())) {
|
|
2281
|
+
let n = "", a = 0, i = this.clone();
|
|
2282
|
+
for (; Xt(r()) && a < 3; ) i = this.clone(), n += String.fromCodePoint(r()), this.advanceState(this.internalState), a++;
|
|
2283
|
+
this.state.peek = parseInt(n, 8), this.internalState = i.internalState;
|
|
2284
|
+
} else Se(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
|
|
2285
|
+
}
|
|
2286
|
+
decodeHexDigits(r, n) {
|
|
2287
|
+
let a = this.input.slice(r.internalState.offset, r.internalState.offset + n), i = parseInt(a, 16);
|
|
2288
|
+
if (isNaN(i)) throw r.state = r.internalState, new Ft("Invalid hexadecimal escape sequence", r);
|
|
2289
|
+
return i;
|
|
2290
|
+
}
|
|
2291
|
+
}, Ft = class extends Error {
|
|
2292
|
+
constructor(t, r) {
|
|
2293
|
+
super(t);
|
|
2294
|
+
u(this, "msg");
|
|
2295
|
+
u(this, "cursor");
|
|
2296
|
+
this.msg = t, this.cursor = r, Object.setPrototypeOf(this, new.target.prototype);
|
|
2297
|
+
}
|
|
2298
|
+
}, w = class un extends Q {
|
|
2299
|
+
constructor(r, n, a) {
|
|
2300
|
+
super(n, a);
|
|
2301
|
+
u(this, "elementName");
|
|
2302
|
+
this.elementName = r;
|
|
2303
|
+
}
|
|
2304
|
+
static create(r, n, a) {
|
|
2305
|
+
return new un(r, n, a);
|
|
2306
|
+
}
|
|
2307
|
+
}, to = class {
|
|
2308
|
+
constructor(e, t) {
|
|
2309
|
+
u(this, "rootNodes");
|
|
2310
|
+
u(this, "errors");
|
|
2311
|
+
this.rootNodes = e, this.errors = t;
|
|
2312
|
+
}
|
|
2313
|
+
}, ro = class {
|
|
2314
|
+
constructor(e) {
|
|
2315
|
+
u(this, "getTagDefinition");
|
|
2316
|
+
this.getTagDefinition = e;
|
|
2317
|
+
}
|
|
2318
|
+
parse(e, t, r, n = !1, a) {
|
|
2319
|
+
let i = (h) => (C, ...f) => h(C.toLowerCase(), ...f), s = n ? this.getTagDefinition : i(this.getTagDefinition), o = (h) => s(h).getContentType(), l = n ? a : i(a), c = Us(e, t, a ? (h, C, f, S) => {
|
|
2320
|
+
let q = l(h, C, f, S);
|
|
2321
|
+
return q !== void 0 ? q : o(h);
|
|
2322
|
+
} : o, r), p = r && r.canSelfClose || !1, v = r && r.allowHtmComponentClosingTags || !1, g = new no(c.tokens, s, p, v, n);
|
|
2323
|
+
return g.build(), new to(g.rootNodes, [...c.errors, ...g.errors]);
|
|
2324
|
+
}
|
|
2325
|
+
}, no = class ln {
|
|
2326
|
+
constructor(t, r, n, a, i) {
|
|
2327
|
+
u(this, "tokens");
|
|
2328
|
+
u(this, "tagDefinitionResolver");
|
|
2329
|
+
u(this, "canSelfClose");
|
|
2330
|
+
u(this, "allowHtmComponentClosingTags");
|
|
2331
|
+
u(this, "isTagNameCaseSensitive");
|
|
2332
|
+
u(this, "_index", -1);
|
|
2333
|
+
u(this, "_peek");
|
|
2334
|
+
u(this, "_containerStack", []);
|
|
2335
|
+
u(this, "rootNodes", []);
|
|
2336
|
+
u(this, "errors", []);
|
|
2337
|
+
this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = a, this.isTagNameCaseSensitive = i, this._advance();
|
|
2338
|
+
}
|
|
2339
|
+
build() {
|
|
2340
|
+
for (; this._peek.type !== 43; ) this._peek.type === 0 || this._peek.type === 4 ? this._consumeElementStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeElementEndTag(this._advance())) : this._peek.type === 13 ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === 10 ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6 ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === 21 ? this._consumeExpansion(this._advance()) : this._peek.type === 26 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 28 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 31 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 19 ? this._consumeDocType(this._advance()) : this._peek.type === 34 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._peek.type === 35 || this._peek.type === 39 ? this._consumeComponentStartTag(this._advance()) : this._peek.type === 38 ? this._consumeComponentEndTag(this._advance()) : this._advance();
|
|
2341
|
+
for (let t of this._containerStack) t instanceof Y && this.errors.push(w.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
2342
|
+
}
|
|
2343
|
+
_advance() {
|
|
2344
|
+
let t = this._peek;
|
|
2345
|
+
return this._index < this.tokens.length - 1 && this._index++, this._peek = this.tokens[this._index], t;
|
|
2346
|
+
}
|
|
2347
|
+
_advanceIf(t) {
|
|
2348
|
+
return this._peek.type === t ? this._advance() : null;
|
|
2349
|
+
}
|
|
2350
|
+
_consumeCdata(t) {
|
|
2351
|
+
let r = this._advance(), n = this._getText(r), a = this._advanceIf(14);
|
|
2352
|
+
this._addToParent(new Ts(n, new d(t.sourceSpan.start, (a || r).sourceSpan.end), [r]));
|
|
2353
|
+
}
|
|
2354
|
+
_consumeComment(t) {
|
|
2355
|
+
let r = this._advanceIf(7), n = this._advanceIf(11), a = r != null ? r.parts[0].trim() : null, i = n == null ? t.sourceSpan : new d(t.sourceSpan.start, n.sourceSpan.end, t.sourceSpan.fullStart);
|
|
2356
|
+
this._addToParent(new qs(a, i));
|
|
2357
|
+
}
|
|
2358
|
+
_consumeDocType(t) {
|
|
2359
|
+
let r = this._advanceIf(7), n = this._advanceIf(20), a = r != null ? r.parts[0].trim() : null, i = new d(t.sourceSpan.start, (n || r || t).sourceSpan.end);
|
|
2360
|
+
this._addToParent(new Is(a, i));
|
|
2361
|
+
}
|
|
2362
|
+
_consumeExpansion(t) {
|
|
2363
|
+
let r = this._advance(), n = this._advance(), a = [];
|
|
2364
|
+
for (; this._peek.type === 22; ) {
|
|
2365
|
+
let s = this._parseExpansionCase();
|
|
2366
|
+
if (!s) return;
|
|
2367
|
+
a.push(s);
|
|
2368
|
+
}
|
|
2369
|
+
if (this._peek.type !== 25) {
|
|
2370
|
+
this.errors.push(w.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
let i = new d(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart);
|
|
2374
|
+
this._addToParent(new Bs(r.parts[0], n.parts[0], a, i, r.sourceSpan)), this._advance();
|
|
2375
|
+
}
|
|
2376
|
+
_parseExpansionCase() {
|
|
2377
|
+
let t = this._advance();
|
|
2378
|
+
if (this._peek.type !== 23) return this.errors.push(w.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
2379
|
+
let r = this._advance(), n = this._collectExpansionExpTokens(r);
|
|
2380
|
+
if (!n) return null;
|
|
2381
|
+
let a = this._advance();
|
|
2382
|
+
n.push({ type: 43, parts: [], sourceSpan: a.sourceSpan });
|
|
2383
|
+
let i = new ln(n, this.tagDefinitionResolver, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
|
|
2384
|
+
if (i.build(), i.errors.length > 0) return this.errors = this.errors.concat(i.errors), null;
|
|
2385
|
+
let s = new d(t.sourceSpan.start, a.sourceSpan.end, t.sourceSpan.fullStart), o = new d(r.sourceSpan.start, a.sourceSpan.end, r.sourceSpan.fullStart);
|
|
2386
|
+
return new Ls(t.parts[0], i.rootNodes, s, t.sourceSpan, o);
|
|
2387
|
+
}
|
|
2388
|
+
_collectExpansionExpTokens(t) {
|
|
2389
|
+
let r = [], n = [23];
|
|
2390
|
+
for (; ; ) {
|
|
2391
|
+
if ((this._peek.type === 21 || this._peek.type === 23) && n.push(this._peek.type), this._peek.type === 24) if (ir(n, 23)) {
|
|
2392
|
+
if (n.pop(), n.length === 0) return r;
|
|
2393
|
+
} else return this.errors.push(w.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2394
|
+
if (this._peek.type === 25) if (ir(n, 21)) n.pop();
|
|
2395
|
+
else return this.errors.push(w.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2396
|
+
if (this._peek.type === 43) return this.errors.push(w.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
2397
|
+
r.push(this._advance());
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
_getText(t) {
|
|
2401
|
+
let r = t.parts[0];
|
|
2402
|
+
if (r.length > 0 && r[0] == `
|
|
2403
|
+
`) {
|
|
2404
|
+
var n;
|
|
2405
|
+
let a = this._getClosestElementLikeParent();
|
|
2406
|
+
a != null && a.children.length == 0 && !((n = this._getTagDefinition(a)) === null || n === void 0) && n.ignoreFirstLf && (r = r.substring(1));
|
|
2407
|
+
}
|
|
2408
|
+
return r;
|
|
2409
|
+
}
|
|
2410
|
+
_consumeText(t) {
|
|
2411
|
+
let r = [t], n = t.sourceSpan, a = t.parts[0];
|
|
2412
|
+
if (a.length > 0 && a[0] === `
|
|
2413
|
+
`) {
|
|
2414
|
+
var i;
|
|
2415
|
+
let s = this._getContainer();
|
|
2416
|
+
s != null && s.children.length === 0 && !((i = this._getTagDefinition(s)) === null || i === void 0) && i.ignoreFirstLf && (a = a.substring(1), r[0] = { type: t.type, sourceSpan: t.sourceSpan, parts: [a] });
|
|
2417
|
+
}
|
|
2418
|
+
for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9; ) t = this._advance(), r.push(t), t.type === 8 ? a += t.parts.join("").replace(/&([^;]+);/g, sr) : t.type === 9 ? a += t.parts[0] : a += t.parts.join("");
|
|
2419
|
+
if (a.length > 0) {
|
|
2420
|
+
let s = t.sourceSpan;
|
|
2421
|
+
this._addToParent(new Ds(a, new d(n.start, s.end, n.fullStart, n.details), r));
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
_closeVoidElement() {
|
|
2425
|
+
var t;
|
|
2426
|
+
let r = this._getContainer();
|
|
2427
|
+
r !== null && !((t = this._getTagDefinition(r)) === null || t === void 0) && t.isVoid && this._containerStack.pop();
|
|
2428
|
+
}
|
|
2429
|
+
_consumeElementStartTag(t) {
|
|
2430
|
+
var r;
|
|
2431
|
+
let n = [], a = [], i = [];
|
|
2432
|
+
this._consumeAttributesAndDirectives(n, a, i);
|
|
2433
|
+
let s = this._getElementFullName(t, this._getClosestElementLikeParent()), o = this._getTagDefinition(s), l = !1;
|
|
2434
|
+
if (this._peek.type === 2) {
|
|
2435
|
+
this._advance(), l = !0;
|
|
2436
|
+
let S = this._getTagDefinition(s);
|
|
2437
|
+
this.canSelfClose || S != null && S.canSelfClose || Ue(s) !== null || S != null && S.isVoid || this.errors.push(w.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
|
|
2438
|
+
} else this._peek.type === 1 && (this._advance(), l = !1);
|
|
2439
|
+
let c = this._peek.sourceSpan.fullStart, p = new d(t.sourceSpan.start, c, t.sourceSpan.fullStart), v = new d(t.sourceSpan.start, c, t.sourceSpan.fullStart), g = new d(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), h = new V(s, n, a, [], l, p, v, void 0, g, (o == null ? void 0 : o.isVoid) ?? !1, void 0, i), C = this._getContainer(), f = C !== null && !!(!((r = this._getTagDefinition(C)) === null || r === void 0) && r.isClosedByChild(h.name));
|
|
2440
|
+
this._pushContainer(h, f), l ? this._popContainer(s, V, p) : t.type === 4 && (this._popContainer(s, V, null), this.errors.push(w.create(s, p, `Opening tag "${s}" not terminated.`)));
|
|
2441
|
+
}
|
|
2442
|
+
_consumeComponentStartTag(t) {
|
|
2443
|
+
var r;
|
|
2444
|
+
let n = t.parts[0], a = [], i = [], s = [];
|
|
2445
|
+
this._consumeAttributesAndDirectives(a, i, s);
|
|
2446
|
+
let o = this._getClosestElementLikeParent(), l = this._getComponentTagName(t, o), c = this._getComponentFullName(t, o), p = this._peek.type === 37;
|
|
2447
|
+
this._advance();
|
|
2448
|
+
let v = this._peek.sourceSpan.fullStart, g = new d(t.sourceSpan.start, v, t.sourceSpan.fullStart), h = new M(n, l, c, a, i, [], p, g, new d(t.sourceSpan.start, v, t.sourceSpan.fullStart), void 0, void 0, s), C = this._getContainer(), f = C !== null && h.tagName !== null && !!(!((r = this._getTagDefinition(C)) === null || r === void 0) && r.isClosedByChild(h.tagName));
|
|
2449
|
+
this._pushContainer(h, f), p ? this._popContainer(c, M, g) : t.type === 39 && (this._popContainer(c, M, null), this.errors.push(w.create(c, g, `Opening tag "${c}" not terminated.`)));
|
|
2450
|
+
}
|
|
2451
|
+
_consumeAttributesAndDirectives(t, r, n) {
|
|
2452
|
+
for (; this._peek.type === 15 || this._peek.type === 40 || this._peek.type === 12; ) if (this._peek.type === 40) r.push(this._consumeDirective(this._peek));
|
|
2453
|
+
else if (this._peek.type === 15) t.push(this._consumeAttr(this._advance()));
|
|
2454
|
+
else {
|
|
2455
|
+
let a = this._advance();
|
|
2456
|
+
n.push(new Ns(a.parts[0], a.parts[1], a.sourceSpan));
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
_consumeComponentEndTag(t) {
|
|
2460
|
+
let r = this._getComponentFullName(t, this._getClosestElementLikeParent());
|
|
2461
|
+
if (!this._popContainer(r, M, t.sourceSpan)) {
|
|
2462
|
+
let n = this._containerStack[this._containerStack.length - 1], a;
|
|
2463
|
+
n instanceof M && n.componentName === t.parts[0] ? a = `, did you mean "${n.fullName}"?` : a = ". It may happen when the tag has already been closed by another tag.";
|
|
2464
|
+
let i = `Unexpected closing tag "${r}"${a}`;
|
|
2465
|
+
this.errors.push(w.create(r, t.sourceSpan, i));
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
_getTagDefinition(t) {
|
|
2469
|
+
return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof V ? this.tagDefinitionResolver(t.name) : t instanceof M && t.tagName !== null ? this.tagDefinitionResolver(t.tagName) : null;
|
|
2470
|
+
}
|
|
2471
|
+
_pushContainer(t, r) {
|
|
2472
|
+
r && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t);
|
|
2473
|
+
}
|
|
2474
|
+
_consumeElementEndTag(t) {
|
|
2475
|
+
var r;
|
|
2476
|
+
let n = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t, this._getClosestElementLikeParent());
|
|
2477
|
+
if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(w.create(n, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
2478
|
+
else if (!this._popContainer(n, V, t.sourceSpan)) {
|
|
2479
|
+
let a = `Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
|
|
2480
|
+
this.errors.push(w.create(n, t.sourceSpan, a));
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
_popContainer(t, r, n) {
|
|
2484
|
+
let a = !1;
|
|
2485
|
+
for (let s = this._containerStack.length - 1; s >= 0; s--) {
|
|
2486
|
+
var i;
|
|
2487
|
+
let o = this._containerStack[s], l = o instanceof M ? o.fullName : o.name;
|
|
2488
|
+
if (Ue(l) ? l === t : (l === t || t === null) && o instanceof r) return o.endSourceSpan = n, o.sourceSpan.end = n !== null ? n.end : o.sourceSpan.end, this._containerStack.splice(s, this._containerStack.length - s), !a;
|
|
2489
|
+
(o instanceof Y || !(!((i = this._getTagDefinition(o)) === null || i === void 0) && i.closedByParent)) && (a = !0);
|
|
2490
|
+
}
|
|
2491
|
+
return !1;
|
|
2492
|
+
}
|
|
2493
|
+
_consumeAttr(t) {
|
|
2494
|
+
let r = _e(t.parts[0], t.parts[1]), n = t.sourceSpan.end, a;
|
|
2495
|
+
this._peek.type === 16 && (a = this._advance());
|
|
2496
|
+
let i = "", s = [], o, l;
|
|
2497
|
+
if (this._peek.type === 17) for (o = this._peek.sourceSpan, l = this._peek.sourceSpan.end; this._peek.type === 17 || this._peek.type === 18 || this._peek.type === 9; ) {
|
|
2498
|
+
let p = this._advance();
|
|
2499
|
+
s.push(p), p.type === 18 ? i += p.parts.join("").replace(/&([^;]+);/g, sr) : p.type === 9 ? i += p.parts[0] : i += p.parts.join(""), l = n = p.sourceSpan.end;
|
|
2500
|
+
}
|
|
2501
|
+
this._peek.type === 16 && (l = n = this._advance().sourceSpan.end);
|
|
2502
|
+
let c = o && l && new d((a == null ? void 0 : a.sourceSpan.start) ?? o.start, l, (a == null ? void 0 : a.sourceSpan.fullStart) ?? o.fullStart);
|
|
2503
|
+
return new Fs(r, i, new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, c, s.length > 0 ? s : void 0, void 0);
|
|
2504
|
+
}
|
|
2505
|
+
_consumeDirective(t) {
|
|
2506
|
+
let r = [], n = t.sourceSpan.end, a = null;
|
|
2507
|
+
if (this._advance(), this._peek.type === 41) {
|
|
2508
|
+
for (n = this._peek.sourceSpan.end, this._advance(); this._peek.type === 15; ) r.push(this._consumeAttr(this._advance()));
|
|
2509
|
+
this._peek.type === 42 ? (a = this._peek.sourceSpan, this._advance()) : this.errors.push(w.create(null, t.sourceSpan, "Unterminated directive definition"));
|
|
2510
|
+
}
|
|
2511
|
+
let i = new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new d(i.start, a === null ? t.sourceSpan.end : a.end, i.fullStart);
|
|
2512
|
+
return new Ms(t.parts[0], r, s, i, a);
|
|
2513
|
+
}
|
|
2514
|
+
_consumeBlockOpen(t) {
|
|
2515
|
+
let r = [];
|
|
2516
|
+
for (; this._peek.type === 29; ) {
|
|
2517
|
+
let o = this._advance();
|
|
2518
|
+
r.push(new Qt(o.parts[0], o.sourceSpan));
|
|
2519
|
+
}
|
|
2520
|
+
this._peek.type === 27 && this._advance();
|
|
2521
|
+
let n = this._peek.sourceSpan.fullStart, a = new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), i = new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new Y(t.parts[0], r, [], a, t.sourceSpan, i);
|
|
2522
|
+
this._pushContainer(s, !1);
|
|
2523
|
+
}
|
|
2524
|
+
_consumeBlockClose(t) {
|
|
2525
|
+
let r = this._containerStack.length, n = this._containerStack[r - 1];
|
|
2526
|
+
if (!this._popContainer(null, Y, t.sourceSpan)) {
|
|
2527
|
+
if (this._containerStack.length < r) {
|
|
2528
|
+
let a = n instanceof M ? n.fullName : n.name;
|
|
2529
|
+
this.errors.push(w.create(null, t.sourceSpan, `Unexpected closing block. The block may have been closed earlier. Did you forget to close the <${a}> element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));
|
|
2530
|
+
return;
|
|
2531
|
+
}
|
|
2532
|
+
this.errors.push(w.create(null, t.sourceSpan, 'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'));
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
_consumeIncompleteBlock(t) {
|
|
2536
|
+
let r = [];
|
|
2537
|
+
for (; this._peek.type === 29; ) {
|
|
2538
|
+
let o = this._advance();
|
|
2539
|
+
r.push(new Qt(o.parts[0], o.sourceSpan));
|
|
2540
|
+
}
|
|
2541
|
+
let n = this._peek.sourceSpan.fullStart, a = new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), i = new d(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new Y(t.parts[0], r, [], a, t.sourceSpan, i);
|
|
2542
|
+
this._pushContainer(s, !1), this._popContainer(null, Y, null), this.errors.push(w.create(t.parts[0], a, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`));
|
|
2543
|
+
}
|
|
2544
|
+
_consumeLet(t) {
|
|
2545
|
+
let r = t.parts[0], n, a;
|
|
2546
|
+
if (this._peek.type !== 32) {
|
|
2547
|
+
this.errors.push(w.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
|
|
2548
|
+
return;
|
|
2549
|
+
} else n = this._advance();
|
|
2550
|
+
if (this._peek.type !== 33) {
|
|
2551
|
+
this.errors.push(w.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
|
|
2552
|
+
return;
|
|
2553
|
+
} else a = this._advance();
|
|
2554
|
+
let i = a.sourceSpan.end, s = new d(t.sourceSpan.start, i, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), l = new d(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), c = new Zt(r, n.parts[0], s, l, n.sourceSpan);
|
|
2555
|
+
this._addToParent(c);
|
|
2556
|
+
}
|
|
2557
|
+
_consumeIncompleteLet(t) {
|
|
2558
|
+
let r = t.parts[0] ?? "", n = r ? ` "${r}"` : "";
|
|
2559
|
+
if (r.length > 0) {
|
|
2560
|
+
let a = t.sourceSpan.toString().lastIndexOf(r), i = new d(t.sourceSpan.start.moveBy(a), t.sourceSpan.end), s = new d(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new Zt(r, "", t.sourceSpan, i, s);
|
|
2561
|
+
this._addToParent(o);
|
|
2562
|
+
}
|
|
2563
|
+
this.errors.push(w.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${n}. @let declarations must be written as \`@let <name> = <value>;\``));
|
|
2564
|
+
}
|
|
2565
|
+
_getContainer() {
|
|
2566
|
+
return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
|
|
2567
|
+
}
|
|
2568
|
+
_getClosestElementLikeParent() {
|
|
2569
|
+
for (let t = this._containerStack.length - 1; t > -1; t--) {
|
|
2570
|
+
let r = this._containerStack[t];
|
|
2571
|
+
if (r instanceof V || r instanceof M) return r;
|
|
2572
|
+
}
|
|
2573
|
+
return null;
|
|
2574
|
+
}
|
|
2575
|
+
_addToParent(t) {
|
|
2576
|
+
let r = this._getContainer();
|
|
2577
|
+
r === null ? this.rootNodes.push(t) : r.children.push(t);
|
|
2578
|
+
}
|
|
2579
|
+
_getElementFullName(t, r) {
|
|
2580
|
+
return _e(this._getPrefix(t, r), t.parts[1]);
|
|
2581
|
+
}
|
|
2582
|
+
_getComponentFullName(t, r) {
|
|
2583
|
+
let n = t.parts[0], a = this._getComponentTagName(t, r);
|
|
2584
|
+
return a === null ? n : a.startsWith(":") ? n + a : `${n}:${a}`;
|
|
2585
|
+
}
|
|
2586
|
+
_getComponentTagName(t, r) {
|
|
2587
|
+
let n = this._getPrefix(t, r), a = t.parts[2];
|
|
2588
|
+
return !n && !a ? null : !n && a ? a : _e(n, a || "ng-component");
|
|
2589
|
+
}
|
|
2590
|
+
_getPrefix(t, r) {
|
|
2591
|
+
var n;
|
|
2592
|
+
let a, i;
|
|
2593
|
+
if (t.type === 35 || t.type === 39 || t.type === 38 ? (a = t.parts[1], i = t.parts[2]) : (a = t.parts[0], i = t.parts[1]), a = a || ((n = this._getTagDefinition(i)) === null || n === void 0 ? void 0 : n.implicitNamespacePrefix) || "", !a && r) {
|
|
2594
|
+
let s = r instanceof V ? r.name : r.tagName;
|
|
2595
|
+
if (s !== null) {
|
|
2596
|
+
let o = oe(s)[1], l = this._getTagDefinition(o);
|
|
2597
|
+
l !== null && !l.preventNamespaceInheritance && (a = Ue(s));
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
return a;
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
function ir(e, t) {
|
|
2604
|
+
return e.length > 0 && e[e.length - 1] === t;
|
|
2605
|
+
}
|
|
2606
|
+
function sr(e, t) {
|
|
2607
|
+
return we[t] !== void 0 ? we[t] || e : /^#x[a-f0-9]+$/i.test(t) ? String.fromCodePoint(parseInt(t.slice(2), 16)) : /^#\d+$/.test(t) ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
|
|
2608
|
+
}
|
|
2609
|
+
var ao = class extends ro {
|
|
2610
|
+
constructor() {
|
|
2611
|
+
super(lt);
|
|
2612
|
+
}
|
|
2613
|
+
parse(e, t, r, n = !1, a) {
|
|
2614
|
+
return super.parse(e, t, r, n, a);
|
|
2615
|
+
}
|
|
2616
|
+
}, at;
|
|
2617
|
+
function dt(e, t = {}) {
|
|
2618
|
+
let { canSelfClose: r = !1, allowHtmComponentClosingTags: n = !1, allowStartTagComments: a = !1, isTagNameCaseSensitive: i = !1, getTagContentType: s, tokenizeAngularBlocks: o = !1, tokenizeAngularLetDeclaration: l = !1, enableAngularSelectorlessSyntax: c = !1 } = t;
|
|
2619
|
+
return at ?? (at = new ao()), at.parse(e, "angular-html-parser", { tokenizeExpansionForms: o, canSelfClose: r, allowHtmComponentClosingTags: n, allowStartTagComments: a, tokenizeBlocks: o, tokenizeLet: l, selectorlessEnabled: c }, i, s);
|
|
2620
|
+
}
|
|
2621
|
+
var io = [oo, uo, co, ho, mo, vo, go, fo, Co, po];
|
|
2622
|
+
function so(e, t) {
|
|
2623
|
+
for (let r of io) r(e, t);
|
|
2624
|
+
return e;
|
|
2625
|
+
}
|
|
2626
|
+
function oo(e) {
|
|
2627
|
+
e.walk((t) => {
|
|
2628
|
+
if (t.kind === "element" && t.tagDefinition.ignoreFirstLf && t.children.length > 0 && t.children[0].kind === "text" && t.children[0].value[0] === `
|
|
2629
|
+
`) {
|
|
2630
|
+
let r = t.children[0];
|
|
2631
|
+
r.value.length === 1 ? t.removeChild(r) : r.value = r.value.slice(1);
|
|
2632
|
+
}
|
|
2633
|
+
});
|
|
2634
|
+
}
|
|
2635
|
+
function uo(e) {
|
|
2636
|
+
let t = (r) => {
|
|
2637
|
+
var n, a;
|
|
2638
|
+
return r.kind === "element" && ((n = r.prev) == null ? void 0 : n.kind) === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && ((a = r.firstChild) == null ? void 0 : a.kind) === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
|
|
2639
|
+
};
|
|
2640
|
+
e.walk((r) => {
|
|
2641
|
+
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
2642
|
+
let a = r.children[n];
|
|
2643
|
+
if (!t(a)) continue;
|
|
2644
|
+
let i = a.prev, s = a.firstChild;
|
|
2645
|
+
r.removeChild(i), n--;
|
|
2646
|
+
let o = new d(i.sourceSpan.start, s.sourceSpan.end), l = new d(o.start, a.sourceSpan.end);
|
|
2647
|
+
a.condition = i.condition, a.sourceSpan = l, a.startSourceSpan = o, a.removeChild(s);
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
}
|
|
2651
|
+
function lo(e, t, r) {
|
|
2652
|
+
e.walk((n) => {
|
|
2653
|
+
if (n.children) for (let a = 0; a < n.children.length; a++) {
|
|
2654
|
+
let i = n.children[a];
|
|
2655
|
+
if (i.kind !== "text" && !t(i)) continue;
|
|
2656
|
+
i.kind !== "text" && (i.kind = "text", i.value = r(i));
|
|
2657
|
+
let s = i.prev;
|
|
2658
|
+
!s || s.kind !== "text" || (s.value += i.value, s.sourceSpan = new d(s.sourceSpan.start, i.sourceSpan.end), n.removeChild(i), a--);
|
|
2659
|
+
}
|
|
2660
|
+
});
|
|
2661
|
+
}
|
|
2662
|
+
function co(e) {
|
|
2663
|
+
return lo(e, (t) => t.kind === "cdata", (t) => `<![CDATA[${t.value}]]>`);
|
|
2664
|
+
}
|
|
2665
|
+
function po(e) {
|
|
2666
|
+
let t = (r) => {
|
|
2667
|
+
var n, a;
|
|
2668
|
+
return r.kind === "element" && r.attrs.length === 0 && !$e(r.startTagComments) && r.children.length === 1 && r.firstChild.kind === "text" && !B.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && ((n = r.prev) == null ? void 0 : n.kind) === "text" && ((a = r.next) == null ? void 0 : a.kind) === "text";
|
|
2669
|
+
};
|
|
2670
|
+
e.walk((r) => {
|
|
2671
|
+
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
2672
|
+
let a = r.children[n];
|
|
2673
|
+
if (!t(a)) continue;
|
|
2674
|
+
let i = a.prev, s = a.next;
|
|
2675
|
+
i.value += `<${a.rawName}>` + a.firstChild.value + `</${a.rawName}>` + s.value, i.sourceSpan = new d(i.sourceSpan.start, s.sourceSpan.end), i.isTrailingSpaceSensitive = s.isTrailingSpaceSensitive, i.hasTrailingSpaces = s.hasTrailingSpaces, r.removeChild(a), n--, r.removeChild(s);
|
|
2676
|
+
}
|
|
2677
|
+
});
|
|
2678
|
+
}
|
|
2679
|
+
function ho(e, t) {
|
|
2680
|
+
if (t.parser === "html") return;
|
|
2681
|
+
let r = /\{\{(.+?)\}\}/s;
|
|
2682
|
+
e.walk((n) => {
|
|
2683
|
+
if (ba(n, t)) for (let a of n.children) {
|
|
2684
|
+
if (a.kind !== "text") continue;
|
|
2685
|
+
let i = a.sourceSpan.start, s, o = a.value.split(r);
|
|
2686
|
+
for (let l = 0; l < o.length; l++, i = s) {
|
|
2687
|
+
let c = o[l];
|
|
2688
|
+
if (l % 2 === 0) {
|
|
2689
|
+
s = i.moveBy(c.length), c.length > 0 && n.insertChildBefore(a, { kind: "text", value: c, sourceSpan: new d(i, s) });
|
|
2690
|
+
continue;
|
|
2691
|
+
}
|
|
2692
|
+
s = i.moveBy(c.length + 4), n.insertChildBefore(a, { kind: "interpolation", sourceSpan: new d(i, s), children: c.length === 0 ? [] : [{ kind: "text", value: c, sourceSpan: new d(i.moveBy(2), s.moveBy(-2)) }] });
|
|
2693
|
+
}
|
|
2694
|
+
n.removeChild(a);
|
|
2695
|
+
}
|
|
2696
|
+
});
|
|
2697
|
+
}
|
|
2698
|
+
function mo(e, t) {
|
|
2699
|
+
e.walk((r) => {
|
|
2700
|
+
let n = r.$children;
|
|
2701
|
+
if (!n) return;
|
|
2702
|
+
if (n.length === 0 || n.length === 1 && n[0].kind === "text" && B.trim(n[0].value).length === 0) {
|
|
2703
|
+
r.hasDanglingSpaces = n.length > 0, r.$children = [];
|
|
2704
|
+
return;
|
|
2705
|
+
}
|
|
2706
|
+
let a = wa(r, t), i = Mr(r);
|
|
2707
|
+
if (!a) for (let s = 0; s < n.length; s++) {
|
|
2708
|
+
let o = n[s];
|
|
2709
|
+
if (o.kind !== "text") continue;
|
|
2710
|
+
let { leadingWhitespace: l, text: c, trailingWhitespace: p } = Sa(o.value), v = o.prev, g = o.next;
|
|
2711
|
+
c ? (o.value = c, o.sourceSpan = new d(o.sourceSpan.start.moveBy(l.length), o.sourceSpan.end.moveBy(-p.length)), l && (v && (v.hasTrailingSpaces = !0), o.hasLeadingSpaces = !0), p && (o.hasTrailingSpaces = !0, g && (g.hasLeadingSpaces = !0))) : (r.removeChild(o), s--, (l || p) && (v && (v.hasTrailingSpaces = !0), g && (g.hasLeadingSpaces = !0)));
|
|
2712
|
+
}
|
|
2713
|
+
r.isWhitespaceSensitive = a, r.isIndentationSensitive = i;
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
function go(e) {
|
|
2717
|
+
e.walk((t) => {
|
|
2718
|
+
t.isSelfClosing = !t.children || t.kind === "element" && (t.tagDefinition.isVoid || t.endSourceSpan && t.startSourceSpan.start === t.endSourceSpan.start && t.startSourceSpan.end === t.endSourceSpan.end);
|
|
2719
|
+
});
|
|
2720
|
+
}
|
|
2721
|
+
function fo(e, t) {
|
|
2722
|
+
e.walk((r) => {
|
|
2723
|
+
r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset, r.endSourceSpan.end.offset)));
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
function vo(e, t) {
|
|
2727
|
+
e.walk((r) => {
|
|
2728
|
+
r.cssDisplay = Ra(r, t);
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
function Co(e, t) {
|
|
2732
|
+
e.walk((r) => {
|
|
2733
|
+
let { children: n } = r;
|
|
2734
|
+
if (n) {
|
|
2735
|
+
if (n.length === 0) {
|
|
2736
|
+
r.isDanglingSpaceSensitive = xa(r, t);
|
|
2737
|
+
return;
|
|
2738
|
+
}
|
|
2739
|
+
for (let a of n) a.isLeadingSpaceSensitive = ya(a, t), a.isTrailingSpaceSensitive = Aa(a, t);
|
|
2740
|
+
for (let a = 0; a < n.length; a++) {
|
|
2741
|
+
let i = n[a];
|
|
2742
|
+
i.isLeadingSpaceSensitive = (a === 0 || i.prev.isTrailingSpaceSensitive) && i.isLeadingSpaceSensitive, i.isTrailingSpaceSensitive = (a === n.length - 1 || i.next.isLeadingSpaceSensitive) && i.isTrailingSpaceSensitive;
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
});
|
|
2746
|
+
}
|
|
2747
|
+
var _o = so;
|
|
2748
|
+
function So(e, t, r) {
|
|
2749
|
+
let { node: n } = e;
|
|
2750
|
+
switch (n.kind) {
|
|
2751
|
+
case "root":
|
|
2752
|
+
return t.__onHtmlRoot && t.__onHtmlRoot(n), [y(Lt(e, t, r)), k];
|
|
2753
|
+
case "element":
|
|
2754
|
+
case "ieConditionalComment":
|
|
2755
|
+
return cs(e, t, r);
|
|
2756
|
+
case "angularControlFlowBlock":
|
|
2757
|
+
return rs(e, t, r);
|
|
2758
|
+
case "angularControlFlowBlockParameters":
|
|
2759
|
+
return os(e, t, r);
|
|
2760
|
+
case "angularControlFlowBlockParameter":
|
|
2761
|
+
return B.trim(n.expression);
|
|
2762
|
+
case "angularLetDeclaration":
|
|
2763
|
+
return y(["@let ", y([n.id, " =", y(N([b, r("init")]))]), ";"]);
|
|
2764
|
+
case "angularLetDeclarationInitializer":
|
|
2765
|
+
return n.value;
|
|
2766
|
+
case "angularIcuExpression":
|
|
2767
|
+
return us(e, t, r);
|
|
2768
|
+
case "angularIcuCase":
|
|
2769
|
+
return ls(e, t, r);
|
|
2770
|
+
case "ieConditionalStartComment":
|
|
2771
|
+
case "ieConditionalEndComment":
|
|
2772
|
+
return [ve(n), fe(n)];
|
|
2773
|
+
case "interpolation":
|
|
2774
|
+
return [ve(n, t), ...e.map(r, "children"), fe(n, t)];
|
|
2775
|
+
case "text": {
|
|
2776
|
+
if (n.parent.kind === "interpolation") {
|
|
2777
|
+
let o = /\n[^\S\n]*$/, l = o.test(n.value), c = l ? n.value.replace(o, "") : n.value;
|
|
2778
|
+
return [F(c), l ? k : ""];
|
|
2779
|
+
}
|
|
2780
|
+
let a = G(n, t), i = Wr(n), s = W(n, t);
|
|
2781
|
+
return i[0] = [a, i[0]], i.push([i.pop(), s]), Er(i);
|
|
2782
|
+
}
|
|
2783
|
+
case "docType":
|
|
2784
|
+
return [y([ve(n, t), " ", x(0, n.value.replace(/^html\b/i, "html"), /\s+/g, " ")]), fe(n, t)];
|
|
2785
|
+
case "comment":
|
|
2786
|
+
return [G(n, t), F(t.originalText.slice(X(n), Ke(n))), W(n, t)];
|
|
2787
|
+
case "attribute": {
|
|
2788
|
+
if (n.value === null) return n.rawName;
|
|
2789
|
+
let a = $r(n.value), i = Gr(n, t) ? "" : Vn(a, '"');
|
|
2790
|
+
return [n.rawName, "=", i, F(i === '"' ? x(0, a, '"', """) : x(0, a, "'", "'")), i];
|
|
2791
|
+
}
|
|
2792
|
+
case "startTagComment":
|
|
2793
|
+
return ps(e);
|
|
2794
|
+
default:
|
|
2795
|
+
throw new Kn(n, "HTML");
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
var ko = { features: { experimental_frontMatterSupport: { massageAstNode: !0, embed: !0, print: !0 } }, preprocess: _o, print: So, insertPragma: es, massageAstNode: Xr, embed: Ri, getVisitorKeys: ji }, bo = ko, wo = [{ name: "Angular", type: "markup", aceMode: "html", extensions: [".component.html"], tmScope: "text.html.basic", aliases: ["xhtml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["angular"], vscodeLanguageIds: ["html"], filenames: [], linguistLanguageId: 146 }, { name: "HTML", type: "markup", aceMode: "html", extensions: [".html", ".hta", ".htm", ".html.hl", ".inc", ".xht", ".xhtml"], tmScope: "text.html.basic", aliases: ["xhtml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["html"], vscodeLanguageIds: ["html"], linguistLanguageId: 146 }, { name: "Lightning Web Components", type: "markup", aceMode: "html", extensions: [], tmScope: "text.html.basic", aliases: ["LWC", "lwc"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["lwc"], vscodeLanguageIds: ["html"], filenames: [], linguistLanguageId: 146 }, { name: "MJML", type: "markup", aceMode: "html", extensions: [".mjml"], tmScope: "text.mjml.basic", aliases: ["MJML", "mjml"], codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", parsers: ["mjml"], filenames: [], vscodeLanguageIds: ["mjml"], linguistLanguageId: 146 }, { name: "Vue", type: "markup", aceMode: "vue", extensions: [".vue"], tmScope: "text.html.vue", codemirrorMode: "vue", codemirrorMimeType: "text/x-vue", parsers: ["vue"], vscodeLanguageIds: ["vue"], linguistLanguageId: 391 }], or = { bracketSameLine: { category: "Common", type: "boolean", default: !1, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: !1, description: "Enforce single attribute per line in HTML, Vue and JSX." } }, ur = "HTML", yo = { bracketSameLine: or.bracketSameLine, htmlWhitespaceSensitivity: { category: ur, type: "choice", default: "css", description: "How to handle whitespaces in HTML.", choices: [{ value: "css", description: "Respect the default value of CSS display property." }, { value: "strict", description: "Whitespaces are considered sensitive." }, { value: "ignore", description: "Whitespaces are considered insensitive." }] }, singleAttributePerLine: or.singleAttributePerLine, vueIndentScriptAndStyle: { category: ur, type: "boolean", default: !1, description: "Indent script and style tags in Vue files." } }, Ao = yo, cn = {};
|
|
2799
|
+
gr(cn, { angular: () => Xo, html: () => Yo, lwc: () => tu, mjml: () => Zo, vue: () => eu });
|
|
2800
|
+
function xo(e, t) {
|
|
2801
|
+
let r = new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
|
|
2802
|
+
return Object.assign(r, t);
|
|
2803
|
+
}
|
|
2804
|
+
var Eo = xo, Do = { canSelfClose: !0, normalizeTagName: !1, normalizeAttributeName: !1, allowHtmComponentClosingTags: !1, allowStartTagComments: !1, isTagNameCaseSensitive: !1, shouldParseFrontMatter: !0 };
|
|
2805
|
+
function pn(e) {
|
|
2806
|
+
return { ...Do, ...e };
|
|
2807
|
+
}
|
|
2808
|
+
function hn(e) {
|
|
2809
|
+
let { canSelfClose: t, allowHtmComponentClosingTags: r, allowStartTagComments: n, isTagNameCaseSensitive: a, shouldParseAsRawText: i, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: o } = e;
|
|
2810
|
+
return { canSelfClose: t, allowHtmComponentClosingTags: r, allowStartTagComments: n, isTagNameCaseSensitive: a, getTagContentType: i ? (...l) => i(...l) ? hs.RAW_TEXT : void 0 : void 0, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: o };
|
|
2811
|
+
}
|
|
2812
|
+
var it = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set(["accesskey", "autocapitalize", "autocorrect", "autofocus", "class", "contenteditable", "dir", "draggable", "enterkeyhint", "exportparts", "hidden", "id", "inert", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "part", "popover", "slot", "spellcheck", "style", "tabindex", "title", "translate", "writingsuggestions"])], ["a", /* @__PURE__ */ new Set(["charset", "coords", "download", "href", "hreflang", "name", "ping", "referrerpolicy", "rel", "rev", "shape", "target", "type"])], ["applet", /* @__PURE__ */ new Set(["align", "alt", "archive", "code", "codebase", "height", "hspace", "name", "object", "vspace", "width"])], ["area", /* @__PURE__ */ new Set(["alt", "coords", "download", "href", "hreflang", "nohref", "ping", "referrerpolicy", "rel", "shape", "target", "type"])], ["audio", /* @__PURE__ */ new Set(["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"])], ["base", /* @__PURE__ */ new Set(["href", "target"])], ["basefont", /* @__PURE__ */ new Set(["color", "face", "size"])], ["blockquote", /* @__PURE__ */ new Set(["cite"])], ["body", /* @__PURE__ */ new Set(["alink", "background", "bgcolor", "link", "text", "vlink"])], ["br", /* @__PURE__ */ new Set(["clear"])], ["button", /* @__PURE__ */ new Set(["command", "commandfor", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "popovertarget", "popovertargetaction", "type", "value"])], ["canvas", /* @__PURE__ */ new Set(["height", "width"])], ["caption", /* @__PURE__ */ new Set(["align"])], ["col", /* @__PURE__ */ new Set(["align", "char", "charoff", "span", "valign", "width"])], ["colgroup", /* @__PURE__ */ new Set(["align", "char", "charoff", "span", "valign", "width"])], ["data", /* @__PURE__ */ new Set(["value"])], ["del", /* @__PURE__ */ new Set(["cite", "datetime"])], ["details", /* @__PURE__ */ new Set(["name", "open"])], ["dialog", /* @__PURE__ */ new Set(["closedby", "open"])], ["dir", /* @__PURE__ */ new Set(["compact"])], ["div", /* @__PURE__ */ new Set(["align"])], ["dl", /* @__PURE__ */ new Set(["compact"])], ["embed", /* @__PURE__ */ new Set(["height", "src", "type", "width"])], ["fieldset", /* @__PURE__ */ new Set(["disabled", "form", "name"])], ["font", /* @__PURE__ */ new Set(["color", "face", "size"])], ["form", /* @__PURE__ */ new Set(["accept", "accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"])], ["frame", /* @__PURE__ */ new Set(["frameborder", "longdesc", "marginheight", "marginwidth", "name", "noresize", "scrolling", "src"])], ["frameset", /* @__PURE__ */ new Set(["cols", "rows"])], ["h1", /* @__PURE__ */ new Set(["align"])], ["h2", /* @__PURE__ */ new Set(["align"])], ["h3", /* @__PURE__ */ new Set(["align"])], ["h4", /* @__PURE__ */ new Set(["align"])], ["h5", /* @__PURE__ */ new Set(["align"])], ["h6", /* @__PURE__ */ new Set(["align"])], ["head", /* @__PURE__ */ new Set(["profile"])], ["hr", /* @__PURE__ */ new Set(["align", "noshade", "size", "width"])], ["html", /* @__PURE__ */ new Set(["manifest", "version"])], ["iframe", /* @__PURE__ */ new Set(["align", "allow", "allowfullscreen", "allowpaymentrequest", "allowusermedia", "frameborder", "height", "loading", "longdesc", "marginheight", "marginwidth", "name", "referrerpolicy", "sandbox", "scrolling", "src", "srcdoc", "width"])], ["img", /* @__PURE__ */ new Set(["align", "alt", "border", "crossorigin", "decoding", "fetchpriority", "height", "hspace", "ismap", "loading", "longdesc", "name", "referrerpolicy", "sizes", "src", "srcset", "usemap", "vspace", "width"])], ["input", /* @__PURE__ */ new Set(["accept", "align", "alpha", "alt", "autocomplete", "checked", "colorspace", "dirname", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "ismap", "list", "max", "maxlength", "min", "minlength", "multiple", "name", "pattern", "placeholder", "popovertarget", "popovertargetaction", "readonly", "required", "size", "src", "step", "type", "usemap", "value", "width"])], ["ins", /* @__PURE__ */ new Set(["cite", "datetime"])], ["isindex", /* @__PURE__ */ new Set(["prompt"])], ["label", /* @__PURE__ */ new Set(["for", "form"])], ["legend", /* @__PURE__ */ new Set(["align"])], ["li", /* @__PURE__ */ new Set(["type", "value"])], ["link", /* @__PURE__ */ new Set(["as", "blocking", "charset", "color", "crossorigin", "disabled", "fetchpriority", "href", "hreflang", "imagesizes", "imagesrcset", "integrity", "media", "referrerpolicy", "rel", "rev", "sizes", "target", "type"])], ["map", /* @__PURE__ */ new Set(["name"])], ["menu", /* @__PURE__ */ new Set(["compact"])], ["meta", /* @__PURE__ */ new Set(["charset", "content", "http-equiv", "media", "name", "scheme"])], ["meter", /* @__PURE__ */ new Set(["high", "low", "max", "min", "optimum", "value"])], ["object", /* @__PURE__ */ new Set(["align", "archive", "border", "classid", "codebase", "codetype", "data", "declare", "form", "height", "hspace", "name", "standby", "type", "typemustmatch", "usemap", "vspace", "width"])], ["ol", /* @__PURE__ */ new Set(["compact", "reversed", "start", "type"])], ["optgroup", /* @__PURE__ */ new Set(["disabled", "label"])], ["option", /* @__PURE__ */ new Set(["disabled", "label", "selected", "value"])], ["output", /* @__PURE__ */ new Set(["for", "form", "name"])], ["p", /* @__PURE__ */ new Set(["align"])], ["param", /* @__PURE__ */ new Set(["name", "type", "value", "valuetype"])], ["pre", /* @__PURE__ */ new Set(["width"])], ["progress", /* @__PURE__ */ new Set(["max", "value"])], ["q", /* @__PURE__ */ new Set(["cite"])], ["script", /* @__PURE__ */ new Set(["async", "blocking", "charset", "crossorigin", "defer", "fetchpriority", "integrity", "language", "nomodule", "referrerpolicy", "src", "type"])], ["select", /* @__PURE__ */ new Set(["autocomplete", "disabled", "form", "multiple", "name", "required", "size"])], ["slot", /* @__PURE__ */ new Set(["name"])], ["source", /* @__PURE__ */ new Set(["height", "media", "sizes", "src", "srcset", "type", "width"])], ["style", /* @__PURE__ */ new Set(["blocking", "media", "type"])], ["table", /* @__PURE__ */ new Set(["align", "bgcolor", "border", "cellpadding", "cellspacing", "frame", "rules", "summary", "width"])], ["tbody", /* @__PURE__ */ new Set(["align", "char", "charoff", "valign"])], ["td", /* @__PURE__ */ new Set(["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"])], ["template", /* @__PURE__ */ new Set(["shadowrootclonable", "shadowrootcustomelementregistry", "shadowrootdelegatesfocus", "shadowrootmode", "shadowrootserializable"])], ["textarea", /* @__PURE__ */ new Set(["autocomplete", "cols", "dirname", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "wrap"])], ["tfoot", /* @__PURE__ */ new Set(["align", "char", "charoff", "valign"])], ["th", /* @__PURE__ */ new Set(["abbr", "align", "axis", "bgcolor", "char", "charoff", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign", "width"])], ["thead", /* @__PURE__ */ new Set(["align", "char", "charoff", "valign"])], ["time", /* @__PURE__ */ new Set(["datetime"])], ["tr", /* @__PURE__ */ new Set(["align", "bgcolor", "char", "charoff", "valign"])], ["track", /* @__PURE__ */ new Set(["default", "kind", "label", "src", "srclang"])], ["ul", /* @__PURE__ */ new Set(["compact", "type"])], ["video", /* @__PURE__ */ new Set(["autoplay", "controls", "crossorigin", "height", "loop", "muted", "playsinline", "poster", "preload", "src", "width"])]]), To = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fencedframe", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "geolocation", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "math", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nextid", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rbc", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "search", "section", "select", "selectedcontent", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]), Re = { attrs: !0, children: !0, cases: !0, expression: !0 }, lr = /* @__PURE__ */ new Set(["parent"]), Z, mt, gt, Bo = class ge {
|
|
2813
|
+
constructor(t = {}) {
|
|
2814
|
+
_n(this, Z), Pt(this, "kind"), Pt(this, "parent");
|
|
2815
|
+
for (let r of /* @__PURE__ */ new Set([...lr, ...Object.keys(t)])) this.setProperty(r, t[r]);
|
|
2816
|
+
if (We(t)) for (let r of Object.getOwnPropertySymbols(t)) this.setProperty(r, t[r]);
|
|
2817
|
+
}
|
|
2818
|
+
setProperty(t, r) {
|
|
2819
|
+
if (this[t] !== r) {
|
|
2820
|
+
if (t in Re && (r = r.map((n) => this.createChild(n))), !lr.has(t)) {
|
|
2821
|
+
this[t] = r;
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
Object.defineProperty(this, t, { value: r, enumerable: !1, configurable: !0 });
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
map(t) {
|
|
2828
|
+
let r;
|
|
2829
|
+
for (let n in Re) {
|
|
2830
|
+
let a = this[n];
|
|
2831
|
+
if (a) {
|
|
2832
|
+
let i = Fo(a, (s) => s.map(t));
|
|
2833
|
+
r !== a && (r ?? (r = new ge({ parent: this.parent })), r.setProperty(n, i));
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
if (r) for (let n in this) n in Re || (r[n] = this[n]);
|
|
2837
|
+
return t(r || this);
|
|
2838
|
+
}
|
|
2839
|
+
walk(t) {
|
|
2840
|
+
for (let r in Re) {
|
|
2841
|
+
let n = this[r];
|
|
2842
|
+
if (n) for (let a = 0; a < n.length; a++) n[a].walk(t);
|
|
2843
|
+
}
|
|
2844
|
+
t(this);
|
|
2845
|
+
}
|
|
2846
|
+
createChild(t) {
|
|
2847
|
+
let r = t instanceof ge ? t.clone() : new ge(t);
|
|
2848
|
+
return r.setProperty("parent", this), r;
|
|
2849
|
+
}
|
|
2850
|
+
insertChildBefore(t, r) {
|
|
2851
|
+
let n = this.$children;
|
|
2852
|
+
n.splice(n.indexOf(t), 0, this.createChild(r));
|
|
2853
|
+
}
|
|
2854
|
+
removeChild(t) {
|
|
2855
|
+
let r = this.$children;
|
|
2856
|
+
r.splice(r.indexOf(t), 1);
|
|
2857
|
+
}
|
|
2858
|
+
replaceChild(t, r) {
|
|
2859
|
+
let n = this.$children;
|
|
2860
|
+
n[n.indexOf(t)] = this.createChild(r);
|
|
2861
|
+
}
|
|
2862
|
+
clone() {
|
|
2863
|
+
return new ge(this);
|
|
2864
|
+
}
|
|
2865
|
+
get $children() {
|
|
2866
|
+
return this[qe(this, Z, mt)];
|
|
2867
|
+
}
|
|
2868
|
+
set $children(t) {
|
|
2869
|
+
this[qe(this, Z, mt)] = t;
|
|
2870
|
+
}
|
|
2871
|
+
get firstChild() {
|
|
2872
|
+
var t;
|
|
2873
|
+
return (t = this.$children) == null ? void 0 : t[0];
|
|
2874
|
+
}
|
|
2875
|
+
get lastChild() {
|
|
2876
|
+
return te(1, this.$children, -1);
|
|
2877
|
+
}
|
|
2878
|
+
get prev() {
|
|
2879
|
+
let t = qe(this, Z, gt);
|
|
2880
|
+
return t[t.indexOf(this) - 1];
|
|
2881
|
+
}
|
|
2882
|
+
get next() {
|
|
2883
|
+
let t = qe(this, Z, gt);
|
|
2884
|
+
return t[t.indexOf(this) + 1];
|
|
2885
|
+
}
|
|
2886
|
+
get rawName() {
|
|
2887
|
+
return this.hasExplicitNamespace ? this.fullName : this.name;
|
|
2888
|
+
}
|
|
2889
|
+
get fullName() {
|
|
2890
|
+
return this.namespace ? this.namespace + ":" + this.name : this.name;
|
|
2891
|
+
}
|
|
2892
|
+
get attrMap() {
|
|
2893
|
+
return Object.fromEntries(this.attrs.map((t) => [t.fullName, t.value]));
|
|
2894
|
+
}
|
|
2895
|
+
};
|
|
2896
|
+
Z = /* @__PURE__ */ new WeakSet(), mt = function() {
|
|
2897
|
+
return this.kind === "angularIcuCase" ? "expression" : this.kind === "angularIcuExpression" ? "cases" : "children";
|
|
2898
|
+
}, gt = function() {
|
|
2899
|
+
var e;
|
|
2900
|
+
return ((e = this.parent) == null ? void 0 : e.$children) ?? [];
|
|
2901
|
+
};
|
|
2902
|
+
var Lo = Bo;
|
|
2903
|
+
function Fo(e, t) {
|
|
2904
|
+
let r = e.map(t);
|
|
2905
|
+
return r.some((n, a) => n !== e[a]) ? r : e;
|
|
2906
|
+
}
|
|
2907
|
+
var No = [{ regex: /^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/s, parse: Io }, { regex: /^\[if(?<condition>[^\]]*)\]><!$/, parse: Mo }, { regex: /^<!\s*\[endif\]$/, parse: Po }];
|
|
2908
|
+
function qo(e, t) {
|
|
2909
|
+
if (e.value) for (let { regex: r, parse: n } of No) {
|
|
2910
|
+
let a = e.value.match(r);
|
|
2911
|
+
if (a) return n(e, a, t);
|
|
2912
|
+
}
|
|
2913
|
+
return null;
|
|
2914
|
+
}
|
|
2915
|
+
function Io(e, t, r) {
|
|
2916
|
+
let { openingTagSuffix: n, condition: a, data: i } = t.groups, s = 4 + n.length, o = e.sourceSpan.start.moveBy(s), l = o.moveBy(i.length), [c, p] = (() => {
|
|
2917
|
+
try {
|
|
2918
|
+
return [!0, r(i, o).children];
|
|
2919
|
+
} catch {
|
|
2920
|
+
return [!1, [{ kind: "text", value: i, sourceSpan: new d(o, l) }]];
|
|
2921
|
+
}
|
|
2922
|
+
})();
|
|
2923
|
+
return { kind: "ieConditionalComment", complete: c, children: p, condition: x(0, a.trim(), /\s+/g, " "), sourceSpan: e.sourceSpan, startSourceSpan: new d(e.sourceSpan.start, o), endSourceSpan: new d(l, e.sourceSpan.end) };
|
|
2924
|
+
}
|
|
2925
|
+
function Mo(e, t) {
|
|
2926
|
+
let { condition: r } = t.groups;
|
|
2927
|
+
return { kind: "ieConditionalStartComment", condition: x(0, r.trim(), /\s+/g, " "), sourceSpan: e.sourceSpan };
|
|
2928
|
+
}
|
|
2929
|
+
function Po(e) {
|
|
2930
|
+
return { kind: "ieConditionalEndComment", sourceSpan: e.sourceSpan };
|
|
2931
|
+
}
|
|
2932
|
+
var Ho = class extends Ps {
|
|
2933
|
+
visitExpansionCase(e, t) {
|
|
2934
|
+
t.parseOptions.name === "angular" && this.visitChildren(t, (r) => {
|
|
2935
|
+
r(e.expression);
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2938
|
+
visit(e, { parseOptions: t }) {
|
|
2939
|
+
zo(e), $o(e, t), jo(e, t), Wo(e);
|
|
2940
|
+
}
|
|
2941
|
+
};
|
|
2942
|
+
function Ro(e, t, r, n) {
|
|
2943
|
+
let a = r.name === "angular";
|
|
2944
|
+
sn(new Ho(), e.children, { parseOptions: r }), t && e.children.unshift(t);
|
|
2945
|
+
let i = new Lo(e);
|
|
2946
|
+
return i.walk((s) => {
|
|
2947
|
+
if (s.kind === "comment") {
|
|
2948
|
+
let o = qo(s, n);
|
|
2949
|
+
o && s.parent.replaceChild(s, o);
|
|
2950
|
+
} else a && s.kind === "element" && s.comments && (s.startTagComments = s.comments, delete s.comments);
|
|
2951
|
+
a && (Uo(s), Vo(s), Oo(s));
|
|
2952
|
+
}), i;
|
|
2953
|
+
}
|
|
2954
|
+
function Uo(e) {
|
|
2955
|
+
if (e.kind === "block") {
|
|
2956
|
+
if (e.name = x(0, e.name.toLowerCase(), /\s+/g, " ").trim(), e.kind = "angularControlFlowBlock", !$e(e.parameters)) {
|
|
2957
|
+
delete e.parameters;
|
|
2958
|
+
return;
|
|
2959
|
+
}
|
|
2960
|
+
for (let t of e.parameters) t.kind = "angularControlFlowBlockParameter";
|
|
2961
|
+
e.parameters = { kind: "angularControlFlowBlockParameters", children: e.parameters, sourceSpan: new d(e.parameters[0].sourceSpan.start, te(0, e.parameters, -1).sourceSpan.end) };
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
function Vo(e) {
|
|
2965
|
+
e.kind === "letDeclaration" && (e.kind = "angularLetDeclaration", e.id = e.name, e.init = { kind: "angularLetDeclarationInitializer", sourceSpan: new d(e.valueSpan.start, e.valueSpan.end), value: e.value }, delete e.name, delete e.value);
|
|
2966
|
+
}
|
|
2967
|
+
function Oo(e) {
|
|
2968
|
+
e.kind === "expansion" && (e.kind = "angularIcuExpression"), e.kind === "expansionCase" && (e.kind = "angularIcuCase");
|
|
2969
|
+
}
|
|
2970
|
+
function cr(e, t) {
|
|
2971
|
+
let r = e.toLowerCase();
|
|
2972
|
+
return t(r) ? r : e;
|
|
2973
|
+
}
|
|
2974
|
+
function pr(e) {
|
|
2975
|
+
let t = e.name.startsWith(":") ? e.name.slice(1).split(":", 1)[0] : null, r = e.nameSpan.toString(), n = t !== null && r.startsWith(`${t}:`), a = n ? r.slice(t.length + 1) : r;
|
|
2976
|
+
e.name = a, e.namespace = t, e.hasExplicitNamespace = n;
|
|
2977
|
+
}
|
|
2978
|
+
function zo(e) {
|
|
2979
|
+
switch (e.kind) {
|
|
2980
|
+
case "element":
|
|
2981
|
+
pr(e);
|
|
2982
|
+
for (let t of e.attrs) pr(t), t.valueSpan ? (t.value = t.valueSpan.toString(), /["']/.test(t.value[0]) && (t.value = t.value.slice(1, -1))) : t.value = null;
|
|
2983
|
+
break;
|
|
2984
|
+
case "comment":
|
|
2985
|
+
e.value = e.sourceSpan.toString().slice(4, -3);
|
|
2986
|
+
break;
|
|
2987
|
+
case "text":
|
|
2988
|
+
e.value = e.sourceSpan.toString();
|
|
2989
|
+
break;
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
function $o(e, t) {
|
|
2993
|
+
if (e.kind === "element") {
|
|
2994
|
+
let r = lt(t.isTagNameCaseSensitive ? e.name : e.name.toLowerCase());
|
|
2995
|
+
!e.namespace || e.namespace === r.implicitNamespacePrefix || Ee(e) ? e.tagDefinition = r : e.tagDefinition = lt("");
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
function Wo(e) {
|
|
2999
|
+
e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new d(e.sourceSpan.start, e.endSourceSpan.end));
|
|
3000
|
+
}
|
|
3001
|
+
function jo(e, t) {
|
|
3002
|
+
if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix || Ee(e)) && (e.name = cr(e.name, (r) => To.has(r))), t.normalizeAttributeName)) for (let r of e.attrs) r.namespace || (r.name = cr(r.name, (n) => it.has(e.name) && (it.get("*").has(n) || it.get(e.name).has(n))));
|
|
3003
|
+
}
|
|
3004
|
+
function dn(e, t) {
|
|
3005
|
+
let { rootNodes: r, errors: n } = dt(e, hn(t));
|
|
3006
|
+
return n.length > 0 && ft(n[0]), { parseOptions: t, rootNodes: r };
|
|
3007
|
+
}
|
|
3008
|
+
function Go(e, t) {
|
|
3009
|
+
let r = hn(t), { rootNodes: n, errors: a } = dt(e, r);
|
|
3010
|
+
if (n.some((l) => l.kind === "docType" && l.value === "html" || l.kind === "element" && l.name.toLowerCase() === "html")) return dn(e, Nt);
|
|
3011
|
+
let i, s = () => i ?? (i = dt(e, { ...r, getTagContentType: void 0 })), o = (l) => {
|
|
3012
|
+
let { offset: c } = l.startSourceSpan.start;
|
|
3013
|
+
return s().rootNodes.find((p) => p.kind === "element" && p.startSourceSpan.start.offset === c) ?? l;
|
|
3014
|
+
};
|
|
3015
|
+
for (let [l, c] of n.entries()) if (c.kind === "element") {
|
|
3016
|
+
if (c.isVoid) a = s().errors, n[l] = o(c);
|
|
3017
|
+
else if (Ko(c)) {
|
|
3018
|
+
let { endSourceSpan: p, startSourceSpan: v } = c, g = s().errors.find((h) => h.span.start.offset > v.start.offset && h.span.start.offset < p.end.offset);
|
|
3019
|
+
g && ft(g), n[l] = o(c);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
return a.length > 0 && ft(a[0]), { parseOptions: t, rootNodes: n };
|
|
3023
|
+
}
|
|
3024
|
+
function Ko(e) {
|
|
3025
|
+
var r;
|
|
3026
|
+
if (e.kind !== "element" || e.name !== "template") return !1;
|
|
3027
|
+
let t = (r = e.attrs.find((n) => n.name === "lang")) == null ? void 0 : r.value;
|
|
3028
|
+
return !t || t === "html";
|
|
3029
|
+
}
|
|
3030
|
+
function ft(e) {
|
|
3031
|
+
let { msg: t, span: { start: r, end: n } } = e;
|
|
3032
|
+
throw Eo(t, { loc: { start: { line: r.line + 1, column: r.col + 1 }, end: { line: n.line + 1, column: n.col + 1 } }, cause: e });
|
|
3033
|
+
}
|
|
3034
|
+
function Jo(e, t, r, n, a, i) {
|
|
3035
|
+
let { offset: s } = n, o = Nr(t.slice(0, s)) + r, l = mn(o, e, { ...a, shouldParseFrontMatter: !1 }, i);
|
|
3036
|
+
l.sourceSpan = new d(n, te(0, l.children, -1).sourceSpan.end);
|
|
3037
|
+
let c = l.children[0];
|
|
3038
|
+
return c.length === s ? l.children.shift() : (c.sourceSpan = new d(c.sourceSpan.start.moveBy(s), c.sourceSpan.end), c.value = c.value.slice(s)), l;
|
|
3039
|
+
}
|
|
3040
|
+
function mn(e, t, r, n = {}) {
|
|
3041
|
+
let { frontMatter: a, content: i } = r.shouldParseFrontMatter ? ga(e) : { content: e }, s = new an(e, n.filepath), o = new ct(s, 0, 0, 0), l = o.moveBy(e.length), { parseOptions: c, rootNodes: p } = t(i, r), v = { kind: "root", sourceSpan: new d(o, l), children: p }, g;
|
|
3042
|
+
if (a) {
|
|
3043
|
+
let [h, C] = [a.start, a.end].map((f) => new ct(s, f.index, f.line - 1, f.column));
|
|
3044
|
+
g = { ...a, kind: "frontMatter", sourceSpan: new d(h, C) };
|
|
3045
|
+
}
|
|
3046
|
+
return Ro(v, g, c, (h, C) => Jo(t, e, h, C, c, n));
|
|
3047
|
+
}
|
|
3048
|
+
var Nt = pn({ name: "html", normalizeTagName: !0, normalizeAttributeName: !0, allowHtmComponentClosingTags: !0 });
|
|
3049
|
+
function Fe(e) {
|
|
3050
|
+
let t = pn(e), r = t.name === "vue" ? Go : dn;
|
|
3051
|
+
return { parse: (n, a) => mn(n, r, t, a), hasPragma: Zi, hasIgnorePragma: Xi, astFormat: "html", locStart: X, locEnd: Ke };
|
|
3052
|
+
}
|
|
3053
|
+
var Yo = Fe(Nt), Qo = /* @__PURE__ */ new Set(["mj-style", "mj-raw"]), Zo = Fe({ ...Nt, name: "mjml", shouldParseAsRawText: (e) => Qo.has(e) }), Xo = Fe({ name: "angular", tokenizeAngularBlocks: !0, tokenizeAngularLetDeclaration: !0, allowStartTagComments: !0 }), eu = Fe({ name: "vue", isTagNameCaseSensitive: !0, shouldParseAsRawText(e, t, r, n) {
|
|
3054
|
+
return e.toLowerCase() !== "html" && !r && (e !== "template" || n.some(({ name: a, value: i }) => a === "lang" && i !== "html" && i !== "" && i !== void 0));
|
|
3055
|
+
} }), tu = Fe({ name: "lwc", canSelfClose: !1 }), ru = { html: bo };
|
|
3056
|
+
export {
|
|
3057
|
+
Sn as default,
|
|
3058
|
+
wo as languages,
|
|
3059
|
+
Ao as options,
|
|
3060
|
+
cn as parsers,
|
|
3061
|
+
ru as printers
|
|
3062
|
+
};
|