element for table captions instead of just styled text."
+ },
+ "td-has-header": {
+ title: " has header",
+ axeSummary: "Ensure each non-empty data cell in large tables (3\xD73+) has one or more headers",
+ friendlySummary: "Every data cell in large tables should be associated with at least one header cell."
+ }
+}, axeRuleMapping_deprecated = {
+ "aria-roledescription": {
+ title: "aria-roledescription",
+ axeSummary: "Ensure aria-roledescription is only used on elements with an implicit or explicit role",
+ friendlySummary: "Only use aria-roledescription on elements that already have a defined role."
+ }
+}, combinedRulesMap = {
+ ...axeRuleMapping_wcag_2_0_a_aa,
+ ...axeRuleMapping_wcag_2_1_a_aa,
+ ...axeRuleMapping_wcag_2_2_a_aa,
+ ...axeRuleMapping_wcag_2_x_aaa,
+ ...axeRuleMapping_best_practices,
+ ...axeRuleMapping_experimental,
+ ...axeRuleMapping_deprecated
+};
+
+// src/axeRuleMappingHelper.ts
+var getTitleForAxeResult = (axeResult) => combinedRulesMap[axeResult.id]?.title || axeResult.id, getFriendlySummaryForAxeResult = (axeResult) => combinedRulesMap[axeResult.id]?.friendlySummary || axeResult.description;
+
+// src/components/A11yContext.tsx
+var unhighlightedSelectors = ["html", "body", "main"], theme = convert(themes.light), colorsByType = {
+ [RuleType.VIOLATION]: theme.color.negative,
+ [RuleType.PASS]: theme.color.positive,
+ [RuleType.INCOMPLETION]: theme.color.warning
+}, A11yContext = createContext({
+ parameters: {},
+ results: void 0,
+ highlighted: !1,
+ toggleHighlight: () => {
+ },
+ tab: RuleType.VIOLATION,
+ handleCopyLink: () => {
+ },
+ setTab: () => {
+ },
+ setStatus: () => {
+ },
+ status: "initial",
+ error: void 0,
+ handleManual: () => {
+ },
+ discrepancy: null,
+ selectedItems: /* @__PURE__ */ new Map(),
+ allExpanded: !1,
+ toggleOpen: () => {
+ },
+ handleCollapseAll: () => {
+ },
+ handleExpandAll: () => {
+ },
+ handleJumpToElement: () => {
+ },
+ handleSelectionChange: () => {
+ }
+}), A11yContextProvider = (props) => {
+ let parameters = useParameter("a11y", {}), [globals] = useGlobals() ?? [], api = useStorybookApi(), getInitialStatus = useCallback((manual2 = !1) => manual2 ? "manual" : "initial", []), manual = useMemo(() => globals?.a11y?.manual ?? !1, [globals?.a11y?.manual]), a11ySelection = useMemo(() => {
+ let value = api.getQueryParam("a11ySelection");
+ return value && api.setQueryParams({ a11ySelection: "" }), value;
+ }, [api]), [state, setState] = useAddonState(ADDON_ID, {
+ ui: {
+ highlighted: !1,
+ tab: RuleType.VIOLATION
+ },
+ results: void 0,
+ error: void 0,
+ status: getInitialStatus(manual)
+ }), { ui, results, error, status } = state, { storyId } = useStorybookState(), currentStoryA11yStatusValue = experimental_useStatusStore(
+ (allStatuses) => allStatuses[storyId]?.[STATUS_TYPE_ID_A11Y]?.value
+ );
+ useEffect(() => experimental_getStatusStore("storybook/component-test").onAllStatusChange(
+ (statuses, previousStatuses) => {
+ let current = statuses[storyId]?.[STATUS_TYPE_ID_COMPONENT_TEST], previous = previousStatuses[storyId]?.[STATUS_TYPE_ID_COMPONENT_TEST];
+ current?.value === "status-value:error" && previous?.value !== "status-value:error" && setState((prev) => ({ ...prev, status: "component-test-error" }));
+ }
+ ), [setState, storyId]);
+ let handleToggleHighlight = useCallback(() => {
+ setState((prev) => ({ ...prev, ui: { ...prev.ui, highlighted: !prev.ui.highlighted } }));
+ }, [setState]), [selectedItems, setSelectedItems] = useState(() => {
+ let initialValue = /* @__PURE__ */ new Map();
+ if (a11ySelection && /^[a-z]+.[a-z-]+.[0-9]+$/.test(a11ySelection)) {
+ let [type, id] = a11ySelection.split(".");
+ initialValue.set(`${type}.${id}`, a11ySelection);
+ }
+ return initialValue;
+ }), allExpanded = useMemo(() => results?.[ui.tab]?.every((result) => selectedItems.has(`${ui.tab}.${result.id}`)) ?? !1, [results, selectedItems, ui.tab]), toggleOpen = useCallback(
+ (event, type, item) => {
+ event.stopPropagation();
+ let key = `${type}.${item.id}`;
+ setSelectedItems((prev) => new Map(prev.delete(key) ? prev : prev.set(key, `${key}.1`)));
+ },
+ []
+ ), handleCollapseAll = useCallback(() => {
+ setSelectedItems(/* @__PURE__ */ new Map());
+ }, []), handleExpandAll = useCallback(() => {
+ setSelectedItems(
+ (prev) => new Map(
+ results?.[ui.tab]?.map((result) => {
+ let key = `${ui.tab}.${result.id}`;
+ return [key, prev.get(key) ?? `${key}.1`];
+ }) ?? []
+ )
+ );
+ }, [results, ui.tab]), handleSelectionChange = useCallback((key) => {
+ let [type, id] = key.split(".");
+ setSelectedItems((prev) => new Map(prev.set(`${type}.${id}`, key)));
+ }, []), handleError = useCallback(
+ (err) => {
+ setState((prev) => ({ ...prev, status: "error", error: err }));
+ },
+ [setState]
+ ), handleResult = useCallback(
+ (axeResults, id) => {
+ storyId === id && (setState((prev) => ({ ...prev, status: "ran", results: axeResults })), setTimeout(() => {
+ setState((prev) => prev.status === "ran" ? { ...prev, status: "ready" } : prev), setSelectedItems((prev) => {
+ if (prev.size === 1) {
+ let [key] = prev.values();
+ document.getElementById(key)?.scrollIntoView({ behavior: "smooth", block: "center" });
+ }
+ return prev;
+ });
+ }, 900));
+ },
+ [storyId, setState, setSelectedItems]
+ ), handleSelect = useCallback(
+ (itemId, details) => {
+ let [type, id] = itemId.split("."), { helpUrl, nodes } = results?.[type]?.find((r) => r.id === id) || {}, openedWindow = helpUrl && window.open(helpUrl, "_blank", "noopener,noreferrer");
+ if (nodes && !openedWindow) {
+ let index = nodes.findIndex((n) => details.selectors.some((s) => s === String(n.target))) ?? -1;
+ if (index !== -1) {
+ let key = `${type}.${id}.${index + 1}`;
+ setSelectedItems(/* @__PURE__ */ new Map([[`${type}.${id}`, key]])), setTimeout(() => {
+ document.getElementById(key)?.scrollIntoView({ behavior: "smooth", block: "center" });
+ }, 100);
+ }
+ }
+ },
+ [results]
+ ), handleReport = useCallback(
+ ({ reporters }) => {
+ let a11yReport = reporters.find((r) => r.type === "a11y");
+ a11yReport && ("error" in a11yReport.result ? handleError(a11yReport.result.error) : handleResult(a11yReport.result, storyId));
+ },
+ [handleError, handleResult, storyId]
+ ), handleReset = useCallback(
+ ({ newPhase }) => {
+ newPhase === "loading" ? setState((prev) => ({
+ ...prev,
+ results: void 0,
+ status: manual ? "manual" : "initial"
+ })) : newPhase === "afterEach" && !manual && setState((prev) => ({ ...prev, status: "running" }));
+ },
+ [manual, setState]
+ ), emit = useChannel(
+ {
+ [EVENTS.RESULT]: handleResult,
+ [EVENTS.ERROR]: handleError,
+ [EVENTS.SELECT]: handleSelect,
+ [STORY_CHANGED]: () => setSelectedItems(/* @__PURE__ */ new Map()),
+ [STORY_RENDER_PHASE_CHANGED]: handleReset,
+ [STORY_FINISHED]: handleReport,
+ [STORY_HOT_UPDATED]: () => {
+ setState((prev) => ({ ...prev, status: "running" })), emit(EVENTS.MANUAL, storyId, parameters);
+ }
+ },
+ [handleReset, handleReport, handleSelect, handleError, handleResult, parameters, storyId]
+ ), handleManual = useCallback(() => {
+ setState((prev) => ({ ...prev, status: "running" })), emit(EVENTS.MANUAL, storyId, parameters);
+ }, [emit, parameters, setState, storyId]), handleCopyLink = useCallback(async (linkPath) => {
+ let { createCopyToClipboardFunction } = await import("storybook/internal/components");
+ await createCopyToClipboardFunction()(`${window.location.origin}${linkPath}`);
+ }, []), handleJumpToElement = useCallback(
+ (target) => emit(SCROLL_INTO_VIEW, target),
+ [emit]
+ );
+ useEffect(() => {
+ setState((prev) => ({ ...prev, status: getInitialStatus(manual) }));
+ }, [getInitialStatus, manual, setState]);
+ let isInitial = status === "initial";
+ useEffect(() => {
+ a11ySelection && setState((prev) => {
+ let update = { ...prev.ui, highlighted: !0 }, [type] = a11ySelection.split(".") ?? [];
+ return type && Object.values(RuleType).includes(type) && (update.tab = type), { ...prev, ui: update };
+ });
+ }, [a11ySelection]), useEffect(() => {
+ if (emit(REMOVE_HIGHLIGHT, `${ADDON_ID}/selected`), emit(REMOVE_HIGHLIGHT, `${ADDON_ID}/others`), !ui.highlighted || isInitial)
+ return;
+ let selected = Array.from(selectedItems.values()).flatMap((key) => {
+ let [type, id, number] = key.split(".");
+ if (type !== ui.tab)
+ return [];
+ let target = results?.[type]?.find((r) => r.id === id)?.nodes[Number(number) - 1]?.target;
+ return target ? [String(target)] : [];
+ });
+ selected.length && emit(HIGHLIGHT, {
+ id: `${ADDON_ID}/selected`,
+ priority: 1,
+ selectors: selected,
+ styles: {
+ outline: `1px solid color-mix(in srgb, ${colorsByType[ui.tab]}, transparent 30%)`,
+ backgroundColor: "transparent"
+ },
+ hoverStyles: {
+ outlineWidth: "2px"
+ },
+ focusStyles: {
+ backgroundColor: "transparent"
+ },
+ menu: results?.[ui.tab].map((result) => {
+ let selectors = result.nodes.flatMap((n) => n.target).map(String).filter((e) => selected.includes(e));
+ return [
+ {
+ id: `${ui.tab}.${result.id}:info`,
+ title: getTitleForAxeResult(result),
+ description: getFriendlySummaryForAxeResult(result),
+ selectors
+ },
+ {
+ id: `${ui.tab}.${result.id}`,
+ iconLeft: "info",
+ iconRight: "shareAlt",
+ title: "Learn how to resolve this violation",
+ clickEvent: EVENTS.SELECT,
+ selectors
+ }
+ ];
+ })
+ });
+ let others = results?.[ui.tab].flatMap((r) => r.nodes.flatMap((n) => n.target).map(String)).filter((e) => ![...unhighlightedSelectors, ...selected].includes(e));
+ others?.length && emit(HIGHLIGHT, {
+ id: `${ADDON_ID}/others`,
+ selectors: others,
+ styles: {
+ outline: `1px solid color-mix(in srgb, ${colorsByType[ui.tab]}, transparent 30%)`,
+ backgroundColor: `color-mix(in srgb, ${colorsByType[ui.tab]}, transparent 60%)`
+ },
+ hoverStyles: {
+ outlineWidth: "2px"
+ },
+ focusStyles: {
+ backgroundColor: "transparent"
+ },
+ menu: results?.[ui.tab].map((result) => {
+ let selectors = result.nodes.flatMap((n) => n.target).map(String).filter((e) => !selected.includes(e));
+ return [
+ {
+ id: `${ui.tab}.${result.id}:info`,
+ title: getTitleForAxeResult(result),
+ description: getFriendlySummaryForAxeResult(result),
+ selectors
+ },
+ {
+ id: `${ui.tab}.${result.id}`,
+ iconLeft: "info",
+ iconRight: "shareAlt",
+ title: "Learn how to resolve this violation",
+ clickEvent: EVENTS.SELECT,
+ selectors
+ }
+ ];
+ })
+ });
+ }, [isInitial, emit, ui.highlighted, results, ui.tab, selectedItems]);
+ let discrepancy = useMemo(() => {
+ if (!currentStoryA11yStatusValue)
+ return null;
+ if (currentStoryA11yStatusValue === "status-value:success" && results?.violations.length)
+ return "cliPassedBrowserFailed";
+ if (currentStoryA11yStatusValue === "status-value:error" && !results?.violations.length) {
+ if (status === "ready" || status === "ran")
+ return "browserPassedCliFailed";
+ if (status === "manual")
+ return "cliFailedButModeManual";
+ }
+ return null;
+ }, [results?.violations.length, status, currentStoryA11yStatusValue]);
+ return React.createElement(
+ A11yContext.Provider,
+ {
+ value: {
+ parameters,
+ results,
+ highlighted: ui.highlighted,
+ toggleHighlight: handleToggleHighlight,
+ tab: ui.tab,
+ setTab: useCallback(
+ (type) => setState((prev) => ({ ...prev, ui: { ...prev.ui, tab: type } })),
+ [setState]
+ ),
+ handleCopyLink,
+ status,
+ setStatus: useCallback(
+ (status2) => setState((prev) => ({ ...prev, status: status2 })),
+ [setState]
+ ),
+ error,
+ handleManual,
+ discrepancy,
+ selectedItems,
+ toggleOpen,
+ allExpanded,
+ handleCollapseAll,
+ handleExpandAll,
+ handleJumpToElement,
+ handleSelectionChange
+ },
+ ...props
+ }
+ );
+}, useA11yContext = () => useContext(A11yContext);
+
+// src/components/Report/Report.tsx
+import React3 from "react";
+import { Badge, Button as Button2, EmptyTabContent } from "storybook/internal/components";
+import { ChevronSmallDownIcon } from "@storybook/icons";
+import { styled as styled2 } from "storybook/theming";
+
+// src/components/Report/Details.tsx
+import React2, { Fragment, useCallback as useCallback2, useState as useState3 } from "react";
+import { Button, Link, SyntaxHighlighter } from "storybook/internal/components";
+import { CheckIcon, CopyIcon, LocationIcon } from "@storybook/icons";
+
+// ../../../node_modules/@babel/runtime/helpers/esm/extends.js
+function _extends() {
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
+ for (var e = 1; e < arguments.length; e++) {
+ var t = arguments[e];
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
+ }
+ return n;
+ }, _extends.apply(null, arguments);
+}
+
+// ../../../node_modules/@radix-ui/react-tabs/dist/index.mjs
+import { forwardRef as $1IHzk$forwardRef, createElement as $1IHzk$createElement, useRef as $1IHzk$useRef, useEffect as $1IHzk$useEffect } from "react";
+
+// ../../../node_modules/@radix-ui/primitive/dist/index.mjs
+function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = !0 } = {}) {
+ return function(event) {
+ if (originalEventHandler?.(event), checkForDefaultPrevented === !1 || !event.defaultPrevented) return ourEventHandler?.(event);
+ };
+}
+
+// ../../../node_modules/@radix-ui/react-context/dist/index.mjs
+import { createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext } from "react";
+function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
+ let defaultContexts = [];
+ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
+ let BaseContext = $3bkAK$createContext(defaultContext), index = defaultContexts.length;
+ defaultContexts = [
+ ...defaultContexts,
+ defaultContext
+ ];
+ function Provider(props) {
+ let { scope, children, ...context } = props, Context = scope?.[scopeName][index] || BaseContext, value = $3bkAK$useMemo(
+ () => context,
+ Object.values(context)
+ );
+ return $3bkAK$createElement(Context.Provider, {
+ value
+ }, children);
+ }
+ function useContext2(consumerName, scope) {
+ let Context = scope?.[scopeName][index] || BaseContext, context = $3bkAK$useContext(Context);
+ if (context) return context;
+ if (defaultContext !== void 0) return defaultContext;
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
+ }
+ return Provider.displayName = rootComponentName + "Provider", [
+ Provider,
+ useContext2
+ ];
+ }
+ let createScope = () => {
+ let scopeContexts = defaultContexts.map((defaultContext) => $3bkAK$createContext(defaultContext));
+ return function(scope) {
+ let contexts = scope?.[scopeName] || scopeContexts;
+ return $3bkAK$useMemo(
+ () => ({
+ [`__scope${scopeName}`]: {
+ ...scope,
+ [scopeName]: contexts
+ }
+ }),
+ [
+ scope,
+ contexts
+ ]
+ );
+ };
+ };
+ return createScope.scopeName = scopeName, [
+ $c512c27ab02ef895$export$fd42f52fd3ae1109,
+ $c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
+ ];
+}
+function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
+ let baseScope = scopes[0];
+ if (scopes.length === 1) return baseScope;
+ let createScope1 = () => {
+ let scopeHooks = scopes.map(
+ (createScope) => ({
+ useScope: createScope(),
+ scopeName: createScope.scopeName
+ })
+ );
+ return function(overrideScopes) {
+ let nextScopes1 = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {
+ let currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
+ return {
+ ...nextScopes,
+ ...currentScope
+ };
+ }, {});
+ return $3bkAK$useMemo(
+ () => ({
+ [`__scope${baseScope.scopeName}`]: nextScopes1
+ }),
+ [
+ nextScopes1
+ ]
+ );
+ };
+ };
+ return createScope1.scopeName = baseScope.scopeName, createScope1;
+}
+
+// ../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
+import { forwardRef as $98Iye$forwardRef, createElement as $98Iye$createElement, useRef as $98Iye$useRef, useState as $98Iye$useState, useEffect as $98Iye$useEffect, useCallback as $98Iye$useCallback } from "react";
+
+// ../../../node_modules/@radix-ui/react-collection/dist/index.mjs
+import $6vYhU$react from "react";
+
+// ../../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
+import { useCallback as $3vqmr$useCallback } from "react";
+function $6ed0406888f73fc4$var$setRef(ref, value) {
+ typeof ref == "function" ? ref(value) : ref != null && (ref.current = value);
+}
+function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
+ return (node) => refs.forEach(
+ (ref) => $6ed0406888f73fc4$var$setRef(ref, node)
+ );
+}
+function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
+ return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
+}
+
+// ../../../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
+import { forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment } from "react";
+var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = $9IrjX$forwardRef((props, forwardedRef) => {
+ let { children, ...slotProps } = props, childrenArray = $9IrjX$Children.toArray(children), slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
+ if (slottable) {
+ let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? $9IrjX$Children.count(newElement) > 1 ? $9IrjX$Children.only(null) : $9IrjX$isValidElement(newElement) ? newElement.props.children : null : child);
+ return $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
+ ref: forwardedRef
+ }), $9IrjX$isValidElement(newElement) ? $9IrjX$cloneElement(newElement, void 0, newChildren) : null);
+ }
+ return $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
+ ref: forwardedRef
+ }), children);
+});
+$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
+var $5e63c961fc1ce211$var$SlotClone = $9IrjX$forwardRef((props, forwardedRef) => {
+ let { children, ...slotProps } = props;
+ return $9IrjX$isValidElement(children) ? $9IrjX$cloneElement(children, {
+ ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
+ ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
+ }) : $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;
+});
+$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
+var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => $9IrjX$createElement($9IrjX$Fragment, null, children);
+function $5e63c961fc1ce211$var$isSlottable(child) {
+ return $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
+}
+function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
+ let overrideProps = {
+ ...childProps
+ };
+ for (let propName in childProps) {
+ let slotPropValue = slotProps[propName], childPropValue = childProps[propName];
+ /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => {
+ childPropValue(...args), slotPropValue(...args);
+ } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = {
+ ...slotPropValue,
+ ...childPropValue
+ } : propName === "className" && (overrideProps[propName] = [
+ slotPropValue,
+ childPropValue
+ ].filter(Boolean).join(" "));
+ }
+ return {
+ ...slotProps,
+ ...overrideProps
+ };
+}
+
+// ../../../node_modules/@radix-ui/react-collection/dist/index.mjs
+function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
+ let PROVIDER_NAME = name + "CollectionProvider", [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME), [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
+ collectionRef: {
+ current: null
+ },
+ itemMap: /* @__PURE__ */ new Map()
+ }), CollectionProvider = (props) => {
+ let { scope, children } = props, ref = $6vYhU$react.useRef(null), itemMap = $6vYhU$react.useRef(/* @__PURE__ */ new Map()).current;
+ return $6vYhU$react.createElement(CollectionProviderImpl, {
+ scope,
+ itemMap,
+ collectionRef: ref
+ }, children);
+ };
+ Object.assign(CollectionProvider, {
+ displayName: PROVIDER_NAME
+ });
+ let COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = $6vYhU$react.forwardRef((props, forwardedRef) => {
+ let { scope, children } = props, context = useCollectionContext(COLLECTION_SLOT_NAME, scope), composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
+ return $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
+ ref: composedRefs
+ }, children);
+ });
+ Object.assign(CollectionSlot, {
+ displayName: COLLECTION_SLOT_NAME
+ });
+ let ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-radix-collection-item", CollectionItemSlot = $6vYhU$react.forwardRef((props, forwardedRef) => {
+ let { scope, children, ...itemData } = props, ref = $6vYhU$react.useRef(null), composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref), context = useCollectionContext(ITEM_SLOT_NAME, scope);
+ return $6vYhU$react.useEffect(() => (context.itemMap.set(ref, {
+ ref,
+ ...itemData
+ }), () => void context.itemMap.delete(ref))), $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
+ [ITEM_DATA_ATTR]: "",
+ ref: composedRefs
+ }, children);
+ });
+ Object.assign(CollectionItemSlot, {
+ displayName: ITEM_SLOT_NAME
+ });
+ function useCollection(scope) {
+ let context = useCollectionContext(name + "CollectionConsumer", scope);
+ return $6vYhU$react.useCallback(() => {
+ let collectionNode = context.collectionRef.current;
+ if (!collectionNode) return [];
+ let orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
+ return Array.from(context.itemMap.values()).sort(
+ (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
+ );
+ }, [
+ context.collectionRef,
+ context.itemMap
+ ]);
+ }
+ return [
+ {
+ Provider: CollectionProvider,
+ Slot: CollectionSlot,
+ ItemSlot: CollectionItemSlot
+ },
+ useCollection,
+ createCollectionScope
+ ];
+}
+
+// ../../../node_modules/@radix-ui/react-id/dist/index.mjs
+import * as $2AODx$react from "react";
+
+// ../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
+import { useLayoutEffect as $dxlwH$useLayoutEffect } from "react";
+var $9f79659886946c16$export$e5c5a5f917a5871c = globalThis?.document ? $dxlwH$useLayoutEffect : () => {
+};
+
+// ../../../node_modules/@radix-ui/react-id/dist/index.mjs
+var $1746a345f3d73bb7$var$useReactId = $2AODx$react.useId || (() => {
+}), $1746a345f3d73bb7$var$count = 0;
+function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
+ let [id, setId] = $2AODx$react.useState($1746a345f3d73bb7$var$useReactId());
+ return $9f79659886946c16$export$e5c5a5f917a5871c(() => {
+ deterministicId || setId(
+ (reactId) => reactId ?? String($1746a345f3d73bb7$var$count++)
+ );
+ }, [
+ deterministicId
+ ]), deterministicId || (id ? `radix-${id}` : "");
+}
+
+// ../../../node_modules/@radix-ui/react-primitive/dist/index.mjs
+import { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from "react";
+import { flushSync as $4q5Fq$flushSync } from "react-dom";
+
+// ../../../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
+import { forwardRef as $9IrjX$forwardRef2, Children as $9IrjX$Children2, isValidElement as $9IrjX$isValidElement2, createElement as $9IrjX$createElement2, cloneElement as $9IrjX$cloneElement2, Fragment as $9IrjX$Fragment2 } from "react";
+var $5e63c961fc1ce211$export$8c6ed5c666ac13602 = $9IrjX$forwardRef2((props, forwardedRef) => {
+ let { children, ...slotProps } = props, childrenArray = $9IrjX$Children2.toArray(children), slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable2);
+ if (slottable) {
+ let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? $9IrjX$Children2.count(newElement) > 1 ? $9IrjX$Children2.only(null) : $9IrjX$isValidElement2(newElement) ? newElement.props.children : null : child);
+ return $9IrjX$createElement2($5e63c961fc1ce211$var$SlotClone2, _extends({}, slotProps, {
+ ref: forwardedRef
+ }), $9IrjX$isValidElement2(newElement) ? $9IrjX$cloneElement2(newElement, void 0, newChildren) : null);
+ }
+ return $9IrjX$createElement2($5e63c961fc1ce211$var$SlotClone2, _extends({}, slotProps, {
+ ref: forwardedRef
+ }), children);
+});
+$5e63c961fc1ce211$export$8c6ed5c666ac13602.displayName = "Slot";
+var $5e63c961fc1ce211$var$SlotClone2 = $9IrjX$forwardRef2((props, forwardedRef) => {
+ let { children, ...slotProps } = props;
+ return $9IrjX$isValidElement2(children) ? $9IrjX$cloneElement2(children, {
+ ...$5e63c961fc1ce211$var$mergeProps2(slotProps, children.props),
+ ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
+ }) : $9IrjX$Children2.count(children) > 1 ? $9IrjX$Children2.only(null) : null;
+});
+$5e63c961fc1ce211$var$SlotClone2.displayName = "SlotClone";
+var $5e63c961fc1ce211$export$d9f1ccf0bdb05d452 = ({ children }) => $9IrjX$createElement2($9IrjX$Fragment2, null, children);
+function $5e63c961fc1ce211$var$isSlottable2(child) {
+ return $9IrjX$isValidElement2(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d452;
+}
+function $5e63c961fc1ce211$var$mergeProps2(slotProps, childProps) {
+ let overrideProps = {
+ ...childProps
+ };
+ for (let propName in childProps) {
+ let slotPropValue = slotProps[propName], childPropValue = childProps[propName];
+ /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => {
+ childPropValue(...args), slotPropValue(...args);
+ } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = {
+ ...slotPropValue,
+ ...childPropValue
+ } : propName === "className" && (overrideProps[propName] = [
+ slotPropValue,
+ childPropValue
+ ].filter(Boolean).join(" "));
+ }
+ return {
+ ...slotProps,
+ ...overrideProps
+ };
+}
+
+// ../../../node_modules/@radix-ui/react-primitive/dist/index.mjs
+var $8927f6f2acc4f386$var$NODES = [
+ "a",
+ "button",
+ "div",
+ "form",
+ "h2",
+ "h3",
+ "img",
+ "input",
+ "label",
+ "li",
+ "nav",
+ "ol",
+ "p",
+ "span",
+ "svg",
+ "ul"
+], $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node) => {
+ let Node = $4q5Fq$forwardRef((props, forwardedRef) => {
+ let { asChild, ...primitiveProps } = props, Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac13602 : node;
+ return $4q5Fq$useEffect(() => {
+ window[Symbol.for("radix-ui")] = !0;
+ }, []), $4q5Fq$createElement(Comp, _extends({}, primitiveProps, {
+ ref: forwardedRef
+ }));
+ });
+ return Node.displayName = `Primitive.${node}`, {
+ ...primitive,
+ [node]: Node
+ };
+}, {});
+
+// ../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
+import { useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo } from "react";
+function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
+ let callbackRef = $lwiWj$useRef(callback);
+ return $lwiWj$useEffect(() => {
+ callbackRef.current = callback;
+ }), $lwiWj$useMemo(
+ () => (...args) => {
+ var _callbackRef$current;
+ return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
+ },
+ []
+ );
+}
+
+// ../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
+import { useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect } from "react";
+function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange = () => {
+} }) {
+ let [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
+ defaultProp,
+ onChange
+ }), isControlled = prop !== void 0, value1 = isControlled ? prop : uncontrolledProp, handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange), setValue = $bnPw9$useCallback((nextValue) => {
+ if (isControlled) {
+ let value = typeof nextValue == "function" ? nextValue(prop) : nextValue;
+ value !== prop && handleChange(value);
+ } else setUncontrolledProp(nextValue);
+ }, [
+ isControlled,
+ prop,
+ setUncontrolledProp,
+ handleChange
+ ]);
+ return [
+ value1,
+ setValue
+ ];
+}
+function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
+ let uncontrolledState = $bnPw9$useState(defaultProp), [value] = uncontrolledState, prevValueRef = $bnPw9$useRef(value), handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
+ return $bnPw9$useEffect(() => {
+ prevValueRef.current !== value && (handleChange(value), prevValueRef.current = value);
+ }, [
+ value,
+ prevValueRef,
+ handleChange
+ ]), uncontrolledState;
+}
+
+// ../../../node_modules/@radix-ui/react-direction/dist/index.mjs
+import { createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext } from "react";
+var $f631663db3294ace$var$DirectionContext = $7Gjcd$createContext(void 0);
+function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
+ let globalDir = $7Gjcd$useContext($f631663db3294ace$var$DirectionContext);
+ return localDir || globalDir || "ltr";
+}
+
+// ../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
+var $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
+ bubbles: !1,
+ cancelable: !0
+}, $d7bdfb9eb0fdf311$var$GROUP_NAME = "RovingFocusGroup", [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME), [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
+ $d7bdfb9eb0fdf311$var$createCollectionScope
+]), [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME), $d7bdfb9eb0fdf311$export$8699f7c8af148338 = $98Iye$forwardRef((props, forwardedRef) => $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {
+ scope: props.__scopeRovingFocusGroup
+}, $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
+ scope: props.__scopeRovingFocusGroup
+}, $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
+ ref: forwardedRef
+})))));
+Object.assign($d7bdfb9eb0fdf311$export$8699f7c8af148338, {
+ displayName: $d7bdfb9eb0fdf311$var$GROUP_NAME
+});
+var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = $98Iye$forwardRef((props, forwardedRef) => {
+ let { __scopeRovingFocusGroup, orientation, loop = !1, dir, currentTabStopId: currentTabStopIdProp, defaultCurrentTabStopId, onCurrentTabStopIdChange, onEntryFocus, ...groupProps } = props, ref = $98Iye$useRef(null), composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref), direction = $f631663db3294ace$export$b39126d51d94e6f3(dir), [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3({
+ prop: currentTabStopIdProp,
+ defaultProp: defaultCurrentTabStopId,
+ onChange: onCurrentTabStopIdChange
+ }), [isTabbingBackOut, setIsTabbingBackOut] = $98Iye$useState(!1), handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus), getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup), isClickFocusRef = $98Iye$useRef(!1), [focusableItemsCount, setFocusableItemsCount] = $98Iye$useState(0);
+ return $98Iye$useEffect(() => {
+ let node = ref.current;
+ if (node)
+ return node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus), () => node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
+ }, [
+ handleEntryFocus
+ ]), $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
+ scope: __scopeRovingFocusGroup,
+ orientation,
+ dir: direction,
+ loop,
+ currentTabStopId,
+ onItemFocus: $98Iye$useCallback(
+ (tabStopId) => setCurrentTabStopId(tabStopId),
+ [
+ setCurrentTabStopId
+ ]
+ ),
+ onItemShiftTab: $98Iye$useCallback(
+ () => setIsTabbingBackOut(!0),
+ []
+ ),
+ onFocusableItemAdd: $98Iye$useCallback(
+ () => setFocusableItemsCount(
+ (prevCount) => prevCount + 1
+ ),
+ []
+ ),
+ onFocusableItemRemove: $98Iye$useCallback(
+ () => setFocusableItemsCount(
+ (prevCount) => prevCount - 1
+ ),
+ []
+ )
+ }, $98Iye$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
+ tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
+ "data-orientation": orientation
+ }, groupProps, {
+ ref: composedRefs,
+ style: {
+ outline: "none",
+ ...props.style
+ },
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, () => {
+ isClickFocusRef.current = !0;
+ }),
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, (event) => {
+ let isKeyboardFocus = !isClickFocusRef.current;
+ if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
+ let entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);
+ if (event.currentTarget.dispatchEvent(entryFocusEvent), !entryFocusEvent.defaultPrevented) {
+ let items = getItems().filter(
+ (item) => item.focusable
+ ), activeItem = items.find(
+ (item) => item.active
+ ), currentItem = items.find(
+ (item) => item.id === currentTabStopId
+ ), candidateNodes = [
+ activeItem,
+ currentItem,
+ ...items
+ ].filter(Boolean).map(
+ (item) => item.ref.current
+ );
+ $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);
+ }
+ }
+ isClickFocusRef.current = !1;
+ }),
+ onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(
+ props.onBlur,
+ () => setIsTabbingBackOut(!1)
+ )
+ })));
+}), $d7bdfb9eb0fdf311$var$ITEM_NAME = "RovingFocusGroupItem", $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = $98Iye$forwardRef((props, forwardedRef) => {
+ let { __scopeRovingFocusGroup, focusable = !0, active = !1, tabStopId, ...itemProps } = props, autoId = $1746a345f3d73bb7$export$f680877a34711e37(), id = tabStopId || autoId, context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup), isCurrentTabStop = context.currentTabStopId === id, getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup), { onFocusableItemAdd, onFocusableItemRemove } = context;
+ return $98Iye$useEffect(() => {
+ if (focusable)
+ return onFocusableItemAdd(), () => onFocusableItemRemove();
+ }, [
+ focusable,
+ onFocusableItemAdd,
+ onFocusableItemRemove
+ ]), $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
+ scope: __scopeRovingFocusGroup,
+ id,
+ focusable,
+ active
+ }, $98Iye$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
+ tabIndex: isCurrentTabStop ? 0 : -1,
+ "data-orientation": context.orientation
+ }, itemProps, {
+ ref: forwardedRef,
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, (event) => {
+ focusable ? context.onItemFocus(id) : event.preventDefault();
+ }),
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(
+ props.onFocus,
+ () => context.onItemFocus(id)
+ ),
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
+ if (event.key === "Tab" && event.shiftKey) {
+ context.onItemShiftTab();
+ return;
+ }
+ if (event.target !== event.currentTarget) return;
+ let focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);
+ if (focusIntent !== void 0) {
+ event.preventDefault();
+ let candidateNodes = getItems().filter(
+ (item) => item.focusable
+ ).map(
+ (item) => item.ref.current
+ );
+ if (focusIntent === "last") candidateNodes.reverse();
+ else if (focusIntent === "prev" || focusIntent === "next") {
+ focusIntent === "prev" && candidateNodes.reverse();
+ let currentIndex = candidateNodes.indexOf(event.currentTarget);
+ candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
+ }
+ setTimeout(
+ () => $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes)
+ );
+ }
+ })
+ })));
+});
+Object.assign($d7bdfb9eb0fdf311$export$ab9df7c53fe8454, {
+ displayName: $d7bdfb9eb0fdf311$var$ITEM_NAME
+});
+var $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {
+ ArrowLeft: "prev",
+ ArrowUp: "prev",
+ ArrowRight: "next",
+ ArrowDown: "next",
+ PageUp: "first",
+ Home: "first",
+ PageDown: "last",
+ End: "last"
+};
+function $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {
+ return dir !== "rtl" ? key : key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
+}
+function $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {
+ let key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);
+ if (!(orientation === "vertical" && [
+ "ArrowLeft",
+ "ArrowRight"
+ ].includes(key)) && !(orientation === "horizontal" && [
+ "ArrowUp",
+ "ArrowDown"
+ ].includes(key)))
+ return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];
+}
+function $d7bdfb9eb0fdf311$var$focusFirst(candidates) {
+ let PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
+ for (let candidate of candidates)
+ if (candidate === PREVIOUSLY_FOCUSED_ELEMENT || (candidate.focus(), document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)) return;
+}
+function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
+ return array.map(
+ (_, index) => array[(startIndex + index) % array.length]
+ );
+}
+var $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338, $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
+
+// ../../../node_modules/@radix-ui/react-presence/dist/index.mjs
+import { Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer } from "react";
+import { flushSync as $iqq3r$flushSync } from "react-dom";
+function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
+ return $iqq3r$useReducer((state, event) => {
+ let nextState = machine[state][event];
+ return nextState ?? state;
+ }, initialState);
+}
+var $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
+ let { present, children } = props, presence = $921a889cee6df7e8$var$usePresence(present), child = typeof children == "function" ? children({
+ present: presence.isPresent
+ }) : $iqq3r$Children.only(children), ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
+ return typeof children == "function" || presence.isPresent ? $iqq3r$cloneElement(child, {
+ ref
+ }) : null;
+};
+$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = "Presence";
+function $921a889cee6df7e8$var$usePresence(present) {
+ let [node1, setNode] = $iqq3r$useState(), stylesRef = $iqq3r$useRef({}), prevPresentRef = $iqq3r$useRef(present), prevAnimationNameRef = $iqq3r$useRef("none"), initialState = present ? "mounted" : "unmounted", [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
+ mounted: {
+ UNMOUNT: "unmounted",
+ ANIMATION_OUT: "unmountSuspended"
+ },
+ unmountSuspended: {
+ MOUNT: "mounted",
+ ANIMATION_END: "unmounted"
+ },
+ unmounted: {
+ MOUNT: "mounted"
+ }
+ });
+ return $iqq3r$useEffect(() => {
+ let currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
+ }, [
+ state
+ ]), $9f79659886946c16$export$e5c5a5f917a5871c(() => {
+ let styles = stylesRef.current, wasPresent = prevPresentRef.current;
+ if (wasPresent !== present) {
+ let prevAnimationName = prevAnimationNameRef.current, currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
+ present ? send("MOUNT") : currentAnimationName === "none" || styles?.display === "none" ? send("UNMOUNT") : send(wasPresent && prevAnimationName !== currentAnimationName ? "ANIMATION_OUT" : "UNMOUNT"), prevPresentRef.current = present;
+ }
+ }, [
+ present,
+ send
+ ]), $9f79659886946c16$export$e5c5a5f917a5871c(() => {
+ if (node1) {
+ let handleAnimationEnd = (event) => {
+ let isCurrentAnimation = $921a889cee6df7e8$var$getAnimationName(stylesRef.current).includes(event.animationName);
+ event.target === node1 && isCurrentAnimation && $iqq3r$flushSync(
+ () => send("ANIMATION_END")
+ );
+ }, handleAnimationStart = (event) => {
+ event.target === node1 && (prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current));
+ };
+ return node1.addEventListener("animationstart", handleAnimationStart), node1.addEventListener("animationcancel", handleAnimationEnd), node1.addEventListener("animationend", handleAnimationEnd), () => {
+ node1.removeEventListener("animationstart", handleAnimationStart), node1.removeEventListener("animationcancel", handleAnimationEnd), node1.removeEventListener("animationend", handleAnimationEnd);
+ };
+ } else
+ send("ANIMATION_END");
+ }, [
+ node1,
+ send
+ ]), {
+ isPresent: [
+ "mounted",
+ "unmountSuspended"
+ ].includes(state),
+ ref: $iqq3r$useCallback((node) => {
+ node && (stylesRef.current = getComputedStyle(node)), setNode(node);
+ }, [])
+ };
+}
+function $921a889cee6df7e8$var$getAnimationName(styles) {
+ return styles?.animationName || "none";
+}
+
+// ../../../node_modules/@radix-ui/react-tabs/dist/index.mjs
+var $69cb30bb0017df05$var$TABS_NAME = "Tabs", [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($69cb30bb0017df05$var$TABS_NAME, [
+ $d7bdfb9eb0fdf311$export$c7109489551a4f4
+]), $69cb30bb0017df05$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4(), [$69cb30bb0017df05$var$TabsProvider, $69cb30bb0017df05$var$useTabsContext] = $69cb30bb0017df05$var$createTabsContext($69cb30bb0017df05$var$TABS_NAME), $69cb30bb0017df05$export$b2539bed5023c21c = $1IHzk$forwardRef((props, forwardedRef) => {
+ let { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", ...tabsProps } = props, direction = $f631663db3294ace$export$b39126d51d94e6f3(dir), [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
+ prop: valueProp,
+ onChange: onValueChange,
+ defaultProp: defaultValue
+ });
+ return $1IHzk$createElement($69cb30bb0017df05$var$TabsProvider, {
+ scope: __scopeTabs,
+ baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
+ value,
+ onValueChange: setValue,
+ orientation,
+ dir: direction,
+ activationMode
+ }, $1IHzk$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
+ dir: direction,
+ "data-orientation": orientation
+ }, tabsProps, {
+ ref: forwardedRef
+ })));
+});
+Object.assign($69cb30bb0017df05$export$b2539bed5023c21c, {
+ displayName: $69cb30bb0017df05$var$TABS_NAME
+});
+var $69cb30bb0017df05$var$TAB_LIST_NAME = "TabsList", $69cb30bb0017df05$export$9712d22edc0d78c1 = $1IHzk$forwardRef((props, forwardedRef) => {
+ let { __scopeTabs, loop = !0, ...listProps } = props, context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs), rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
+ return $1IHzk$createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
+ asChild: !0
+ }, rovingFocusGroupScope, {
+ orientation: context.orientation,
+ dir: context.dir,
+ loop
+ }), $1IHzk$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
+ role: "tablist",
+ "aria-orientation": context.orientation
+ }, listProps, {
+ ref: forwardedRef
+ })));
+});
+Object.assign($69cb30bb0017df05$export$9712d22edc0d78c1, {
+ displayName: $69cb30bb0017df05$var$TAB_LIST_NAME
+});
+var $69cb30bb0017df05$var$TRIGGER_NAME = "TabsTrigger", $69cb30bb0017df05$export$8114b9fdfdf9f3ba = $1IHzk$forwardRef((props, forwardedRef) => {
+ let { __scopeTabs, value, disabled = !1, ...triggerProps } = props, context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TRIGGER_NAME, __scopeTabs), rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs), triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value), contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value), isSelected = value === context.value;
+ return $1IHzk$createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
+ asChild: !0
+ }, rovingFocusGroupScope, {
+ focusable: !disabled,
+ active: isSelected
+ }), $1IHzk$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
+ type: "button",
+ role: "tab",
+ "aria-selected": isSelected,
+ "aria-controls": contentId,
+ "data-state": isSelected ? "active" : "inactive",
+ "data-disabled": disabled ? "" : void 0,
+ disabled,
+ id: triggerId
+ }, triggerProps, {
+ ref: forwardedRef,
+ onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, (event) => {
+ !disabled && event.button === 0 && event.ctrlKey === !1 ? context.onValueChange(value) : event.preventDefault();
+ }),
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
+ [
+ " ",
+ "Enter"
+ ].includes(event.key) && context.onValueChange(value);
+ }),
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, () => {
+ let isAutomaticActivation = context.activationMode !== "manual";
+ !isSelected && !disabled && isAutomaticActivation && context.onValueChange(value);
+ })
+ })));
+});
+Object.assign($69cb30bb0017df05$export$8114b9fdfdf9f3ba, {
+ displayName: $69cb30bb0017df05$var$TRIGGER_NAME
+});
+var $69cb30bb0017df05$var$CONTENT_NAME = "TabsContent", $69cb30bb0017df05$export$bd905d70e8fd2ebb = $1IHzk$forwardRef((props, forwardedRef) => {
+ let { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$CONTENT_NAME, __scopeTabs), triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value), contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value), isSelected = value === context.value, isMountAnimationPreventedRef = $1IHzk$useRef(isSelected);
+ return $1IHzk$useEffect(() => {
+ let rAF = requestAnimationFrame(
+ () => isMountAnimationPreventedRef.current = !1
+ );
+ return () => cancelAnimationFrame(rAF);
+ }, []), $1IHzk$createElement(
+ $921a889cee6df7e8$export$99c2b779aa4e8b8b,
+ {
+ present: forceMount || isSelected
+ },
+ ({ present }) => $1IHzk$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
+ "data-state": isSelected ? "active" : "inactive",
+ "data-orientation": context.orientation,
+ role: "tabpanel",
+ "aria-labelledby": triggerId,
+ hidden: !present,
+ id: contentId,
+ tabIndex: 0
+ }, contentProps, {
+ ref: forwardedRef,
+ style: {
+ ...props.style,
+ animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
+ }
+ }), present && children)
+ );
+});
+Object.assign($69cb30bb0017df05$export$bd905d70e8fd2ebb, {
+ displayName: $69cb30bb0017df05$var$CONTENT_NAME
+});
+function $69cb30bb0017df05$var$makeTriggerId(baseId, value) {
+ return `${baseId}-trigger-${value}`;
+}
+function $69cb30bb0017df05$var$makeContentId(baseId, value) {
+ return `${baseId}-content-${value}`;
+}
+var $69cb30bb0017df05$export$be92b6f5f03c0fe9 = $69cb30bb0017df05$export$b2539bed5023c21c, $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d22edc0d78c1, $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba, $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
+
+// src/components/Report/Details.tsx
+import { styled } from "storybook/theming";
+var StyledSyntaxHighlighter = styled(SyntaxHighlighter)(
+ ({ theme: theme2 }) => ({
+ fontSize: theme2.typography.size.s1
+ }),
+ ({ language }) => (
+ // We appended ' {}' to the selector in order to get proper syntax highlighting. This rule hides the last 3 spans
+ // (one character each) in the displayed output. Only siblings of .selector (the actual CSS selector characters)
+ // are targeted so that the code comment line isn't affected.
+ language === "css" && {
+ ".selector ~ span:nth-last-of-type(-n+3)": {
+ display: "none"
+ }
+ }
+ )
+), Info = styled.div({
+ display: "flex",
+ flexDirection: "column"
+}), RuleId = styled.div(({ theme: theme2 }) => ({
+ display: "block",
+ color: theme2.textMutedColor,
+ fontFamily: theme2.typography.fonts.mono,
+ fontSize: theme2.typography.size.s1,
+ marginTop: -8,
+ marginBottom: 12,
+ "@container (min-width: 800px)": {
+ display: "none"
+ }
+})), Description = styled.p({
+ margin: 0
+}), Wrapper = styled.div({
+ display: "flex",
+ flexDirection: "column",
+ padding: "0 15px 20px 15px",
+ gap: 20
+}), Columns = styled.div({
+ gap: 15,
+ "@container (min-width: 800px)": {
+ display: "grid",
+ gridTemplateColumns: "50% 50%"
+ }
+}), Content = styled.div(({ theme: theme2, side }) => ({
+ display: side === "left" ? "flex" : "none",
+ flexDirection: "column",
+ gap: 15,
+ margin: side === "left" ? "15px 0" : 0,
+ padding: side === "left" ? "0 15px" : 0,
+ borderLeft: side === "left" ? `1px solid ${theme2.color.border}` : "none",
+ "&:focus-visible": {
+ outline: "none",
+ borderRadius: 4,
+ boxShadow: `0 0 0 1px inset ${theme2.color.secondary}`
+ },
+ "@container (min-width: 800px)": {
+ display: side === "left" ? "none" : "flex"
+ }
+})), Item = styled(Button)(({ theme: theme2 }) => ({
+ fontFamily: theme2.typography.fonts.mono,
+ fontWeight: theme2.typography.weight.regular,
+ color: theme2.textMutedColor,
+ height: 40,
+ overflow: "hidden",
+ textOverflow: "ellipsis",
+ whiteSpace: "nowrap",
+ display: "block",
+ width: "100%",
+ textAlign: "left",
+ padding: "0 12px",
+ '&[data-state="active"]': {
+ color: theme2.color.secondary,
+ backgroundColor: theme2.background.hoverable
+ }
+})), Messages = styled.div({
+ display: "flex",
+ flexDirection: "column",
+ gap: 10
+}), Actions = styled.div({
+ display: "flex",
+ gap: 10
+}), CopyButton = ({ onClick }) => {
+ let [copied, setCopied] = useState3(!1), handleClick = useCallback2(() => {
+ onClick(), setCopied(!0);
+ let timeout = setTimeout(() => setCopied(!1), 2e3);
+ return () => clearTimeout(timeout);
+ }, [onClick]);
+ return React2.createElement(Button, { ariaLabel: !1, onClick: handleClick }, copied ? React2.createElement(CheckIcon, null) : React2.createElement(CopyIcon, null), " ", copied ? "Copied" : "Copy link");
+}, Details = ({ id, item, type, selection, handleSelectionChange }) => React2.createElement(Wrapper, { id }, React2.createElement(Info, null, React2.createElement(RuleId, null, item.id), React2.createElement(Description, null, getFriendlySummaryForAxeResult(item), " ", React2.createElement(Link, { href: item.helpUrl, target: "_blank", rel: "noopener noreferrer", withArrow: !0 }, "Learn how to resolve this violation"))), React2.createElement(
+ $69cb30bb0017df05$export$be92b6f5f03c0fe9,
+ {
+ defaultValue: selection,
+ orientation: "vertical",
+ value: selection,
+ onValueChange: handleSelectionChange,
+ asChild: !0
+ },
+ React2.createElement(Columns, null, React2.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, { "aria-label": type }, item.nodes.map((node, index) => {
+ let key = `${type}.${item.id}.${index + 1}`;
+ return React2.createElement(Fragment, { key }, React2.createElement($69cb30bb0017df05$export$41fb9f06171c75f4, { value: key, asChild: !0 }, React2.createElement(Item, { ariaLabel: !1, variant: "ghost", size: "medium", id: key }, index + 1, ". ", node.html)), React2.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { value: key, asChild: !0 }, React2.createElement(Content, { side: "left" }, getContent(node))));
+ })), item.nodes.map((node, index) => {
+ let key = `${type}.${item.id}.${index + 1}`;
+ return React2.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { key, value: key, asChild: !0 }, React2.createElement(Content, { side: "right" }, getContent(node)));
+ }))
+));
+function getContent(node) {
+ let { handleCopyLink, handleJumpToElement } = useA11yContext(), { any, all, none, html, target } = node, rules = [...any, ...all, ...none];
+ return React2.createElement(React2.Fragment, null, React2.createElement(Messages, null, rules.map((rule) => React2.createElement("div", { key: rule.id }, `${rule.message}${/(\.|: [^.]+\.*)$/.test(rule.message) ? "" : "."}`))), React2.createElement(Actions, null, React2.createElement(Button, { ariaLabel: !1, onClick: () => handleJumpToElement(node.target.toString()) }, React2.createElement(LocationIcon, null), " Jump to element"), React2.createElement(CopyButton, { onClick: () => handleCopyLink(node.linkPath) })), React2.createElement(
+ StyledSyntaxHighlighter,
+ {
+ language: "jsx",
+ wrapLongLines: !0
+ },
+ `/* element */
+${html}`
+ ), React2.createElement(
+ StyledSyntaxHighlighter,
+ {
+ language: "css",
+ wrapLongLines: !0
+ },
+ `/* selector */
+${target} {}`
+ ));
+}
+
+// src/components/Report/Report.tsx
+var impactStatus = {
+ minor: "neutral",
+ moderate: "warning",
+ serious: "negative",
+ critical: "critical"
+}, impactLabels = {
+ minor: "Minor",
+ moderate: "Moderate",
+ serious: "Serious",
+ critical: "Critical"
+}, Wrapper2 = styled2.div(({ theme: theme2 }) => ({
+ display: "flex",
+ flexDirection: "column",
+ width: "100%",
+ borderBottom: `1px solid ${theme2.appBorderColor}`,
+ containerType: "inline-size",
+ fontSize: theme2.typography.size.s2
+})), Icon = styled2(ChevronSmallDownIcon)({
+ transition: "transform 0.1s ease-in-out"
+}), HeaderBar = styled2.div(({ theme: theme2 }) => ({
+ display: "flex",
+ justifyContent: "space-between",
+ alignItems: "center",
+ gap: 6,
+ padding: "6px 10px 6px 15px",
+ minHeight: 40,
+ background: "none",
+ color: "inherit",
+ textAlign: "left",
+ cursor: "pointer",
+ width: "100%",
+ "&:hover": {
+ color: theme2.color.secondary
+ }
+})), Title = styled2.div(({ theme: theme2 }) => ({
+ display: "flex",
+ alignItems: "baseline",
+ flexGrow: 1,
+ fontSize: theme2.typography.size.s2,
+ gap: 8
+})), RuleId2 = styled2.div(({ theme: theme2 }) => ({
+ display: "none",
+ color: theme2.textMutedColor,
+ fontFamily: theme2.typography.fonts.mono,
+ fontSize: theme2.typography.size.s1,
+ "@container (min-width: 800px)": {
+ display: "block"
+ }
+})), Count = styled2.div(({ theme: theme2 }) => ({
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ color: theme2.textMutedColor,
+ width: 28,
+ height: 28
+})), Report = ({
+ items,
+ empty,
+ type,
+ handleSelectionChange,
+ selectedItems,
+ toggleOpen
+}) => React3.createElement(React3.Fragment, null, items && items.length ? items.map((item) => {
+ let id = `${type}.${item.id}`, detailsId = `details:${id}`, selection = selectedItems.get(id), title = getTitleForAxeResult(item);
+ return React3.createElement(Wrapper2, { key: id }, React3.createElement(HeaderBar, { onClick: (event) => toggleOpen(event, type, item), "data-active": !!selection }, React3.createElement(Title, null, React3.createElement("strong", null, title), React3.createElement(RuleId2, null, item.id)), item.impact && React3.createElement(Badge, { status: type === RuleType.PASS ? "neutral" : impactStatus[item.impact] }, impactLabels[item.impact]), React3.createElement(Count, null, item.nodes.length), React3.createElement(
+ Button2,
+ {
+ onClick: (event) => toggleOpen(event, type, item),
+ ariaLabel: `${selection ? "Collapse" : "Expand"} details for: ${title}`,
+ "aria-expanded": !!selection,
+ "aria-controls": detailsId,
+ variant: "ghost",
+ padding: "small"
+ },
+ React3.createElement(Icon, { style: { transform: `rotate(${selection ? -180 : 0}deg)` } })
+ )), selection ? React3.createElement(
+ Details,
+ {
+ id: detailsId,
+ item,
+ type,
+ selection,
+ handleSelectionChange
+ }
+ ) : React3.createElement("div", { id: detailsId }));
+}) : React3.createElement(EmptyTabContent, { title: empty }));
+
+// src/components/Tabs.tsx
+import * as React4 from "react";
+import { Button as Button3, TabsView } from "storybook/internal/components";
+import { CollapseIcon, ExpandAltIcon, EyeCloseIcon, EyeIcon, SyncIcon } from "@storybook/icons";
+import { styled as styled3, useTheme } from "storybook/theming";
+var Container = styled3.div({
+ width: "100%",
+ position: "relative",
+ height: "100%",
+ overflow: "hidden",
+ display: "flex",
+ flexDirection: "column"
+}), ActionsWrapper = styled3.div({
+ display: "flex",
+ justifyContent: "flex-end",
+ gap: 6
+}), Tabs = ({ tabs }) => {
+ let {
+ tab,
+ setTab,
+ toggleHighlight,
+ highlighted,
+ handleManual,
+ allExpanded,
+ handleCollapseAll,
+ handleExpandAll
+ } = useA11yContext(), theme2 = useTheme();
+ return React4.createElement(Container, null, React4.createElement(
+ TabsView,
+ {
+ backgroundColor: theme2.background.app,
+ panelProps: { hasScrollbar: !0 },
+ tabs: tabs.map((tab2) => ({
+ id: tab2.type,
+ title: tab2.label,
+ children: tab2.panel
+ })),
+ selected: tab,
+ onSelectionChange: (key) => setTab(key),
+ tools: React4.createElement(ActionsWrapper, null, React4.createElement(
+ Button3,
+ {
+ variant: "ghost",
+ padding: "small",
+ onClick: toggleHighlight,
+ ariaLabel: highlighted ? "Hide accessibility test result highlights" : "Highlight elements with accessibility test results"
+ },
+ highlighted ? React4.createElement(EyeCloseIcon, null) : React4.createElement(EyeIcon, null)
+ ), React4.createElement(
+ Button3,
+ {
+ variant: "ghost",
+ padding: "small",
+ onClick: allExpanded ? handleCollapseAll : handleExpandAll,
+ ariaLabel: allExpanded ? "Collapse all results" : "Expand all results",
+ "aria-expanded": allExpanded
+ },
+ allExpanded ? React4.createElement(CollapseIcon, null) : React4.createElement(ExpandAltIcon, null)
+ ), React4.createElement(
+ Button3,
+ {
+ variant: "ghost",
+ padding: "small",
+ onClick: handleManual,
+ ariaLabel: "Rerun accessibility scan"
+ },
+ React4.createElement(SyncIcon, null)
+ ))
+ }
+ ));
+};
+
+// src/components/TestDiscrepancyMessage.tsx
+import React5, { useMemo as useMemo2 } from "react";
+import { Link as Link2 } from "storybook/internal/components";
+import { useStorybookApi as useStorybookApi2 } from "storybook/manager-api";
+import { styled as styled4 } from "storybook/theming";
+var Wrapper3 = styled4.div(({ theme: { color, typography, background } }) => ({
+ textAlign: "start",
+ padding: "11px 15px",
+ fontSize: `${typography.size.s2}px`,
+ fontWeight: typography.weight.regular,
+ lineHeight: "1rem",
+ background: background.app,
+ borderBottom: `1px solid ${color.border}`,
+ color: color.defaultText,
+ backgroundClip: "padding-box",
+ position: "relative",
+ code: {
+ fontSize: `${typography.size.s1 - 1}px`,
+ color: "inherit",
+ margin: "0 0.2em",
+ padding: "0 0.2em",
+ background: "rgba(255, 255, 255, 0.8)",
+ borderRadius: "2px",
+ boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)"
+ }
+})), TestDiscrepancyMessage = ({ discrepancy }) => {
+ let docsUrl = useStorybookApi2().getDocsUrl({
+ subpath: DOCUMENTATION_DISCREPANCY_LINK,
+ versioned: !0,
+ renderer: !0
+ }), message = useMemo2(() => {
+ switch (discrepancy) {
+ case "browserPassedCliFailed":
+ return "Accessibility checks passed in this browser but failed in the CLI.";
+ case "cliPassedBrowserFailed":
+ return "Accessibility checks passed in the CLI but failed in this browser.";
+ case "cliFailedButModeManual":
+ return "Accessibility checks failed in the CLI. Run the tests manually to see the results.";
+ default:
+ return null;
+ }
+ }, [discrepancy]);
+ return message ? React5.createElement(Wrapper3, null, message, " ", React5.createElement(Link2, { href: docsUrl, target: "_blank", withArrow: !0 }, "Learn what could cause this")) : null;
+};
+
+// src/components/A11YPanel.tsx
+var RotatingIcon = styled5(SyncIcon2)(({ theme: theme2 }) => ({
+ animation: `${theme2.animation.rotate360} 1s linear infinite;`,
+ margin: 4
+})), Tab = styled5.div({
+ display: "flex",
+ alignItems: "center",
+ gap: 6
+}), Centered = styled5.span(({ theme: theme2 }) => ({
+ display: "flex",
+ flexDirection: "column",
+ alignItems: "center",
+ justifyContent: "center",
+ textAlign: "center",
+ fontSize: theme2.typography.size.s2,
+ height: "100%",
+ gap: 24,
+ div: {
+ display: "flex",
+ flexDirection: "column",
+ alignItems: "center",
+ gap: 8
+ },
+ p: {
+ margin: 0,
+ color: theme2.textMutedColor
+ },
+ code: {
+ display: "inline-block",
+ fontSize: theme2.typography.size.s2 - 1,
+ backgroundColor: theme2.background.app,
+ border: `1px solid ${theme2.color.border}`,
+ borderRadius: 4,
+ padding: "2px 3px"
+ }
+})), A11YPanel = () => {
+ let {
+ parameters,
+ tab,
+ results,
+ status,
+ handleManual,
+ error,
+ discrepancy,
+ handleSelectionChange,
+ selectedItems,
+ toggleOpen
+ } = useA11yContext(), tabs = useMemo3(() => {
+ let { passes, incomplete, violations } = results ?? {
+ passes: [],
+ incomplete: [],
+ violations: []
+ };
+ return [
+ {
+ label: React6.createElement(Tab, null, "Violations", React6.createElement(Badge2, { compact: !0, status: tab === "violations" ? "active" : "neutral" }, violations.length)),
+ panel: React6.createElement(
+ Report,
+ {
+ items: violations,
+ type: RuleType.VIOLATION,
+ empty: "No accessibility violations found.",
+ handleSelectionChange,
+ selectedItems,
+ toggleOpen
+ }
+ ),
+ items: violations,
+ type: RuleType.VIOLATION
+ },
+ {
+ label: React6.createElement(Tab, null, "Passes", React6.createElement(Badge2, { compact: !0, status: tab === "passes" ? "active" : "neutral" }, passes.length)),
+ panel: React6.createElement(
+ Report,
+ {
+ items: passes,
+ type: RuleType.PASS,
+ empty: "No passing accessibility checks found.",
+ handleSelectionChange,
+ selectedItems,
+ toggleOpen
+ }
+ ),
+ items: passes,
+ type: RuleType.PASS
+ },
+ {
+ label: React6.createElement(Tab, null, "Inconclusive", React6.createElement(Badge2, { compact: !0, status: tab === "incomplete" ? "active" : "neutral" }, incomplete.length)),
+ panel: React6.createElement(
+ Report,
+ {
+ items: incomplete,
+ type: RuleType.INCOMPLETION,
+ empty: "No inconclusive accessibility checks found.",
+ handleSelectionChange,
+ selectedItems,
+ toggleOpen
+ }
+ ),
+ items: incomplete,
+ type: RuleType.INCOMPLETION
+ }
+ ];
+ }, [tab, results, handleSelectionChange, selectedItems, toggleOpen]);
+ return parameters.disable || parameters.test === "off" ? React6.createElement(Centered, null, React6.createElement("div", null, React6.createElement("strong", null, "Accessibility tests are disabled for this story"), React6.createElement("p", null, "Update", " ", React6.createElement("code", null, parameters.disable ? "parameters.a11y.disable" : "parameters.a11y.test"), " ", "to enable accessibility tests."))) : React6.createElement(React6.Fragment, null, discrepancy && React6.createElement(TestDiscrepancyMessage, { discrepancy }), status === "ready" || status === "ran" ? React6.createElement(Tabs, { key: "tabs", tabs }) : React6.createElement(Centered, { style: { marginTop: discrepancy ? "1em" : 0 } }, status === "initial" && React6.createElement("div", null, React6.createElement(RotatingIcon, { size: 12 }), React6.createElement("strong", null, "Preparing accessibility scan"), React6.createElement("p", null, "Please wait while the addon is initializing...")), status === "manual" && React6.createElement(React6.Fragment, null, React6.createElement("div", null, React6.createElement("strong", null, "Accessibility tests run manually for this story"), React6.createElement("p", null, "Results will not show when using the testing module. You can still run accessibility tests manually.")), React6.createElement(Button4, { ariaLabel: !1, size: "medium", onClick: handleManual }, "Run accessibility scan"), React6.createElement("p", null, "Update ", React6.createElement("code", null, "globals.a11y.manual"), " to disable manual mode.")), status === "running" && React6.createElement("div", null, React6.createElement(RotatingIcon, { size: 12 }), React6.createElement("strong", null, "Accessibility scan in progress"), React6.createElement("p", null, "Please wait while the accessibility scan is running...")), status === "error" && React6.createElement(React6.Fragment, null, React6.createElement("div", null, React6.createElement("strong", null, "The accessibility scan encountered an error"), React6.createElement("p", null, typeof error == "string" ? error : error instanceof Error ? error.toString() : JSON.stringify(error, null, 2))), React6.createElement(Button4, { ariaLabel: !1, size: "medium", onClick: handleManual }, "Rerun accessibility scan")), status === "component-test-error" && React6.createElement(React6.Fragment, null, React6.createElement("div", null, React6.createElement("strong", null, "This story's component tests failed"), React6.createElement("p", null, "Automated accessibility tests will not run until this is resolved. You can still test manually.")), React6.createElement(Button4, { ariaLabel: !1, size: "medium", onClick: handleManual }, "Run accessibility scan"))));
+};
+
+// src/components/VisionSimulator.tsx
+import React7 from "react";
+import { Select } from "storybook/internal/components";
+import { AccessibilityIcon } from "@storybook/icons";
+import { useGlobals as useGlobals2 } from "storybook/manager-api";
+import { styled as styled6 } from "storybook/theming";
+var Hidden = styled6.div({
+ "&, & svg": {
+ position: "absolute",
+ width: 0,
+ height: 0
+ }
+}), ColorIcon = styled6.span(
+ {
+ background: "linear-gradient(to right, #F44336, #FF9800, #FFEB3B, #8BC34A, #2196F3, #9C27B0)",
+ borderRadius: 14,
+ display: "block",
+ flexShrink: 0,
+ height: 14,
+ width: 14
+ },
+ ({ $filter }) => ({
+ filter: filters[$filter].filter || "none"
+ }),
+ ({ theme: theme2 }) => ({
+ boxShadow: `${theme2.appBorderColor} 0 0 0 1px inset`
+ })
+), VisionSimulator = () => {
+ let [globals, updateGlobals, storyGlobals] = useGlobals2(), value = globals[VISION_GLOBAL_KEY], isLocked = storyGlobals[VISION_GLOBAL_KEY] !== void 0, options = Object.entries(filters).map(([key, { label, percentage }]) => ({
+ title: label,
+ description: percentage ? `${percentage}% of users` : void 0,
+ icon: React7.createElement(ColorIcon, { $filter: key }),
+ value: key
+ }));
+ return React7.createElement(React7.Fragment, null, React7.createElement(
+ Select,
+ {
+ resetLabel: "Reset color filter",
+ onReset: () => updateGlobals({ [VISION_GLOBAL_KEY]: void 0 }),
+ icon: React7.createElement(AccessibilityIcon, null),
+ disabled: isLocked,
+ ariaLabel: isLocked ? "Vision filter set by story globals" : "Vision filter",
+ ariaDescription: "Select a vision filter among predefined options, or reset to remove the filter.",
+ tooltip: isLocked ? "Vision filter set by story globals" : "Change vision filter",
+ defaultOptions: value,
+ options,
+ onSelect: (selected) => updateGlobals({ [VISION_GLOBAL_KEY]: selected })
+ }
+ ), React7.createElement(Hidden, { dangerouslySetInnerHTML: { __html: filterDefs } }));
+};
+
+// src/manager.tsx
+var Title2 = () => {
+ let selectedPanel = useStorybookApi3().getSelectedPanel(), [{ results }] = useAddonState2(ADDON_ID, {
+ ui: {
+ highlighted: !1,
+ tab: RuleType.VIOLATION
+ },
+ results: void 0,
+ error: void 0,
+ status: "initial"
+ }), violationsNb = results?.violations?.length ?? 0, incompleteNb = results?.incomplete?.length ?? 0, count = violationsNb + incompleteNb, suffix = count === 0 ? null : React8.createElement(Badge3, { compact: !0, status: selectedPanel === PANEL_ID ? "active" : "neutral" }, count);
+ return React8.createElement("div", { style: { display: "flex", alignItems: "center", gap: 6 } }, React8.createElement("span", null, "Accessibility"), suffix);
+};
+addons.register(ADDON_ID, (api) => {
+ addons.add(PANEL_ID, {
+ title: "",
+ type: types.TOOL,
+ match: ({ viewMode, tabId }) => viewMode === "story" && !tabId,
+ render: () => React8.createElement(VisionSimulator, null)
+ }), addons.add(PANEL_ID, {
+ title: Title2,
+ type: types.PANEL,
+ render: ({ active = !0 }) => React8.createElement(A11yContextProvider, null, active ? React8.createElement(A11YPanel, null) : null),
+ paramKey: PARAM_KEY
+ });
+});
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/postinstall.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/postinstall.js
new file mode 100644
index 0000000000000000000000000000000000000000..98a22432eb9b415be5c004a111fb0f83a2d5d84e
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/postinstall.js
@@ -0,0 +1,24 @@
+import CJS_COMPAT_NODE_URL_3n95zh6obwk from 'node:url';
+import CJS_COMPAT_NODE_PATH_3n95zh6obwk from 'node:path';
+import CJS_COMPAT_NODE_MODULE_3n95zh6obwk from "node:module";
+
+var __filename = CJS_COMPAT_NODE_URL_3n95zh6obwk.fileURLToPath(import.meta.url);
+var __dirname = CJS_COMPAT_NODE_PATH_3n95zh6obwk.dirname(__filename);
+var require = CJS_COMPAT_NODE_MODULE_3n95zh6obwk.createRequire(import.meta.url);
+
+// ------------------------------------------------------------
+// end of CJS compatibility banner, injected by Storybook's esbuild configuration
+// ------------------------------------------------------------
+
+// src/postinstall.ts
+import { JsPackageManagerFactory } from "storybook/internal/common";
+async function postinstall(options) {
+ let args = ["storybook", "automigrate", "addon-a11y-addon-test"];
+ args.push("--loglevel", "silent"), args.push("--skip-doctor"), options.yes && args.push("--yes"), options.packageManager && args.push("--package-manager", options.packageManager), options.configDir && args.push("--config-dir", options.configDir), await JsPackageManagerFactory.getPackageManager({
+ force: options.packageManager,
+ configDir: options.configDir
+ }).runPackageCommand({ args });
+}
+export {
+ postinstall as default
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f328142add395e9cb17a686c1677c4328f1c0947
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.d.ts
@@ -0,0 +1,53 @@
+import * as storybook_internal_csf from 'storybook/internal/csf';
+import { AfterEach } from 'storybook/internal/types';
+import { Selector, SelectorList, RunOptions, Spec } from 'axe-core';
+
+type SelectorWithoutNode = Omit | Omit;
+type ContextObjectWithoutNode = {
+ include: SelectorWithoutNode;
+ exclude?: SelectorWithoutNode;
+} | {
+ exclude: SelectorWithoutNode;
+ include?: SelectorWithoutNode;
+};
+type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode;
+type A11yTest = 'off' | 'todo' | 'error';
+interface A11yParameters {
+ /**
+ * Context parameter for axe-core's run function, except without support for passing Nodes and
+ * NodeLists directly.
+ *
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md
+ */
+ context?: ContextSpecWithoutNode;
+ /**
+ * Options for running axe-core.
+ *
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
+ */
+ options?: RunOptions;
+ /**
+ * Configuration object for axe-core.
+ *
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure
+ */
+ config?: Spec;
+ /** Whether to disable accessibility tests. */
+ disable?: boolean;
+ /** Defines how accessibility violations should be handled: 'off', 'todo', or 'error'. */
+ test?: A11yTest;
+}
+
+declare const decorators: storybook_internal_csf.DecoratorFunction[];
+declare const afterEach: AfterEach;
+declare const initialGlobals: {
+ a11y: {
+ manual: boolean;
+ };
+ vision: undefined;
+};
+declare const parameters: {
+ a11y: A11yParameters;
+};
+
+export { afterEach, decorators, initialGlobals, parameters };
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.js
new file mode 100644
index 0000000000000000000000000000000000000000..9372f00cde9724b695ebc916935caa54d1008972
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/preview.js
@@ -0,0 +1,14 @@
+import {
+ afterEach,
+ decorators,
+ initialGlobals,
+ parameters
+} from "./_browser-chunks/chunk-2FVV6YOY.js";
+import "./_browser-chunks/chunk-7OPMK7TU.js";
+import "./_browser-chunks/chunk-4BE7D4DS.js";
+export {
+ afterEach,
+ decorators,
+ initialGlobals,
+ parameters
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..1fbebfb1e4460799c27ccf57d348457a5da94ed0
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/README.md
@@ -0,0 +1,156 @@
+
+
+
+
+# Storybook Docs
+
+> migration guide: This page documents the method to configure Storybook introduced recently in 7.0.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring Storybook.
+
+Storybook Docs transforms your Storybook stories into world-class component documentation.
+
+**DocsPage.** Out of the box, all your stories get a `DocsPage`. `DocsPage` is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, readable pages.
+
+**MDX.** If you want more control, `MDX` allows you to write long-form markdown documentation and include stories in one file. You can also use it to write pure documentation pages and embed them inside your Storybook alongside your stories.
+
+Just like Storybook, Docs supports every major view layer including React, Vue 3, Angular, HTML, Web components, Svelte, and many more.
+
+Read on to learn more:
+
+- [Storybook Docs](#storybook-docs)
+ - [DocsPage](#docspage)
+ - [MDX](#mdx)
+ - [Framework support](#framework-support)
+ - [Installation](#installation)
+ - [Be sure to check framework specific installation needs](#be-sure-to-check-framework-specific-installation-needs)
+ - [Preset options](#preset-options)
+ - [TypeScript configuration](#typescript-configuration)
+ - [More resources](#more-resources)
+
+## DocsPage
+
+When you [install Docs](#installation), every story gets a `DocsPage`. `DocsPage` pulls information from your stories, components, source code, and story metadata to construct a sensible, zero-config default.
+
+Click on the `Docs` tab to see it:
+
+
+
+
+
+For more information on how it works, see the [`DocsPage` reference](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/docspage.md).
+
+## MDX
+
+`MDX` is a syntax for writing long-form documentation with stories side-by-side in the same file. In contrast to `DocsPage`, which provides smart documentation out of the box, `MDX` gives you full control over your component documentation.
+
+Here's an example file:
+
+
+
+```md
+import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
+import * as CheckboxStories from './Checkbox.stories';
+
+
+
+# Checkbox
+
+With `MDX` we can include a story for `Checkbox` right in the middle of our
+markdown documentation.
+
+
+```
+
+
+
+And here's how that's rendered in Storybook:
+
+
+
+
+
+For more information on `MDX`, see the [`MDX` reference](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/mdx.md).
+
+## Framework support
+
+Storybook Docs supports all view layers that Storybook supports except for React Native (currently). There are some framework-specific features as well, such as props tables and inline story rendering. The following page captures the current state of support:
+
+[Framework Support](https://storybook.js.org/docs/configure/integration/frameworks-feature-support?ref=readme)
+
+**Note:** `#` = WIP support
+
+Want to add enhanced features to your favorite framework? Check out this [dev guide](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/multiframework.md)
+
+## Installation
+
+First add the package. Make sure that the versions for your `@storybook/*` packages match:
+
+```sh
+yarn add -D @storybook/addon-docs
+```
+
+Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
+
+```sh
+yarn add -D react
+```
+
+Then add the following to your `.storybook/main.js`:
+
+```js
+export default {
+ stories: [
+ '../src/**/*.mdx', // 👈 Add this, to match your project's structure
+ '../src/**/*.stories.@(js|jsx|ts|tsx)',
+ ],
+ addons: [
+ '@storybook/addon-docs', // 👈 Also add this
+ ],
+};
+```
+
+### Be sure to check framework specific installation needs
+
+- [React](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/react) (covered here)
+- [Vue 3](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/vue3)
+- [Angular](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/angular)
+- [Ember](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/ember)
+- [Web Components](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/web-components)
+- [Common setup (all other frameworks)](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/common)
+
+## Preset options
+
+The `addon-docs` preset has a few configuration options that can be used to configure its babel/webpack loading behavior. Here's an example of how to use the preset with options:
+
+```js
+export default {
+ addons: [
+ {
+ name: '@storybook/addon-docs',
+ options: {
+ csfPluginOptions: null,
+ mdxPluginOptions: {},
+ },
+ },
+ ],
+};
+```
+
+`csfPluginOptions` is an object for configuring `@storybook/csf-plugin`. When set to `null` it tells docs not to run the `csf-plugin` at all, which can be used as an optimization, or if you're already using `csf-plugin` in your `main.js`.
+
+> With the release of version 7.0, it is no longer possible to import `.md` files directly into Storybook using the `transcludeMarkdown` [option](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#importing-plain-markdown-files-with-transcludemarkdown-has-changed). Instead, we recommend using the [`Markdown`](https://storybook.js.org/docs/api/doc-blocks/doc-block-markdown?ref=readme) Doc Block for importing Markdown files into your Storybook documentation.
+
+## TypeScript configuration
+
+As of SB6 [TypeScript is zero-config](https://storybook.js.org/docs/configure/integration/typescript?ref=readme) and should work with SB Docs out of the box. For advanced configuration options, refer to the [Props documentation](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/props-tables.md).
+
+## More resources
+
+Want to learn more? Here are some more articles on Storybook Docs:
+
+- References: [DocsPage](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/docspage.md) / [MDX](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/mdx.md) / [FAQ](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/faq.md) / [Recipes](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/recipes.md) / [Theming](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/theming.md) / [Props](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/props-tables.md)
+- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
+- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
+
+Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme).
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/Color-6BZIO3FS.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/Color-6BZIO3FS.js
new file mode 100644
index 0000000000000000000000000000000000000000..652c4a766e0909343f21ff04fa5eec58128476a0
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/Color-6BZIO3FS.js
@@ -0,0 +1,1096 @@
+import {
+ getControlId
+} from "./chunk-CYSK6WYR.js";
+import {
+ __commonJS,
+ __toESM
+} from "./chunk-SL3VIQZ3.js";
+
+// ../../../node_modules/color-name/index.js
+var require_color_name = __commonJS({
+ "../../../node_modules/color-name/index.js"(exports, module) {
+ "use strict";
+ module.exports = {
+ aliceblue: [240, 248, 255],
+ antiquewhite: [250, 235, 215],
+ aqua: [0, 255, 255],
+ aquamarine: [127, 255, 212],
+ azure: [240, 255, 255],
+ beige: [245, 245, 220],
+ bisque: [255, 228, 196],
+ black: [0, 0, 0],
+ blanchedalmond: [255, 235, 205],
+ blue: [0, 0, 255],
+ blueviolet: [138, 43, 226],
+ brown: [165, 42, 42],
+ burlywood: [222, 184, 135],
+ cadetblue: [95, 158, 160],
+ chartreuse: [127, 255, 0],
+ chocolate: [210, 105, 30],
+ coral: [255, 127, 80],
+ cornflowerblue: [100, 149, 237],
+ cornsilk: [255, 248, 220],
+ crimson: [220, 20, 60],
+ cyan: [0, 255, 255],
+ darkblue: [0, 0, 139],
+ darkcyan: [0, 139, 139],
+ darkgoldenrod: [184, 134, 11],
+ darkgray: [169, 169, 169],
+ darkgreen: [0, 100, 0],
+ darkgrey: [169, 169, 169],
+ darkkhaki: [189, 183, 107],
+ darkmagenta: [139, 0, 139],
+ darkolivegreen: [85, 107, 47],
+ darkorange: [255, 140, 0],
+ darkorchid: [153, 50, 204],
+ darkred: [139, 0, 0],
+ darksalmon: [233, 150, 122],
+ darkseagreen: [143, 188, 143],
+ darkslateblue: [72, 61, 139],
+ darkslategray: [47, 79, 79],
+ darkslategrey: [47, 79, 79],
+ darkturquoise: [0, 206, 209],
+ darkviolet: [148, 0, 211],
+ deeppink: [255, 20, 147],
+ deepskyblue: [0, 191, 255],
+ dimgray: [105, 105, 105],
+ dimgrey: [105, 105, 105],
+ dodgerblue: [30, 144, 255],
+ firebrick: [178, 34, 34],
+ floralwhite: [255, 250, 240],
+ forestgreen: [34, 139, 34],
+ fuchsia: [255, 0, 255],
+ gainsboro: [220, 220, 220],
+ ghostwhite: [248, 248, 255],
+ gold: [255, 215, 0],
+ goldenrod: [218, 165, 32],
+ gray: [128, 128, 128],
+ green: [0, 128, 0],
+ greenyellow: [173, 255, 47],
+ grey: [128, 128, 128],
+ honeydew: [240, 255, 240],
+ hotpink: [255, 105, 180],
+ indianred: [205, 92, 92],
+ indigo: [75, 0, 130],
+ ivory: [255, 255, 240],
+ khaki: [240, 230, 140],
+ lavender: [230, 230, 250],
+ lavenderblush: [255, 240, 245],
+ lawngreen: [124, 252, 0],
+ lemonchiffon: [255, 250, 205],
+ lightblue: [173, 216, 230],
+ lightcoral: [240, 128, 128],
+ lightcyan: [224, 255, 255],
+ lightgoldenrodyellow: [250, 250, 210],
+ lightgray: [211, 211, 211],
+ lightgreen: [144, 238, 144],
+ lightgrey: [211, 211, 211],
+ lightpink: [255, 182, 193],
+ lightsalmon: [255, 160, 122],
+ lightseagreen: [32, 178, 170],
+ lightskyblue: [135, 206, 250],
+ lightslategray: [119, 136, 153],
+ lightslategrey: [119, 136, 153],
+ lightsteelblue: [176, 196, 222],
+ lightyellow: [255, 255, 224],
+ lime: [0, 255, 0],
+ limegreen: [50, 205, 50],
+ linen: [250, 240, 230],
+ magenta: [255, 0, 255],
+ maroon: [128, 0, 0],
+ mediumaquamarine: [102, 205, 170],
+ mediumblue: [0, 0, 205],
+ mediumorchid: [186, 85, 211],
+ mediumpurple: [147, 112, 219],
+ mediumseagreen: [60, 179, 113],
+ mediumslateblue: [123, 104, 238],
+ mediumspringgreen: [0, 250, 154],
+ mediumturquoise: [72, 209, 204],
+ mediumvioletred: [199, 21, 133],
+ midnightblue: [25, 25, 112],
+ mintcream: [245, 255, 250],
+ mistyrose: [255, 228, 225],
+ moccasin: [255, 228, 181],
+ navajowhite: [255, 222, 173],
+ navy: [0, 0, 128],
+ oldlace: [253, 245, 230],
+ olive: [128, 128, 0],
+ olivedrab: [107, 142, 35],
+ orange: [255, 165, 0],
+ orangered: [255, 69, 0],
+ orchid: [218, 112, 214],
+ palegoldenrod: [238, 232, 170],
+ palegreen: [152, 251, 152],
+ paleturquoise: [175, 238, 238],
+ palevioletred: [219, 112, 147],
+ papayawhip: [255, 239, 213],
+ peachpuff: [255, 218, 185],
+ peru: [205, 133, 63],
+ pink: [255, 192, 203],
+ plum: [221, 160, 221],
+ powderblue: [176, 224, 230],
+ purple: [128, 0, 128],
+ rebeccapurple: [102, 51, 153],
+ red: [255, 0, 0],
+ rosybrown: [188, 143, 143],
+ royalblue: [65, 105, 225],
+ saddlebrown: [139, 69, 19],
+ salmon: [250, 128, 114],
+ sandybrown: [244, 164, 96],
+ seagreen: [46, 139, 87],
+ seashell: [255, 245, 238],
+ sienna: [160, 82, 45],
+ silver: [192, 192, 192],
+ skyblue: [135, 206, 235],
+ slateblue: [106, 90, 205],
+ slategray: [112, 128, 144],
+ slategrey: [112, 128, 144],
+ snow: [255, 250, 250],
+ springgreen: [0, 255, 127],
+ steelblue: [70, 130, 180],
+ tan: [210, 180, 140],
+ teal: [0, 128, 128],
+ thistle: [216, 191, 216],
+ tomato: [255, 99, 71],
+ turquoise: [64, 224, 208],
+ violet: [238, 130, 238],
+ wheat: [245, 222, 179],
+ white: [255, 255, 255],
+ whitesmoke: [245, 245, 245],
+ yellow: [255, 255, 0],
+ yellowgreen: [154, 205, 50]
+ };
+ }
+});
+
+// ../../../node_modules/color-convert/conversions.js
+var require_conversions = __commonJS({
+ "../../../node_modules/color-convert/conversions.js"(exports, module) {
+ var cssKeywords = require_color_name(), reverseKeywords = {};
+ for (let key of Object.keys(cssKeywords))
+ reverseKeywords[cssKeywords[key]] = key;
+ var convert2 = {
+ rgb: { channels: 3, labels: "rgb" },
+ hsl: { channels: 3, labels: "hsl" },
+ hsv: { channels: 3, labels: "hsv" },
+ hwb: { channels: 3, labels: "hwb" },
+ cmyk: { channels: 4, labels: "cmyk" },
+ xyz: { channels: 3, labels: "xyz" },
+ lab: { channels: 3, labels: "lab" },
+ lch: { channels: 3, labels: "lch" },
+ hex: { channels: 1, labels: ["hex"] },
+ keyword: { channels: 1, labels: ["keyword"] },
+ ansi16: { channels: 1, labels: ["ansi16"] },
+ ansi256: { channels: 1, labels: ["ansi256"] },
+ hcg: { channels: 3, labels: ["h", "c", "g"] },
+ apple: { channels: 3, labels: ["r16", "g16", "b16"] },
+ gray: { channels: 1, labels: ["gray"] }
+ };
+ module.exports = convert2;
+ for (let model of Object.keys(convert2)) {
+ if (!("channels" in convert2[model]))
+ throw new Error("missing channels property: " + model);
+ if (!("labels" in convert2[model]))
+ throw new Error("missing channel labels property: " + model);
+ if (convert2[model].labels.length !== convert2[model].channels)
+ throw new Error("channel and label counts mismatch: " + model);
+ let { channels, labels } = convert2[model];
+ delete convert2[model].channels, delete convert2[model].labels, Object.defineProperty(convert2[model], "channels", { value: channels }), Object.defineProperty(convert2[model], "labels", { value: labels });
+ }
+ convert2.rgb.hsl = function(rgb) {
+ let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, min = Math.min(r2, g2, b2), max = Math.max(r2, g2, b2), delta = max - min, h2, s2;
+ max === min ? h2 = 0 : r2 === max ? h2 = (g2 - b2) / delta : g2 === max ? h2 = 2 + (b2 - r2) / delta : b2 === max && (h2 = 4 + (r2 - g2) / delta), h2 = Math.min(h2 * 60, 360), h2 < 0 && (h2 += 360);
+ let l2 = (min + max) / 2;
+ return max === min ? s2 = 0 : l2 <= 0.5 ? s2 = delta / (max + min) : s2 = delta / (2 - max - min), [h2, s2 * 100, l2 * 100];
+ };
+ convert2.rgb.hsv = function(rgb) {
+ let rdif, gdif, bdif, h2, s2, r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, v2 = Math.max(r2, g2, b2), diff = v2 - Math.min(r2, g2, b2), diffc = function(c2) {
+ return (v2 - c2) / 6 / diff + 1 / 2;
+ };
+ return diff === 0 ? (h2 = 0, s2 = 0) : (s2 = diff / v2, rdif = diffc(r2), gdif = diffc(g2), bdif = diffc(b2), r2 === v2 ? h2 = bdif - gdif : g2 === v2 ? h2 = 1 / 3 + rdif - bdif : b2 === v2 && (h2 = 2 / 3 + gdif - rdif), h2 < 0 ? h2 += 1 : h2 > 1 && (h2 -= 1)), [
+ h2 * 360,
+ s2 * 100,
+ v2 * 100
+ ];
+ };
+ convert2.rgb.hwb = function(rgb) {
+ let r2 = rgb[0], g2 = rgb[1], b2 = rgb[2], h2 = convert2.rgb.hsl(rgb)[0], w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2));
+ return b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2)), [h2, w2 * 100, b2 * 100];
+ };
+ convert2.rgb.cmyk = function(rgb) {
+ let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, k2 = Math.min(1 - r2, 1 - g2, 1 - b2), c2 = (1 - r2 - k2) / (1 - k2) || 0, m2 = (1 - g2 - k2) / (1 - k2) || 0, y2 = (1 - b2 - k2) / (1 - k2) || 0;
+ return [c2 * 100, m2 * 100, y2 * 100, k2 * 100];
+ };
+ function comparativeDistance(x2, y2) {
+ return (x2[0] - y2[0]) ** 2 + (x2[1] - y2[1]) ** 2 + (x2[2] - y2[2]) ** 2;
+ }
+ convert2.rgb.keyword = function(rgb) {
+ let reversed = reverseKeywords[rgb];
+ if (reversed)
+ return reversed;
+ let currentClosestDistance = 1 / 0, currentClosestKeyword;
+ for (let keyword of Object.keys(cssKeywords)) {
+ let value = cssKeywords[keyword], distance = comparativeDistance(rgb, value);
+ distance < currentClosestDistance && (currentClosestDistance = distance, currentClosestKeyword = keyword);
+ }
+ return currentClosestKeyword;
+ };
+ convert2.keyword.rgb = function(keyword) {
+ return cssKeywords[keyword];
+ };
+ convert2.rgb.xyz = function(rgb) {
+ let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255;
+ r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92, g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92, b2 = b2 > 0.04045 ? ((b2 + 0.055) / 1.055) ** 2.4 : b2 / 12.92;
+ let x2 = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805, y2 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722, z2 = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505;
+ return [x2 * 100, y2 * 100, z2 * 100];
+ };
+ convert2.rgb.lab = function(rgb) {
+ let xyz = convert2.rgb.xyz(rgb), x2 = xyz[0], y2 = xyz[1], z2 = xyz[2];
+ x2 /= 95.047, y2 /= 100, z2 /= 108.883, x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116, y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116, z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
+ let l2 = 116 * y2 - 16, a2 = 500 * (x2 - y2), b2 = 200 * (y2 - z2);
+ return [l2, a2, b2];
+ };
+ convert2.hsl.rgb = function(hsl) {
+ let h2 = hsl[0] / 360, s2 = hsl[1] / 100, l2 = hsl[2] / 100, t2, t3, val;
+ if (s2 === 0)
+ return val = l2 * 255, [val, val, val];
+ l2 < 0.5 ? t2 = l2 * (1 + s2) : t2 = l2 + s2 - l2 * s2;
+ let t1 = 2 * l2 - t2, rgb = [0, 0, 0];
+ for (let i2 = 0; i2 < 3; i2++)
+ t3 = h2 + 1 / 3 * -(i2 - 1), t3 < 0 && t3++, t3 > 1 && t3--, 6 * t3 < 1 ? val = t1 + (t2 - t1) * 6 * t3 : 2 * t3 < 1 ? val = t2 : 3 * t3 < 2 ? val = t1 + (t2 - t1) * (2 / 3 - t3) * 6 : val = t1, rgb[i2] = val * 255;
+ return rgb;
+ };
+ convert2.hsl.hsv = function(hsl) {
+ let h2 = hsl[0], s2 = hsl[1] / 100, l2 = hsl[2] / 100, smin = s2, lmin = Math.max(l2, 0.01);
+ l2 *= 2, s2 *= l2 <= 1 ? l2 : 2 - l2, smin *= lmin <= 1 ? lmin : 2 - lmin;
+ let v2 = (l2 + s2) / 2, sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l2 + s2);
+ return [h2, sv * 100, v2 * 100];
+ };
+ convert2.hsv.rgb = function(hsv) {
+ let h2 = hsv[0] / 60, s2 = hsv[1] / 100, v2 = hsv[2] / 100, hi = Math.floor(h2) % 6, f2 = h2 - Math.floor(h2), p2 = 255 * v2 * (1 - s2), q2 = 255 * v2 * (1 - s2 * f2), t2 = 255 * v2 * (1 - s2 * (1 - f2));
+ switch (v2 *= 255, hi) {
+ case 0:
+ return [v2, t2, p2];
+ case 1:
+ return [q2, v2, p2];
+ case 2:
+ return [p2, v2, t2];
+ case 3:
+ return [p2, q2, v2];
+ case 4:
+ return [t2, p2, v2];
+ case 5:
+ return [v2, p2, q2];
+ }
+ };
+ convert2.hsv.hsl = function(hsv) {
+ let h2 = hsv[0], s2 = hsv[1] / 100, v2 = hsv[2] / 100, vmin = Math.max(v2, 0.01), sl, l2;
+ l2 = (2 - s2) * v2;
+ let lmin = (2 - s2) * vmin;
+ return sl = s2 * vmin, sl /= lmin <= 1 ? lmin : 2 - lmin, sl = sl || 0, l2 /= 2, [h2, sl * 100, l2 * 100];
+ };
+ convert2.hwb.rgb = function(hwb) {
+ let h2 = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl, f2;
+ ratio > 1 && (wh /= ratio, bl /= ratio);
+ let i2 = Math.floor(6 * h2), v2 = 1 - bl;
+ f2 = 6 * h2 - i2, (i2 & 1) !== 0 && (f2 = 1 - f2);
+ let n2 = wh + f2 * (v2 - wh), r2, g2, b2;
+ switch (i2) {
+ default:
+ case 6:
+ case 0:
+ r2 = v2, g2 = n2, b2 = wh;
+ break;
+ case 1:
+ r2 = n2, g2 = v2, b2 = wh;
+ break;
+ case 2:
+ r2 = wh, g2 = v2, b2 = n2;
+ break;
+ case 3:
+ r2 = wh, g2 = n2, b2 = v2;
+ break;
+ case 4:
+ r2 = n2, g2 = wh, b2 = v2;
+ break;
+ case 5:
+ r2 = v2, g2 = wh, b2 = n2;
+ break;
+ }
+ return [r2 * 255, g2 * 255, b2 * 255];
+ };
+ convert2.cmyk.rgb = function(cmyk) {
+ let c2 = cmyk[0] / 100, m2 = cmyk[1] / 100, y2 = cmyk[2] / 100, k2 = cmyk[3] / 100, r2 = 1 - Math.min(1, c2 * (1 - k2) + k2), g2 = 1 - Math.min(1, m2 * (1 - k2) + k2), b2 = 1 - Math.min(1, y2 * (1 - k2) + k2);
+ return [r2 * 255, g2 * 255, b2 * 255];
+ };
+ convert2.xyz.rgb = function(xyz) {
+ let x2 = xyz[0] / 100, y2 = xyz[1] / 100, z2 = xyz[2] / 100, r2, g2, b2;
+ return r2 = x2 * 3.2406 + y2 * -1.5372 + z2 * -0.4986, g2 = x2 * -0.9689 + y2 * 1.8758 + z2 * 0.0415, b2 = x2 * 0.0557 + y2 * -0.204 + z2 * 1.057, r2 = r2 > 31308e-7 ? 1.055 * r2 ** (1 / 2.4) - 0.055 : r2 * 12.92, g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92, b2 = b2 > 31308e-7 ? 1.055 * b2 ** (1 / 2.4) - 0.055 : b2 * 12.92, r2 = Math.min(Math.max(0, r2), 1), g2 = Math.min(Math.max(0, g2), 1), b2 = Math.min(Math.max(0, b2), 1), [r2 * 255, g2 * 255, b2 * 255];
+ };
+ convert2.xyz.lab = function(xyz) {
+ let x2 = xyz[0], y2 = xyz[1], z2 = xyz[2];
+ x2 /= 95.047, y2 /= 100, z2 /= 108.883, x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116, y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116, z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
+ let l2 = 116 * y2 - 16, a2 = 500 * (x2 - y2), b2 = 200 * (y2 - z2);
+ return [l2, a2, b2];
+ };
+ convert2.lab.xyz = function(lab) {
+ let l2 = lab[0], a2 = lab[1], b2 = lab[2], x2, y2, z2;
+ y2 = (l2 + 16) / 116, x2 = a2 / 500 + y2, z2 = y2 - b2 / 200;
+ let y22 = y2 ** 3, x22 = x2 ** 3, z22 = z2 ** 3;
+ return y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787, x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787, z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787, x2 *= 95.047, y2 *= 100, z2 *= 108.883, [x2, y2, z2];
+ };
+ convert2.lab.lch = function(lab) {
+ let l2 = lab[0], a2 = lab[1], b2 = lab[2], h2;
+ h2 = Math.atan2(b2, a2) * 360 / 2 / Math.PI, h2 < 0 && (h2 += 360);
+ let c2 = Math.sqrt(a2 * a2 + b2 * b2);
+ return [l2, c2, h2];
+ };
+ convert2.lch.lab = function(lch) {
+ let l2 = lch[0], c2 = lch[1], hr = lch[2] / 360 * 2 * Math.PI, a2 = c2 * Math.cos(hr), b2 = c2 * Math.sin(hr);
+ return [l2, a2, b2];
+ };
+ convert2.rgb.ansi16 = function(args, saturation = null) {
+ let [r2, g2, b2] = args, value = saturation === null ? convert2.rgb.hsv(args)[2] : saturation;
+ if (value = Math.round(value / 50), value === 0)
+ return 30;
+ let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
+ return value === 2 && (ansi += 60), ansi;
+ };
+ convert2.hsv.ansi16 = function(args) {
+ return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
+ };
+ convert2.rgb.ansi256 = function(args) {
+ let r2 = args[0], g2 = args[1], b2 = args[2];
+ return r2 === g2 && g2 === b2 ? r2 < 8 ? 16 : r2 > 248 ? 231 : Math.round((r2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5);
+ };
+ convert2.ansi16.rgb = function(args) {
+ let color = args % 10;
+ if (color === 0 || color === 7)
+ return args > 50 && (color += 3.5), color = color / 10.5 * 255, [color, color, color];
+ let mult = (~~(args > 50) + 1) * 0.5, r2 = (color & 1) * mult * 255, g2 = (color >> 1 & 1) * mult * 255, b2 = (color >> 2 & 1) * mult * 255;
+ return [r2, g2, b2];
+ };
+ convert2.ansi256.rgb = function(args) {
+ if (args >= 232) {
+ let c2 = (args - 232) * 10 + 8;
+ return [c2, c2, c2];
+ }
+ args -= 16;
+ let rem, r2 = Math.floor(args / 36) / 5 * 255, g2 = Math.floor((rem = args % 36) / 6) / 5 * 255, b2 = rem % 6 / 5 * 255;
+ return [r2, g2, b2];
+ };
+ convert2.rgb.hex = function(args) {
+ let string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
+ return "000000".substring(string.length) + string;
+ };
+ convert2.hex.rgb = function(args) {
+ let match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match)
+ return [0, 0, 0];
+ let colorString = match[0];
+ match[0].length === 3 && (colorString = colorString.split("").map((char) => char + char).join(""));
+ let integer = parseInt(colorString, 16), r2 = integer >> 16 & 255, g2 = integer >> 8 & 255, b2 = integer & 255;
+ return [r2, g2, b2];
+ };
+ convert2.rgb.hcg = function(rgb) {
+ let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, max = Math.max(Math.max(r2, g2), b2), min = Math.min(Math.min(r2, g2), b2), chroma = max - min, grayscale, hue;
+ return chroma < 1 ? grayscale = min / (1 - chroma) : grayscale = 0, chroma <= 0 ? hue = 0 : max === r2 ? hue = (g2 - b2) / chroma % 6 : max === g2 ? hue = 2 + (b2 - r2) / chroma : hue = 4 + (r2 - g2) / chroma, hue /= 6, hue %= 1, [hue * 360, chroma * 100, grayscale * 100];
+ };
+ convert2.hsl.hcg = function(hsl) {
+ let s2 = hsl[1] / 100, l2 = hsl[2] / 100, c2 = l2 < 0.5 ? 2 * s2 * l2 : 2 * s2 * (1 - l2), f2 = 0;
+ return c2 < 1 && (f2 = (l2 - 0.5 * c2) / (1 - c2)), [hsl[0], c2 * 100, f2 * 100];
+ };
+ convert2.hsv.hcg = function(hsv) {
+ let s2 = hsv[1] / 100, v2 = hsv[2] / 100, c2 = s2 * v2, f2 = 0;
+ return c2 < 1 && (f2 = (v2 - c2) / (1 - c2)), [hsv[0], c2 * 100, f2 * 100];
+ };
+ convert2.hcg.rgb = function(hcg) {
+ let h2 = hcg[0] / 360, c2 = hcg[1] / 100, g2 = hcg[2] / 100;
+ if (c2 === 0)
+ return [g2 * 255, g2 * 255, g2 * 255];
+ let pure = [0, 0, 0], hi = h2 % 1 * 6, v2 = hi % 1, w2 = 1 - v2, mg = 0;
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1, pure[1] = v2, pure[2] = 0;
+ break;
+ case 1:
+ pure[0] = w2, pure[1] = 1, pure[2] = 0;
+ break;
+ case 2:
+ pure[0] = 0, pure[1] = 1, pure[2] = v2;
+ break;
+ case 3:
+ pure[0] = 0, pure[1] = w2, pure[2] = 1;
+ break;
+ case 4:
+ pure[0] = v2, pure[1] = 0, pure[2] = 1;
+ break;
+ default:
+ pure[0] = 1, pure[1] = 0, pure[2] = w2;
+ }
+ return mg = (1 - c2) * g2, [
+ (c2 * pure[0] + mg) * 255,
+ (c2 * pure[1] + mg) * 255,
+ (c2 * pure[2] + mg) * 255
+ ];
+ };
+ convert2.hcg.hsv = function(hcg) {
+ let c2 = hcg[1] / 100, g2 = hcg[2] / 100, v2 = c2 + g2 * (1 - c2), f2 = 0;
+ return v2 > 0 && (f2 = c2 / v2), [hcg[0], f2 * 100, v2 * 100];
+ };
+ convert2.hcg.hsl = function(hcg) {
+ let c2 = hcg[1] / 100, l2 = hcg[2] / 100 * (1 - c2) + 0.5 * c2, s2 = 0;
+ return l2 > 0 && l2 < 0.5 ? s2 = c2 / (2 * l2) : l2 >= 0.5 && l2 < 1 && (s2 = c2 / (2 * (1 - l2))), [hcg[0], s2 * 100, l2 * 100];
+ };
+ convert2.hcg.hwb = function(hcg) {
+ let c2 = hcg[1] / 100, g2 = hcg[2] / 100, v2 = c2 + g2 * (1 - c2);
+ return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
+ };
+ convert2.hwb.hcg = function(hwb) {
+ let w2 = hwb[1] / 100, v2 = 1 - hwb[2] / 100, c2 = v2 - w2, g2 = 0;
+ return c2 < 1 && (g2 = (v2 - c2) / (1 - c2)), [hwb[0], c2 * 100, g2 * 100];
+ };
+ convert2.apple.rgb = function(apple) {
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
+ };
+ convert2.rgb.apple = function(rgb) {
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
+ };
+ convert2.gray.rgb = function(args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+ };
+ convert2.gray.hsl = function(args) {
+ return [0, 0, args[0]];
+ };
+ convert2.gray.hsv = convert2.gray.hsl;
+ convert2.gray.hwb = function(gray) {
+ return [0, 100, gray[0]];
+ };
+ convert2.gray.cmyk = function(gray) {
+ return [0, 0, 0, gray[0]];
+ };
+ convert2.gray.lab = function(gray) {
+ return [gray[0], 0, 0];
+ };
+ convert2.gray.hex = function(gray) {
+ let val = Math.round(gray[0] / 100 * 255) & 255, string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
+ return "000000".substring(string.length) + string;
+ };
+ convert2.rgb.gray = function(rgb) {
+ return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
+ };
+ }
+});
+
+// ../../../node_modules/color-convert/route.js
+var require_route = __commonJS({
+ "../../../node_modules/color-convert/route.js"(exports, module) {
+ var conversions = require_conversions();
+ function buildGraph() {
+ let graph = {}, models = Object.keys(conversions);
+ for (let len = models.length, i2 = 0; i2 < len; i2++)
+ graph[models[i2]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ return graph;
+ }
+ function deriveBFS(fromModel) {
+ let graph = buildGraph(), queue = [fromModel];
+ for (graph[fromModel].distance = 0; queue.length; ) {
+ let current = queue.pop(), adjacents = Object.keys(conversions[current]);
+ for (let len = adjacents.length, i2 = 0; i2 < len; i2++) {
+ let adjacent = adjacents[i2], node = graph[adjacent];
+ node.distance === -1 && (node.distance = graph[current].distance + 1, node.parent = current, queue.unshift(adjacent));
+ }
+ }
+ return graph;
+ }
+ function link(from, to) {
+ return function(args) {
+ return to(from(args));
+ };
+ }
+ function wrapConversion(toModel, graph) {
+ let path = [graph[toModel].parent, toModel], fn = conversions[graph[toModel].parent][toModel], cur = graph[toModel].parent;
+ for (; graph[cur].parent; )
+ path.unshift(graph[cur].parent), fn = link(conversions[graph[cur].parent][cur], fn), cur = graph[cur].parent;
+ return fn.conversion = path, fn;
+ }
+ module.exports = function(fromModel) {
+ let graph = deriveBFS(fromModel), conversion = {}, models = Object.keys(graph);
+ for (let len = models.length, i2 = 0; i2 < len; i2++) {
+ let toModel = models[i2];
+ graph[toModel].parent !== null && (conversion[toModel] = wrapConversion(toModel, graph));
+ }
+ return conversion;
+ };
+ }
+});
+
+// ../../../node_modules/color-convert/index.js
+var require_color_convert = __commonJS({
+ "../../../node_modules/color-convert/index.js"(exports, module) {
+ var conversions = require_conversions(), route = require_route(), convert2 = {}, models = Object.keys(conversions);
+ function wrapRaw(fn) {
+ let wrappedFn = function(...args) {
+ let arg0 = args[0];
+ return arg0 == null ? arg0 : (arg0.length > 1 && (args = arg0), fn(args));
+ };
+ return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
+ }
+ function wrapRounded(fn) {
+ let wrappedFn = function(...args) {
+ let arg0 = args[0];
+ if (arg0 == null)
+ return arg0;
+ arg0.length > 1 && (args = arg0);
+ let result = fn(args);
+ if (typeof result == "object")
+ for (let len = result.length, i2 = 0; i2 < len; i2++)
+ result[i2] = Math.round(result[i2]);
+ return result;
+ };
+ return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
+ }
+ models.forEach((fromModel) => {
+ convert2[fromModel] = {}, Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels }), Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
+ let routes = route(fromModel);
+ Object.keys(routes).forEach((toModel) => {
+ let fn = routes[toModel];
+ convert2[fromModel][toModel] = wrapRounded(fn), convert2[fromModel][toModel].raw = wrapRaw(fn);
+ });
+ });
+ module.exports = convert2;
+ }
+});
+
+// src/blocks/controls/Color.tsx
+var import_color_convert = __toESM(require_color_convert(), 1);
+import React, { useCallback, useEffect, useMemo, useState } from "react";
+import { Button, Form, PopoverProvider } from "storybook/internal/components";
+import { MarkupIcon } from "@storybook/icons";
+
+// ../../../node_modules/es-toolkit/dist/function/debounce.mjs
+function debounce(func, debounceMs, { signal, edges } = {}) {
+ let pendingThis, pendingArgs = null, leading = edges != null && edges.includes("leading"), trailing = edges == null || edges.includes("trailing"), invoke = () => {
+ pendingArgs !== null && (func.apply(pendingThis, pendingArgs), pendingThis = void 0, pendingArgs = null);
+ }, onTimerEnd = () => {
+ trailing && invoke(), cancel();
+ }, timeoutId = null, schedule = () => {
+ timeoutId != null && clearTimeout(timeoutId), timeoutId = setTimeout(() => {
+ timeoutId = null, onTimerEnd();
+ }, debounceMs);
+ }, cancelTimer = () => {
+ timeoutId !== null && (clearTimeout(timeoutId), timeoutId = null);
+ }, cancel = () => {
+ cancelTimer(), pendingThis = void 0, pendingArgs = null;
+ }, flush = () => {
+ invoke();
+ }, debounced = function(...args) {
+ if (signal?.aborted)
+ return;
+ pendingThis = this, pendingArgs = args;
+ let isFirstCall = timeoutId == null;
+ schedule(), leading && isFirstCall && invoke();
+ };
+ return debounced.schedule = schedule, debounced.cancel = cancel, debounced.flush = flush, signal?.addEventListener("abort", cancel, { once: !0 }), debounced;
+}
+
+// ../../../node_modules/es-toolkit/dist/function/partial.mjs
+function partial(func, ...partialArgs) {
+ return partialImpl(func, placeholderSymbol, ...partialArgs);
+}
+function partialImpl(func, placeholder, ...partialArgs) {
+ let partialed = function(...providedArgs) {
+ let providedArgsIndex = 0, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg), remainingArgs = providedArgs.slice(providedArgsIndex);
+ return func.apply(this, substitutedArgs.concat(remainingArgs));
+ };
+ return func.prototype && (partialed.prototype = Object.create(func.prototype)), partialed;
+}
+var placeholderSymbol = Symbol("partial.placeholder");
+partial.placeholder = placeholderSymbol;
+
+// ../../../node_modules/es-toolkit/dist/function/partialRight.mjs
+function partialRight(func, ...partialArgs) {
+ return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
+}
+function partialRightImpl(func, placeholder, ...partialArgs) {
+ let partialedRight = function(...providedArgs) {
+ let placeholderLength = partialArgs.filter((arg) => arg === placeholder).length, rangeLength = Math.max(providedArgs.length - placeholderLength, 0), remainingArgs = providedArgs.slice(0, rangeLength), providedArgsIndex = rangeLength, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
+ return func.apply(this, remainingArgs.concat(substitutedArgs));
+ };
+ return func.prototype && (partialedRight.prototype = Object.create(func.prototype)), partialedRight;
+}
+var placeholderSymbol2 = Symbol("partialRight.placeholder");
+partialRight.placeholder = placeholderSymbol2;
+
+// ../../../node_modules/es-toolkit/dist/function/retry.mjs
+var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
+
+// ../../../node_modules/react-colorful/dist/index.mjs
+import e, { useRef as r, useMemo as t, useEffect as n, useState as o, useCallback as a, useLayoutEffect as l } from "react";
+function u() {
+ return (u = Object.assign || function(e2) {
+ for (var r2 = 1; r2 < arguments.length; r2++) {
+ var t2 = arguments[r2];
+ for (var n2 in t2) Object.prototype.hasOwnProperty.call(t2, n2) && (e2[n2] = t2[n2]);
+ }
+ return e2;
+ }).apply(this, arguments);
+}
+function c(e2, r2) {
+ if (e2 == null) return {};
+ var t2, n2, o2 = {}, a2 = Object.keys(e2);
+ for (n2 = 0; n2 < a2.length; n2++) r2.indexOf(t2 = a2[n2]) >= 0 || (o2[t2] = e2[t2]);
+ return o2;
+}
+function i(e2) {
+ var t2 = r(e2), n2 = r(function(e3) {
+ t2.current && t2.current(e3);
+ });
+ return t2.current = e2, n2.current;
+}
+var s = function(e2, r2, t2) {
+ return r2 === void 0 && (r2 = 0), t2 === void 0 && (t2 = 1), e2 > t2 ? t2 : e2 < r2 ? r2 : e2;
+}, f = function(e2) {
+ return "touches" in e2;
+}, v = function(e2) {
+ return e2 && e2.ownerDocument.defaultView || self;
+}, d = function(e2, r2, t2) {
+ var n2 = e2.getBoundingClientRect(), o2 = f(r2) ? (function(e3, r3) {
+ for (var t3 = 0; t3 < e3.length; t3++) if (e3[t3].identifier === r3) return e3[t3];
+ return e3[0];
+ })(r2.touches, t2) : r2;
+ return { left: s((o2.pageX - (n2.left + v(e2).pageXOffset)) / n2.width), top: s((o2.pageY - (n2.top + v(e2).pageYOffset)) / n2.height) };
+}, h = function(e2) {
+ !f(e2) && e2.preventDefault();
+}, m = e.memo(function(o2) {
+ var a2 = o2.onMove, l2 = o2.onKey, s2 = c(o2, ["onMove", "onKey"]), m2 = r(null), g2 = i(a2), p2 = i(l2), b2 = r(null), _2 = r(!1), x2 = t(function() {
+ var e2 = function(e3) {
+ h(e3), (f(e3) ? e3.touches.length > 0 : e3.buttons > 0) && m2.current ? g2(d(m2.current, e3, b2.current)) : t2(!1);
+ }, r2 = function() {
+ return t2(!1);
+ };
+ function t2(t3) {
+ var n2 = _2.current, o3 = v(m2.current), a3 = t3 ? o3.addEventListener : o3.removeEventListener;
+ a3(n2 ? "touchmove" : "mousemove", e2), a3(n2 ? "touchend" : "mouseup", r2);
+ }
+ return [function(e3) {
+ var r3 = e3.nativeEvent, n2 = m2.current;
+ if (n2 && (h(r3), !(function(e4, r4) {
+ return r4 && !f(e4);
+ })(r3, _2.current) && n2)) {
+ if (f(r3)) {
+ _2.current = !0;
+ var o3 = r3.changedTouches || [];
+ o3.length && (b2.current = o3[0].identifier);
+ }
+ n2.focus(), g2(d(n2, r3, b2.current)), t2(!0);
+ }
+ }, function(e3) {
+ var r3 = e3.which || e3.keyCode;
+ r3 < 37 || r3 > 40 || (e3.preventDefault(), p2({ left: r3 === 39 ? 0.05 : r3 === 37 ? -0.05 : 0, top: r3 === 40 ? 0.05 : r3 === 38 ? -0.05 : 0 }));
+ }, t2];
+ }, [p2, g2]), C2 = x2[0], E2 = x2[1], H2 = x2[2];
+ return n(function() {
+ return H2;
+ }, [H2]), e.createElement("div", u({}, s2, { onTouchStart: C2, onMouseDown: C2, className: "react-colorful__interactive", ref: m2, onKeyDown: E2, tabIndex: 0, role: "slider" }));
+}), g = function(e2) {
+ return e2.filter(Boolean).join(" ");
+}, p = function(r2) {
+ var t2 = r2.color, n2 = r2.left, o2 = r2.top, a2 = o2 === void 0 ? 0.5 : o2, l2 = g(["react-colorful__pointer", r2.className]);
+ return e.createElement("div", { className: l2, style: { top: 100 * a2 + "%", left: 100 * n2 + "%" } }, e.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t2 } }));
+}, b = function(e2, r2, t2) {
+ return r2 === void 0 && (r2 = 0), t2 === void 0 && (t2 = Math.pow(10, r2)), Math.round(t2 * e2) / t2;
+}, _ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, x = function(e2) {
+ return L(C(e2));
+}, C = function(e2) {
+ return e2[0] === "#" && (e2 = e2.substring(1)), e2.length < 6 ? { r: parseInt(e2[0] + e2[0], 16), g: parseInt(e2[1] + e2[1], 16), b: parseInt(e2[2] + e2[2], 16), a: e2.length === 4 ? b(parseInt(e2[3] + e2[3], 16) / 255, 2) : 1 } : { r: parseInt(e2.substring(0, 2), 16), g: parseInt(e2.substring(2, 4), 16), b: parseInt(e2.substring(4, 6), 16), a: e2.length === 8 ? b(parseInt(e2.substring(6, 8), 16) / 255, 2) : 1 };
+}, E = function(e2, r2) {
+ return r2 === void 0 && (r2 = "deg"), Number(e2) * (_[r2] || 1);
+}, H = function(e2) {
+ var r2 = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2);
+ return r2 ? N({ h: E(r2[1], r2[2]), s: Number(r2[3]), l: Number(r2[4]), a: r2[5] === void 0 ? 1 : Number(r2[5]) / (r2[6] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 };
+};
+var N = function(e2) {
+ var r2 = e2.s, t2 = e2.l;
+ return { h: e2.h, s: (r2 *= (t2 < 50 ? t2 : 100 - t2) / 100) > 0 ? 2 * r2 / (t2 + r2) * 100 : 0, v: t2 + r2, a: e2.a };
+}, w = function(e2) {
+ return K(I(e2));
+}, y = function(e2) {
+ var r2 = e2.s, t2 = e2.v, n2 = e2.a, o2 = (200 - r2) * t2 / 100;
+ return { h: b(e2.h), s: b(o2 > 0 && o2 < 200 ? r2 * t2 / 100 / (o2 <= 100 ? o2 : 200 - o2) * 100 : 0), l: b(o2 / 2), a: b(n2, 2) };
+}, q = function(e2) {
+ var r2 = y(e2);
+ return "hsl(" + r2.h + ", " + r2.s + "%, " + r2.l + "%)";
+}, k = function(e2) {
+ var r2 = y(e2);
+ return "hsla(" + r2.h + ", " + r2.s + "%, " + r2.l + "%, " + r2.a + ")";
+}, I = function(e2) {
+ var r2 = e2.h, t2 = e2.s, n2 = e2.v, o2 = e2.a;
+ r2 = r2 / 360 * 6, t2 /= 100, n2 /= 100;
+ var a2 = Math.floor(r2), l2 = n2 * (1 - t2), u2 = n2 * (1 - (r2 - a2) * t2), c2 = n2 * (1 - (1 - r2 + a2) * t2), i2 = a2 % 6;
+ return { r: b(255 * [n2, u2, l2, l2, c2, n2][i2]), g: b(255 * [c2, n2, n2, u2, l2, l2][i2]), b: b(255 * [l2, l2, c2, n2, n2, u2][i2]), a: b(o2, 2) };
+};
+var z = function(e2) {
+ var r2 = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2);
+ return r2 ? L({ r: Number(r2[1]) / (r2[2] ? 100 / 255 : 1), g: Number(r2[3]) / (r2[4] ? 100 / 255 : 1), b: Number(r2[5]) / (r2[6] ? 100 / 255 : 1), a: r2[7] === void 0 ? 1 : Number(r2[7]) / (r2[8] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 };
+};
+var D = function(e2) {
+ var r2 = e2.toString(16);
+ return r2.length < 2 ? "0" + r2 : r2;
+}, K = function(e2) {
+ var r2 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = o2 < 1 ? D(b(255 * o2)) : "";
+ return "#" + D(r2) + D(t2) + D(n2) + a2;
+}, L = function(e2) {
+ var r2 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = Math.max(r2, t2, n2), l2 = a2 - Math.min(r2, t2, n2), u2 = l2 ? a2 === r2 ? (t2 - n2) / l2 : a2 === t2 ? 2 + (n2 - r2) / l2 : 4 + (r2 - t2) / l2 : 0;
+ return { h: b(60 * (u2 < 0 ? u2 + 6 : u2)), s: b(a2 ? l2 / a2 * 100 : 0), v: b(a2 / 255 * 100), a: o2 };
+};
+var S = e.memo(function(r2) {
+ var t2 = r2.hue, n2 = r2.onChange, o2 = g(["react-colorful__hue", r2.className]);
+ return e.createElement("div", { className: o2 }, e.createElement(m, { onMove: function(e2) {
+ n2({ h: 360 * e2.left });
+ }, onKey: function(e2) {
+ n2({ h: s(t2 + 360 * e2.left, 0, 360) });
+ }, "aria-label": "Hue", "aria-valuenow": b(t2), "aria-valuemax": "360", "aria-valuemin": "0" }, e.createElement(p, { className: "react-colorful__hue-pointer", left: t2 / 360, color: q({ h: t2, s: 100, v: 100, a: 1 }) })));
+}), T = e.memo(function(r2) {
+ var t2 = r2.hsva, n2 = r2.onChange, o2 = { backgroundColor: q({ h: t2.h, s: 100, v: 100, a: 1 }) };
+ return e.createElement("div", { className: "react-colorful__saturation", style: o2 }, e.createElement(m, { onMove: function(e2) {
+ n2({ s: 100 * e2.left, v: 100 - 100 * e2.top });
+ }, onKey: function(e2) {
+ n2({ s: s(t2.s + 100 * e2.left, 0, 100), v: s(t2.v - 100 * e2.top, 0, 100) });
+ }, "aria-label": "Color", "aria-valuetext": "Saturation " + b(t2.s) + "%, Brightness " + b(t2.v) + "%" }, e.createElement(p, { className: "react-colorful__saturation-pointer", top: 1 - t2.v / 100, left: t2.s / 100, color: q(t2) })));
+}), F = function(e2, r2) {
+ if (e2 === r2) return !0;
+ for (var t2 in e2) if (e2[t2] !== r2[t2]) return !1;
+ return !0;
+}, P = function(e2, r2) {
+ return e2.replace(/\s/g, "") === r2.replace(/\s/g, "");
+}, X = function(e2, r2) {
+ return e2.toLowerCase() === r2.toLowerCase() || F(C(e2), C(r2));
+};
+function Y(e2, t2, l2) {
+ var u2 = i(l2), c2 = o(function() {
+ return e2.toHsva(t2);
+ }), s2 = c2[0], f2 = c2[1], v2 = r({ color: t2, hsva: s2 });
+ n(function() {
+ if (!e2.equal(t2, v2.current.color)) {
+ var r2 = e2.toHsva(t2);
+ v2.current = { hsva: r2, color: t2 }, f2(r2);
+ }
+ }, [t2, e2]), n(function() {
+ var r2;
+ F(s2, v2.current.hsva) || e2.equal(r2 = e2.fromHsva(s2), v2.current.color) || (v2.current = { hsva: s2, color: r2 }, u2(r2));
+ }, [s2, e2, u2]);
+ var d2 = a(function(e3) {
+ f2(function(r2) {
+ return Object.assign({}, r2, e3);
+ });
+ }, []);
+ return [s2, d2];
+}
+var R, V = typeof window < "u" ? l : n, $ = function() {
+ return R || (typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0);
+};
+var J = /* @__PURE__ */ new Map(), Q = function(e2) {
+ V(function() {
+ var r2 = e2.current ? e2.current.ownerDocument : document;
+ if (r2 !== void 0 && !J.has(r2)) {
+ var t2 = r2.createElement("style");
+ t2.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, J.set(r2, t2);
+ var n2 = $();
+ n2 && t2.setAttribute("nonce", n2), r2.head.appendChild(t2);
+ }
+ }, []);
+}, U = function(t2) {
+ var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = a2 === void 0 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c(t2, ["className", "colorModel", "color", "onChange"]), f2 = r(null);
+ Q(f2);
+ var v2 = Y(o2, l2, i2), d2 = v2[0], h2 = v2[1], m2 = g(["react-colorful", n2]);
+ return e.createElement("div", u({}, s2, { ref: f2, className: m2 }), e.createElement(T, { hsva: d2, onChange: h2 }), e.createElement(S, { hue: d2.h, onChange: h2, className: "react-colorful__last-control" }));
+}, W = { defaultColor: "000", toHsva: x, fromHsva: function(e2) {
+ return w({ h: e2.h, s: e2.s, v: e2.v, a: 1 });
+}, equal: X }, Z = function(r2) {
+ return e.createElement(U, u({}, r2, { colorModel: W }));
+}, ee = function(r2) {
+ var t2 = r2.className, n2 = r2.hsva, o2 = r2.onChange, a2 = { backgroundImage: "linear-gradient(90deg, " + k(Object.assign({}, n2, { a: 0 })) + ", " + k(Object.assign({}, n2, { a: 1 })) + ")" }, l2 = g(["react-colorful__alpha", t2]), u2 = b(100 * n2.a);
+ return e.createElement("div", { className: l2 }, e.createElement("div", { className: "react-colorful__alpha-gradient", style: a2 }), e.createElement(m, { onMove: function(e2) {
+ o2({ a: e2.left });
+ }, onKey: function(e2) {
+ o2({ a: s(n2.a + e2.left) });
+ }, "aria-label": "Alpha", "aria-valuetext": u2 + "%", "aria-valuenow": u2, "aria-valuemin": "0", "aria-valuemax": "100" }, e.createElement(p, { className: "react-colorful__alpha-pointer", left: n2.a, color: k(n2) })));
+}, re = function(t2) {
+ var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = a2 === void 0 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c(t2, ["className", "colorModel", "color", "onChange"]), f2 = r(null);
+ Q(f2);
+ var v2 = Y(o2, l2, i2), d2 = v2[0], h2 = v2[1], m2 = g(["react-colorful", n2]);
+ return e.createElement("div", u({}, s2, { ref: f2, className: m2 }), e.createElement(T, { hsva: d2, onChange: h2 }), e.createElement(S, { hue: d2.h, onChange: h2 }), e.createElement(ee, { hsva: d2, onChange: h2, className: "react-colorful__last-control" }));
+};
+var le = { defaultColor: "hsla(0, 0%, 0%, 1)", toHsva: H, fromHsva: k, equal: P }, ue = function(r2) {
+ return e.createElement(re, u({}, r2, { colorModel: le }));
+};
+var Ee = { defaultColor: "rgba(0, 0, 0, 1)", toHsva: z, fromHsva: function(e2) {
+ var r2 = I(e2);
+ return "rgba(" + r2.r + ", " + r2.g + ", " + r2.b + ", " + r2.a + ")";
+}, equal: P }, He = function(r2) {
+ return e.createElement(re, u({}, r2, { colorModel: Ee }));
+};
+
+// src/blocks/controls/Color.tsx
+import { styled } from "storybook/theming";
+var Wrapper = styled.div({
+ position: "relative",
+ maxWidth: 250
+}), TooltipContent = styled.div({
+ width: 200,
+ margin: 5,
+ ".react-colorful__saturation": {
+ borderRadius: "4px 4px 0 0"
+ },
+ ".react-colorful__hue": {
+ boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 5%)"
+ },
+ ".react-colorful__last-control": {
+ borderRadius: "0 0 4px 4px"
+ }
+}), Swatches = styled.div({
+ display: "grid",
+ gridTemplateColumns: "repeat(9, 16px)",
+ gap: 6,
+ padding: 3,
+ marginTop: 5,
+ width: 200
+}), swatchBackground = (isDark) => `url('data:image/svg+xml;charset=utf-8,')`, SwatchColor = styled(Button)(
+ ({ value, selected, theme }) => ({
+ width: 16,
+ height: 16,
+ boxShadow: selected ? `${theme.appBorderColor} 0 0 0 1px inset, ${theme.textMutedColor}50 0 0 0 4px` : `${theme.appBorderColor} 0 0 0 1px inset`,
+ border: "none",
+ borderRadius: theme.appBorderRadius,
+ "&, &:hover": {
+ background: "unset",
+ backgroundColor: "unset",
+ backgroundImage: `linear-gradient(${value}, ${value}), ${swatchBackground(theme.base === "dark")}`
+ }
+ })
+), Input = styled(Form.Input)(({ theme }) => ({
+ width: "100%",
+ paddingLeft: 30,
+ paddingRight: 30,
+ boxSizing: "border-box",
+ fontFamily: theme.typography.fonts.base,
+ '[aria-readonly="true"] > &': {
+ background: theme.base === "light" ? theme.color.lighter : "transparent"
+ }
+})), PopoverTrigger = styled(SwatchColor)(({ disabled }) => ({
+ position: "absolute",
+ top: 4,
+ left: 4,
+ zIndex: 1,
+ cursor: disabled ? "not-allowed" : "pointer"
+})), CycleColorSpaceButton = styled(Button)(({ theme }) => ({
+ position: "absolute",
+ zIndex: 1,
+ top: 6,
+ right: 7,
+ width: 20,
+ height: 20,
+ padding: 4,
+ boxSizing: "border-box",
+ cursor: "pointer",
+ color: theme.input.color
+})), ColorSpace = /* @__PURE__ */ ((ColorSpace2) => (ColorSpace2.RGB = "rgb", ColorSpace2.HSL = "hsl", ColorSpace2.HEX = "hex", ColorSpace2))(ColorSpace || {}), COLOR_SPACES = Object.values(ColorSpace), COLOR_REGEXP = /\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/, RGB_REGEXP = /^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i, HSL_REGEXP = /^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i, HEX_REGEXP = /^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i, SHORTHEX_REGEXP = /^\s*#?([0-9a-f]{3})\s*$/i, ColorPicker = {
+ hex: Z,
+ rgb: He,
+ hsl: ue
+}, fallbackColor = {
+ hex: "transparent",
+ rgb: "rgba(0, 0, 0, 0)",
+ hsl: "hsla(0, 0%, 0%, 0)"
+}, stringToArgs = (value) => {
+ let match = value?.match(COLOR_REGEXP);
+ if (!match)
+ return [0, 0, 0, 1];
+ let [, x2, y2, z2, a2 = 1] = match;
+ return [x2, y2, z2, a2].map(Number);
+}, parseRgb = (value) => {
+ let [r2, g2, b2, a2] = stringToArgs(value), [h2, s2, l2] = import_color_convert.default.rgb.hsl([r2, g2, b2]) || [0, 0, 0];
+ return {
+ valid: !0,
+ value,
+ keyword: import_color_convert.default.rgb.keyword([r2, g2, b2]),
+ colorSpace: "rgb" /* RGB */,
+ rgb: value,
+ hsl: `hsla(${h2}, ${s2}%, ${l2}%, ${a2})`,
+ hex: `#${import_color_convert.default.rgb.hex([r2, g2, b2]).toLowerCase()}`
+ };
+}, parseHsl = (value) => {
+ let [h2, s2, l2, a2] = stringToArgs(value), [r2, g2, b2] = import_color_convert.default.hsl.rgb([h2, s2, l2]) || [0, 0, 0];
+ return {
+ valid: !0,
+ value,
+ keyword: import_color_convert.default.hsl.keyword([h2, s2, l2]),
+ colorSpace: "hsl" /* HSL */,
+ rgb: `rgba(${r2}, ${g2}, ${b2}, ${a2})`,
+ hsl: value,
+ hex: `#${import_color_convert.default.hsl.hex([h2, s2, l2]).toLowerCase()}`
+ };
+}, parseHexOrKeyword = (value) => {
+ let plain = value.replace("#", ""), rgb = import_color_convert.default.keyword.rgb(plain) || import_color_convert.default.hex.rgb(plain), hsl = import_color_convert.default.rgb.hsl(rgb), mapped = value;
+ /[^#a-f0-9]/i.test(value) ? mapped = plain : HEX_REGEXP.test(value) && (mapped = `#${plain}`);
+ let valid = !0;
+ if (mapped.startsWith("#"))
+ valid = HEX_REGEXP.test(mapped);
+ else
+ try {
+ import_color_convert.default.keyword.hex(mapped);
+ } catch {
+ valid = !1;
+ }
+ return {
+ valid,
+ value: mapped,
+ keyword: import_color_convert.default.rgb.keyword(rgb),
+ colorSpace: "hex" /* HEX */,
+ rgb: `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 1)`,
+ hsl: `hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, 1)`,
+ hex: mapped
+ };
+}, parseValue = (value) => {
+ if (value)
+ return RGB_REGEXP.test(value) ? parseRgb(value) : HSL_REGEXP.test(value) ? parseHsl(value) : parseHexOrKeyword(value);
+}, getRealValue = (value, color, colorSpace) => {
+ if (!value || !color?.valid)
+ return fallbackColor[colorSpace];
+ if (colorSpace !== "hex" /* HEX */)
+ return color?.[colorSpace] || fallbackColor[colorSpace];
+ if (!color.hex.startsWith("#"))
+ try {
+ return `#${import_color_convert.default.keyword.hex(color.hex)}`;
+ } catch {
+ return fallbackColor.hex;
+ }
+ let short = color.hex.match(SHORTHEX_REGEXP);
+ if (!short)
+ return HEX_REGEXP.test(color.hex) ? color.hex : fallbackColor.hex;
+ let [r2, g2, b2] = short[1].split("");
+ return `#${r2}${r2}${g2}${g2}${b2}${b2}`;
+}, useColorInput = (initialValue, onChange) => {
+ let [value, setValue] = useState(initialValue || ""), [color, setColor] = useState(() => parseValue(value)), [colorSpace, setColorSpace] = useState(color?.colorSpace || "hex" /* HEX */);
+ useEffect(() => {
+ let nextValue = initialValue || "", nextColor = parseValue(nextValue);
+ setValue(nextValue), setColor(nextColor), setColorSpace(nextColor?.colorSpace || "hex" /* HEX */);
+ }, [initialValue]);
+ let realValue = useMemo(
+ () => getRealValue(value, color, colorSpace).toLowerCase(),
+ [value, color, colorSpace]
+ ), updateValue = useCallback(
+ (update) => {
+ let parsed = parseValue(update), v2 = parsed?.value || update || "";
+ setValue(v2), v2 === "" && (setColor(void 0), onChange(void 0)), parsed && (setColor(parsed), setColorSpace(parsed.colorSpace), onChange(parsed.value));
+ },
+ [onChange]
+ ), cycleColorSpace = useCallback(() => {
+ let nextIndex = (COLOR_SPACES.indexOf(colorSpace) + 1) % COLOR_SPACES.length, nextSpace = COLOR_SPACES[nextIndex];
+ setColorSpace(nextSpace);
+ let updatedValue = color?.[nextSpace] || "";
+ setValue(updatedValue), onChange(updatedValue);
+ }, [color, colorSpace, onChange]);
+ return { value, realValue, updateValue, color, colorSpace, cycleColorSpace };
+}, id = (value) => value.replace(/\s*/, "").toLowerCase(), usePresets = (presetColors, currentColor, colorSpace) => {
+ let [selectedColors, setSelectedColors] = useState(currentColor?.valid ? [currentColor] : []);
+ useEffect(() => {
+ currentColor === void 0 && setSelectedColors([]);
+ }, [currentColor]);
+ let presets = useMemo(() => (presetColors || []).map((preset) => typeof preset == "string" ? parseValue(preset) : preset.title ? { ...parseValue(preset.color), keyword: preset.title } : parseValue(preset.color)).concat(selectedColors).filter(Boolean).slice(-27), [presetColors, selectedColors]), addPreset = useCallback(
+ (color) => {
+ color?.valid && (presets.some(
+ (preset) => preset && preset[colorSpace] && id(preset[colorSpace] || "") === id(color[colorSpace] || "")
+ ) || setSelectedColors((arr) => arr.concat(color)));
+ },
+ [colorSpace, presets]
+ );
+ return { presets, addPreset };
+}, ColorControl = ({
+ name,
+ value: initialValue,
+ onChange,
+ onFocus,
+ onBlur,
+ presetColors,
+ startOpen = !1,
+ argType
+}) => {
+ let debouncedOnChange = useCallback(debounce(onChange, 200), [onChange]), { value, realValue, updateValue, color, colorSpace, cycleColorSpace } = useColorInput(
+ initialValue,
+ debouncedOnChange
+ ), { presets, addPreset } = usePresets(presetColors ?? [], color, colorSpace), Picker = ColorPicker[colorSpace], readOnly = !!argType?.table?.readonly, controlId = getControlId(name);
+ return React.createElement(Wrapper, null, React.createElement("label", { htmlFor: controlId, className: "sb-sr-only" }, name), React.createElement(
+ Input,
+ {
+ id: controlId,
+ value,
+ onChange: (e2) => updateValue(e2.target.value),
+ onFocus: (e2) => e2.target.select(),
+ readOnly,
+ placeholder: "Choose color..."
+ }
+ ), React.createElement(
+ PopoverProvider,
+ {
+ defaultVisible: startOpen,
+ visible: readOnly ? !1 : void 0,
+ onVisibleChange: () => color && addPreset(color),
+ popover: React.createElement(TooltipContent, null, React.createElement(
+ Picker,
+ {
+ color: realValue === "transparent" ? "#000000" : realValue,
+ onChange: updateValue,
+ onFocus,
+ onBlur
+ }
+ ), presets.length > 0 && React.createElement(Swatches, null, presets.map((preset, index) => React.createElement(
+ SwatchColor,
+ {
+ key: `${preset?.value || index}-${index}`,
+ variant: "ghost",
+ padding: "small",
+ size: "small",
+ ariaLabel: "Pick this color",
+ tooltip: preset?.keyword || preset?.value || "",
+ value: preset?.value || "",
+ selected: !!(color && preset && preset[colorSpace] && id(preset[colorSpace] || "") === id(color[colorSpace])),
+ onClick: () => preset && updateValue(preset.value || "")
+ }
+ ))))
+ },
+ React.createElement(
+ PopoverTrigger,
+ {
+ variant: "ghost",
+ padding: "small",
+ size: "small",
+ ariaLabel: "Open color picker",
+ value: realValue,
+ style: { margin: 4 },
+ disabled: readOnly
+ }
+ )
+ ), value ? React.createElement(
+ CycleColorSpaceButton,
+ {
+ variant: "ghost",
+ padding: "small",
+ size: "small",
+ ariaLabel: "Cycle through color spaces",
+ disabled: readOnly,
+ onClick: readOnly ? void 0 : cycleColorSpace
+ },
+ React.createElement(MarkupIcon, null)
+ ) : null);
+}, Color_default = ColorControl;
+export {
+ ColorControl,
+ Color_default as default
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/DocsRenderer-LL677BLK.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/DocsRenderer-LL677BLK.js
new file mode 100644
index 0000000000000000000000000000000000000000..a193c0ea8abbc4a71b5acaa295db9b53dc6fe10b
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/DocsRenderer-LL677BLK.js
@@ -0,0 +1,9 @@
+import {
+ DocsRenderer,
+ defaultComponents
+} from "./chunk-OATZR77O.js";
+import "./chunk-SL3VIQZ3.js";
+export {
+ DocsRenderer,
+ defaultComponents
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-AAVP3AE4.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-AAVP3AE4.js
new file mode 100644
index 0000000000000000000000000000000000000000..d3260ad1eea911ad8b13fb72c55869699fa8df35
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-AAVP3AE4.js
@@ -0,0 +1,949 @@
+// src/blocks/components/Source.tsx
+import React2 from "react";
+import { SyntaxHighlighter } from "storybook/internal/components";
+import {
+ ThemeProvider,
+ convert,
+ ignoreSsrWarning,
+ styled as styled2,
+ themes,
+ useTheme
+} from "storybook/theming";
+
+// src/blocks/components/EmptyBlock.tsx
+import React from "react";
+import { withReset } from "storybook/internal/components";
+
+// ../../../node_modules/@babel/runtime/helpers/esm/extends.js
+function _extends() {
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
+ for (var e = 1; e < arguments.length; e++) {
+ var t = arguments[e];
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
+ }
+ return n;
+ }, _extends.apply(null, arguments);
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
+function _assertThisInitialized(e) {
+ if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
+function _setPrototypeOf(t, e) {
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
+ return t2.__proto__ = e2, t2;
+ }, _setPrototypeOf(t, e);
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
+function _inheritsLoose(t, o) {
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
+function _getPrototypeOf(t) {
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
+ return t2.__proto__ || Object.getPrototypeOf(t2);
+ }, _getPrototypeOf(t);
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
+function _isNativeFunction(t) {
+ try {
+ return Function.toString.call(t).indexOf("[native code]") !== -1;
+ } catch {
+ return typeof t == "function";
+ }
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
+function _isNativeReflectConstruct() {
+ try {
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
+ }));
+ } catch {
+ }
+ return (_isNativeReflectConstruct = function() {
+ return !!t;
+ })();
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/construct.js
+function _construct(t, e, r) {
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
+ var o = [null];
+ o.push.apply(o, e);
+ var p = new (t.bind.apply(t, o))();
+ return r && _setPrototypeOf(p, r.prototype), p;
+}
+
+// ../../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
+function _wrapNativeSuper(t) {
+ var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
+ return _wrapNativeSuper = function(t2) {
+ if (t2 === null || !_isNativeFunction(t2)) return t2;
+ if (typeof t2 != "function") throw new TypeError("Super expression must either be null or a function");
+ if (r !== void 0) {
+ if (r.has(t2)) return r.get(t2);
+ r.set(t2, Wrapper2);
+ }
+ function Wrapper2() {
+ return _construct(t2, arguments, _getPrototypeOf(this).constructor);
+ }
+ return Wrapper2.prototype = Object.create(t2.prototype, {
+ constructor: {
+ value: Wrapper2,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }), _setPrototypeOf(Wrapper2, t2);
+ }, _wrapNativeSuper(t);
+}
+
+// ../../../node_modules/polished/dist/polished.esm.js
+var ERRORS = {
+ 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).
+
+`,
+ 2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).
+
+`,
+ 3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
+
+`,
+ 4: `Couldn't generate valid rgb string from %s, it returned %s.
+
+`,
+ 5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
+
+`,
+ 6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).
+
+`,
+ 7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).
+
+`,
+ 8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
+
+`,
+ 9: `Please provide a number of steps to the modularScale helper.
+
+`,
+ 10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
+
+`,
+ 11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
+
+`,
+ 12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
+
+`,
+ 13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
+
+`,
+ 14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
+
+`,
+ 15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
+
+`,
+ 16: `You must provide a template to this method.
+
+`,
+ 17: `You passed an unsupported selector state to this method.
+
+`,
+ 18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
+
+`,
+ 19: `fromSize and toSize must be provided as stringified numbers with the same units.
+
+`,
+ 20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
+
+`,
+ 21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
+ 22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
+ 23: `fontFace expects a name of a font-family.
+
+`,
+ 24: `fontFace expects either the path to the font file(s) or a name of a local copy.
+
+`,
+ 25: `fontFace expects localFonts to be an array.
+
+`,
+ 26: `fontFace expects fileFormats to be an array.
+
+`,
+ 27: `radialGradient requries at least 2 color-stops to properly render.
+
+`,
+ 28: `Please supply a filename to retinaImage() as the first argument.
+
+`,
+ 29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
+
+`,
+ 30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
+ 31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
+
+`,
+ 32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
+To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
+
+`,
+ 33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
+
+`,
+ 34: `borderRadius expects a radius value as a string or number as the second argument.
+
+`,
+ 35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
+
+`,
+ 36: `Property must be a string value.
+
+`,
+ 37: `Syntax Error at %s.
+
+`,
+ 38: `Formula contains a function that needs parentheses at %s.
+
+`,
+ 39: `Formula is missing closing parenthesis at %s.
+
+`,
+ 40: `Formula has too many closing parentheses at %s.
+
+`,
+ 41: `All values in a formula must have the same unit or be unitless.
+
+`,
+ 42: `Please provide a number of steps to the modularScale helper.
+
+`,
+ 43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
+
+`,
+ 44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
+
+`,
+ 45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
+
+`,
+ 46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
+
+`,
+ 47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
+
+`,
+ 48: `fromSize and toSize must be provided as stringified numbers with the same units.
+
+`,
+ 49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
+
+`,
+ 50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
+
+`,
+ 51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
+
+`,
+ 52: `fontFace expects either the path to the font file(s) or a name of a local copy.
+
+`,
+ 53: `fontFace expects localFonts to be an array.
+
+`,
+ 54: `fontFace expects fileFormats to be an array.
+
+`,
+ 55: `fontFace expects a name of a font-family.
+
+`,
+ 56: `linearGradient requries at least 2 color-stops to properly render.
+
+`,
+ 57: `radialGradient requries at least 2 color-stops to properly render.
+
+`,
+ 58: `Please supply a filename to retinaImage() as the first argument.
+
+`,
+ 59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
+
+`,
+ 60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
+ 61: `Property must be a string value.
+
+`,
+ 62: `borderRadius expects a radius value as a string or number as the second argument.
+
+`,
+ 63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
+
+`,
+ 64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
+
+`,
+ 65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').
+
+`,
+ 66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
+
+`,
+ 67: `You must provide a template to this method.
+
+`,
+ 68: `You passed an unsupported selector state to this method.
+
+`,
+ 69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
+
+`,
+ 70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
+
+`,
+ 71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
+
+`,
+ 72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
+
+`,
+ 73: `Please provide a valid CSS variable.
+
+`,
+ 74: `CSS variable not found and no default was provided.
+
+`,
+ 75: `important requires a valid style object, got a %s instead.
+
+`,
+ 76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
+
+`,
+ 77: `remToPx expects a value in "rem" but you provided it in "%s".
+
+`,
+ 78: `base must be set in "px" or "%" but you set it in "%s".
+`
+};
+function format() {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
+ args[_key] = arguments[_key];
+ var a = args[0], b = [], c;
+ for (c = 1; c < args.length; c += 1)
+ b.push(args[c]);
+ return b.forEach(function(d) {
+ a = a.replace(/%[a-z]/, d);
+ }), a;
+}
+var PolishedError = (function(_Error) {
+ _inheritsLoose(PolishedError2, _Error);
+ function PolishedError2(code) {
+ var _this;
+ if (process.env.NODE_ENV === "production")
+ _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
+ else {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
+ args[_key2 - 1] = arguments[_key2];
+ _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
+ }
+ return _assertThisInitialized(_this);
+ }
+ return PolishedError2;
+})(_wrapNativeSuper(Error));
+function endsWith(string, suffix) {
+ return string.substr(-suffix.length) === suffix;
+}
+var cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
+function stripUnit(value) {
+ if (typeof value != "string") return value;
+ var matchedValue = value.match(cssRegex$1);
+ return matchedValue ? parseFloat(value) : value;
+}
+var pxtoFactory = function(to) {
+ return function(pxval, base) {
+ base === void 0 && (base = "16px");
+ var newPxval = pxval, newBase = base;
+ if (typeof pxval == "string") {
+ if (!endsWith(pxval, "px"))
+ throw new PolishedError(69, to, pxval);
+ newPxval = stripUnit(pxval);
+ }
+ if (typeof base == "string") {
+ if (!endsWith(base, "px"))
+ throw new PolishedError(70, to, base);
+ newBase = stripUnit(base);
+ }
+ if (typeof newPxval == "string")
+ throw new PolishedError(71, pxval, to);
+ if (typeof newBase == "string")
+ throw new PolishedError(72, base, to);
+ return "" + newPxval / newBase + to;
+ };
+}, pixelsto = pxtoFactory, em = pixelsto("em");
+var rem = pixelsto("rem");
+function colorToInt(color) {
+ return Math.round(color * 255);
+}
+function convertToInt(red, green, blue) {
+ return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
+}
+function hslToRgb(hue, saturation, lightness, convert2) {
+ if (convert2 === void 0 && (convert2 = convertToInt), saturation === 0)
+ return convert2(lightness, lightness, lightness);
+ var huePrime = (hue % 360 + 360) % 360 / 60, chroma = (1 - Math.abs(2 * lightness - 1)) * saturation, secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1)), red = 0, green = 0, blue = 0;
+ huePrime >= 0 && huePrime < 1 ? (red = chroma, green = secondComponent) : huePrime >= 1 && huePrime < 2 ? (red = secondComponent, green = chroma) : huePrime >= 2 && huePrime < 3 ? (green = chroma, blue = secondComponent) : huePrime >= 3 && huePrime < 4 ? (green = secondComponent, blue = chroma) : huePrime >= 4 && huePrime < 5 ? (red = secondComponent, blue = chroma) : huePrime >= 5 && huePrime < 6 && (red = chroma, blue = secondComponent);
+ var lightnessModification = lightness - chroma / 2, finalRed = red + lightnessModification, finalGreen = green + lightnessModification, finalBlue = blue + lightnessModification;
+ return convert2(finalRed, finalGreen, finalBlue);
+}
+var namedColorMap = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "00ffff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "0000ff",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "00ffff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "ff00ff",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "639",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+};
+function nameToHex(color) {
+ if (typeof color != "string") return color;
+ var normalizedColorName = color.toLowerCase();
+ return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
+}
+var hexRegex = /^#[a-fA-F0-9]{6}$/, hexRgbaRegex = /^#[a-fA-F0-9]{8}$/, reducedHexRegex = /^#[a-fA-F0-9]{3}$/, reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/, rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
+function parseToRgb(color) {
+ if (typeof color != "string")
+ throw new PolishedError(3);
+ var normalizedColor = nameToHex(color);
+ if (normalizedColor.match(hexRegex))
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
+ green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
+ blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
+ };
+ if (normalizedColor.match(hexRgbaRegex)) {
+ var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
+ green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
+ blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
+ alpha
+ };
+ }
+ if (normalizedColor.match(reducedHexRegex))
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
+ green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
+ blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
+ };
+ if (normalizedColor.match(reducedRgbaHexRegex)) {
+ var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
+ green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
+ blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
+ alpha: _alpha
+ };
+ }
+ var rgbMatched = rgbRegex.exec(normalizedColor);
+ if (rgbMatched)
+ return {
+ red: parseInt("" + rgbMatched[1], 10),
+ green: parseInt("" + rgbMatched[2], 10),
+ blue: parseInt("" + rgbMatched[3], 10)
+ };
+ var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
+ if (rgbaMatched)
+ return {
+ red: parseInt("" + rgbaMatched[1], 10),
+ green: parseInt("" + rgbaMatched[2], 10),
+ blue: parseInt("" + rgbaMatched[3], 10),
+ alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
+ };
+ var hslMatched = hslRegex.exec(normalizedColor);
+ if (hslMatched) {
+ var hue = parseInt("" + hslMatched[1], 10), saturation = parseInt("" + hslMatched[2], 10) / 100, lightness = parseInt("" + hslMatched[3], 10) / 100, rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")", hslRgbMatched = rgbRegex.exec(rgbColorString);
+ if (!hslRgbMatched)
+ throw new PolishedError(4, normalizedColor, rgbColorString);
+ return {
+ red: parseInt("" + hslRgbMatched[1], 10),
+ green: parseInt("" + hslRgbMatched[2], 10),
+ blue: parseInt("" + hslRgbMatched[3], 10)
+ };
+ }
+ var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
+ if (hslaMatched) {
+ var _hue = parseInt("" + hslaMatched[1], 10), _saturation = parseInt("" + hslaMatched[2], 10) / 100, _lightness = parseInt("" + hslaMatched[3], 10) / 100, _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")", _hslRgbMatched = rgbRegex.exec(_rgbColorString);
+ if (!_hslRgbMatched)
+ throw new PolishedError(4, normalizedColor, _rgbColorString);
+ return {
+ red: parseInt("" + _hslRgbMatched[1], 10),
+ green: parseInt("" + _hslRgbMatched[2], 10),
+ blue: parseInt("" + _hslRgbMatched[3], 10),
+ alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
+ };
+ }
+ throw new PolishedError(5);
+}
+function rgbToHsl(color) {
+ var red = color.red / 255, green = color.green / 255, blue = color.blue / 255, max = Math.max(red, green, blue), min = Math.min(red, green, blue), lightness = (max + min) / 2;
+ if (max === min)
+ return color.alpha !== void 0 ? {
+ hue: 0,
+ saturation: 0,
+ lightness,
+ alpha: color.alpha
+ } : {
+ hue: 0,
+ saturation: 0,
+ lightness
+ };
+ var hue, delta = max - min, saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
+ switch (max) {
+ case red:
+ hue = (green - blue) / delta + (green < blue ? 6 : 0);
+ break;
+ case green:
+ hue = (blue - red) / delta + 2;
+ break;
+ default:
+ hue = (red - green) / delta + 4;
+ break;
+ }
+ return hue *= 60, color.alpha !== void 0 ? {
+ hue,
+ saturation,
+ lightness,
+ alpha: color.alpha
+ } : {
+ hue,
+ saturation,
+ lightness
+ };
+}
+function parseToHsl(color) {
+ return rgbToHsl(parseToRgb(color));
+}
+var reduceHexValue = function(value) {
+ return value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6] ? "#" + value[1] + value[3] + value[5] : value;
+}, reduceHexValue$1 = reduceHexValue;
+function numberToHex(value) {
+ var hex = value.toString(16);
+ return hex.length === 1 ? "0" + hex : hex;
+}
+function colorToHex(color) {
+ return numberToHex(Math.round(color * 255));
+}
+function convertToHex(red, green, blue) {
+ return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
+}
+function hslToHex(hue, saturation, lightness) {
+ return hslToRgb(hue, saturation, lightness, convertToHex);
+}
+function hsl(value, saturation, lightness) {
+ if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number")
+ return hslToHex(value, saturation, lightness);
+ if (typeof value == "object" && saturation === void 0 && lightness === void 0)
+ return hslToHex(value.hue, value.saturation, value.lightness);
+ throw new PolishedError(1);
+}
+function hsla(value, saturation, lightness, alpha) {
+ if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number" && typeof alpha == "number")
+ return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
+ if (typeof value == "object" && saturation === void 0 && lightness === void 0 && alpha === void 0)
+ return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
+ throw new PolishedError(2);
+}
+function rgb(value, green, blue) {
+ if (typeof value == "number" && typeof green == "number" && typeof blue == "number")
+ return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
+ if (typeof value == "object" && green === void 0 && blue === void 0)
+ return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
+ throw new PolishedError(6);
+}
+function rgba(firstValue, secondValue, thirdValue, fourthValue) {
+ if (typeof firstValue == "string" && typeof secondValue == "number") {
+ var rgbValue = parseToRgb(firstValue);
+ return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
+ } else {
+ if (typeof firstValue == "number" && typeof secondValue == "number" && typeof thirdValue == "number" && typeof fourthValue == "number")
+ return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
+ if (typeof firstValue == "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0)
+ return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
+ }
+ throw new PolishedError(7);
+}
+var isRgb = function(color) {
+ return typeof color.red == "number" && typeof color.green == "number" && typeof color.blue == "number" && (typeof color.alpha != "number" || typeof color.alpha > "u");
+}, isRgba = function(color) {
+ return typeof color.red == "number" && typeof color.green == "number" && typeof color.blue == "number" && typeof color.alpha == "number";
+}, isHsl = function(color) {
+ return typeof color.hue == "number" && typeof color.saturation == "number" && typeof color.lightness == "number" && (typeof color.alpha != "number" || typeof color.alpha > "u");
+}, isHsla = function(color) {
+ return typeof color.hue == "number" && typeof color.saturation == "number" && typeof color.lightness == "number" && typeof color.alpha == "number";
+};
+function toColorString(color) {
+ if (typeof color != "object") throw new PolishedError(8);
+ if (isRgba(color)) return rgba(color);
+ if (isRgb(color)) return rgb(color);
+ if (isHsla(color)) return hsla(color);
+ if (isHsl(color)) return hsl(color);
+ throw new PolishedError(8);
+}
+function curried(f, length, acc) {
+ return function() {
+ var combined = acc.concat(Array.prototype.slice.call(arguments));
+ return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
+ };
+}
+function curry(f) {
+ return curried(f, f.length, []);
+}
+function adjustHue(degree, color) {
+ if (color === "transparent") return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ hue: hslColor.hue + parseFloat(degree)
+ }));
+}
+var curriedAdjustHue = curry(adjustHue);
+function guard(lowerBoundary, upperBoundary, value) {
+ return Math.max(lowerBoundary, Math.min(upperBoundary, value));
+}
+function darken(amount, color) {
+ if (color === "transparent") return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
+ }));
+}
+var curriedDarken = curry(darken), curriedDarken$1 = curriedDarken;
+function desaturate(amount, color) {
+ if (color === "transparent") return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
+ }));
+}
+var curriedDesaturate = curry(desaturate);
+function lighten(amount, color) {
+ if (color === "transparent") return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
+ }));
+}
+var curriedLighten = curry(lighten), curriedLighten$1 = curriedLighten;
+function mix(weight, color, otherColor) {
+ if (color === "transparent") return otherColor;
+ if (otherColor === "transparent") return color;
+ if (weight === 0) return otherColor;
+ var parsedColor1 = parseToRgb(color), color1 = _extends({}, parsedColor1, {
+ alpha: typeof parsedColor1.alpha == "number" ? parsedColor1.alpha : 1
+ }), parsedColor2 = parseToRgb(otherColor), color2 = _extends({}, parsedColor2, {
+ alpha: typeof parsedColor2.alpha == "number" ? parsedColor2.alpha : 1
+ }), alphaDelta = color1.alpha - color2.alpha, x = parseFloat(weight) * 2 - 1, y = x * alphaDelta === -1 ? x : x + alphaDelta, z = 1 + x * alphaDelta, weight1 = (y / z + 1) / 2, weight2 = 1 - weight1, mixedColor = {
+ red: Math.floor(color1.red * weight1 + color2.red * weight2),
+ green: Math.floor(color1.green * weight1 + color2.green * weight2),
+ blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
+ alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
+ };
+ return rgba(mixedColor);
+}
+var curriedMix = curry(mix), mix$1 = curriedMix;
+function opacify(amount, color) {
+ if (color === "transparent") return color;
+ var parsedColor = parseToRgb(color), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, {
+ alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
+ });
+ return rgba(colorWithAlpha);
+}
+var curriedOpacify = curry(opacify), curriedOpacify$1 = curriedOpacify;
+function saturate(amount, color) {
+ if (color === "transparent") return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
+ }));
+}
+var curriedSaturate = curry(saturate);
+function setHue(hue, color) {
+ return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), {
+ hue: parseFloat(hue)
+ }));
+}
+var curriedSetHue = curry(setHue);
+function setLightness(lightness, color) {
+ return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), {
+ lightness: parseFloat(lightness)
+ }));
+}
+var curriedSetLightness = curry(setLightness);
+function setSaturation(saturation, color) {
+ return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), {
+ saturation: parseFloat(saturation)
+ }));
+}
+var curriedSetSaturation = curry(setSaturation);
+function shade(percentage, color) {
+ return color === "transparent" ? color : mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color);
+}
+var curriedShade = curry(shade);
+function tint(percentage, color) {
+ return color === "transparent" ? color : mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color);
+}
+var curriedTint = curry(tint);
+function transparentize(amount, color) {
+ if (color === "transparent") return color;
+ var parsedColor = parseToRgb(color), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, {
+ alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
+ });
+ return rgba(colorWithAlpha);
+}
+var curriedTransparentize = curry(transparentize), curriedTransparentize$1 = curriedTransparentize;
+
+// src/blocks/components/EmptyBlock.tsx
+import { styled } from "storybook/theming";
+var Wrapper = styled.div(withReset, ({ theme }) => ({
+ backgroundColor: theme.base === "light" ? "rgba(0,0,0,.01)" : "rgba(255,255,255,.01)",
+ borderRadius: theme.appBorderRadius,
+ border: `1px dashed ${theme.appBorderColor}`,
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ padding: 20,
+ margin: "25px 0 40px",
+ color: curriedTransparentize$1(0.3, theme.color.defaultText),
+ fontSize: theme.typography.size.s2
+})), EmptyBlock = (props) => React.createElement(Wrapper, { ...props, className: "docblock-emptyblock sb-unstyled" });
+
+// src/blocks/components/Source.tsx
+var StyledSyntaxHighlighter = styled2(
+ SyntaxHighlighter
+)(({ theme }) => ({
+ // DocBlocks-specific styling and overrides
+ fontSize: `${theme.typography.size.s2 - 1}px`,
+ lineHeight: "19px",
+ margin: "25px 0 40px",
+ borderRadius: theme.appBorderRadius,
+ boxShadow: theme.base === "light" ? "rgba(0, 0, 0, 0.10) 0 1px 3px 0" : "rgba(0, 0, 0, 0.20) 0 2px 5px 0",
+ "pre.prismjs": {
+ padding: 20,
+ background: "inherit"
+ }
+}));
+var SourceSkeletonWrapper = styled2.div(({ theme }) => ({
+ background: theme.background.content,
+ borderRadius: theme.appBorderRadius,
+ border: `1px solid ${theme.appBorderColor}`,
+ boxShadow: theme.base === "light" ? "rgba(0, 0, 0, 0.10) 0 1px 3px 0" : "rgba(0, 0, 0, 0.20) 0 2px 5px 0",
+ margin: "25px 0 40px",
+ padding: "20px 20px 20px 22px"
+})), SourceSkeletonPlaceholder = styled2.div(({ theme }) => ({
+ animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
+ background: theme.appBorderColor,
+ height: 17,
+ marginTop: 1,
+ width: "60%",
+ [`&:first-child${ignoreSsrWarning}`]: {
+ margin: 0
+ }
+})), SourceSkeleton = () => React2.createElement(SourceSkeletonWrapper, null, React2.createElement(SourceSkeletonPlaceholder, null), React2.createElement(SourceSkeletonPlaceholder, { style: { width: "80%" } }), React2.createElement(SourceSkeletonPlaceholder, { style: { width: "30%" } }), React2.createElement(SourceSkeletonPlaceholder, { style: { width: "80%" } })), Source = ({
+ isLoading,
+ error,
+ language,
+ code,
+ dark,
+ format: format2 = !0,
+ ...rest
+}) => {
+ let { typography } = useTheme();
+ if (isLoading)
+ return React2.createElement(SourceSkeleton, null);
+ if (error)
+ return React2.createElement(EmptyBlock, null, error);
+ let syntaxHighlighter = React2.createElement(
+ StyledSyntaxHighlighter,
+ {
+ bordered: !0,
+ copyable: !0,
+ format: format2,
+ language: language ?? "jsx",
+ className: "docblock-source sb-unstyled",
+ ...rest
+ },
+ code
+ );
+ if (typeof dark > "u")
+ return syntaxHighlighter;
+ let overrideTheme = dark ? themes.dark : themes.light;
+ return React2.createElement(
+ ThemeProvider,
+ {
+ theme: convert({
+ ...overrideTheme,
+ fontCode: typography.fonts.mono,
+ fontBase: typography.fonts.base
+ })
+ },
+ syntaxHighlighter
+ );
+};
+
+export {
+ rgba,
+ curriedDarken$1,
+ curriedLighten$1,
+ curriedOpacify$1,
+ curriedTransparentize$1,
+ EmptyBlock,
+ Source
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-CYSK6WYR.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-CYSK6WYR.js
new file mode 100644
index 0000000000000000000000000000000000000000..954c882edff0866676eac6da8aed1bc1db61f149
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-CYSK6WYR.js
@@ -0,0 +1,7 @@
+// src/blocks/controls/helpers.ts
+var getControlId = (value) => `control-${value.replace(/\s+/g, "-")}`, getControlSetterButtonId = (value) => `set-${value.replace(/\s+/g, "-")}`;
+
+export {
+ getControlId,
+ getControlSetterButtonId
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-OATZR77O.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-OATZR77O.js
new file mode 100644
index 0000000000000000000000000000000000000000..093d1d438c6945690dd167d6f6dd566af739c057
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-OATZR77O.js
@@ -0,0 +1,52 @@
+// src/DocsRenderer.tsx
+import React, { Component } from "react";
+import { renderElement, unmountElement } from "@storybook/react-dom-shim";
+import { AnchorMdx, CodeOrSourceMdx, Docs, HeadersMdx } from "@storybook/addon-docs/blocks";
+var defaultComponents = {
+ code: CodeOrSourceMdx,
+ a: AnchorMdx,
+ ...HeadersMdx
+}, ErrorBoundary = class extends Component {
+ constructor() {
+ super(...arguments);
+ this.state = { hasError: !1 };
+ }
+ static getDerivedStateFromError() {
+ return { hasError: !0 };
+ }
+ componentDidCatch(err) {
+ let { showException } = this.props;
+ showException(err);
+ }
+ render() {
+ let { hasError } = this.state, { children } = this.props;
+ return hasError ? null : React.createElement(React.Fragment, null, children);
+ }
+}, DocsRenderer = class {
+ constructor() {
+ this.render = async (context, docsParameter, element) => {
+ let components = {
+ ...defaultComponents,
+ ...docsParameter?.components
+ }, TDocs = Docs;
+ return new Promise((resolve, reject) => {
+ import("@mdx-js/react").then(
+ ({ MDXProvider }) => (
+ // We use a `key={}` here to reset the `hasError` state each time we render ErrorBoundary
+ renderElement(
+ React.createElement(ErrorBoundary, { showException: reject, key: Math.random() }, React.createElement(MDXProvider, { components }, React.createElement(TDocs, { context, docsParameter }))),
+ element
+ )
+ )
+ ).then(() => resolve());
+ });
+ }, this.unmount = (element) => {
+ unmountElement(element);
+ };
+ }
+};
+
+export {
+ defaultComponents,
+ DocsRenderer
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-S4QKU6I5.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-S4QKU6I5.js
new file mode 100644
index 0000000000000000000000000000000000000000..e6eeb0a0d655a1245bde8bf61e9a0cf9e46a670b
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-S4QKU6I5.js
@@ -0,0 +1,31 @@
+import {
+ __export
+} from "./chunk-SL3VIQZ3.js";
+
+// src/preview.ts
+var preview_exports = {};
+__export(preview_exports, {
+ parameters: () => parameters
+});
+var excludeTags = Object.entries(globalThis.TAGS_OPTIONS ?? {}).reduce(
+ (acc, entry) => {
+ let [tag, option] = entry;
+ return option.excludeFromDocsStories && (acc[tag] = !0), acc;
+ },
+ {}
+), parameters = {
+ docs: {
+ renderer: async () => {
+ let { DocsRenderer } = await import("./DocsRenderer-LL677BLK.js");
+ return new DocsRenderer();
+ },
+ stories: {
+ filter: (story) => (story.tags || []).filter((tag) => excludeTags[tag]).length === 0 && !story.parameters.docs?.disable
+ }
+ }
+};
+
+export {
+ parameters,
+ preview_exports
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-SL3VIQZ3.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-SL3VIQZ3.js
new file mode 100644
index 0000000000000000000000000000000000000000..8435d71dacbbb07796aa8f70bc04478fff55d1e7
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_browser-chunks/chunk-SL3VIQZ3.js
@@ -0,0 +1,31 @@
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: !0 });
+}, __copyProps = (to, from, except, desc) => {
+ if (from && typeof from == "object" || typeof from == "function")
+ for (let key of __getOwnPropNames(from))
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
+ mod
+));
+
+export {
+ __commonJS,
+ __export,
+ __toESM
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-2SCGLXP5.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-2SCGLXP5.js
new file mode 100644
index 0000000000000000000000000000000000000000..9309d0c4f5af2aa32de5c8e662f4eea21d69bf5f
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-2SCGLXP5.js
@@ -0,0 +1,196 @@
+import CJS_COMPAT_NODE_URL_t17piavj1z from 'node:url';
+import CJS_COMPAT_NODE_PATH_t17piavj1z from 'node:path';
+import CJS_COMPAT_NODE_MODULE_t17piavj1z from "node:module";
+
+var __filename = CJS_COMPAT_NODE_URL_t17piavj1z.fileURLToPath(import.meta.url);
+var __dirname = CJS_COMPAT_NODE_PATH_t17piavj1z.dirname(__filename);
+var require = CJS_COMPAT_NODE_MODULE_t17piavj1z.createRequire(import.meta.url);
+
+// ------------------------------------------------------------
+// end of CJS compatibility banner, injected by Storybook's esbuild configuration
+// ------------------------------------------------------------
+
+// ../../../node_modules/@ungap/structured-clone/esm/deserialize.js
+var env = typeof self == "object" ? self : globalThis, deserializer = ($, _) => {
+ let as = (out, index) => ($.set(index, out), out), unpair = (index) => {
+ if ($.has(index))
+ return $.get(index);
+ let [type, value] = _[index];
+ switch (type) {
+ case 0:
+ case -1:
+ return as(value, index);
+ case 1: {
+ let arr = as([], index);
+ for (let index2 of value)
+ arr.push(unpair(index2));
+ return arr;
+ }
+ case 2: {
+ let object = as({}, index);
+ for (let [key, index2] of value)
+ object[unpair(key)] = unpair(index2);
+ return object;
+ }
+ case 3:
+ return as(new Date(value), index);
+ case 4: {
+ let { source, flags } = value;
+ return as(new RegExp(source, flags), index);
+ }
+ case 5: {
+ let map = as(/* @__PURE__ */ new Map(), index);
+ for (let [key, index2] of value)
+ map.set(unpair(key), unpair(index2));
+ return map;
+ }
+ case 6: {
+ let set = as(/* @__PURE__ */ new Set(), index);
+ for (let index2 of value)
+ set.add(unpair(index2));
+ return set;
+ }
+ case 7: {
+ let { name, message } = value;
+ return as(new env[name](message), index);
+ }
+ case 8:
+ return as(BigInt(value), index);
+ case "BigInt":
+ return as(Object(BigInt(value)), index);
+ case "ArrayBuffer":
+ return as(new Uint8Array(value).buffer, value);
+ case "DataView": {
+ let { buffer } = new Uint8Array(value);
+ return as(new DataView(buffer), value);
+ }
+ }
+ return as(new env[type](value), index);
+ };
+ return unpair;
+}, deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
+
+// ../../../node_modules/@ungap/structured-clone/esm/serialize.js
+var EMPTY = "", { toString } = {}, { keys } = Object, typeOf = (value) => {
+ let type = typeof value;
+ if (type !== "object" || !value)
+ return [0, type];
+ let asString = toString.call(value).slice(8, -1);
+ switch (asString) {
+ case "Array":
+ return [1, EMPTY];
+ case "Object":
+ return [2, EMPTY];
+ case "Date":
+ return [3, EMPTY];
+ case "RegExp":
+ return [4, EMPTY];
+ case "Map":
+ return [5, EMPTY];
+ case "Set":
+ return [6, EMPTY];
+ case "DataView":
+ return [1, asString];
+ }
+ return asString.includes("Array") ? [1, asString] : asString.includes("Error") ? [7, asString] : [2, asString];
+}, shouldSkip = ([TYPE, type]) => TYPE === 0 && (type === "function" || type === "symbol"), serializer = (strict, json, $, _) => {
+ let as = (out, value) => {
+ let index = _.push(out) - 1;
+ return $.set(value, index), index;
+ }, pair = (value) => {
+ if ($.has(value))
+ return $.get(value);
+ let [TYPE, type] = typeOf(value);
+ switch (TYPE) {
+ case 0: {
+ let entry = value;
+ switch (type) {
+ case "bigint":
+ TYPE = 8, entry = value.toString();
+ break;
+ case "function":
+ case "symbol":
+ if (strict)
+ throw new TypeError("unable to serialize " + type);
+ entry = null;
+ break;
+ case "undefined":
+ return as([-1], value);
+ }
+ return as([TYPE, entry], value);
+ }
+ case 1: {
+ if (type) {
+ let spread = value;
+ return type === "DataView" ? spread = new Uint8Array(value.buffer) : type === "ArrayBuffer" && (spread = new Uint8Array(value)), as([type, [...spread]], value);
+ }
+ let arr = [], index = as([TYPE, arr], value);
+ for (let entry of value)
+ arr.push(pair(entry));
+ return index;
+ }
+ case 2: {
+ if (type)
+ switch (type) {
+ case "BigInt":
+ return as([type, value.toString()], value);
+ case "Boolean":
+ case "Number":
+ case "String":
+ return as([type, value.valueOf()], value);
+ }
+ if (json && "toJSON" in value)
+ return pair(value.toJSON());
+ let entries = [], index = as([TYPE, entries], value);
+ for (let key of keys(value))
+ (strict || !shouldSkip(typeOf(value[key]))) && entries.push([pair(key), pair(value[key])]);
+ return index;
+ }
+ case 3:
+ return as([TYPE, value.toISOString()], value);
+ case 4: {
+ let { source, flags } = value;
+ return as([TYPE, { source, flags }], value);
+ }
+ case 5: {
+ let entries = [], index = as([TYPE, entries], value);
+ for (let [key, entry] of value)
+ (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) && entries.push([pair(key), pair(entry)]);
+ return index;
+ }
+ case 6: {
+ let entries = [], index = as([TYPE, entries], value);
+ for (let entry of value)
+ (strict || !shouldSkip(typeOf(entry))) && entries.push(pair(entry));
+ return index;
+ }
+ }
+ let { message } = value;
+ return as([TYPE, { name: type, message }], value);
+ };
+ return pair;
+}, serialize = (value, { json, lossy } = {}) => {
+ let _ = [];
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
+};
+
+// ../../../node_modules/@ungap/structured-clone/esm/index.js
+var esm_default = typeof structuredClone == "function" ? (
+ /* c8 ignore start */
+ (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
+) : (any, options) => deserialize(serialize(any, options));
+
+// ../../../node_modules/space-separated-tokens/index.js
+function parse(value) {
+ let input = String(value || "").trim();
+ return input ? input.split(/[ \t\n\r\f]+/g) : [];
+}
+function stringify(values) {
+ return values.join(" ").trim();
+}
+
+export {
+ esm_default,
+ parse,
+ stringify
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-4WYSRR6Q.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-4WYSRR6Q.js
new file mode 100644
index 0000000000000000000000000000000000000000..e1c8f365a40938209da3e6fcdf00b318a1d90cee
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-4WYSRR6Q.js
@@ -0,0 +1,168 @@
+import CJS_COMPAT_NODE_URL_t17piavj1z from 'node:url';
+import CJS_COMPAT_NODE_PATH_t17piavj1z from 'node:path';
+import CJS_COMPAT_NODE_MODULE_t17piavj1z from "node:module";
+
+var __filename = CJS_COMPAT_NODE_URL_t17piavj1z.fileURLToPath(import.meta.url);
+var __dirname = CJS_COMPAT_NODE_PATH_t17piavj1z.dirname(__filename);
+var require = CJS_COMPAT_NODE_MODULE_t17piavj1z.createRequire(import.meta.url);
+
+// ------------------------------------------------------------
+// end of CJS compatibility banner, injected by Storybook's esbuild configuration
+// ------------------------------------------------------------
+
+// ../../../node_modules/unist-util-is/lib/index.js
+var convert = (
+ // Note: overloads in JSDoc can’t yet use different `@template`s.
+ /**
+ * @type {(
+ * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
+ * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
+ * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &
+ * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
+ * ((test?: Test) => Check)
+ * )}
+ */
+ /**
+ * @param {Test} [test]
+ * @returns {Check}
+ */
+ (function(test) {
+ if (test == null)
+ return ok;
+ if (typeof test == "function")
+ return castFactory(test);
+ if (typeof test == "object")
+ return Array.isArray(test) ? anyFactory(test) : (
+ // Cast because `ReadonlyArray` goes into the above but `isArray`
+ // narrows to `Array`.
+ propertiesFactory(
+ /** @type {Props} */
+ test
+ )
+ );
+ if (typeof test == "string")
+ return typeFactory(test);
+ throw new Error("Expected function, string, or object as test");
+ })
+);
+function anyFactory(tests) {
+ let checks = [], index = -1;
+ for (; ++index < tests.length; )
+ checks[index] = convert(tests[index]);
+ return castFactory(any);
+ function any(...parameters) {
+ let index2 = -1;
+ for (; ++index2 < checks.length; )
+ if (checks[index2].apply(this, parameters)) return !0;
+ return !1;
+ }
+}
+function propertiesFactory(check) {
+ let checkAsRecord = (
+ /** @type {Record} */
+ check
+ );
+ return castFactory(all);
+ function all(node) {
+ let nodeAsRecord = (
+ /** @type {Record} */
+ /** @type {unknown} */
+ node
+ ), key;
+ for (key in check)
+ if (nodeAsRecord[key] !== checkAsRecord[key]) return !1;
+ return !0;
+ }
+}
+function typeFactory(check) {
+ return castFactory(type);
+ function type(node) {
+ return node && node.type === check;
+ }
+}
+function castFactory(testFunction) {
+ return check;
+ function check(value, index, parent) {
+ return !!(looksLikeANode(value) && testFunction.call(
+ this,
+ value,
+ typeof index == "number" ? index : void 0,
+ parent || void 0
+ ));
+ }
+}
+function ok() {
+ return !0;
+}
+function looksLikeANode(value) {
+ return value !== null && typeof value == "object" && "type" in value;
+}
+
+// ../../../node_modules/unist-util-visit-parents/lib/color.node.js
+function color(d) {
+ return "\x1B[33m" + d + "\x1B[39m";
+}
+
+// ../../../node_modules/unist-util-visit-parents/lib/index.js
+var empty = [], CONTINUE = !0, EXIT = !1, SKIP = "skip";
+function visitParents(tree, test, visitor, reverse) {
+ let check;
+ typeof test == "function" && typeof visitor != "function" ? (reverse = visitor, visitor = test) : check = test;
+ let is2 = convert(check), step = reverse ? -1 : 1;
+ factory(tree, void 0, [])();
+ function factory(node, index, parents) {
+ let value = (
+ /** @type {Record} */
+ node && typeof node == "object" ? node : {}
+ );
+ if (typeof value.type == "string") {
+ let name = (
+ // `hast`
+ typeof value.tagName == "string" ? value.tagName : (
+ // `xast`
+ typeof value.name == "string" ? value.name : void 0
+ )
+ );
+ Object.defineProperty(visit2, "name", {
+ value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
+ });
+ }
+ return visit2;
+ function visit2() {
+ let result = empty, subresult, offset, grandparents;
+ if ((!test || is2(node, index, parents[parents.length - 1] || void 0)) && (result = toResult(visitor(node, parents)), result[0] === EXIT))
+ return result;
+ if ("children" in node && node.children) {
+ let nodeAsParent = (
+ /** @type {UnistParent} */
+ node
+ );
+ if (nodeAsParent.children && result[0] !== SKIP)
+ for (offset = (reverse ? nodeAsParent.children.length : -1) + step, grandparents = parents.concat(nodeAsParent); offset > -1 && offset < nodeAsParent.children.length; ) {
+ let child = nodeAsParent.children[offset];
+ if (subresult = factory(child, offset, grandparents)(), subresult[0] === EXIT)
+ return subresult;
+ offset = typeof subresult[1] == "number" ? subresult[1] : offset + step;
+ }
+ }
+ return result;
+ }
+ }
+}
+function toResult(value) {
+ return Array.isArray(value) ? value : typeof value == "number" ? [CONTINUE, value] : value == null ? empty : [value];
+}
+
+// ../../../node_modules/unist-util-visit/lib/index.js
+function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
+ let reverse, test, visitor;
+ typeof testOrVisitor == "function" && typeof visitorOrReverse != "function" ? (test = void 0, visitor = testOrVisitor, reverse = visitorOrReverse) : (test = testOrVisitor, visitor = visitorOrReverse, reverse = maybeReverse), visitParents(tree, test, overload, reverse);
+ function overload(node, parents) {
+ let parent = parents[parents.length - 1], index = parent ? parent.children.indexOf(node) : void 0;
+ return visitor(node, index, parent);
+ }
+}
+
+export {
+ visit
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-G6W4HXRC.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-G6W4HXRC.js
new file mode 100644
index 0000000000000000000000000000000000000000..a6b4c7a9d38ee8797c6c3c3462a8156c119e265e
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-G6W4HXRC.js
@@ -0,0 +1,42 @@
+import CJS_COMPAT_NODE_URL_t17piavj1z from 'node:url';
+import CJS_COMPAT_NODE_PATH_t17piavj1z from 'node:path';
+import CJS_COMPAT_NODE_MODULE_t17piavj1z from "node:module";
+
+var __filename = CJS_COMPAT_NODE_URL_t17piavj1z.fileURLToPath(import.meta.url);
+var __dirname = CJS_COMPAT_NODE_PATH_t17piavj1z.dirname(__filename);
+var require = CJS_COMPAT_NODE_MODULE_t17piavj1z.createRequire(import.meta.url);
+
+// ------------------------------------------------------------
+// end of CJS compatibility banner, injected by Storybook's esbuild configuration
+// ------------------------------------------------------------
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: !0 });
+}, __copyProps = (to, from, except, desc) => {
+ if (from && typeof from == "object" || typeof from == "function")
+ for (let key of __getOwnPropNames(from))
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
+ mod
+));
+
+export {
+ __commonJS,
+ __export,
+ __toESM
+};
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-SOR3F7GI.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-SOR3F7GI.js
new file mode 100644
index 0000000000000000000000000000000000000000..aade32c235ae5a3f882a04450a91da56f0f270a1
--- /dev/null
+++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-docs/dist/_node-chunks/chunk-SOR3F7GI.js
@@ -0,0 +1,22630 @@
+import CJS_COMPAT_NODE_URL_t17piavj1z from 'node:url';
+import CJS_COMPAT_NODE_PATH_t17piavj1z from 'node:path';
+import CJS_COMPAT_NODE_MODULE_t17piavj1z from "node:module";
+
+var __filename = CJS_COMPAT_NODE_URL_t17piavj1z.fileURLToPath(import.meta.url);
+var __dirname = CJS_COMPAT_NODE_PATH_t17piavj1z.dirname(__filename);
+var require = CJS_COMPAT_NODE_MODULE_t17piavj1z.createRequire(import.meta.url);
+
+// ------------------------------------------------------------
+// end of CJS compatibility banner, injected by Storybook's esbuild configuration
+// ------------------------------------------------------------
+import {
+ esm_default,
+ stringify
+} from "./chunk-2SCGLXP5.js";
+import {
+ visit
+} from "./chunk-4WYSRR6Q.js";
+import {
+ __commonJS,
+ __export,
+ __toESM
+} from "./chunk-G6W4HXRC.js";
+
+// ../../../node_modules/@mdx-js/mdx/node_modules/acorn-jsx/xhtml.js
+var require_xhtml = __commonJS({
+ "../../../node_modules/@mdx-js/mdx/node_modules/acorn-jsx/xhtml.js"(exports, module) {
+ module.exports = {
+ quot: '"',
+ amp: "&",
+ apos: "'",
+ lt: "<",
+ gt: ">",
+ nbsp: "\xA0",
+ iexcl: "\xA1",
+ cent: "\xA2",
+ pound: "\xA3",
+ curren: "\xA4",
+ yen: "\xA5",
+ brvbar: "\xA6",
+ sect: "\xA7",
+ uml: "\xA8",
+ copy: "\xA9",
+ ordf: "\xAA",
+ laquo: "\xAB",
+ not: "\xAC",
+ shy: "\xAD",
+ reg: "\xAE",
+ macr: "\xAF",
+ deg: "\xB0",
+ plusmn: "\xB1",
+ sup2: "\xB2",
+ sup3: "\xB3",
+ acute: "\xB4",
+ micro: "\xB5",
+ para: "\xB6",
+ middot: "\xB7",
+ cedil: "\xB8",
+ sup1: "\xB9",
+ ordm: "\xBA",
+ raquo: "\xBB",
+ frac14: "\xBC",
+ frac12: "\xBD",
+ frac34: "\xBE",
+ iquest: "\xBF",
+ Agrave: "\xC0",
+ Aacute: "\xC1",
+ Acirc: "\xC2",
+ Atilde: "\xC3",
+ Auml: "\xC4",
+ Aring: "\xC5",
+ AElig: "\xC6",
+ Ccedil: "\xC7",
+ Egrave: "\xC8",
+ Eacute: "\xC9",
+ Ecirc: "\xCA",
+ Euml: "\xCB",
+ Igrave: "\xCC",
+ Iacute: "\xCD",
+ Icirc: "\xCE",
+ Iuml: "\xCF",
+ ETH: "\xD0",
+ Ntilde: "\xD1",
+ Ograve: "\xD2",
+ Oacute: "\xD3",
+ Ocirc: "\xD4",
+ Otilde: "\xD5",
+ Ouml: "\xD6",
+ times: "\xD7",
+ Oslash: "\xD8",
+ Ugrave: "\xD9",
+ Uacute: "\xDA",
+ Ucirc: "\xDB",
+ Uuml: "\xDC",
+ Yacute: "\xDD",
+ THORN: "\xDE",
+ szlig: "\xDF",
+ agrave: "\xE0",
+ aacute: "\xE1",
+ acirc: "\xE2",
+ atilde: "\xE3",
+ auml: "\xE4",
+ aring: "\xE5",
+ aelig: "\xE6",
+ ccedil: "\xE7",
+ egrave: "\xE8",
+ eacute: "\xE9",
+ ecirc: "\xEA",
+ euml: "\xEB",
+ igrave: "\xEC",
+ iacute: "\xED",
+ icirc: "\xEE",
+ iuml: "\xEF",
+ eth: "\xF0",
+ ntilde: "\xF1",
+ ograve: "\xF2",
+ oacute: "\xF3",
+ ocirc: "\xF4",
+ otilde: "\xF5",
+ ouml: "\xF6",
+ divide: "\xF7",
+ oslash: "\xF8",
+ ugrave: "\xF9",
+ uacute: "\xFA",
+ ucirc: "\xFB",
+ uuml: "\xFC",
+ yacute: "\xFD",
+ thorn: "\xFE",
+ yuml: "\xFF",
+ OElig: "\u0152",
+ oelig: "\u0153",
+ Scaron: "\u0160",
+ scaron: "\u0161",
+ Yuml: "\u0178",
+ fnof: "\u0192",
+ circ: "\u02C6",
+ tilde: "\u02DC",
+ Alpha: "\u0391",
+ Beta: "\u0392",
+ Gamma: "\u0393",
+ Delta: "\u0394",
+ Epsilon: "\u0395",
+ Zeta: "\u0396",
+ Eta: "\u0397",
+ Theta: "\u0398",
+ Iota: "\u0399",
+ Kappa: "\u039A",
+ Lambda: "\u039B",
+ Mu: "\u039C",
+ Nu: "\u039D",
+ Xi: "\u039E",
+ Omicron: "\u039F",
+ Pi: "\u03A0",
+ Rho: "\u03A1",
+ Sigma: "\u03A3",
+ Tau: "\u03A4",
+ Upsilon: "\u03A5",
+ Phi: "\u03A6",
+ Chi: "\u03A7",
+ Psi: "\u03A8",
+ Omega: "\u03A9",
+ alpha: "\u03B1",
+ beta: "\u03B2",
+ gamma: "\u03B3",
+ delta: "\u03B4",
+ epsilon: "\u03B5",
+ zeta: "\u03B6",
+ eta: "\u03B7",
+ theta: "\u03B8",
+ iota: "\u03B9",
+ kappa: "\u03BA",
+ lambda: "\u03BB",
+ mu: "\u03BC",
+ nu: "\u03BD",
+ xi: "\u03BE",
+ omicron: "\u03BF",
+ pi: "\u03C0",
+ rho: "\u03C1",
+ sigmaf: "\u03C2",
+ sigma: "\u03C3",
+ tau: "\u03C4",
+ upsilon: "\u03C5",
+ phi: "\u03C6",
+ chi: "\u03C7",
+ psi: "\u03C8",
+ omega: "\u03C9",
+ thetasym: "\u03D1",
+ upsih: "\u03D2",
+ piv: "\u03D6",
+ ensp: "\u2002",
+ emsp: "\u2003",
+ thinsp: "\u2009",
+ zwnj: "\u200C",
+ zwj: "\u200D",
+ lrm: "\u200E",
+ rlm: "\u200F",
+ ndash: "\u2013",
+ mdash: "\u2014",
+ lsquo: "\u2018",
+ rsquo: "\u2019",
+ sbquo: "\u201A",
+ ldquo: "\u201C",
+ rdquo: "\u201D",
+ bdquo: "\u201E",
+ dagger: "\u2020",
+ Dagger: "\u2021",
+ bull: "\u2022",
+ hellip: "\u2026",
+ permil: "\u2030",
+ prime: "\u2032",
+ Prime: "\u2033",
+ lsaquo: "\u2039",
+ rsaquo: "\u203A",
+ oline: "\u203E",
+ frasl: "\u2044",
+ euro: "\u20AC",
+ image: "\u2111",
+ weierp: "\u2118",
+ real: "\u211C",
+ trade: "\u2122",
+ alefsym: "\u2135",
+ larr: "\u2190",
+ uarr: "\u2191",
+ rarr: "\u2192",
+ darr: "\u2193",
+ harr: "\u2194",
+ crarr: "\u21B5",
+ lArr: "\u21D0",
+ uArr: "\u21D1",
+ rArr: "\u21D2",
+ dArr: "\u21D3",
+ hArr: "\u21D4",
+ forall: "\u2200",
+ part: "\u2202",
+ exist: "\u2203",
+ empty: "\u2205",
+ nabla: "\u2207",
+ isin: "\u2208",
+ notin: "\u2209",
+ ni: "\u220B",
+ prod: "\u220F",
+ sum: "\u2211",
+ minus: "\u2212",
+ lowast: "\u2217",
+ radic: "\u221A",
+ prop: "\u221D",
+ infin: "\u221E",
+ ang: "\u2220",
+ and: "\u2227",
+ or: "\u2228",
+ cap: "\u2229",
+ cup: "\u222A",
+ int: "\u222B",
+ there4: "\u2234",
+ sim: "\u223C",
+ cong: "\u2245",
+ asymp: "\u2248",
+ ne: "\u2260",
+ equiv: "\u2261",
+ le: "\u2264",
+ ge: "\u2265",
+ sub: "\u2282",
+ sup: "\u2283",
+ nsub: "\u2284",
+ sube: "\u2286",
+ supe: "\u2287",
+ oplus: "\u2295",
+ otimes: "\u2297",
+ perp: "\u22A5",
+ sdot: "\u22C5",
+ lceil: "\u2308",
+ rceil: "\u2309",
+ lfloor: "\u230A",
+ rfloor: "\u230B",
+ lang: "\u2329",
+ rang: "\u232A",
+ loz: "\u25CA",
+ spades: "\u2660",
+ clubs: "\u2663",
+ hearts: "\u2665",
+ diams: "\u2666"
+ };
+ }
+});
+
+// ../../../node_modules/@mdx-js/mdx/node_modules/acorn/dist/acorn.js
+var require_acorn = __commonJS({
+ "../../../node_modules/@mdx-js/mdx/node_modules/acorn/dist/acorn.js"(exports, module) {
+ (function(global, factory) {
+ typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis < "u" ? globalThis : global || self, factory(global.acorn = {}));
+ })(exports, (function(exports2) {
+ "use strict";
+ var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65", nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC", reservedWords2 = {
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+ 5: "class enum extends super const export import",
+ 6: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+ }, ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", keywords$12 = {
+ 5: ecma5AndLessKeywords2,
+ "5module": ecma5AndLessKeywords2 + " export import",
+ 6: ecma5AndLessKeywords2 + " const class extends export import super"
+ }, keywordRelationalOperator2 = /^in(stanceof)?$/, nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]"), nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
+ function isInAstralSet2(code2, set) {
+ for (var pos = 65536, i2 = 0; i2 < set.length; i2 += 2) {
+ if (pos += set[i2], pos > code2)
+ return !1;
+ if (pos += set[i2 + 1], pos >= code2)
+ return !0;
+ }
+ return !1;
+ }
+ function isIdentifierStart2(code2, astral) {
+ return code2 < 65 ? code2 === 36 : code2 < 91 ? !0 : code2 < 97 ? code2 === 95 : code2 < 123 ? !0 : code2 <= 65535 ? code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2)) : astral === !1 ? !1 : isInAstralSet2(code2, astralIdentifierStartCodes2);
+ }
+ function isIdentifierChar2(code2, astral) {
+ return code2 < 48 ? code2 === 36 : code2 < 58 ? !0 : code2 < 65 ? !1 : code2 < 91 ? !0 : code2 < 97 ? code2 === 95 : code2 < 123 ? !0 : code2 <= 65535 ? code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2)) : astral === !1 ? !1 : isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
+ }
+ var TokenType3 = function(label, conf) {
+ conf === void 0 && (conf = {}), this.label = label, this.keyword = conf.keyword, this.beforeExpr = !!conf.beforeExpr, this.startsExpr = !!conf.startsExpr, this.isLoop = !!conf.isLoop, this.isAssign = !!conf.isAssign, this.prefix = !!conf.prefix, this.postfix = !!conf.postfix, this.binop = conf.binop || null, this.updateContext = null;
+ };
+ function binop2(name2, prec) {
+ return new TokenType3(name2, { beforeExpr: !0, binop: prec });
+ }
+ var beforeExpr2 = { beforeExpr: !0 }, startsExpr2 = { startsExpr: !0 }, keywords2 = {};
+ function kw2(name2, options) {
+ return options === void 0 && (options = {}), options.keyword = name2, keywords2[name2] = new TokenType3(name2, options);
+ }
+ var types$12 = {
+ num: new TokenType3("num", startsExpr2),
+ regexp: new TokenType3("regexp", startsExpr2),
+ string: new TokenType3("string", startsExpr2),
+ name: new TokenType3("name", startsExpr2),
+ privateId: new TokenType3("privateId", startsExpr2),
+ eof: new TokenType3("eof"),
+ // Punctuation token types.
+ bracketL: new TokenType3("[", { beforeExpr: !0, startsExpr: !0 }),
+ bracketR: new TokenType3("]"),
+ braceL: new TokenType3("{", { beforeExpr: !0, startsExpr: !0 }),
+ braceR: new TokenType3("}"),
+ parenL: new TokenType3("(", { beforeExpr: !0, startsExpr: !0 }),
+ parenR: new TokenType3(")"),
+ comma: new TokenType3(",", beforeExpr2),
+ semi: new TokenType3(";", beforeExpr2),
+ colon: new TokenType3(":", beforeExpr2),
+ dot: new TokenType3("."),
+ question: new TokenType3("?", beforeExpr2),
+ questionDot: new TokenType3("?."),
+ arrow: new TokenType3("=>", beforeExpr2),
+ template: new TokenType3("template"),
+ invalidTemplate: new TokenType3("invalidTemplate"),
+ ellipsis: new TokenType3("...", beforeExpr2),
+ backQuote: new TokenType3("`", startsExpr2),
+ dollarBraceL: new TokenType3("${", { beforeExpr: !0, startsExpr: !0 }),
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+ eq: new TokenType3("=", { beforeExpr: !0, isAssign: !0 }),
+ assign: new TokenType3("_=", { beforeExpr: !0, isAssign: !0 }),
+ incDec: new TokenType3("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
+ prefix: new TokenType3("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ logicalOR: binop2("||", 1),
+ logicalAND: binop2("&&", 2),
+ bitwiseOR: binop2("|", 3),
+ bitwiseXOR: binop2("^", 4),
+ bitwiseAND: binop2("&", 5),
+ equality: binop2("==/!=/===/!==", 6),
+ relational: binop2(">/<=/>=", 7),
+ bitShift: binop2("<>>/>>>", 8),
+ plusMin: new TokenType3("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
+ modulo: binop2("%", 10),
+ star: binop2("*", 10),
+ slash: binop2("/", 10),
+ starstar: new TokenType3("**", { beforeExpr: !0 }),
+ coalesce: binop2("??", 1),
+ // Keyword token types.
+ _break: kw2("break"),
+ _case: kw2("case", beforeExpr2),
+ _catch: kw2("catch"),
+ _continue: kw2("continue"),
+ _debugger: kw2("debugger"),
+ _default: kw2("default", beforeExpr2),
+ _do: kw2("do", { isLoop: !0, beforeExpr: !0 }),
+ _else: kw2("else", beforeExpr2),
+ _finally: kw2("finally"),
+ _for: kw2("for", { isLoop: !0 }),
+ _function: kw2("function", startsExpr2),
+ _if: kw2("if"),
+ _return: kw2("return", beforeExpr2),
+ _switch: kw2("switch"),
+ _throw: kw2("throw", beforeExpr2),
+ _try: kw2("try"),
+ _var: kw2("var"),
+ _const: kw2("const"),
+ _while: kw2("while", { isLoop: !0 }),
+ _with: kw2("with"),
+ _new: kw2("new", { beforeExpr: !0, startsExpr: !0 }),
+ _this: kw2("this", startsExpr2),
+ _super: kw2("super", startsExpr2),
+ _class: kw2("class", startsExpr2),
+ _extends: kw2("extends", beforeExpr2),
+ _export: kw2("export"),
+ _import: kw2("import", startsExpr2),
+ _null: kw2("null", startsExpr2),
+ _true: kw2("true", startsExpr2),
+ _false: kw2("false", startsExpr2),
+ _in: kw2("in", { beforeExpr: !0, binop: 7 }),
+ _instanceof: kw2("instanceof", { beforeExpr: !0, binop: 7 }),
+ _typeof: kw2("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ _void: kw2("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ _delete: kw2("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
+ }, lineBreak2 = /\r\n?|\n|\u2028|\u2029/, lineBreakG2 = new RegExp(lineBreak2.source, "g");
+ function isNewLine2(code2) {
+ return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
+ }
+ function nextLineBreak2(code2, from, end) {
+ end === void 0 && (end = code2.length);
+ for (var i2 = from; i2 < end; i2++) {
+ var next = code2.charCodeAt(i2);
+ if (isNewLine2(next))
+ return i2 < end - 1 && next === 13 && code2.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
+ }
+ return -1;
+ }
+ var nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ref2 = Object.prototype, hasOwnProperty4 = ref2.hasOwnProperty, toString3 = ref2.toString, hasOwn2 = Object.hasOwn || (function(obj, propName) {
+ return hasOwnProperty4.call(obj, propName);
+ }), isArray2 = Array.isArray || (function(obj) {
+ return toString3.call(obj) === "[object Array]";
+ }), regexpCache2 = /* @__PURE__ */ Object.create(null);
+ function wordsRegexp2(words) {
+ return regexpCache2[words] || (regexpCache2[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
+ }
+ function codePointToString2(code2) {
+ return code2 <= 65535 ? String.fromCharCode(code2) : (code2 -= 65536, String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320));
+ }
+ var loneSurrogate2 = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Position3 = function(line, col) {
+ this.line = line, this.column = col;
+ };
+ Position3.prototype.offset = function(n) {
+ return new Position3(this.line, this.column + n);
+ };
+ var SourceLocation3 = function(p, start2, end) {
+ this.start = start2, this.end = end, p.sourceFile !== null && (this.source = p.sourceFile);
+ };
+ function getLineInfo2(input, offset2) {
+ for (var line = 1, cur = 0; ; ) {
+ var nextBreak = nextLineBreak2(input, cur, offset2);
+ if (nextBreak < 0)
+ return new Position3(line, offset2 - cur);
+ ++line, cur = nextBreak;
+ }
+ }
+ var defaultOptions2 = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must be
+ // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
+ // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
+ // (the latest version the library supports). This influences
+ // support for strict mode, the set of reserved words, and support
+ // for new syntax features.
+ ecmaVersion: null,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called when
+ // a semicolon is automatically inserted. It will be passed the
+ // position of the inserted semicolon as an offset, and if
+ // `locations` is enabled, it is given the location as a `{line,
+ // column}` object as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
+ // Set `allowReserved` to a boolean value to explicitly turn this on
+ // an off. When this option has the value "never", reserved words
+ // and keywords can also not be used as property names.
+ allowReserved: null,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: !1,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program, and an import.meta expression
+ // in a script isn't considered an error.
+ allowImportExportEverywhere: !1,
+ // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
+ // When enabled, await identifiers are allowed to appear at the top-level scope,
+ // but they are still not allowed in non-async functions.
+ allowAwaitOutsideFunction: null,
+ // When enabled, super identifiers are not constrained to
+ // appearing in methods and do not raise an error when they appear elsewhere.
+ allowSuperOutsideMethod: null,
+ // When enabled, hashbang directive in the beginning of file is
+ // allowed and treated as a line comment. Enabled by default when
+ // `ecmaVersion` >= 2023.
+ allowHashBang: !1,
+ // By default, the parser will verify that private properties are
+ // only used in places where they are valid and have been declared.
+ // Set this to false to turn such checks off.
+ checkPrivateFields: !0,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: !1,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokens returned from `tokenizer().getToken()`. Note
+ // that you are not allowed to call the parser from the
+ // callback—that will corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ // When this option has an array as value, objects representing the
+ // comments are pushed to it.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: !1,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: !1
+ }, warnedAboutEcmaVersion2 = !1;
+ function getOptions2(opts) {
+ var options = {};
+ for (var opt in defaultOptions2)
+ options[opt] = opts && hasOwn2(opts, opt) ? opts[opt] : defaultOptions2[opt];
+ if (options.ecmaVersion === "latest" ? options.ecmaVersion = 1e8 : options.ecmaVersion == null ? (!warnedAboutEcmaVersion2 && typeof console == "object" && console.warn && (warnedAboutEcmaVersion2 = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
+Defaulting to 2020, but this will stop working in the future.`)), options.ecmaVersion = 11) : options.ecmaVersion >= 2015 && (options.ecmaVersion -= 2009), options.allowReserved == null && (options.allowReserved = options.ecmaVersion < 5), (!opts || opts.allowHashBang == null) && (options.allowHashBang = options.ecmaVersion >= 14), isArray2(options.onToken)) {
+ var tokens = options.onToken;
+ options.onToken = function(token) {
+ return tokens.push(token);
+ };
+ }
+ return isArray2(options.onComment) && (options.onComment = pushComment2(options, options.onComment)), options;
+ }
+ function pushComment2(options, array) {
+ return function(block, text5, start2, end, startLoc, endLoc) {
+ var comment2 = {
+ type: block ? "Block" : "Line",
+ value: text5,
+ start: start2,
+ end
+ };
+ options.locations && (comment2.loc = new SourceLocation3(this, startLoc, endLoc)), options.ranges && (comment2.range = [start2, end]), array.push(comment2);
+ };
+ }
+ var SCOPE_TOP2 = 1, SCOPE_FUNCTION2 = 2, SCOPE_ASYNC2 = 4, SCOPE_GENERATOR2 = 8, SCOPE_ARROW2 = 16, SCOPE_SIMPLE_CATCH2 = 32, SCOPE_SUPER2 = 64, SCOPE_DIRECT_SUPER2 = 128, SCOPE_CLASS_STATIC_BLOCK2 = 256, SCOPE_CLASS_FIELD_INIT2 = 512, SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2;
+ function functionFlags2(async, generator) {
+ return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0);
+ }
+ var BIND_NONE2 = 0, BIND_VAR2 = 1, BIND_LEXICAL2 = 2, BIND_FUNCTION2 = 3, BIND_SIMPLE_CATCH2 = 4, BIND_OUTSIDE2 = 5, Parser3 = function(options, input, startPos) {
+ this.options = options = getOptions2(options), this.sourceFile = options.sourceFile, this.keywords = wordsRegexp2(keywords$12[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
+ var reserved = "";
+ options.allowReserved !== !0 && (reserved = reservedWords2[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3], options.sourceType === "module" && (reserved += " await")), this.reservedWords = wordsRegexp2(reserved);
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict;
+ this.reservedWordsStrict = wordsRegexp2(reservedStrict), this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind), this.input = String(input), this.containsEsc = !1, startPos ? (this.pos = startPos, this.lineStart = this.input.lastIndexOf(`
+`, startPos - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = types$12.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = options.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(SCOPE_TOP2), this.regexpState = null, this.privateNameStack = [];
+ }, prototypeAccessors2 = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
+ Parser3.prototype.parse = function() {
+ var node2 = this.options.program || this.startNode();
+ return this.nextToken(), this.parseTopLevel(node2);
+ }, prototypeAccessors2.inFunction.get = function() {
+ return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
+ }, prototypeAccessors2.inGenerator.get = function() {
+ return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0;
+ }, prototypeAccessors2.inAsync.get = function() {
+ return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0;
+ }, prototypeAccessors2.canAwait.get = function() {
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
+ var ref3 = this.scopeStack[i2], flags = ref3.flags;
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2))
+ return !1;
+ if (flags & SCOPE_FUNCTION2)
+ return (flags & SCOPE_ASYNC2) > 0;
+ }
+ return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
+ }, prototypeAccessors2.allowSuper.get = function() {
+ var ref3 = this.currentThisScope(), flags = ref3.flags;
+ return (flags & SCOPE_SUPER2) > 0 || this.options.allowSuperOutsideMethod;
+ }, prototypeAccessors2.allowDirectSuper.get = function() {
+ return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
+ }, prototypeAccessors2.treatFunctionsAsVar.get = function() {
+ return this.treatFunctionsAsVarInScope(this.currentScope());
+ }, prototypeAccessors2.allowNewDotTarget.get = function() {
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
+ var ref3 = this.scopeStack[i2], flags = ref3.flags;
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2) || flags & SCOPE_FUNCTION2 && !(flags & SCOPE_ARROW2))
+ return !0;
+ }
+ return !1;
+ }, prototypeAccessors2.inClassStaticBlock.get = function() {
+ return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK2) > 0;
+ }, Parser3.extend = function() {
+ for (var plugins = [], len = arguments.length; len--; ) plugins[len] = arguments[len];
+ for (var cls = this, i2 = 0; i2 < plugins.length; i2++)
+ cls = plugins[i2](cls);
+ return cls;
+ }, Parser3.parse = function(input, options) {
+ return new this(options, input).parse();
+ }, Parser3.parseExpressionAt = function(input, pos, options) {
+ var parser = new this(options, input, pos);
+ return parser.nextToken(), parser.parseExpression();
+ }, Parser3.tokenizer = function(input, options) {
+ return new this(options, input);
+ }, Object.defineProperties(Parser3.prototype, prototypeAccessors2);
+ var pp$92 = Parser3.prototype, literal2 = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
+ pp$92.strictDirective = function(start2) {
+ if (this.options.ecmaVersion < 5)
+ return !1;
+ for (; ; ) {
+ skipWhiteSpace2.lastIndex = start2, start2 += skipWhiteSpace2.exec(this.input)[0].length;
+ var match = literal2.exec(this.input.slice(start2));
+ if (!match)
+ return !1;
+ if ((match[1] || match[2]) === "use strict") {
+ skipWhiteSpace2.lastIndex = start2 + match[0].length;
+ var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length, next = this.input.charAt(end);
+ return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
+ }
+ start2 += match[0].length, skipWhiteSpace2.lastIndex = start2, start2 += skipWhiteSpace2.exec(this.input)[0].length, this.input[start2] === ";" && start2++;
+ }
+ }, pp$92.eat = function(type) {
+ return this.type === type ? (this.next(), !0) : !1;
+ }, pp$92.isContextual = function(name2) {
+ return this.type === types$12.name && this.value === name2 && !this.containsEsc;
+ }, pp$92.eatContextual = function(name2) {
+ return this.isContextual(name2) ? (this.next(), !0) : !1;
+ }, pp$92.expectContextual = function(name2) {
+ this.eatContextual(name2) || this.unexpected();
+ }, pp$92.canInsertSemicolon = function() {
+ return this.type === types$12.eof || this.type === types$12.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
+ }, pp$92.insertSemicolon = function() {
+ if (this.canInsertSemicolon())
+ return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
+ }, pp$92.semicolon = function() {
+ !this.eat(types$12.semi) && !this.insertSemicolon() && this.unexpected();
+ }, pp$92.afterTrailingComma = function(tokType, notNext) {
+ if (this.type === tokType)
+ return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), notNext || this.next(), !0;
+ }, pp$92.expect = function(type) {
+ this.eat(type) || this.unexpected();
+ }, pp$92.unexpected = function(pos) {
+ this.raise(pos ?? this.start, "Unexpected token");
+ };
+ var DestructuringErrors3 = function() {
+ this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
+ };
+ pp$92.checkPatternErrors = function(refDestructuringErrors, isAssign) {
+ if (refDestructuringErrors) {
+ refDestructuringErrors.trailingComma > -1 && this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
+ parens > -1 && this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern");
+ }
+ }, pp$92.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ if (!refDestructuringErrors)
+ return !1;
+ var shorthandAssign = refDestructuringErrors.shorthandAssign, doubleProto = refDestructuringErrors.doubleProto;
+ if (!andThrow)
+ return shorthandAssign >= 0 || doubleProto >= 0;
+ shorthandAssign >= 0 && this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"), doubleProto >= 0 && this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
+ }, pp$92.checkYieldAwaitInDefaultParams = function() {
+ this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
+ }, pp$92.isSimpleAssignTarget = function(expr) {
+ return expr.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(expr.expression) : expr.type === "Identifier" || expr.type === "MemberExpression";
+ };
+ var pp$82 = Parser3.prototype;
+ pp$82.parseTopLevel = function(node2) {
+ var exports3 = /* @__PURE__ */ Object.create(null);
+ for (node2.body || (node2.body = []); this.type !== types$12.eof; ) {
+ var stmt = this.parseStatement(null, !0, exports3);
+ node2.body.push(stmt);
+ }
+ if (this.inModule)
+ for (var i2 = 0, list4 = Object.keys(this.undefinedExports); i2 < list4.length; i2 += 1) {
+ var name2 = list4[i2];
+ this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
+ }
+ return this.adaptDirectivePrologue(node2.body), this.next(), node2.sourceType = this.options.sourceType, this.finishNode(node2, "Program");
+ };
+ var loopLabel2 = { kind: "loop" }, switchLabel2 = { kind: "switch" };
+ pp$82.isLet = function(context) {
+ if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 91 || nextCh === 92)
+ return !0;
+ if (context)
+ return !1;
+ if (nextCh === 123 || nextCh > 55295 && nextCh < 56320)
+ return !0;
+ if (isIdentifierStart2(nextCh, !0)) {
+ for (var pos = next + 1; isIdentifierChar2(nextCh = this.input.charCodeAt(pos), !0); )
+ ++pos;
+ if (nextCh === 92 || nextCh > 55295 && nextCh < 56320)
+ return !0;
+ var ident = this.input.slice(next, pos);
+ if (!keywordRelationalOperator2.test(ident))
+ return !0;
+ }
+ return !1;
+ }, pp$82.isAsyncFunction = function() {
+ if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, after;
+ return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
+ }, pp$82.isUsingKeyword = function(isAwaitUsing, isFor) {
+ if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length;
+ if (lineBreak2.test(this.input.slice(this.pos, next)))
+ return !1;
+ if (isAwaitUsing) {
+ var awaitEndPos = next + 5, after;
+ if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar2(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320)
+ return !1;
+ skipWhiteSpace2.lastIndex = awaitEndPos;
+ var skipAfterUsing = skipWhiteSpace2.exec(this.input);
+ if (skipAfterUsing && lineBreak2.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length)))
+ return !1;
+ }
+ if (isFor) {
+ var ofEndPos = next + 2, after$1;
+ if (this.input.slice(next, ofEndPos) === "of" && (ofEndPos === this.input.length || !isIdentifierChar2(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)))
+ return !1;
+ }
+ var ch = this.input.charCodeAt(next);
+ return isIdentifierStart2(ch, !0) || ch === 92;
+ }, pp$82.isAwaitUsing = function(isFor) {
+ return this.isUsingKeyword(!0, isFor);
+ }, pp$82.isUsing = function(isFor) {
+ return this.isUsingKeyword(!1, isFor);
+ }, pp$82.parseStatement = function(context, topLevel, exports3) {
+ var starttype = this.type, node2 = this.startNode(), kind;
+ switch (this.isLet(context) && (starttype = types$12._var, kind = "let"), starttype) {
+ case types$12._break:
+ case types$12._continue:
+ return this.parseBreakContinueStatement(node2, starttype.keyword);
+ case types$12._debugger:
+ return this.parseDebuggerStatement(node2);
+ case types$12._do:
+ return this.parseDoStatement(node2);
+ case types$12._for:
+ return this.parseForStatement(node2);
+ case types$12._function:
+ return context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(node2, !1, !context);
+ case types$12._class:
+ return context && this.unexpected(), this.parseClass(node2, !0);
+ case types$12._if:
+ return this.parseIfStatement(node2);
+ case types$12._return:
+ return this.parseReturnStatement(node2);
+ case types$12._switch:
+ return this.parseSwitchStatement(node2);
+ case types$12._throw:
+ return this.parseThrowStatement(node2);
+ case types$12._try:
+ return this.parseTryStatement(node2);
+ case types$12._const:
+ case types$12._var:
+ return kind = kind || this.value, context && kind !== "var" && this.unexpected(), this.parseVarStatement(node2, kind);
+ case types$12._while:
+ return this.parseWhileStatement(node2);
+ case types$12._with:
+ return this.parseWithStatement(node2);
+ case types$12.braceL:
+ return this.parseBlock(!0, node2);
+ case types$12.semi:
+ return this.parseEmptyStatement(node2);
+ case types$12._export:
+ case types$12._import:
+ if (this.options.ecmaVersion > 10 && starttype === types$12._import) {
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 40 || nextCh === 46)
+ return this.parseExpressionStatement(node2, this.parseExpression());
+ }
+ return this.options.allowImportExportEverywhere || (topLevel || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports3);
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ if (this.isAsyncFunction())
+ return context && this.unexpected(), this.next(), this.parseFunctionStatement(node2, !0, !context);
+ var usingKind = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
+ if (usingKind)
+ return topLevel && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), usingKind === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(node2, !1, usingKind), this.semicolon(), this.finishNode(node2, "VariableDeclaration");
+ var maybeName = this.value, expr = this.parseExpression();
+ return starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon) ? this.parseLabeledStatement(node2, maybeName, expr, context) : this.parseExpressionStatement(node2, expr);
+ }
+ }, pp$82.parseBreakContinueStatement = function(node2, keyword) {
+ var isBreak = keyword === "break";
+ this.next(), this.eat(types$12.semi) || this.insertSemicolon() ? node2.label = null : this.type !== types$12.name ? this.unexpected() : (node2.label = this.parseIdent(), this.semicolon());
+ for (var i2 = 0; i2 < this.labels.length; ++i2) {
+ var lab = this.labels[i2];
+ if ((node2.label == null || lab.name === node2.label.name) && (lab.kind != null && (isBreak || lab.kind === "loop") || node2.label && isBreak))
+ break;
+ }
+ return i2 === this.labels.length && this.raise(node2.start, "Unsyntactic " + keyword), this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement");
+ }, pp$82.parseDebuggerStatement = function(node2) {
+ return this.next(), this.semicolon(), this.finishNode(node2, "DebuggerStatement");
+ }, pp$82.parseDoStatement = function(node2) {
+ return this.next(), this.labels.push(loopLabel2), node2.body = this.parseStatement("do"), this.labels.pop(), this.expect(types$12._while), node2.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(types$12.semi) : this.semicolon(), this.finishNode(node2, "DoWhileStatement");
+ }, pp$82.parseForStatement = function(node2) {
+ this.next();
+ var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
+ if (this.labels.push(loopLabel2), this.enterScope(0), this.expect(types$12.parenL), this.type === types$12.semi)
+ return awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, null);
+ var isLet = this.isLet();
+ if (this.type === types$12._var || this.type === types$12._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
+ return this.next(), this.parseVar(init$1, !0, kind), this.finishNode(init$1, "VariableDeclaration"), this.parseForAfterInit(node2, init$1, awaitAt);
+ }
+ var startsWithLet = this.isContextual("let"), isForOf = !1, usingKind = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
+ if (usingKind) {
+ var init$2 = this.startNode();
+ return this.next(), usingKind === "await using" && this.next(), this.parseVar(init$2, !0, usingKind), this.finishNode(init$2, "VariableDeclaration"), this.parseForAfterInit(node2, init$2, awaitAt);
+ }
+ var containsEsc = this.containsEsc, refDestructuringErrors = new DestructuringErrors3(), initPos = this.start, init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(!0, refDestructuringErrors);
+ return this.type === types$12._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (awaitAt > -1 ? (this.type === types$12._in && this.unexpected(awaitAt), node2.await = !0) : isForOf && this.options.ecmaVersion >= 8 && (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (node2.await = !1)), startsWithLet && isForOf && this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(init, !1, refDestructuringErrors), this.checkLValPattern(init), this.parseForIn(node2, init)) : (this.checkExpressionErrors(refDestructuringErrors, !0), awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, init));
+ }, pp$82.parseForAfterInit = function(node2, init, awaitAt) {
+ return (this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === types$12._in ? awaitAt > -1 && this.unexpected(awaitAt) : node2.await = awaitAt > -1), this.parseForIn(node2, init)) : (awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, init));
+ }, pp$82.parseFunctionStatement = function(node2, isAsync, declarationPosition) {
+ return this.next(), this.parseFunction(node2, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), !1, isAsync);
+ }, pp$82.parseIfStatement = function(node2) {
+ return this.next(), node2.test = this.parseParenExpression(), node2.consequent = this.parseStatement("if"), node2.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null, this.finishNode(node2, "IfStatement");
+ }, pp$82.parseReturnStatement = function(node2) {
+ return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(types$12.semi) || this.insertSemicolon() ? node2.argument = null : (node2.argument = this.parseExpression(), this.semicolon()), this.finishNode(node2, "ReturnStatement");
+ }, pp$82.parseSwitchStatement = function(node2) {
+ this.next(), node2.discriminant = this.parseParenExpression(), node2.cases = [], this.expect(types$12.braceL), this.labels.push(switchLabel2), this.enterScope(0);
+ for (var cur, sawDefault = !1; this.type !== types$12.braceR; )
+ if (this.type === types$12._case || this.type === types$12._default) {
+ var isCase = this.type === types$12._case;
+ cur && this.finishNode(cur, "SwitchCase"), node2.cases.push(cur = this.startNode()), cur.consequent = [], this.next(), isCase ? cur.test = this.parseExpression() : (sawDefault && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), sawDefault = !0, cur.test = null), this.expect(types$12.colon);
+ } else
+ cur || this.unexpected(), cur.consequent.push(this.parseStatement(null));
+ return this.exitScope(), cur && this.finishNode(cur, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(node2, "SwitchStatement");
+ }, pp$82.parseThrowStatement = function(node2) {
+ return this.next(), lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), node2.argument = this.parseExpression(), this.semicolon(), this.finishNode(node2, "ThrowStatement");
+ };
+ var empty$12 = [];
+ pp$82.parseCatchClauseParam = function() {
+ var param = this.parseBindingAtom(), simple = param.type === "Identifier";
+ return this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0), this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2), this.expect(types$12.parenR), param;
+ }, pp$82.parseTryStatement = function(node2) {
+ if (this.next(), node2.block = this.parseBlock(), node2.handler = null, this.type === types$12._catch) {
+ var clause = this.startNode();
+ this.next(), this.eat(types$12.parenL) ? clause.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), clause.param = null, this.enterScope(0)), clause.body = this.parseBlock(!1), this.exitScope(), node2.handler = this.finishNode(clause, "CatchClause");
+ }
+ return node2.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null, !node2.handler && !node2.finalizer && this.raise(node2.start, "Missing catch or finally clause"), this.finishNode(node2, "TryStatement");
+ }, pp$82.parseVarStatement = function(node2, kind, allowMissingInitializer) {
+ return this.next(), this.parseVar(node2, !1, kind, allowMissingInitializer), this.semicolon(), this.finishNode(node2, "VariableDeclaration");
+ }, pp$82.parseWhileStatement = function(node2) {
+ return this.next(), node2.test = this.parseParenExpression(), this.labels.push(loopLabel2), node2.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(node2, "WhileStatement");
+ }, pp$82.parseWithStatement = function(node2) {
+ return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), node2.object = this.parseParenExpression(), node2.body = this.parseStatement("with"), this.finishNode(node2, "WithStatement");
+ }, pp$82.parseEmptyStatement = function(node2) {
+ return this.next(), this.finishNode(node2, "EmptyStatement");
+ }, pp$82.parseLabeledStatement = function(node2, maybeName, expr, context) {
+ for (var i$1 = 0, list4 = this.labels; i$1 < list4.length; i$1 += 1) {
+ var label = list4[i$1];
+ label.name === maybeName && this.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ }
+ for (var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null, i2 = this.labels.length - 1; i2 >= 0; i2--) {
+ var label$1 = this.labels[i2];
+ if (label$1.statementStart === node2.start)
+ label$1.statementStart = this.start, label$1.kind = kind;
+ else
+ break;
+ }
+ return this.labels.push({ name: maybeName, kind, statementStart: this.start }), node2.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"), this.labels.pop(), node2.label = expr, this.finishNode(node2, "LabeledStatement");
+ }, pp$82.parseExpressionStatement = function(node2, expr) {
+ return node2.expression = expr, this.semicolon(), this.finishNode(node2, "ExpressionStatement");
+ }, pp$82.parseBlock = function(createNewLexicalScope, node2, exitStrict) {
+ for (createNewLexicalScope === void 0 && (createNewLexicalScope = !0), node2 === void 0 && (node2 = this.startNode()), node2.body = [], this.expect(types$12.braceL), createNewLexicalScope && this.enterScope(0); this.type !== types$12.braceR; ) {
+ var stmt = this.parseStatement(null);
+ node2.body.push(stmt);
+ }
+ return exitStrict && (this.strict = !1), this.next(), createNewLexicalScope && this.exitScope(), this.finishNode(node2, "BlockStatement");
+ }, pp$82.parseFor = function(node2, init) {
+ return node2.init = init, this.expect(types$12.semi), node2.test = this.type === types$12.semi ? null : this.parseExpression(), this.expect(types$12.semi), node2.update = this.type === types$12.parenR ? null : this.parseExpression(), this.expect(types$12.parenR), node2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node2, "ForStatement");
+ }, pp$82.parseForIn = function(node2, init) {
+ var isForIn = this.type === types$12._in;
+ return this.next(), init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier") && this.raise(
+ init.start,
+ (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
+ ), node2.left = init, node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(), this.expect(types$12.parenR), node2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement");
+ }, pp$82.parseVar = function(node2, isFor, kind, allowMissingInitializer) {
+ for (node2.declarations = [], node2.kind = kind; ; ) {
+ var decl = this.startNode();
+ if (this.parseVarId(decl, kind), this.eat(types$12.eq) ? decl.init = this.parseMaybeAssign(isFor) : !allowMissingInitializer && kind === "const" && !(this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$12._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration") : !allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$12._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : decl.init = null, node2.declarations.push(this.finishNode(decl, "VariableDeclarator")), !this.eat(types$12.comma))
+ break;
+ }
+ return node2;
+ }, pp$82.parseVarId = function(decl, kind) {
+ decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, !1);
+ };
+ var FUNC_STATEMENT2 = 1, FUNC_HANGING_STATEMENT2 = 2, FUNC_NULLABLE_ID2 = 4;
+ pp$82.parseFunction = function(node2, statement, allowExpressionBody, isAsync, forInit) {
+ this.initFunction(node2), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) && (this.type === types$12.star && statement & FUNC_HANGING_STATEMENT2 && this.unexpected(), node2.generator = this.eat(types$12.star)), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), statement & FUNC_STATEMENT2 && (node2.id = statement & FUNC_NULLABLE_ID2 && this.type !== types$12.name ? null : this.parseIdent(), node2.id && !(statement & FUNC_HANGING_STATEMENT2) && this.checkLValSimple(node2.id, this.strict || node2.generator || node2.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2));
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags2(node2.async, node2.generator)), statement & FUNC_STATEMENT2 || (node2.id = this.type === types$12.name ? this.parseIdent() : null), this.parseFunctionParams(node2), this.parseFunctionBody(node2, allowExpressionBody, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression");
+ }, pp$82.parseFunctionParams = function(node2) {
+ this.expect(types$12.parenL), node2.params = this.parseBindingList(types$12.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
+ }, pp$82.parseClass = function(node2, isStatement) {
+ this.next();
+ var oldStrict = this.strict;
+ this.strict = !0, this.parseClassId(node2, isStatement), this.parseClassSuper(node2);
+ var privateNameMap = this.enterClassBody(), classBody = this.startNode(), hadConstructor = !1;
+ for (classBody.body = [], this.expect(types$12.braceL); this.type !== types$12.braceR; ) {
+ var element2 = this.parseClassElement(node2.superClass !== null);
+ element2 && (classBody.body.push(element2), element2.type === "MethodDefinition" && element2.kind === "constructor" ? (hadConstructor && this.raiseRecoverable(element2.start, "Duplicate constructor in the same class"), hadConstructor = !0) : element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted2(privateNameMap, element2) && this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared"));
+ }
+ return this.strict = oldStrict, this.next(), node2.body = this.finishNode(classBody, "ClassBody"), this.exitClassBody(), this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression");
+ }, pp$82.parseClassElement = function(constructorAllowsSuper) {
+ if (this.eat(types$12.semi))
+ return null;
+ var ecmaVersion2 = this.options.ecmaVersion, node2 = this.startNode(), keyName = "", isGenerator = !1, isAsync = !1, kind = "method", isStatic = !1;
+ if (this.eatContextual("static")) {
+ if (ecmaVersion2 >= 13 && this.eat(types$12.braceL))
+ return this.parseClassStaticBlock(node2), node2;
+ this.isClassElementNameStart() || this.type === types$12.star ? isStatic = !0 : keyName = "static";
+ }
+ if (node2.static = isStatic, !keyName && ecmaVersion2 >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon() ? isAsync = !0 : keyName = "async"), !keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$12.star) && (isGenerator = !0), !keyName && !isAsync && !isGenerator) {
+ var lastValue = this.value;
+ (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? kind = lastValue : keyName = lastValue);
+ }
+ if (keyName ? (node2.computed = !1, node2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), node2.key.name = keyName, this.finishNode(node2.key, "Identifier")) : this.parseClassElementName(node2), ecmaVersion2 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) {
+ var isConstructor = !node2.static && checkKeyName2(node2, "constructor"), allowsDirectSuper = isConstructor && constructorAllowsSuper;
+ isConstructor && kind !== "method" && this.raise(node2.key.start, "Constructor can't have get/set modifier"), node2.kind = isConstructor ? "constructor" : kind, this.parseClassMethod(node2, isGenerator, isAsync, allowsDirectSuper);
+ } else
+ this.parseClassField(node2);
+ return node2;
+ }, pp$82.isClassElementNameStart = function() {
+ return this.type === types$12.name || this.type === types$12.privateId || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword;
+ }, pp$82.parseClassElementName = function(element2) {
+ this.type === types$12.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), element2.computed = !1, element2.key = this.parsePrivateIdent()) : this.parsePropertyName(element2);
+ }, pp$82.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
+ var key2 = method.key;
+ method.kind === "constructor" ? (isGenerator && this.raise(key2.start, "Constructor can't be a generator"), isAsync && this.raise(key2.start, "Constructor can't be an async method")) : method.static && checkKeyName2(method, "prototype") && this.raise(key2.start, "Classes may not have a static property named prototype");
+ var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
+ return method.kind === "get" && value.params.length !== 0 && this.raiseRecoverable(value.start, "getter should have no params"), method.kind === "set" && value.params.length !== 1 && this.raiseRecoverable(value.start, "setter should have exactly one param"), method.kind === "set" && value.params[0].type === "RestElement" && this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"), this.finishNode(method, "MethodDefinition");
+ }, pp$82.parseClassField = function(field) {
+ return checkKeyName2(field, "constructor") ? this.raise(field.key.start, "Classes can't have a field named 'constructor'") : field.static && checkKeyName2(field, "prototype") && this.raise(field.key.start, "Classes can't have a static field named 'prototype'"), this.eat(types$12.eq) ? (this.enterScope(SCOPE_CLASS_FIELD_INIT2 | SCOPE_SUPER2), field.value = this.parseMaybeAssign(), this.exitScope()) : field.value = null, this.semicolon(), this.finishNode(field, "PropertyDefinition");
+ }, pp$82.parseClassStaticBlock = function(node2) {
+ node2.body = [];
+ var oldLabels = this.labels;
+ for (this.labels = [], this.enterScope(SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_SUPER2); this.type !== types$12.braceR; ) {
+ var stmt = this.parseStatement(null);
+ node2.body.push(stmt);
+ }
+ return this.next(), this.exitScope(), this.labels = oldLabels, this.finishNode(node2, "StaticBlock");
+ }, pp$82.parseClassId = function(node2, isStatement) {
+ this.type === types$12.name ? (node2.id = this.parseIdent(), isStatement && this.checkLValSimple(node2.id, BIND_LEXICAL2, !1)) : (isStatement === !0 && this.unexpected(), node2.id = null);
+ }, pp$82.parseClassSuper = function(node2) {
+ node2.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts(null, !1) : null;
+ }, pp$82.enterClassBody = function() {
+ var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
+ return this.privateNameStack.push(element2), element2.declared;
+ }, pp$82.exitClassBody = function() {
+ var ref3 = this.privateNameStack.pop(), declared = ref3.declared, used = ref3.used;
+ if (this.options.checkPrivateFields)
+ for (var len = this.privateNameStack.length, parent = len === 0 ? null : this.privateNameStack[len - 1], i2 = 0; i2 < used.length; ++i2) {
+ var id = used[i2];
+ hasOwn2(declared, id.name) || (parent ? parent.used.push(id) : this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"));
+ }
+ };
+ function isPrivateNameConflicted2(privateNameMap, element2) {
+ var name2 = element2.key.name, curr = privateNameMap[name2], next = "true";
+ return element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set") && (next = (element2.static ? "s" : "i") + element2.kind), curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget" ? (privateNameMap[name2] = "true", !1) : curr ? !0 : (privateNameMap[name2] = next, !1);
+ }
+ function checkKeyName2(node2, name2) {
+ var computed = node2.computed, key2 = node2.key;
+ return !computed && (key2.type === "Identifier" && key2.name === name2 || key2.type === "Literal" && key2.value === name2);
+ }
+ pp$82.parseExportAllDeclaration = function(node2, exports3) {
+ return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node2.exported = this.parseModuleExportName(), this.checkExport(exports3, node2.exported, this.lastTokStart)) : node2.exported = null), this.expectContextual("from"), this.type !== types$12.string && this.unexpected(), node2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node2, "ExportAllDeclaration");
+ }, pp$82.parseExport = function(node2, exports3) {
+ if (this.next(), this.eat(types$12.star))
+ return this.parseExportAllDeclaration(node2, exports3);
+ if (this.eat(types$12._default))
+ return this.checkExport(exports3, "default", this.lastTokStart), node2.declaration = this.parseExportDefaultDeclaration(), this.finishNode(node2, "ExportDefaultDeclaration");
+ if (this.shouldParseExportStatement())
+ node2.declaration = this.parseExportDeclaration(node2), node2.declaration.type === "VariableDeclaration" ? this.checkVariableExport(exports3, node2.declaration.declarations) : this.checkExport(exports3, node2.declaration.id, node2.declaration.id.start), node2.specifiers = [], node2.source = null, this.options.ecmaVersion >= 16 && (node2.attributes = []);
+ else {
+ if (node2.declaration = null, node2.specifiers = this.parseExportSpecifiers(exports3), this.eatContextual("from"))
+ this.type !== types$12.string && this.unexpected(), node2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause());
+ else {
+ for (var i2 = 0, list4 = node2.specifiers; i2 < list4.length; i2 += 1) {
+ var spec = list4[i2];
+ this.checkUnreserved(spec.local), this.checkLocalExport(spec.local), spec.local.type === "Literal" && this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
+ }
+ node2.source = null, this.options.ecmaVersion >= 16 && (node2.attributes = []);
+ }
+ this.semicolon();
+ }
+ return this.finishNode(node2, "ExportNamedDeclaration");
+ }, pp$82.parseExportDeclaration = function(node2) {
+ return this.parseStatement(null);
+ }, pp$82.parseExportDefaultDeclaration = function() {
+ var isAsync;
+ if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
+ var fNode = this.startNode();
+ return this.next(), isAsync && this.next(), this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, !1, isAsync);
+ } else if (this.type === types$12._class) {
+ var cNode = this.startNode();
+ return this.parseClass(cNode, "nullableID");
+ } else {
+ var declaration = this.parseMaybeAssign();
+ return this.semicolon(), declaration;
+ }
+ }, pp$82.checkExport = function(exports3, name2, pos) {
+ exports3 && (typeof name2 != "string" && (name2 = name2.type === "Identifier" ? name2.name : name2.value), hasOwn2(exports3, name2) && this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'"), exports3[name2] = !0);
+ }, pp$82.checkPatternExport = function(exports3, pat) {
+ var type = pat.type;
+ if (type === "Identifier")
+ this.checkExport(exports3, pat, pat.start);
+ else if (type === "ObjectPattern")
+ for (var i2 = 0, list4 = pat.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.checkPatternExport(exports3, prop);
+ }
+ else if (type === "ArrayPattern")
+ for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
+ var elt = list$1[i$1];
+ elt && this.checkPatternExport(exports3, elt);
+ }
+ else type === "Property" ? this.checkPatternExport(exports3, pat.value) : type === "AssignmentPattern" ? this.checkPatternExport(exports3, pat.left) : type === "RestElement" && this.checkPatternExport(exports3, pat.argument);
+ }, pp$82.checkVariableExport = function(exports3, decls) {
+ if (exports3)
+ for (var i2 = 0, list4 = decls; i2 < list4.length; i2 += 1) {
+ var decl = list4[i2];
+ this.checkPatternExport(exports3, decl.id);
+ }
+ }, pp$82.shouldParseExportStatement = function() {
+ return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
+ }, pp$82.parseExportSpecifier = function(exports3) {
+ var node2 = this.startNode();
+ return node2.local = this.parseModuleExportName(), node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local, this.checkExport(
+ exports3,
+ node2.exported,
+ node2.exported.start
+ ), this.finishNode(node2, "ExportSpecifier");
+ }, pp$82.parseExportSpecifiers = function(exports3) {
+ var nodes = [], first = !0;
+ for (this.expect(types$12.braceL); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ nodes.push(this.parseExportSpecifier(exports3));
+ }
+ return nodes;
+ }, pp$82.parseImport = function(node2) {
+ return this.next(), this.type === types$12.string ? (node2.specifiers = empty$12, node2.source = this.parseExprAtom()) : (node2.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), node2.source = this.type === types$12.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node2, "ImportDeclaration");
+ }, pp$82.parseImportSpecifier = function() {
+ var node2 = this.startNode();
+ return node2.imported = this.parseModuleExportName(), this.eatContextual("as") ? node2.local = this.parseIdent() : (this.checkUnreserved(node2.imported), node2.local = node2.imported), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportSpecifier");
+ }, pp$82.parseImportDefaultSpecifier = function() {
+ var node2 = this.startNode();
+ return node2.local = this.parseIdent(), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportDefaultSpecifier");
+ }, pp$82.parseImportNamespaceSpecifier = function() {
+ var node2 = this.startNode();
+ return this.next(), this.expectContextual("as"), node2.local = this.parseIdent(), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportNamespaceSpecifier");
+ }, pp$82.parseImportSpecifiers = function() {
+ var nodes = [], first = !0;
+ if (this.type === types$12.name && (nodes.push(this.parseImportDefaultSpecifier()), !this.eat(types$12.comma)))
+ return nodes;
+ if (this.type === types$12.star)
+ return nodes.push(this.parseImportNamespaceSpecifier()), nodes;
+ for (this.expect(types$12.braceL); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ nodes.push(this.parseImportSpecifier());
+ }
+ return nodes;
+ }, pp$82.parseWithClause = function() {
+ var nodes = [];
+ if (!this.eat(types$12._with))
+ return nodes;
+ this.expect(types$12.braceL);
+ for (var attributeKeys = {}, first = !0; !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ var attr = this.parseImportAttribute(), keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value;
+ hasOwn2(attributeKeys, keyName) && this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"), attributeKeys[keyName] = !0, nodes.push(attr);
+ }
+ return nodes;
+ }, pp$82.parseImportAttribute = function() {
+ var node2 = this.startNode();
+ return node2.key = this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(types$12.colon), this.type !== types$12.string && this.unexpected(), node2.value = this.parseExprAtom(), this.finishNode(node2, "ImportAttribute");
+ }, pp$82.parseModuleExportName = function() {
+ if (this.options.ecmaVersion >= 13 && this.type === types$12.string) {
+ var stringLiteral = this.parseLiteral(this.value);
+ return loneSurrogate2.test(stringLiteral.value) && this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."), stringLiteral;
+ }
+ return this.parseIdent(!0);
+ }, pp$82.adaptDirectivePrologue = function(statements) {
+ for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2)
+ statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
+ }, pp$82.isDirectiveCandidate = function(statement) {
+ return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value == "string" && // Reject parenthesized strings.
+ (this.input[statement.start] === '"' || this.input[statement.start] === "'");
+ };
+ var pp$72 = Parser3.prototype;
+ pp$72.toAssignable = function(node2, isBinding, refDestructuringErrors) {
+ if (this.options.ecmaVersion >= 6 && node2)
+ switch (node2.type) {
+ case "Identifier":
+ this.inAsync && node2.name === "await" && this.raise(node2.start, "Cannot use 'await' as identifier inside an async function");
+ break;
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ case "RestElement":
+ break;
+ case "ObjectExpression":
+ node2.type = "ObjectPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
+ for (var i2 = 0, list4 = node2.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.toAssignable(prop, isBinding), prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") && this.raise(prop.argument.start, "Unexpected token");
+ }
+ break;
+ case "Property":
+ node2.kind !== "init" && this.raise(node2.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(node2.value, isBinding);
+ break;
+ case "ArrayExpression":
+ node2.type = "ArrayPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0), this.toAssignableList(node2.elements, isBinding);
+ break;
+ case "SpreadElement":
+ node2.type = "RestElement", this.toAssignable(node2.argument, isBinding), node2.argument.type === "AssignmentPattern" && this.raise(node2.argument.start, "Rest elements cannot have a default value");
+ break;
+ case "AssignmentExpression":
+ node2.operator !== "=" && this.raise(node2.left.end, "Only '=' operator can be used for specifying default value."), node2.type = "AssignmentPattern", delete node2.operator, this.toAssignable(node2.left, isBinding);
+ break;
+ case "ParenthesizedExpression":
+ this.toAssignable(node2.expression, isBinding, refDestructuringErrors);
+ break;
+ case "ChainExpression":
+ this.raiseRecoverable(node2.start, "Optional chaining cannot appear in left-hand side");
+ break;
+ case "MemberExpression":
+ if (!isBinding)
+ break;
+ default:
+ this.raise(node2.start, "Assigning to rvalue");
+ }
+ else refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
+ return node2;
+ }, pp$72.toAssignableList = function(exprList, isBinding) {
+ for (var end = exprList.length, i2 = 0; i2 < end; i2++) {
+ var elt = exprList[i2];
+ elt && this.toAssignable(elt, isBinding);
+ }
+ if (end) {
+ var last = exprList[end - 1];
+ this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier" && this.unexpected(last.argument.start);
+ }
+ return exprList;
+ }, pp$72.parseSpread = function(refDestructuringErrors) {
+ var node2 = this.startNode();
+ return this.next(), node2.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.finishNode(node2, "SpreadElement");
+ }, pp$72.parseRestBinding = function() {
+ var node2 = this.startNode();
+ return this.next(), this.options.ecmaVersion === 6 && this.type !== types$12.name && this.unexpected(), node2.argument = this.parseBindingAtom(), this.finishNode(node2, "RestElement");
+ }, pp$72.parseBindingAtom = function() {
+ if (this.options.ecmaVersion >= 6)
+ switch (this.type) {
+ case types$12.bracketL:
+ var node2 = this.startNode();
+ return this.next(), node2.elements = this.parseBindingList(types$12.bracketR, !0, !0), this.finishNode(node2, "ArrayPattern");
+ case types$12.braceL:
+ return this.parseObj(!0);
+ }
+ return this.parseIdent();
+ }, pp$72.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
+ for (var elts = [], first = !0; !this.eat(close); )
+ if (first ? first = !1 : this.expect(types$12.comma), allowEmpty && this.type === types$12.comma)
+ elts.push(null);
+ else {
+ if (allowTrailingComma && this.afterTrailingComma(close))
+ break;
+ if (this.type === types$12.ellipsis) {
+ var rest = this.parseRestBinding();
+ this.parseBindingListItem(rest), elts.push(rest), this.type === types$12.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(close);
+ break;
+ } else
+ elts.push(this.parseAssignableListItem(allowModifiers));
+ }
+ return elts;
+ }, pp$72.parseAssignableListItem = function(allowModifiers) {
+ var elem = this.parseMaybeDefault(this.start, this.startLoc);
+ return this.parseBindingListItem(elem), elem;
+ }, pp$72.parseBindingListItem = function(param) {
+ return param;
+ }, pp$72.parseMaybeDefault = function(startPos, startLoc, left) {
+ if (left = left || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(types$12.eq))
+ return left;
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.left = left, node2.right = this.parseMaybeAssign(), this.finishNode(node2, "AssignmentPattern");
+ }, pp$72.checkLValSimple = function(expr, bindingType, checkClashes) {
+ bindingType === void 0 && (bindingType = BIND_NONE2);
+ var isBind = bindingType !== BIND_NONE2;
+ switch (expr.type) {
+ case "Identifier":
+ this.strict && this.reservedWordsStrictBind.test(expr.name) && this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"), isBind && (bindingType === BIND_LEXICAL2 && expr.name === "let" && this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"), checkClashes && (hasOwn2(checkClashes, expr.name) && this.raiseRecoverable(expr.start, "Argument name clash"), checkClashes[expr.name] = !0), bindingType !== BIND_OUTSIDE2 && this.declareName(expr.name, bindingType, expr.start));
+ break;
+ case "ChainExpression":
+ this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
+ break;
+ case "MemberExpression":
+ isBind && this.raiseRecoverable(expr.start, "Binding member expression");
+ break;
+ case "ParenthesizedExpression":
+ return isBind && this.raiseRecoverable(expr.start, "Binding parenthesized expression"), this.checkLValSimple(expr.expression, bindingType, checkClashes);
+ default:
+ this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
+ }
+ }, pp$72.checkLValPattern = function(expr, bindingType, checkClashes) {
+ switch (bindingType === void 0 && (bindingType = BIND_NONE2), expr.type) {
+ case "ObjectPattern":
+ for (var i2 = 0, list4 = expr.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.checkLValInnerPattern(prop, bindingType, checkClashes);
+ }
+ break;
+ case "ArrayPattern":
+ for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
+ var elem = list$1[i$1];
+ elem && this.checkLValInnerPattern(elem, bindingType, checkClashes);
+ }
+ break;
+ default:
+ this.checkLValSimple(expr, bindingType, checkClashes);
+ }
+ }, pp$72.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
+ switch (bindingType === void 0 && (bindingType = BIND_NONE2), expr.type) {
+ case "Property":
+ this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
+ break;
+ case "AssignmentPattern":
+ this.checkLValPattern(expr.left, bindingType, checkClashes);
+ break;
+ case "RestElement":
+ this.checkLValPattern(expr.argument, bindingType, checkClashes);
+ break;
+ default:
+ this.checkLValPattern(expr, bindingType, checkClashes);
+ }
+ };
+ var TokContext3 = function(token, isExpr, preserveSpace, override, generator) {
+ this.token = token, this.isExpr = !!isExpr, this.preserveSpace = !!preserveSpace, this.override = override, this.generator = !!generator;
+ }, types2 = {
+ b_stat: new TokContext3("{", !1),
+ b_expr: new TokContext3("{", !0),
+ b_tmpl: new TokContext3("${", !1),
+ p_stat: new TokContext3("(", !1),
+ p_expr: new TokContext3("(", !0),
+ q_tmpl: new TokContext3("`", !0, !0, function(p) {
+ return p.tryReadTemplateToken();
+ }),
+ f_stat: new TokContext3("function", !1),
+ f_expr: new TokContext3("function", !0),
+ f_expr_gen: new TokContext3("function", !0, !1, null, !0),
+ f_gen: new TokContext3("function", !1, !1, null, !0)
+ }, pp$62 = Parser3.prototype;
+ pp$62.initialContext = function() {
+ return [types2.b_stat];
+ }, pp$62.curContext = function() {
+ return this.context[this.context.length - 1];
+ }, pp$62.braceIsBlock = function(prevType) {
+ var parent = this.curContext();
+ return parent === types2.f_expr || parent === types2.f_stat ? !0 : prevType === types$12.colon && (parent === types2.b_stat || parent === types2.b_expr) ? !parent.isExpr : prevType === types$12._return || prevType === types$12.name && this.exprAllowed ? lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)) : prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow ? !0 : prevType === types$12.braceL ? parent === types2.b_stat : prevType === types$12._var || prevType === types$12._const || prevType === types$12.name ? !1 : !this.exprAllowed;
+ }, pp$62.inGeneratorContext = function() {
+ for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
+ var context = this.context[i2];
+ if (context.token === "function")
+ return context.generator;
+ }
+ return !1;
+ }, pp$62.updateContext = function(prevType) {
+ var update, type = this.type;
+ type.keyword && prevType === types$12.dot ? this.exprAllowed = !1 : (update = type.updateContext) ? update.call(this, prevType) : this.exprAllowed = type.beforeExpr;
+ }, pp$62.overrideContext = function(tokenCtx) {
+ this.curContext() !== tokenCtx && (this.context[this.context.length - 1] = tokenCtx);
+ }, types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
+ if (this.context.length === 1) {
+ this.exprAllowed = !0;
+ return;
+ }
+ var out = this.context.pop();
+ out === types2.b_stat && this.curContext().token === "function" && (out = this.context.pop()), this.exprAllowed = !out.isExpr;
+ }, types$12.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types2.b_stat : types2.b_expr), this.exprAllowed = !0;
+ }, types$12.dollarBraceL.updateContext = function() {
+ this.context.push(types2.b_tmpl), this.exprAllowed = !0;
+ }, types$12.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
+ this.context.push(statementParens ? types2.p_stat : types2.p_expr), this.exprAllowed = !0;
+ }, types$12.incDec.updateContext = function() {
+ }, types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
+ prevType.beforeExpr && prevType !== types$12._else && !(prevType === types$12.semi && this.curContext() !== types2.p_stat) && !(prevType === types$12._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat) ? this.context.push(types2.f_expr) : this.context.push(types2.f_stat), this.exprAllowed = !1;
+ }, types$12.colon.updateContext = function() {
+ this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
+ }, types$12.backQuote.updateContext = function() {
+ this.curContext() === types2.q_tmpl ? this.context.pop() : this.context.push(types2.q_tmpl), this.exprAllowed = !1;
+ }, types$12.star.updateContext = function(prevType) {
+ if (prevType === types$12._function) {
+ var index2 = this.context.length - 1;
+ this.context[index2] === types2.f_expr ? this.context[index2] = types2.f_expr_gen : this.context[index2] = types2.f_gen;
+ }
+ this.exprAllowed = !0;
+ }, types$12.name.updateContext = function(prevType) {
+ var allowed = !1;
+ this.options.ecmaVersion >= 6 && prevType !== types$12.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (allowed = !0), this.exprAllowed = allowed;
+ };
+ var pp$52 = Parser3.prototype;
+ pp$52.checkPropClash = function(prop, propHash, refDestructuringErrors) {
+ if (!(this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))) {
+ var key2 = prop.key, name2;
+ switch (key2.type) {
+ case "Identifier":
+ name2 = key2.name;
+ break;
+ case "Literal":
+ name2 = String(key2.value);
+ break;
+ default:
+ return;
+ }
+ var kind = prop.kind;
+ if (this.options.ecmaVersion >= 6) {
+ name2 === "__proto__" && kind === "init" && (propHash.proto && (refDestructuringErrors ? refDestructuringErrors.doubleProto < 0 && (refDestructuringErrors.doubleProto = key2.start) : this.raiseRecoverable(key2.start, "Redefinition of __proto__ property")), propHash.proto = !0);
+ return;
+ }
+ name2 = "$" + name2;
+ var other = propHash[name2];
+ if (other) {
+ var redefinition;
+ kind === "init" ? redefinition = this.strict && other.init || other.get || other.set : redefinition = other.init || other[kind], redefinition && this.raiseRecoverable(key2.start, "Redefinition of property");
+ } else
+ other = propHash[name2] = {
+ init: !1,
+ get: !1,
+ set: !1
+ };
+ other[kind] = !0;
+ }
+ }, pp$52.parseExpression = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
+ if (this.type === types$12.comma) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ for (node2.expressions = [expr]; this.eat(types$12.comma); )
+ node2.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
+ return this.finishNode(node2, "SequenceExpression");
+ }
+ return expr;
+ }, pp$52.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
+ if (this.isContextual("yield")) {
+ if (this.inGenerator)
+ return this.parseYield(forInit);
+ this.exprAllowed = !1;
+ }
+ var ownDestructuringErrors = !1, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
+ refDestructuringErrors ? (oldParenAssign = refDestructuringErrors.parenthesizedAssign, oldTrailingComma = refDestructuringErrors.trailingComma, oldDoubleProto = refDestructuringErrors.doubleProto, refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1) : (refDestructuringErrors = new DestructuringErrors3(), ownDestructuringErrors = !0);
+ var startPos = this.start, startLoc = this.startLoc;
+ (this.type === types$12.parenL || this.type === types$12.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = forInit === "await");
+ var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
+ if (afterLeftParse && (left = afterLeftParse.call(this, left, startPos, startLoc)), this.type.isAssign) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.operator = this.value, this.type === types$12.eq && (left = this.toAssignable(left, !1, refDestructuringErrors)), ownDestructuringErrors || (refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1), refDestructuringErrors.shorthandAssign >= left.start && (refDestructuringErrors.shorthandAssign = -1), this.type === types$12.eq ? this.checkLValPattern(left) : this.checkLValSimple(left), node2.left = left, this.next(), node2.right = this.parseMaybeAssign(forInit), oldDoubleProto > -1 && (refDestructuringErrors.doubleProto = oldDoubleProto), this.finishNode(node2, "AssignmentExpression");
+ } else
+ ownDestructuringErrors && this.checkExpressionErrors(refDestructuringErrors, !0);
+ return oldParenAssign > -1 && (refDestructuringErrors.parenthesizedAssign = oldParenAssign), oldTrailingComma > -1 && (refDestructuringErrors.trailingComma = oldTrailingComma), left;
+ }, pp$52.parseMaybeConditional = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprOps(forInit, refDestructuringErrors);
+ if (this.checkExpressionErrors(refDestructuringErrors))
+ return expr;
+ if (this.eat(types$12.question)) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.test = expr, node2.consequent = this.parseMaybeAssign(), this.expect(types$12.colon), node2.alternate = this.parseMaybeAssign(forInit), this.finishNode(node2, "ConditionalExpression");
+ }
+ return expr;
+ }, pp$52.parseExprOps = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseMaybeUnary(refDestructuringErrors, !1, !1, forInit);
+ return this.checkExpressionErrors(refDestructuringErrors) || expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
+ }, pp$52.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
+ var prec = this.type.binop;
+ if (prec != null && (!forInit || this.type !== types$12._in) && prec > minPrec) {
+ var logical = this.type === types$12.logicalOR || this.type === types$12.logicalAND, coalesce = this.type === types$12.coalesce;
+ coalesce && (prec = types$12.logicalAND.binop);
+ var op = this.value;
+ this.next();
+ var startPos = this.start, startLoc = this.startLoc, right = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, forInit), startPos, startLoc, prec, forInit), node2 = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
+ return (logical && this.type === types$12.coalesce || coalesce && (this.type === types$12.logicalOR || this.type === types$12.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(node2, leftStartPos, leftStartLoc, minPrec, forInit);
+ }
+ return left;
+ }, pp$52.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ right.type === "PrivateIdentifier" && this.raise(right.start, "Private identifier can only be left side of binary expression");
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.left = left, node2.operator = op, node2.right = right, this.finishNode(node2, logical ? "LogicalExpression" : "BinaryExpression");
+ }, pp$52.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, expr;
+ if (this.isContextual("await") && this.canAwait)
+ expr = this.parseAwait(forInit), sawUnary = !0;
+ else if (this.type.prefix) {
+ var node2 = this.startNode(), update = this.type === types$12.incDec;
+ node2.operator = this.value, node2.prefix = !0, this.next(), node2.argument = this.parseMaybeUnary(null, !0, update, forInit), this.checkExpressionErrors(refDestructuringErrors, !0), update ? this.checkLValSimple(node2.argument) : this.strict && node2.operator === "delete" && isLocalVariableAccess2(node2.argument) ? this.raiseRecoverable(node2.start, "Deleting local variable in strict mode") : node2.operator === "delete" && isPrivateFieldAccess2(node2.argument) ? this.raiseRecoverable(node2.start, "Private fields can not be deleted") : sawUnary = !0, expr = this.finishNode(node2, update ? "UpdateExpression" : "UnaryExpression");
+ } else if (!sawUnary && this.type === types$12.privateId)
+ (forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), expr = this.parsePrivateIdent(), this.type !== types$12._in && this.unexpected();
+ else {
+ if (expr = this.parseExprSubscripts(refDestructuringErrors, forInit), this.checkExpressionErrors(refDestructuringErrors))
+ return expr;
+ for (; this.type.postfix && !this.canInsertSemicolon(); ) {
+ var node$1 = this.startNodeAt(startPos, startLoc);
+ node$1.operator = this.value, node$1.prefix = !1, node$1.argument = expr, this.checkLValSimple(expr), this.next(), expr = this.finishNode(node$1, "UpdateExpression");
+ }
+ }
+ if (!incDec && this.eat(types$12.starstar))
+ if (sawUnary)
+ this.unexpected(this.lastTokStart);
+ else
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, !1, !1, forInit), "**", !1);
+ else
+ return expr;
+ };
+ function isLocalVariableAccess2(node2) {
+ return node2.type === "Identifier" || node2.type === "ParenthesizedExpression" && isLocalVariableAccess2(node2.expression);
+ }
+ function isPrivateFieldAccess2(node2) {
+ return node2.type === "MemberExpression" && node2.property.type === "PrivateIdentifier" || node2.type === "ChainExpression" && isPrivateFieldAccess2(node2.expression) || node2.type === "ParenthesizedExpression" && isPrivateFieldAccess2(node2.expression);
+ }
+ pp$52.parseExprSubscripts = function(refDestructuringErrors, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprAtom(refDestructuringErrors, forInit);
+ if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
+ return expr;
+ var result = this.parseSubscripts(expr, startPos, startLoc, !1, forInit);
+ return refDestructuringErrors && result.type === "MemberExpression" && (refDestructuringErrors.parenthesizedAssign >= result.start && (refDestructuringErrors.parenthesizedAssign = -1), refDestructuringErrors.parenthesizedBind >= result.start && (refDestructuringErrors.parenthesizedBind = -1), refDestructuringErrors.trailingComma >= result.start && (refDestructuringErrors.trailingComma = -1)), result;
+ }, pp$52.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
+ for (var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start, optionalChained = !1; ; ) {
+ var element2 = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
+ if (element2.optional && (optionalChained = !0), element2 === base || element2.type === "ArrowFunctionExpression") {
+ if (optionalChained) {
+ var chainNode = this.startNodeAt(startPos, startLoc);
+ chainNode.expression = element2, element2 = this.finishNode(chainNode, "ChainExpression");
+ }
+ return element2;
+ }
+ base = element2;
+ }
+ }, pp$52.shouldParseAsyncArrow = function() {
+ return !this.canInsertSemicolon() && this.eat(types$12.arrow);
+ }, pp$52.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !0, forInit);
+ }, pp$52.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
+ var optionalSupported = this.options.ecmaVersion >= 11, optional = optionalSupported && this.eat(types$12.questionDot);
+ noCalls && optional && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
+ var computed = this.eat(types$12.bracketL);
+ if (computed || optional && this.type !== types$12.parenL && this.type !== types$12.backQuote || this.eat(types$12.dot)) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ node2.object = base, computed ? (node2.property = this.parseExpression(), this.expect(types$12.bracketR)) : this.type === types$12.privateId && base.type !== "Super" ? node2.property = this.parsePrivateIdent() : node2.property = this.parseIdent(this.options.allowReserved !== "never"), node2.computed = !!computed, optionalSupported && (node2.optional = optional), base = this.finishNode(node2, "MemberExpression");
+ } else if (!noCalls && this.eat(types$12.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
+ var exprList = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, !1, refDestructuringErrors);
+ if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow())
+ return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit);
+ this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
+ var node$1 = this.startNodeAt(startPos, startLoc);
+ node$1.callee = base, node$1.arguments = exprList, optionalSupported && (node$1.optional = optional), base = this.finishNode(node$1, "CallExpression");
+ } else if (this.type === types$12.backQuote) {
+ (optional || optionalChained) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
+ var node$2 = this.startNodeAt(startPos, startLoc);
+ node$2.tag = base, node$2.quasi = this.parseTemplate({ isTagged: !0 }), base = this.finishNode(node$2, "TaggedTemplateExpression");
+ }
+ return base;
+ }, pp$52.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
+ this.type === types$12.slash && this.readRegexp();
+ var node2, canBeArrow = this.potentialArrowAt === this.start;
+ switch (this.type) {
+ case types$12._super:
+ return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), node2 = this.startNode(), this.next(), this.type === types$12.parenL && !this.allowDirectSuper && this.raise(node2.start, "super() call outside constructor of a subclass"), this.type !== types$12.dot && this.type !== types$12.bracketL && this.type !== types$12.parenL && this.unexpected(), this.finishNode(node2, "Super");
+ case types$12._this:
+ return node2 = this.startNode(), this.next(), this.finishNode(node2, "ThisExpression");
+ case types$12.name:
+ var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc, id = this.parseIdent(!1);
+ if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$12._function))
+ return this.overrideContext(types2.f_expr), this.parseFunction(this.startNodeAt(startPos, startLoc), 0, !1, !0, forInit);
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(types$12.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], !1, forInit);
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$12.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc))
+ return id = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(types$12.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], !0, forInit);
+ }
+ return id;
+ case types$12.regexp:
+ var value = this.value;
+ return node2 = this.parseLiteral(value.value), node2.regex = { pattern: value.pattern, flags: value.flags }, node2;
+ case types$12.num:
+ case types$12.string:
+ return this.parseLiteral(this.value);
+ case types$12._null:
+ case types$12._true:
+ case types$12._false:
+ return node2 = this.startNode(), node2.value = this.type === types$12._null ? null : this.type === types$12._true, node2.raw = this.type.keyword, this.next(), this.finishNode(node2, "Literal");
+ case types$12.parenL:
+ var start2 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
+ return refDestructuringErrors && (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr) && (refDestructuringErrors.parenthesizedAssign = start2), refDestructuringErrors.parenthesizedBind < 0 && (refDestructuringErrors.parenthesizedBind = start2)), expr;
+ case types$12.bracketL:
+ return node2 = this.startNode(), this.next(), node2.elements = this.parseExprList(types$12.bracketR, !0, !0, refDestructuringErrors), this.finishNode(node2, "ArrayExpression");
+ case types$12.braceL:
+ return this.overrideContext(types2.b_expr), this.parseObj(!1, refDestructuringErrors);
+ case types$12._function:
+ return node2 = this.startNode(), this.next(), this.parseFunction(node2, 0);
+ case types$12._class:
+ return this.parseClass(this.startNode(), !1);
+ case types$12._new:
+ return this.parseNew();
+ case types$12.backQuote:
+ return this.parseTemplate();
+ case types$12._import:
+ return this.options.ecmaVersion >= 11 ? this.parseExprImport(forNew) : this.unexpected();
+ default:
+ return this.parseExprAtomDefault();
+ }
+ }, pp$52.parseExprAtomDefault = function() {
+ this.unexpected();
+ }, pp$52.parseExprImport = function(forNew) {
+ var node2 = this.startNode();
+ if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === types$12.parenL && !forNew)
+ return this.parseDynamicImport(node2);
+ if (this.type === types$12.dot) {
+ var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
+ return meta.name = "import", node2.meta = this.finishNode(meta, "Identifier"), this.parseImportMeta(node2);
+ } else
+ this.unexpected();
+ }, pp$52.parseDynamicImport = function(node2) {
+ if (this.next(), node2.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
+ this.eat(types$12.parenR) ? node2.options = null : (this.expect(types$12.comma), this.afterTrailingComma(types$12.parenR) ? node2.options = null : (node2.options = this.parseMaybeAssign(), this.eat(types$12.parenR) || (this.expect(types$12.comma), this.afterTrailingComma(types$12.parenR) || this.unexpected())));
+ else if (!this.eat(types$12.parenR)) {
+ var errorPos = this.start;
+ this.eat(types$12.comma) && this.eat(types$12.parenR) ? this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()") : this.unexpected(errorPos);
+ }
+ return this.finishNode(node2, "ImportExpression");
+ }, pp$52.parseImportMeta = function(node2) {
+ this.next();
+ var containsEsc = this.containsEsc;
+ return node2.property = this.parseIdent(!0), node2.property.name !== "meta" && this.raiseRecoverable(node2.property.start, "The only valid meta property for import is 'import.meta'"), containsEsc && this.raiseRecoverable(node2.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(node2.start, "Cannot use 'import.meta' outside a module"), this.finishNode(node2, "MetaProperty");
+ }, pp$52.parseLiteral = function(value) {
+ var node2 = this.startNode();
+ return node2.value = value, node2.raw = this.input.slice(this.start, this.end), node2.raw.charCodeAt(node2.raw.length - 1) === 110 && (node2.bigint = node2.value != null ? node2.value.toString() : node2.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(node2, "Literal");
+ }, pp$52.parseParenExpression = function() {
+ this.expect(types$12.parenL);
+ var val = this.parseExpression();
+ return this.expect(types$12.parenR), val;
+ }, pp$52.shouldParseArrow = function(exprList) {
+ return !this.canInsertSemicolon();
+ }, pp$52.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
+ if (this.options.ecmaVersion >= 6) {
+ this.next();
+ var innerStartPos = this.start, innerStartLoc = this.startLoc, exprList = [], first = !0, lastIsComma = !1, refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
+ for (this.yieldPos = 0, this.awaitPos = 0; this.type !== types$12.parenR; )
+ if (first ? first = !1 : this.expect(types$12.comma), allowTrailingComma && this.afterTrailingComma(types$12.parenR, !0)) {
+ lastIsComma = !0;
+ break;
+ } else if (this.type === types$12.ellipsis) {
+ spreadStart = this.start, exprList.push(this.parseParenItem(this.parseRestBinding())), this.type === types$12.comma && this.raiseRecoverable(
+ this.start,
+ "Comma is not permitted after the rest element"
+ );
+ break;
+ } else
+ exprList.push(this.parseMaybeAssign(!1, refDestructuringErrors, this.parseParenItem));
+ var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
+ if (this.expect(types$12.parenR), canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$12.arrow))
+ return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.parseParenArrowList(startPos, startLoc, exprList, forInit);
+ (!exprList.length || lastIsComma) && this.unexpected(this.lastTokStart), spreadStart && this.unexpected(spreadStart), this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, exprList.length > 1 ? (val = this.startNodeAt(innerStartPos, innerStartLoc), val.expressions = exprList, this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)) : val = exprList[0];
+ } else
+ val = this.parseParenExpression();
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(startPos, startLoc);
+ return par.expression = val, this.finishNode(par, "ParenthesizedExpression");
+ } else
+ return val;
+ }, pp$52.parseParenItem = function(item) {
+ return item;
+ }, pp$52.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !1, forInit);
+ };
+ var empty4 = [];
+ pp$52.parseNew = function() {
+ this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
+ var node2 = this.startNode();
+ if (this.next(), this.options.ecmaVersion >= 6 && this.type === types$12.dot) {
+ var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
+ meta.name = "new", node2.meta = this.finishNode(meta, "Identifier"), this.next();
+ var containsEsc = this.containsEsc;
+ return node2.property = this.parseIdent(!0), node2.property.name !== "target" && this.raiseRecoverable(node2.property.start, "The only valid meta property for new is 'new.target'"), containsEsc && this.raiseRecoverable(node2.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(node2.start, "'new.target' can only be used in functions and class static block"), this.finishNode(node2, "MetaProperty");
+ }
+ var startPos = this.start, startLoc = this.startLoc;
+ return node2.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), startPos, startLoc, !0, !1), this.eat(types$12.parenL) ? node2.arguments = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, !1) : node2.arguments = empty4, this.finishNode(node2, "NewExpression");
+ }, pp$52.parseTemplateElement = function(ref3) {
+ var isTagged = ref3.isTagged, elem = this.startNode();
+ return this.type === types$12.invalidTemplate ? (isTagged || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), elem.value = {
+ raw: this.value.replace(/\r\n?/g, `
+`),
+ cooked: null
+ }) : elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, `
+`),
+ cooked: this.value
+ }, this.next(), elem.tail = this.type === types$12.backQuote, this.finishNode(elem, "TemplateElement");
+ }, pp$52.parseTemplate = function(ref3) {
+ ref3 === void 0 && (ref3 = {});
+ var isTagged = ref3.isTagged;
+ isTagged === void 0 && (isTagged = !1);
+ var node2 = this.startNode();
+ this.next(), node2.expressions = [];
+ var curElt = this.parseTemplateElement({ isTagged });
+ for (node2.quasis = [curElt]; !curElt.tail; )
+ this.type === types$12.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(types$12.dollarBraceL), node2.expressions.push(this.parseExpression()), this.expect(types$12.braceR), node2.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
+ return this.next(), this.finishNode(node2, "TemplateLiteral");
+ }, pp$52.isAsyncProp = function(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$12.name || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$12.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
+ }, pp$52.parseObj = function(isPattern, refDestructuringErrors) {
+ var node2 = this.startNode(), first = !0, propHash = {};
+ for (node2.properties = [], this.next(); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$12.braceR))
+ break;
+ var prop = this.parseProperty(isPattern, refDestructuringErrors);
+ isPattern || this.checkPropClash(prop, propHash, refDestructuringErrors), node2.properties.push(prop);
+ }
+ return this.finishNode(node2, isPattern ? "ObjectPattern" : "ObjectExpression");
+ }, pp$52.parseProperty = function(isPattern, refDestructuringErrors) {
+ var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
+ if (this.options.ecmaVersion >= 9 && this.eat(types$12.ellipsis))
+ return isPattern ? (prop.argument = this.parseIdent(!1), this.type === types$12.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(prop, "RestElement")) : (prop.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.type === types$12.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start), this.finishNode(prop, "SpreadElement"));
+ this.options.ecmaVersion >= 6 && (prop.method = !1, prop.shorthand = !1, (isPattern || refDestructuringErrors) && (startPos = this.start, startLoc = this.startLoc), isPattern || (isGenerator = this.eat(types$12.star)));
+ var containsEsc = this.containsEsc;
+ return this.parsePropertyName(prop), !isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop) ? (isAsync = !0, isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$12.star), this.parsePropertyName(prop)) : isAsync = !1, this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc), this.finishNode(prop, "Property");
+ }, pp$52.parseGetterSetter = function(prop) {
+ var kind = prop.key.name;
+ this.parsePropertyName(prop), prop.value = this.parseMethod(!1), prop.kind = kind;
+ var paramCount = prop.kind === "get" ? 0 : 1;
+ if (prop.value.params.length !== paramCount) {
+ var start2 = prop.value.start;
+ prop.kind === "get" ? this.raiseRecoverable(start2, "getter should have no params") : this.raiseRecoverable(start2, "setter should have exactly one param");
+ } else
+ prop.kind === "set" && prop.value.params[0].type === "RestElement" && this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
+ }, pp$52.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
+ (isGenerator || isAsync) && this.type === types$12.colon && this.unexpected(), this.eat(types$12.colon) ? (prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, refDestructuringErrors), prop.kind = "init") : this.options.ecmaVersion >= 6 && this.type === types$12.parenL ? (isPattern && this.unexpected(), prop.method = !0, prop.value = this.parseMethod(isGenerator, isAsync), prop.kind = "init") : !isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types$12.comma && this.type !== types$12.braceR && this.type !== types$12.eq ? ((isGenerator || isAsync) && this.unexpected(), this.parseGetterSetter(prop)) : this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier" ? ((isGenerator || isAsync) && this.unexpected(), this.checkUnreserved(prop.key), prop.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = startPos), isPattern ? prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)) : this.type === types$12.eq && refDestructuringErrors ? (refDestructuringErrors.shorthandAssign < 0 && (refDestructuringErrors.shorthandAssign = this.start), prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))) : prop.value = this.copyNode(prop.key), prop.kind = "init", prop.shorthand = !0) : this.unexpected();
+ }, pp$52.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(types$12.bracketL))
+ return prop.computed = !0, prop.key = this.parseMaybeAssign(), this.expect(types$12.bracketR), prop.key;
+ prop.computed = !1;
+ }
+ return prop.key = this.type === types$12.num || this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
+ }, pp$52.initFunction = function(node2) {
+ node2.id = null, this.options.ecmaVersion >= 6 && (node2.generator = node2.expression = !1), this.options.ecmaVersion >= 8 && (node2.async = !1);
+ }, pp$52.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
+ var node2 = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.initFunction(node2), this.options.ecmaVersion >= 6 && (node2.generator = isGenerator), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags2(isAsync, node2.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0)), this.expect(types$12.parenL), node2.params = this.parseBindingList(types$12.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(node2, !1, !0, !1), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, "FunctionExpression");
+ }, pp$52.parseArrowExpression = function(node2, params, isAsync, forInit) {
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.enterScope(functionFlags2(isAsync, !1) | SCOPE_ARROW2), this.initFunction(node2), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, node2.params = this.toAssignableList(params, !0), this.parseFunctionBody(node2, !0, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, "ArrowFunctionExpression");
+ }, pp$52.parseFunctionBody = function(node2, isArrowFunction, isMethod, forInit) {
+ var isExpression = isArrowFunction && this.type !== types$12.braceL, oldStrict = this.strict, useStrict = !1;
+ if (isExpression)
+ node2.body = this.parseMaybeAssign(forInit), node2.expression = !0, this.checkParams(node2, !1);
+ else {
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node2.params);
+ (!oldStrict || nonSimple) && (useStrict = this.strictDirective(this.end), useStrict && nonSimple && this.raiseRecoverable(node2.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
+ var oldLabels = this.labels;
+ this.labels = [], useStrict && (this.strict = !0), this.checkParams(node2, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node2.params)), this.strict && node2.id && this.checkLValSimple(node2.id, BIND_OUTSIDE2), node2.body = this.parseBlock(!1, void 0, useStrict && !oldStrict), node2.expression = !1, this.adaptDirectivePrologue(node2.body.body), this.labels = oldLabels;
+ }
+ this.exitScope();
+ }, pp$52.isSimpleParamList = function(params) {
+ for (var i2 = 0, list4 = params; i2 < list4.length; i2 += 1) {
+ var param = list4[i2];
+ if (param.type !== "Identifier")
+ return !1;
+ }
+ return !0;
+ }, pp$52.checkParams = function(node2, allowDuplicates) {
+ for (var nameHash = /* @__PURE__ */ Object.create(null), i2 = 0, list4 = node2.params; i2 < list4.length; i2 += 1) {
+ var param = list4[i2];
+ this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash);
+ }
+ }, pp$52.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ for (var elts = [], first = !0; !this.eat(close); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), allowTrailingComma && this.afterTrailingComma(close))
+ break;
+ var elt = void 0;
+ allowEmpty && this.type === types$12.comma ? elt = null : this.type === types$12.ellipsis ? (elt = this.parseSpread(refDestructuringErrors), refDestructuringErrors && this.type === types$12.comma && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start)) : elt = this.parseMaybeAssign(!1, refDestructuringErrors), elts.push(elt);
+ }
+ return elts;
+ }, pp$52.checkUnreserved = function(ref3) {
+ var start2 = ref3.start, end = ref3.end, name2 = ref3.name;
+ if (this.inGenerator && name2 === "yield" && this.raiseRecoverable(start2, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && name2 === "await" && this.raiseRecoverable(start2, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & SCOPE_VAR2) && name2 === "arguments" && this.raiseRecoverable(start2, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (name2 === "arguments" || name2 === "await") && this.raise(start2, "Cannot use " + name2 + " in class static initialization block"), this.keywords.test(name2) && this.raise(start2, "Unexpected keyword '" + name2 + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(start2, end).indexOf("\\") !== -1)) {
+ var re2 = this.strict ? this.reservedWordsStrict : this.reservedWords;
+ re2.test(name2) && (!this.inAsync && name2 === "await" && this.raiseRecoverable(start2, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(start2, "The keyword '" + name2 + "' is reserved"));
+ }
+ }, pp$52.parseIdent = function(liberal) {
+ var node2 = this.parseIdentNode();
+ return this.next(!!liberal), this.finishNode(node2, "Identifier"), liberal || (this.checkUnreserved(node2), node2.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = node2.start)), node2;
+ }, pp$52.parseIdentNode = function() {
+ var node2 = this.startNode();
+ return this.type === types$12.name ? node2.name = this.value : this.type.keyword ? (node2.name = this.type.keyword, (node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = types$12.name) : this.unexpected(), node2;
+ }, pp$52.parsePrivateIdent = function() {
+ var node2 = this.startNode();
+ return this.type === types$12.privateId ? node2.name = this.value : this.unexpected(), this.next(), this.finishNode(node2, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(node2.start, "Private field '#" + node2.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(node2)), node2;
+ }, pp$52.parseYield = function(forInit) {
+ this.yieldPos || (this.yieldPos = this.start);
+ var node2 = this.startNode();
+ return this.next(), this.type === types$12.semi || this.canInsertSemicolon() || this.type !== types$12.star && !this.type.startsExpr ? (node2.delegate = !1, node2.argument = null) : (node2.delegate = this.eat(types$12.star), node2.argument = this.parseMaybeAssign(forInit)), this.finishNode(node2, "YieldExpression");
+ }, pp$52.parseAwait = function(forInit) {
+ this.awaitPos || (this.awaitPos = this.start);
+ var node2 = this.startNode();
+ return this.next(), node2.argument = this.parseMaybeUnary(null, !0, !1, forInit), this.finishNode(node2, "AwaitExpression");
+ };
+ var pp$42 = Parser3.prototype;
+ pp$42.raise = function(pos, message) {
+ var loc = getLineInfo2(this.input, pos);
+ message += " (" + loc.line + ":" + loc.column + ")", this.sourceFile && (message += " in " + this.sourceFile);
+ var err = new SyntaxError(message);
+ throw err.pos = pos, err.loc = loc, err.raisedAt = this.pos, err;
+ }, pp$42.raiseRecoverable = pp$42.raise, pp$42.curPosition = function() {
+ if (this.options.locations)
+ return new Position3(this.curLine, this.pos - this.lineStart);
+ };
+ var pp$32 = Parser3.prototype, Scope3 = function(flags) {
+ this.flags = flags, this.var = [], this.lexical = [], this.functions = [];
+ };
+ pp$32.enterScope = function(flags) {
+ this.scopeStack.push(new Scope3(flags));
+ }, pp$32.exitScope = function() {
+ this.scopeStack.pop();
+ }, pp$32.treatFunctionsAsVarInScope = function(scope) {
+ return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2;
+ }, pp$32.declareName = function(name2, bindingType, pos) {
+ var redeclared = !1;
+ if (bindingType === BIND_LEXICAL2) {
+ var scope = this.currentScope();
+ redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1, scope.lexical.push(name2), this.inModule && scope.flags & SCOPE_TOP2 && delete this.undefinedExports[name2];
+ } else if (bindingType === BIND_SIMPLE_CATCH2) {
+ var scope$1 = this.currentScope();
+ scope$1.lexical.push(name2);
+ } else if (bindingType === BIND_FUNCTION2) {
+ var scope$2 = this.currentScope();
+ this.treatFunctionsAsVar ? redeclared = scope$2.lexical.indexOf(name2) > -1 : redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1, scope$2.functions.push(name2);
+ } else
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
+ var scope$3 = this.scopeStack[i2];
+ if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
+ redeclared = !0;
+ break;
+ }
+ if (scope$3.var.push(name2), this.inModule && scope$3.flags & SCOPE_TOP2 && delete this.undefinedExports[name2], scope$3.flags & SCOPE_VAR2)
+ break;
+ }
+ redeclared && this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
+ }, pp$32.checkLocalExport = function(id) {
+ this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && (this.undefinedExports[id.name] = id);
+ }, pp$32.currentScope = function() {
+ return this.scopeStack[this.scopeStack.length - 1];
+ }, pp$32.currentVarScope = function() {
+ for (var i2 = this.scopeStack.length - 1; ; i2--) {
+ var scope = this.scopeStack[i2];
+ if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2))
+ return scope;
+ }
+ }, pp$32.currentThisScope = function() {
+ for (var i2 = this.scopeStack.length - 1; ; i2--) {
+ var scope = this.scopeStack[i2];
+ if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2) && !(scope.flags & SCOPE_ARROW2))
+ return scope;
+ }
+ };
+ var Node3 = function(parser, pos, loc) {
+ this.type = "", this.start = pos, this.end = 0, parser.options.locations && (this.loc = new SourceLocation3(parser, loc)), parser.options.directSourceFile && (this.sourceFile = parser.options.directSourceFile), parser.options.ranges && (this.range = [pos, 0]);
+ }, pp$22 = Parser3.prototype;
+ pp$22.startNode = function() {
+ return new Node3(this, this.start, this.startLoc);
+ }, pp$22.startNodeAt = function(pos, loc) {
+ return new Node3(this, pos, loc);
+ };
+ function finishNodeAt2(node2, type, pos, loc) {
+ return node2.type = type, node2.end = pos, this.options.locations && (node2.loc.end = loc), this.options.ranges && (node2.range[1] = pos), node2;
+ }
+ pp$22.finishNode = function(node2, type) {
+ return finishNodeAt2.call(this, node2, type, this.lastTokEnd, this.lastTokEndLoc);
+ }, pp$22.finishNodeAt = function(node2, type, pos, loc) {
+ return finishNodeAt2.call(this, node2, type, pos, loc);
+ }, pp$22.copyNode = function(node2) {
+ var newNode = new Node3(this, node2.start, this.startLoc);
+ for (var prop in node2)
+ newNode[prop] = node2[prop];
+ return newNode;
+ };
+ var scriptValuesAddedInUnicode2 = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic", ecma11BinaryProperties2 = ecma10BinaryProperties2, ecma12BinaryProperties2 = ecma11BinaryProperties2 + " EBase EComp EMod EPres ExtPict", ecma13BinaryProperties2 = ecma12BinaryProperties2, ecma14BinaryProperties2 = ecma13BinaryProperties2, unicodeBinaryProperties2 = {
+ 9: ecma9BinaryProperties2,
+ 10: ecma10BinaryProperties2,
+ 11: ecma11BinaryProperties2,
+ 12: ecma12BinaryProperties2,
+ 13: ecma13BinaryProperties2,
+ 14: ecma14BinaryProperties2
+ }, ecma14BinaryPropertiesOfStrings2 = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", unicodeBinaryPropertiesOfStrings2 = {
+ 9: "",
+ 10: "",
+ 11: "",
+ 12: "",
+ 13: "",
+ 14: ecma14BinaryPropertiesOfStrings2
+ }, unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ecma9ScriptValues2 = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ecma12ScriptValues2 = ecma11ScriptValues2 + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ecma13ScriptValues2 = ecma12ScriptValues2 + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", ecma14ScriptValues2 = ecma13ScriptValues2 + " " + scriptValuesAddedInUnicode2, unicodeScriptValues2 = {
+ 9: ecma9ScriptValues2,
+ 10: ecma10ScriptValues2,
+ 11: ecma11ScriptValues2,
+ 12: ecma12ScriptValues2,
+ 13: ecma13ScriptValues2,
+ 14: ecma14ScriptValues2
+ }, data2 = {};
+ function buildUnicodeData2(ecmaVersion2) {
+ var d = data2[ecmaVersion2] = {
+ binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion2] + " " + unicodeGeneralCategoryValues2),
+ binaryOfStrings: wordsRegexp2(unicodeBinaryPropertiesOfStrings2[ecmaVersion2]),
+ nonBinary: {
+ General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
+ Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion2])
+ }
+ };
+ d.nonBinary.Script_Extensions = d.nonBinary.Script, d.nonBinary.gc = d.nonBinary.General_Category, d.nonBinary.sc = d.nonBinary.Script, d.nonBinary.scx = d.nonBinary.Script_Extensions;
+ }
+ for (var i = 0, list3 = [9, 10, 11, 12, 13, 14]; i < list3.length; i += 1) {
+ var ecmaVersion = list3[i];
+ buildUnicodeData2(ecmaVersion);
+ }
+ var pp$12 = Parser3.prototype, BranchID3 = function(parent, base) {
+ this.parent = parent, this.base = base || this;
+ };
+ BranchID3.prototype.separatedFrom = function(alt) {
+ for (var self2 = this; self2; self2 = self2.parent)
+ for (var other = alt; other; other = other.parent)
+ if (self2.base === other.base && self2 !== other)
+ return !0;
+ return !1;
+ }, BranchID3.prototype.sibling = function() {
+ return new BranchID3(this.parent, this.base);
+ };
+ var RegExpValidationState3 = function(parser) {
+ this.parser = parser, this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = data2[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
+ };
+ RegExpValidationState3.prototype.reset = function(start2, pattern, flags) {
+ var unicodeSets = flags.indexOf("v") !== -1, unicode = flags.indexOf("u") !== -1;
+ this.start = start2 | 0, this.source = pattern + "", this.flags = flags, unicodeSets && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = unicode && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = unicode && this.parser.options.ecmaVersion >= 9);
+ }, RegExpValidationState3.prototype.raise = function(message) {
+ this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
+ }, RegExpValidationState3.prototype.at = function(i2, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var s = this.source, l = s.length;
+ if (i2 >= l)
+ return -1;
+ var c = s.charCodeAt(i2);
+ if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l)
+ return c;
+ var next = s.charCodeAt(i2 + 1);
+ return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
+ }, RegExpValidationState3.prototype.nextIndex = function(i2, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var s = this.source, l = s.length;
+ if (i2 >= l)
+ return l;
+ var c = s.charCodeAt(i2), next;
+ return !(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343 ? i2 + 1 : i2 + 2;
+ }, RegExpValidationState3.prototype.current = function(forceU) {
+ return forceU === void 0 && (forceU = !1), this.at(this.pos, forceU);
+ }, RegExpValidationState3.prototype.lookahead = function(forceU) {
+ return forceU === void 0 && (forceU = !1), this.at(this.nextIndex(this.pos, forceU), forceU);
+ }, RegExpValidationState3.prototype.advance = function(forceU) {
+ forceU === void 0 && (forceU = !1), this.pos = this.nextIndex(this.pos, forceU);
+ }, RegExpValidationState3.prototype.eat = function(ch, forceU) {
+ return forceU === void 0 && (forceU = !1), this.current(forceU) === ch ? (this.advance(forceU), !0) : !1;
+ }, RegExpValidationState3.prototype.eatChars = function(chs, forceU) {
+ forceU === void 0 && (forceU = !1);
+ for (var pos = this.pos, i2 = 0, list4 = chs; i2 < list4.length; i2 += 1) {
+ var ch = list4[i2], current2 = this.at(pos, forceU);
+ if (current2 === -1 || current2 !== ch)
+ return !1;
+ pos = this.nextIndex(pos, forceU);
+ }
+ return this.pos = pos, !0;
+ }, pp$12.validateRegExpFlags = function(state) {
+ for (var validFlags = state.validFlags, flags = state.flags, u = !1, v = !1, i2 = 0; i2 < flags.length; i2++) {
+ var flag = flags.charAt(i2);
+ validFlags.indexOf(flag) === -1 && this.raise(state.start, "Invalid regular expression flag"), flags.indexOf(flag, i2 + 1) > -1 && this.raise(state.start, "Duplicate regular expression flag"), flag === "u" && (u = !0), flag === "v" && (v = !0);
+ }
+ this.options.ecmaVersion >= 15 && u && v && this.raise(state.start, "Invalid regular expression flag");
+ };
+ function hasProp2(obj) {
+ for (var _ in obj)
+ return !0;
+ return !1;
+ }
+ pp$12.validateRegExpPattern = function(state) {
+ this.regexp_pattern(state), !state.switchN && this.options.ecmaVersion >= 9 && hasProp2(state.groupNames) && (state.switchN = !0, this.regexp_pattern(state));
+ }, pp$12.regexp_pattern = function(state) {
+ state.pos = 0, state.lastIntValue = 0, state.lastStringValue = "", state.lastAssertionIsQuantifiable = !1, state.numCapturingParens = 0, state.maxBackReference = 0, state.groupNames = /* @__PURE__ */ Object.create(null), state.backReferenceNames.length = 0, state.branchID = null, this.regexp_disjunction(state), state.pos !== state.source.length && (state.eat(
+ 41
+ /* ) */
+ ) && state.raise("Unmatched ')'"), (state.eat(
+ 93
+ /* ] */
+ ) || state.eat(
+ 125
+ /* } */
+ )) && state.raise("Lone quantifier brackets")), state.maxBackReference > state.numCapturingParens && state.raise("Invalid escape");
+ for (var i2 = 0, list4 = state.backReferenceNames; i2 < list4.length; i2 += 1) {
+ var name2 = list4[i2];
+ state.groupNames[name2] || state.raise("Invalid named capture referenced");
+ }
+ }, pp$12.regexp_disjunction = function(state) {
+ var trackDisjunction = this.options.ecmaVersion >= 16;
+ for (trackDisjunction && (state.branchID = new BranchID3(state.branchID, null)), this.regexp_alternative(state); state.eat(
+ 124
+ /* | */
+ ); )
+ trackDisjunction && (state.branchID = state.branchID.sibling()), this.regexp_alternative(state);
+ trackDisjunction && (state.branchID = state.branchID.parent), this.regexp_eatQuantifier(state, !0) && state.raise("Nothing to repeat"), state.eat(
+ 123
+ /* { */
+ ) && state.raise("Lone quantifier brackets");
+ }, pp$12.regexp_alternative = function(state) {
+ for (; state.pos < state.source.length && this.regexp_eatTerm(state); )
+ ;
+ }, pp$12.regexp_eatTerm = function(state) {
+ return this.regexp_eatAssertion(state) ? (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state) && state.switchU && state.raise("Invalid quantifier"), !0) : (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) ? (this.regexp_eatQuantifier(state), !0) : !1;
+ }, pp$12.regexp_eatAssertion = function(state) {
+ var start2 = state.pos;
+ if (state.lastAssertionIsQuantifiable = !1, state.eat(
+ 94
+ /* ^ */
+ ) || state.eat(
+ 36
+ /* $ */
+ ))
+ return !0;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (state.eat(
+ 66
+ /* B */
+ ) || state.eat(
+ 98
+ /* b */
+ ))
+ return !0;
+ state.pos = start2;
+ }
+ if (state.eat(
+ 40
+ /* ( */
+ ) && state.eat(
+ 63
+ /* ? */
+ )) {
+ var lookbehind = !1;
+ if (this.options.ecmaVersion >= 9 && (lookbehind = state.eat(
+ 60
+ /* < */
+ )), state.eat(
+ 61
+ /* = */
+ ) || state.eat(
+ 33
+ /* ! */
+ ))
+ return this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ) || state.raise("Unterminated group"), state.lastAssertionIsQuantifiable = !lookbehind, !0;
+ }
+ return state.pos = start2, !1;
+ }, pp$12.regexp_eatQuantifier = function(state, noError) {
+ return noError === void 0 && (noError = !1), this.regexp_eatQuantifierPrefix(state, noError) ? (state.eat(
+ 63
+ /* ? */
+ ), !0) : !1;
+ }, pp$12.regexp_eatQuantifierPrefix = function(state, noError) {
+ return state.eat(
+ 42
+ /* * */
+ ) || state.eat(
+ 43
+ /* + */
+ ) || state.eat(
+ 63
+ /* ? */
+ ) || this.regexp_eatBracedQuantifier(state, noError);
+ }, pp$12.regexp_eatBracedQuantifier = function(state, noError) {
+ var start2 = state.pos;
+ if (state.eat(
+ 123
+ /* { */
+ )) {
+ var min = 0, max = -1;
+ if (this.regexp_eatDecimalDigits(state) && (min = state.lastIntValue, state.eat(
+ 44
+ /* , */
+ ) && this.regexp_eatDecimalDigits(state) && (max = state.lastIntValue), state.eat(
+ 125
+ /* } */
+ )))
+ return max !== -1 && max < min && !noError && state.raise("numbers out of order in {} quantifier"), !0;
+ state.switchU && !noError && state.raise("Incomplete quantifier"), state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatAtom = function(state) {
+ return this.regexp_eatPatternCharacters(state) || state.eat(
+ 46
+ /* . */
+ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
+ }, pp$12.regexp_eatReverseSolidusAtomEscape = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (this.regexp_eatAtomEscape(state))
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatUncapturingGroup = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 40
+ /* ( */
+ )) {
+ if (state.eat(
+ 63
+ /* ? */
+ )) {
+ if (this.options.ecmaVersion >= 16) {
+ var addModifiers = this.regexp_eatModifiers(state), hasHyphen = state.eat(
+ 45
+ /* - */
+ );
+ if (addModifiers || hasHyphen) {
+ for (var i2 = 0; i2 < addModifiers.length; i2++) {
+ var modifier = addModifiers.charAt(i2);
+ addModifiers.indexOf(modifier, i2 + 1) > -1 && state.raise("Duplicate regular expression modifiers");
+ }
+ if (hasHyphen) {
+ var removeModifiers = this.regexp_eatModifiers(state);
+ !addModifiers && !removeModifiers && state.current() === 58 && state.raise("Invalid regular expression modifiers");
+ for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) {
+ var modifier$1 = removeModifiers.charAt(i$1);
+ (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) && state.raise("Duplicate regular expression modifiers");
+ }
+ }
+ }
+ }
+ if (state.eat(
+ 58
+ /* : */
+ )) {
+ if (this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ))
+ return !0;
+ state.raise("Unterminated group");
+ }
+ }
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatCapturingGroup = function(state) {
+ if (state.eat(
+ 40
+ /* ( */
+ )) {
+ if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(state) : state.current() === 63 && state.raise("Invalid group"), this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ))
+ return state.numCapturingParens += 1, !0;
+ state.raise("Unterminated group");
+ }
+ return !1;
+ }, pp$12.regexp_eatModifiers = function(state) {
+ for (var modifiers = "", ch = 0; (ch = state.current()) !== -1 && isRegularExpressionModifier2(ch); )
+ modifiers += codePointToString2(ch), state.advance();
+ return modifiers;
+ };
+ function isRegularExpressionModifier2(ch) {
+ return ch === 105 || ch === 109 || ch === 115;
+ }
+ pp$12.regexp_eatExtendedAtom = function(state) {
+ return state.eat(
+ 46
+ /* . */
+ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
+ }, pp$12.regexp_eatInvalidBracedQuantifier = function(state) {
+ return this.regexp_eatBracedQuantifier(state, !0) && state.raise("Nothing to repeat"), !1;
+ }, pp$12.regexp_eatSyntaxCharacter = function(state) {
+ var ch = state.current();
+ return isSyntaxCharacter2(ch) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ };
+ function isSyntaxCharacter2(ch) {
+ return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
+ }
+ pp$12.regexp_eatPatternCharacters = function(state) {
+ for (var start2 = state.pos, ch = 0; (ch = state.current()) !== -1 && !isSyntaxCharacter2(ch); )
+ state.advance();
+ return state.pos !== start2;
+ }, pp$12.regexp_eatExtendedPatternCharacter = function(state) {
+ var ch = state.current();
+ return ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124 ? (state.advance(), !0) : !1;
+ }, pp$12.regexp_groupSpecifier = function(state) {
+ if (state.eat(
+ 63
+ /* ? */
+ )) {
+ this.regexp_eatGroupName(state) || state.raise("Invalid group");
+ var trackDisjunction = this.options.ecmaVersion >= 16, known = state.groupNames[state.lastStringValue];
+ if (known)
+ if (trackDisjunction)
+ for (var i2 = 0, list4 = known; i2 < list4.length; i2 += 1) {
+ var altID = list4[i2];
+ altID.separatedFrom(state.branchID) || state.raise("Duplicate capture group name");
+ }
+ else
+ state.raise("Duplicate capture group name");
+ trackDisjunction ? (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID) : state.groupNames[state.lastStringValue] = !0;
+ }
+ }, pp$12.regexp_eatGroupName = function(state) {
+ if (state.lastStringValue = "", state.eat(
+ 60
+ /* < */
+ )) {
+ if (this.regexp_eatRegExpIdentifierName(state) && state.eat(
+ 62
+ /* > */
+ ))
+ return !0;
+ state.raise("Invalid capture group name");
+ }
+ return !1;
+ }, pp$12.regexp_eatRegExpIdentifierName = function(state) {
+ if (state.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(state)) {
+ for (state.lastStringValue += codePointToString2(state.lastIntValue); this.regexp_eatRegExpIdentifierPart(state); )
+ state.lastStringValue += codePointToString2(state.lastIntValue);
+ return !0;
+ }
+ return !1;
+ }, pp$12.regexp_eatRegExpIdentifierStart = function(state) {
+ var start2 = state.pos, forceU = this.options.ecmaVersion >= 11, ch = state.current(forceU);
+ return state.advance(forceU), ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch = state.lastIntValue), isRegExpIdentifierStart2(ch) ? (state.lastIntValue = ch, !0) : (state.pos = start2, !1);
+ };
+ function isRegExpIdentifierStart2(ch) {
+ return isIdentifierStart2(ch, !0) || ch === 36 || ch === 95;
+ }
+ pp$12.regexp_eatRegExpIdentifierPart = function(state) {
+ var start2 = state.pos, forceU = this.options.ecmaVersion >= 11, ch = state.current(forceU);
+ return state.advance(forceU), ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch = state.lastIntValue), isRegExpIdentifierPart2(ch) ? (state.lastIntValue = ch, !0) : (state.pos = start2, !1);
+ };
+ function isRegExpIdentifierPart2(ch) {
+ return isIdentifierChar2(ch, !0) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
+ }
+ pp$12.regexp_eatAtomEscape = function(state) {
+ return this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state) ? !0 : (state.switchU && (state.current() === 99 && state.raise("Invalid unicode escape"), state.raise("Invalid escape")), !1);
+ }, pp$12.regexp_eatBackReference = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatDecimalEscape(state)) {
+ var n = state.lastIntValue;
+ if (state.switchU)
+ return n > state.maxBackReference && (state.maxBackReference = n), !0;
+ if (n <= state.numCapturingParens)
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatKGroupName = function(state) {
+ if (state.eat(
+ 107
+ /* k */
+ )) {
+ if (this.regexp_eatGroupName(state))
+ return state.backReferenceNames.push(state.lastStringValue), !0;
+ state.raise("Invalid named reference");
+ }
+ return !1;
+ }, pp$12.regexp_eatCharacterEscape = function(state) {
+ return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, !1) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
+ }, pp$12.regexp_eatCControlLetter = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 99
+ /* c */
+ )) {
+ if (this.regexp_eatControlLetter(state))
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatZero = function(state) {
+ return state.current() === 48 && !isDecimalDigit2(state.lookahead()) ? (state.lastIntValue = 0, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatControlEscape = function(state) {
+ var ch = state.current();
+ return ch === 116 ? (state.lastIntValue = 9, state.advance(), !0) : ch === 110 ? (state.lastIntValue = 10, state.advance(), !0) : ch === 118 ? (state.lastIntValue = 11, state.advance(), !0) : ch === 102 ? (state.lastIntValue = 12, state.advance(), !0) : ch === 114 ? (state.lastIntValue = 13, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatControlLetter = function(state) {
+ var ch = state.current();
+ return isControlLetter2(ch) ? (state.lastIntValue = ch % 32, state.advance(), !0) : !1;
+ };
+ function isControlLetter2(ch) {
+ return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
+ }
+ pp$12.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var start2 = state.pos, switchU = forceU || state.switchU;
+ if (state.eat(
+ 117
+ /* u */
+ )) {
+ if (this.regexp_eatFixedHexDigits(state, 4)) {
+ var lead = state.lastIntValue;
+ if (switchU && lead >= 55296 && lead <= 56319) {
+ var leadSurrogateEnd = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ ) && state.eat(
+ 117
+ /* u */
+ ) && this.regexp_eatFixedHexDigits(state, 4)) {
+ var trail = state.lastIntValue;
+ if (trail >= 56320 && trail <= 57343)
+ return state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536, !0;
+ }
+ state.pos = leadSurrogateEnd, state.lastIntValue = lead;
+ }
+ return !0;
+ }
+ if (switchU && state.eat(
+ 123
+ /* { */
+ ) && this.regexp_eatHexDigits(state) && state.eat(
+ 125
+ /* } */
+ ) && isValidUnicode2(state.lastIntValue))
+ return !0;
+ switchU && state.raise("Invalid unicode escape"), state.pos = start2;
+ }
+ return !1;
+ };
+ function isValidUnicode2(ch) {
+ return ch >= 0 && ch <= 1114111;
+ }
+ pp$12.regexp_eatIdentityEscape = function(state) {
+ if (state.switchU)
+ return this.regexp_eatSyntaxCharacter(state) ? !0 : state.eat(
+ 47
+ /* / */
+ ) ? (state.lastIntValue = 47, !0) : !1;
+ var ch = state.current();
+ return ch !== 99 && (!state.switchN || ch !== 107) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatDecimalEscape = function(state) {
+ state.lastIntValue = 0;
+ var ch = state.current();
+ if (ch >= 49 && ch <= 57) {
+ do
+ state.lastIntValue = 10 * state.lastIntValue + (ch - 48), state.advance();
+ while ((ch = state.current()) >= 48 && ch <= 57);
+ return !0;
+ }
+ return !1;
+ };
+ var CharSetNone2 = 0, CharSetOk2 = 1, CharSetString2 = 2;
+ pp$12.regexp_eatCharacterClassEscape = function(state) {
+ var ch = state.current();
+ if (isCharacterClassEscape2(ch))
+ return state.lastIntValue = -1, state.advance(), CharSetOk2;
+ var negate = !1;
+ if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 80) || ch === 112)) {
+ state.lastIntValue = -1, state.advance();
+ var result;
+ if (state.eat(
+ 123
+ /* { */
+ ) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat(
+ 125
+ /* } */
+ ))
+ return negate && result === CharSetString2 && state.raise("Invalid property name"), result;
+ state.raise("Invalid property name");
+ }
+ return CharSetNone2;
+ };
+ function isCharacterClassEscape2(ch) {
+ return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
+ }
+ pp$12.regexp_eatUnicodePropertyValueExpression = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatUnicodePropertyName(state) && state.eat(
+ 61
+ /* = */
+ )) {
+ var name2 = state.lastStringValue;
+ if (this.regexp_eatUnicodePropertyValue(state)) {
+ var value = state.lastStringValue;
+ return this.regexp_validateUnicodePropertyNameAndValue(state, name2, value), CharSetOk2;
+ }
+ }
+ if (state.pos = start2, this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
+ var nameOrValue = state.lastStringValue;
+ return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
+ }
+ return CharSetNone2;
+ }, pp$12.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
+ hasOwn2(state.unicodeProperties.nonBinary, name2) || state.raise("Invalid property name"), state.unicodeProperties.nonBinary[name2].test(value) || state.raise("Invalid property value");
+ }, pp$12.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
+ if (state.unicodeProperties.binary.test(nameOrValue))
+ return CharSetOk2;
+ if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue))
+ return CharSetString2;
+ state.raise("Invalid property name");
+ }, pp$12.regexp_eatUnicodePropertyName = function(state) {
+ var ch = 0;
+ for (state.lastStringValue = ""; isUnicodePropertyNameCharacter2(ch = state.current()); )
+ state.lastStringValue += codePointToString2(ch), state.advance();
+ return state.lastStringValue !== "";
+ };
+ function isUnicodePropertyNameCharacter2(ch) {
+ return isControlLetter2(ch) || ch === 95;
+ }
+ pp$12.regexp_eatUnicodePropertyValue = function(state) {
+ var ch = 0;
+ for (state.lastStringValue = ""; isUnicodePropertyValueCharacter2(ch = state.current()); )
+ state.lastStringValue += codePointToString2(ch), state.advance();
+ return state.lastStringValue !== "";
+ };
+ function isUnicodePropertyValueCharacter2(ch) {
+ return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch);
+ }
+ pp$12.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
+ return this.regexp_eatUnicodePropertyValue(state);
+ }, pp$12.regexp_eatCharacterClass = function(state) {
+ if (state.eat(
+ 91
+ /* [ */
+ )) {
+ var negate = state.eat(
+ 94
+ /* ^ */
+ ), result = this.regexp_classContents(state);
+ return state.eat(
+ 93
+ /* ] */
+ ) || state.raise("Unterminated character class"), negate && result === CharSetString2 && state.raise("Negated character class may contain strings"), !0;
+ }
+ return !1;
+ }, pp$12.regexp_classContents = function(state) {
+ return state.current() === 93 ? CharSetOk2 : state.switchV ? this.regexp_classSetExpression(state) : (this.regexp_nonEmptyClassRanges(state), CharSetOk2);
+ }, pp$12.regexp_nonEmptyClassRanges = function(state) {
+ for (; this.regexp_eatClassAtom(state); ) {
+ var left = state.lastIntValue;
+ if (state.eat(
+ 45
+ /* - */
+ ) && this.regexp_eatClassAtom(state)) {
+ var right = state.lastIntValue;
+ state.switchU && (left === -1 || right === -1) && state.raise("Invalid character class"), left !== -1 && right !== -1 && left > right && state.raise("Range out of order in character class");
+ }
+ }
+ }, pp$12.regexp_eatClassAtom = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (this.regexp_eatClassEscape(state))
+ return !0;
+ if (state.switchU) {
+ var ch$1 = state.current();
+ (ch$1 === 99 || isOctalDigit2(ch$1)) && state.raise("Invalid class escape"), state.raise("Invalid escape");
+ }
+ state.pos = start2;
+ }
+ var ch = state.current();
+ return ch !== 93 ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatClassEscape = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 98
+ /* b */
+ ))
+ return state.lastIntValue = 8, !0;
+ if (state.switchU && state.eat(
+ 45
+ /* - */
+ ))
+ return state.lastIntValue = 45, !0;
+ if (!state.switchU && state.eat(
+ 99
+ /* c */
+ )) {
+ if (this.regexp_eatClassControlLetter(state))
+ return !0;
+ state.pos = start2;
+ }
+ return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
+ }, pp$12.regexp_classSetExpression = function(state) {
+ var result = CharSetOk2, subResult;
+ if (!this.regexp_eatClassSetRange(state)) if (subResult = this.regexp_eatClassSetOperand(state)) {
+ subResult === CharSetString2 && (result = CharSetString2);
+ for (var start2 = state.pos; state.eatChars(
+ [38, 38]
+ /* && */
+ ); ) {
+ if (state.current() !== 38 && (subResult = this.regexp_eatClassSetOperand(state))) {
+ subResult !== CharSetString2 && (result = CharSetOk2);
+ continue;
+ }
+ state.raise("Invalid character in character class");
+ }
+ if (start2 !== state.pos)
+ return result;
+ for (; state.eatChars(
+ [45, 45]
+ /* -- */
+ ); )
+ this.regexp_eatClassSetOperand(state) || state.raise("Invalid character in character class");
+ if (start2 !== state.pos)
+ return result;
+ } else
+ state.raise("Invalid character in character class");
+ for (; ; )
+ if (!this.regexp_eatClassSetRange(state)) {
+ if (subResult = this.regexp_eatClassSetOperand(state), !subResult)
+ return result;
+ subResult === CharSetString2 && (result = CharSetString2);
+ }
+ }, pp$12.regexp_eatClassSetRange = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatClassSetCharacter(state)) {
+ var left = state.lastIntValue;
+ if (state.eat(
+ 45
+ /* - */
+ ) && this.regexp_eatClassSetCharacter(state)) {
+ var right = state.lastIntValue;
+ return left !== -1 && right !== -1 && left > right && state.raise("Range out of order in character class"), !0;
+ }
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatClassSetOperand = function(state) {
+ return this.regexp_eatClassSetCharacter(state) ? CharSetOk2 : this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state);
+ }, pp$12.regexp_eatNestedClass = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 91
+ /* [ */
+ )) {
+ var negate = state.eat(
+ 94
+ /* ^ */
+ ), result = this.regexp_classContents(state);
+ if (state.eat(
+ 93
+ /* ] */
+ ))
+ return negate && result === CharSetString2 && state.raise("Negated character class may contain strings"), result;
+ state.pos = start2;
+ }
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ var result$1 = this.regexp_eatCharacterClassEscape(state);
+ if (result$1)
+ return result$1;
+ state.pos = start2;
+ }
+ return null;
+ }, pp$12.regexp_eatClassStringDisjunction = function(state) {
+ var start2 = state.pos;
+ if (state.eatChars(
+ [92, 113]
+ /* \q */
+ )) {
+ if (state.eat(
+ 123
+ /* { */
+ )) {
+ var result = this.regexp_classStringDisjunctionContents(state);
+ if (state.eat(
+ 125
+ /* } */
+ ))
+ return result;
+ } else
+ state.raise("Invalid escape");
+ state.pos = start2;
+ }
+ return null;
+ }, pp$12.regexp_classStringDisjunctionContents = function(state) {
+ for (var result = this.regexp_classString(state); state.eat(
+ 124
+ /* | */
+ ); )
+ this.regexp_classString(state) === CharSetString2 && (result = CharSetString2);
+ return result;
+ }, pp$12.regexp_classString = function(state) {
+ for (var count = 0; this.regexp_eatClassSetCharacter(state); )
+ count++;
+ return count === 1 ? CharSetOk2 : CharSetString2;
+ }, pp$12.regexp_eatClassSetCharacter = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ ))
+ return this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state) ? !0 : state.eat(
+ 98
+ /* b */
+ ) ? (state.lastIntValue = 8, !0) : (state.pos = start2, !1);
+ var ch = state.current();
+ return ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter2(ch) || isClassSetSyntaxCharacter2(ch) ? !1 : (state.advance(), state.lastIntValue = ch, !0);
+ };
+ function isClassSetReservedDoublePunctuatorCharacter2(ch) {
+ return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126;
+ }
+ function isClassSetSyntaxCharacter2(ch) {
+ return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125;
+ }
+ pp$12.regexp_eatClassSetReservedPunctuator = function(state) {
+ var ch = state.current();
+ return isClassSetReservedPunctuator2(ch) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ };
+ function isClassSetReservedPunctuator2(ch) {
+ return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126;
+ }
+ pp$12.regexp_eatClassControlLetter = function(state) {
+ var ch = state.current();
+ return isDecimalDigit2(ch) || ch === 95 ? (state.lastIntValue = ch % 32, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatHexEscapeSequence = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 120
+ /* x */
+ )) {
+ if (this.regexp_eatFixedHexDigits(state, 2))
+ return !0;
+ state.switchU && state.raise("Invalid escape"), state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatDecimalDigits = function(state) {
+ var start2 = state.pos, ch = 0;
+ for (state.lastIntValue = 0; isDecimalDigit2(ch = state.current()); )
+ state.lastIntValue = 10 * state.lastIntValue + (ch - 48), state.advance();
+ return state.pos !== start2;
+ };
+ function isDecimalDigit2(ch) {
+ return ch >= 48 && ch <= 57;
+ }
+ pp$12.regexp_eatHexDigits = function(state) {
+ var start2 = state.pos, ch = 0;
+ for (state.lastIntValue = 0; isHexDigit2(ch = state.current()); )
+ state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch), state.advance();
+ return state.pos !== start2;
+ };
+ function isHexDigit2(ch) {
+ return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
+ }
+ function hexToInt2(ch) {
+ return ch >= 65 && ch <= 70 ? 10 + (ch - 65) : ch >= 97 && ch <= 102 ? 10 + (ch - 97) : ch - 48;
+ }
+ pp$12.regexp_eatLegacyOctalEscapeSequence = function(state) {
+ if (this.regexp_eatOctalDigit(state)) {
+ var n1 = state.lastIntValue;
+ if (this.regexp_eatOctalDigit(state)) {
+ var n2 = state.lastIntValue;
+ n1 <= 3 && this.regexp_eatOctalDigit(state) ? state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue : state.lastIntValue = n1 * 8 + n2;
+ } else
+ state.lastIntValue = n1;
+ return !0;
+ }
+ return !1;
+ }, pp$12.regexp_eatOctalDigit = function(state) {
+ var ch = state.current();
+ return isOctalDigit2(ch) ? (state.lastIntValue = ch - 48, state.advance(), !0) : (state.lastIntValue = 0, !1);
+ };
+ function isOctalDigit2(ch) {
+ return ch >= 48 && ch <= 55;
+ }
+ pp$12.regexp_eatFixedHexDigits = function(state, length) {
+ var start2 = state.pos;
+ state.lastIntValue = 0;
+ for (var i2 = 0; i2 < length; ++i2) {
+ var ch = state.current();
+ if (!isHexDigit2(ch))
+ return state.pos = start2, !1;
+ state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch), state.advance();
+ }
+ return !0;
+ };
+ var Token3 = function(p) {
+ this.type = p.type, this.value = p.value, this.start = p.start, this.end = p.end, p.options.locations && (this.loc = new SourceLocation3(p, p.startLoc, p.endLoc)), p.options.ranges && (this.range = [p.start, p.end]);
+ }, pp2 = Parser3.prototype;
+ pp2.next = function(ignoreEscapeSequenceInKeyword) {
+ !ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Token3(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
+ }, pp2.getToken = function() {
+ return this.next(), new Token3(this);
+ }, typeof Symbol < "u" && (pp2[Symbol.iterator] = function() {
+ var this$1$1 = this;
+ return {
+ next: function() {
+ var token = this$1$1.getToken();
+ return {
+ done: token.type === types$12.eof,
+ value: token
+ };
+ }
+ };
+ }), pp2.nextToken = function() {
+ var curContext = this.curContext();
+ if ((!curContext || !curContext.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
+ return this.finishToken(types$12.eof);
+ if (curContext.override)
+ return curContext.override(this);
+ this.readToken(this.fullCharCodeAtPos());
+ }, pp2.readToken = function(code2) {
+ return isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92 ? this.readWord() : this.getTokenFromCode(code2);
+ }, pp2.fullCharCodeAtPos = function() {
+ var code2 = this.input.charCodeAt(this.pos);
+ if (code2 <= 55295 || code2 >= 56320)
+ return code2;
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
+ }, pp2.skipBlockComment = function() {
+ var startLoc = this.options.onComment && this.curPosition(), start2 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
+ if (end === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = end + 2, this.options.locations)
+ for (var nextBreak = void 0, pos = start2; (nextBreak = nextLineBreak2(this.input, pos, this.pos)) > -1; )
+ ++this.curLine, pos = this.lineStart = nextBreak;
+ this.options.onComment && this.options.onComment(
+ !0,
+ this.input.slice(start2 + 2, end),
+ start2,
+ this.pos,
+ startLoc,
+ this.curPosition()
+ );
+ }, pp2.skipLineComment = function(startSkip) {
+ for (var start2 = this.pos, startLoc = this.options.onComment && this.curPosition(), ch = this.input.charCodeAt(this.pos += startSkip); this.pos < this.input.length && !isNewLine2(ch); )
+ ch = this.input.charCodeAt(++this.pos);
+ this.options.onComment && this.options.onComment(
+ !1,
+ this.input.slice(start2 + startSkip, this.pos),
+ start2,
+ this.pos,
+ startLoc,
+ this.curPosition()
+ );
+ }, pp2.skipSpace = function() {
+ loop: for (; this.pos < this.input.length; ) {
+ var ch = this.input.charCodeAt(this.pos);
+ switch (ch) {
+ case 32:
+ case 160:
+ ++this.pos;
+ break;
+ case 13:
+ this.input.charCodeAt(this.pos + 1) === 10 && ++this.pos;
+ case 10:
+ case 8232:
+ case 8233:
+ ++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
+ break;
+ case 47:
+ switch (this.input.charCodeAt(this.pos + 1)) {
+ case 42:
+ this.skipBlockComment();
+ break;
+ case 47:
+ this.skipLineComment(2);
+ break;
+ default:
+ break loop;
+ }
+ break;
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch)))
+ ++this.pos;
+ else
+ break loop;
+ }
+ }
+ }, pp2.finishToken = function(type, val) {
+ this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
+ var prevType = this.type;
+ this.type = type, this.value = val, this.updateContext(prevType);
+ }, pp2.readToken_dot = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next >= 48 && next <= 57)
+ return this.readNumber(!0);
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ return this.options.ecmaVersion >= 6 && next === 46 && next2 === 46 ? (this.pos += 3, this.finishToken(types$12.ellipsis)) : (++this.pos, this.finishToken(types$12.dot));
+ }, pp2.readToken_slash = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return this.exprAllowed ? (++this.pos, this.readRegexp()) : next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.slash, 1);
+ }, pp2.readToken_mult_modulo_exp = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1), size = 1, tokentype = code2 === 42 ? types$12.star : types$12.modulo;
+ return this.options.ecmaVersion >= 7 && code2 === 42 && next === 42 && (++size, tokentype = types$12.starstar, next = this.input.charCodeAt(this.pos + 2)), next === 61 ? this.finishOp(types$12.assign, size + 1) : this.finishOp(tokentype, size);
+ }, pp2.readToken_pipe_amp = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code2) {
+ if (this.options.ecmaVersion >= 12) {
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ if (next2 === 61)
+ return this.finishOp(types$12.assign, 3);
+ }
+ return this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
+ }
+ return next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
+ }, pp2.readToken_caret = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.bitwiseXOR, 1);
+ }, pp2.readToken_plus_min = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === code2 ? next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(types$12.incDec, 2) : next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.plusMin, 1);
+ }, pp2.readToken_lt_gt = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1), size = 1;
+ return next === code2 ? (size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + size) === 61 ? this.finishOp(types$12.assign, size + 1) : this.finishOp(types$12.bitShift, size)) : next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (next === 61 && (size = 2), this.finishOp(types$12.relational, size));
+ }, pp2.readToken_eq_excl = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === 61 ? this.finishOp(types$12.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : code2 === 61 && next === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(types$12.arrow)) : this.finishOp(code2 === 61 ? types$12.eq : types$12.prefix, 1);
+ }, pp2.readToken_question = function() {
+ var ecmaVersion2 = this.options.ecmaVersion;
+ if (ecmaVersion2 >= 11) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 46) {
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ if (next2 < 48 || next2 > 57)
+ return this.finishOp(types$12.questionDot, 2);
+ }
+ if (next === 63) {
+ if (ecmaVersion2 >= 12) {
+ var next2$1 = this.input.charCodeAt(this.pos + 2);
+ if (next2$1 === 61)
+ return this.finishOp(types$12.assign, 3);
+ }
+ return this.finishOp(types$12.coalesce, 2);
+ }
+ }
+ return this.finishOp(types$12.question, 1);
+ }, pp2.readToken_numberSign = function() {
+ var ecmaVersion2 = this.options.ecmaVersion, code2 = 35;
+ if (ecmaVersion2 >= 13 && (++this.pos, code2 = this.fullCharCodeAtPos(), isIdentifierStart2(code2, !0) || code2 === 92))
+ return this.finishToken(types$12.privateId, this.readWord1());
+ this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
+ }, pp2.getTokenFromCode = function(code2) {
+ switch (code2) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46:
+ return this.readToken_dot();
+ // Punctuation tokens.
+ case 40:
+ return ++this.pos, this.finishToken(types$12.parenL);
+ case 41:
+ return ++this.pos, this.finishToken(types$12.parenR);
+ case 59:
+ return ++this.pos, this.finishToken(types$12.semi);
+ case 44:
+ return ++this.pos, this.finishToken(types$12.comma);
+ case 91:
+ return ++this.pos, this.finishToken(types$12.bracketL);
+ case 93:
+ return ++this.pos, this.finishToken(types$12.bracketR);
+ case 123:
+ return ++this.pos, this.finishToken(types$12.braceL);
+ case 125:
+ return ++this.pos, this.finishToken(types$12.braceR);
+ case 58:
+ return ++this.pos, this.finishToken(types$12.colon);
+ case 96:
+ if (this.options.ecmaVersion < 6)
+ break;
+ return ++this.pos, this.finishToken(types$12.backQuote);
+ case 48:
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 120 || next === 88)
+ return this.readRadixNumber(16);
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79)
+ return this.readRadixNumber(8);
+ if (next === 98 || next === 66)
+ return this.readRadixNumber(2);
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ return this.readNumber(!1);
+ // Quotes produce strings.
+ case 34:
+ case 39:
+ return this.readString(code2);
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+ case 47:
+ return this.readToken_slash();
+ case 37:
+ case 42:
+ return this.readToken_mult_modulo_exp(code2);
+ case 124:
+ case 38:
+ return this.readToken_pipe_amp(code2);
+ case 94:
+ return this.readToken_caret();
+ case 43:
+ case 45:
+ return this.readToken_plus_min(code2);
+ case 60:
+ case 62:
+ return this.readToken_lt_gt(code2);
+ case 61:
+ case 33:
+ return this.readToken_eq_excl(code2);
+ case 63:
+ return this.readToken_question();
+ case 126:
+ return this.finishOp(types$12.prefix, 1);
+ case 35:
+ return this.readToken_numberSign();
+ }
+ this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
+ }, pp2.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size);
+ return this.pos += size, this.finishToken(type, str);
+ }, pp2.readRegexp = function() {
+ for (var escaped, inClass, start2 = this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(start2, "Unterminated regular expression");
+ var ch = this.input.charAt(this.pos);
+ if (lineBreak2.test(ch) && this.raise(start2, "Unterminated regular expression"), escaped)
+ escaped = !1;
+ else {
+ if (ch === "[")
+ inClass = !0;
+ else if (ch === "]" && inClass)
+ inClass = !1;
+ else if (ch === "/" && !inClass)
+ break;
+ escaped = ch === "\\";
+ }
+ ++this.pos;
+ }
+ var pattern = this.input.slice(start2, this.pos);
+ ++this.pos;
+ var flagsStart = this.pos, flags = this.readWord1();
+ this.containsEsc && this.unexpected(flagsStart);
+ var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this));
+ state.reset(start2, pattern, flags), this.validateRegExpFlags(state), this.validateRegExpPattern(state);
+ var value = null;
+ try {
+ value = new RegExp(pattern, flags);
+ } catch {
+ }
+ return this.finishToken(types$12.regexp, { pattern, flags, value });
+ }, pp2.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
+ for (var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0, isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48, start2 = this.pos, total = 0, lastCode = 0, i2 = 0, e = len ?? 1 / 0; i2 < e; ++i2, ++this.pos) {
+ var code2 = this.input.charCodeAt(this.pos), val = void 0;
+ if (allowSeparators && code2 === 95) {
+ isLegacyOctalNumericLiteral && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), lastCode === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), i2 === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), lastCode = code2;
+ continue;
+ }
+ if (code2 >= 97 ? val = code2 - 97 + 10 : code2 >= 65 ? val = code2 - 65 + 10 : code2 >= 48 && code2 <= 57 ? val = code2 - 48 : val = 1 / 0, val >= radix)
+ break;
+ lastCode = code2, total = total * radix + val;
+ }
+ return allowSeparators && lastCode === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === start2 || len != null && this.pos - start2 !== len ? null : total;
+ };
+ function stringToNumber2(str, isLegacyOctalNumericLiteral) {
+ return isLegacyOctalNumericLiteral ? parseInt(str, 8) : parseFloat(str.replace(/_/g, ""));
+ }
+ function stringToBigInt2(str) {
+ return typeof BigInt != "function" ? null : BigInt(str.replace(/_/g, ""));
+ }
+ pp2.readRadixNumber = function(radix) {
+ var start2 = this.pos;
+ this.pos += 2;
+ var val = this.readInt(radix);
+ return val == null && this.raise(this.start + 2, "Expected number in radix " + radix), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (val = stringToBigInt2(this.input.slice(start2, this.pos)), ++this.pos) : isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$12.num, val);
+ }, pp2.readNumber = function(startsWithDot) {
+ var start2 = this.pos;
+ !startsWithDot && this.readInt(10, void 0, !0) === null && this.raise(start2, "Invalid number");
+ var octal = this.pos - start2 >= 2 && this.input.charCodeAt(start2) === 48;
+ octal && this.strict && this.raise(start2, "Invalid number");
+ var next = this.input.charCodeAt(this.pos);
+ if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
+ var val$1 = stringToBigInt2(this.input.slice(start2, this.pos));
+ return ++this.pos, isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$12.num, val$1);
+ }
+ octal && /[89]/.test(this.input.slice(start2, this.pos)) && (octal = !1), next === 46 && !octal && (++this.pos, this.readInt(10), next = this.input.charCodeAt(this.pos)), (next === 69 || next === 101) && !octal && (next = this.input.charCodeAt(++this.pos), (next === 43 || next === 45) && ++this.pos, this.readInt(10) === null && this.raise(start2, "Invalid number")), isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
+ var val = stringToNumber2(this.input.slice(start2, this.pos), octal);
+ return this.finishToken(types$12.num, val);
+ }, pp2.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code2;
+ if (ch === 123) {
+ this.options.ecmaVersion < 6 && this.unexpected();
+ var codePos = ++this.pos;
+ code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, code2 > 1114111 && this.invalidStringToken(codePos, "Code point out of bounds");
+ } else
+ code2 = this.readHexChar(4);
+ return code2;
+ }, pp2.readString = function(quote) {
+ for (var out = "", chunkStart = ++this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === quote)
+ break;
+ ch === 92 ? (out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!1), chunkStart = this.pos) : ch === 8232 || ch === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine2(ch) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
+ }
+ return out += this.input.slice(chunkStart, this.pos++), this.finishToken(types$12.string, out);
+ };
+ var INVALID_TEMPLATE_ESCAPE_ERROR2 = {};
+ pp2.tryReadTemplateToken = function() {
+ this.inTemplateElement = !0;
+ try {
+ this.readTmplToken();
+ } catch (err) {
+ if (err === INVALID_TEMPLATE_ESCAPE_ERROR2)
+ this.readInvalidTemplateToken();
+ else
+ throw err;
+ }
+ this.inTemplateElement = !1;
+ }, pp2.invalidStringToken = function(position3, message) {
+ if (this.inTemplateElement && this.options.ecmaVersion >= 9)
+ throw INVALID_TEMPLATE_ESCAPE_ERROR2;
+ this.raise(position3, message);
+ }, pp2.readTmplToken = function() {
+ for (var out = "", chunkStart = this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123)
+ return this.pos === this.start && (this.type === types$12.template || this.type === types$12.invalidTemplate) ? ch === 36 ? (this.pos += 2, this.finishToken(types$12.dollarBraceL)) : (++this.pos, this.finishToken(types$12.backQuote)) : (out += this.input.slice(chunkStart, this.pos), this.finishToken(types$12.template, out));
+ if (ch === 92)
+ out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!0), chunkStart = this.pos;
+ else if (isNewLine2(ch)) {
+ switch (out += this.input.slice(chunkStart, this.pos), ++this.pos, ch) {
+ case 13:
+ this.input.charCodeAt(this.pos) === 10 && ++this.pos;
+ case 10:
+ out += `
+`;
+ break;
+ default:
+ out += String.fromCharCode(ch);
+ break;
+ }
+ this.options.locations && (++this.curLine, this.lineStart = this.pos), chunkStart = this.pos;
+ } else
+ ++this.pos;
+ }
+ }, pp2.readInvalidTemplateToken = function() {
+ for (; this.pos < this.input.length; this.pos++)
+ switch (this.input[this.pos]) {
+ case "\\":
+ ++this.pos;
+ break;
+ case "$":
+ if (this.input[this.pos + 1] !== "{")
+ break;
+ // fall through
+ case "`":
+ return this.finishToken(types$12.invalidTemplate, this.input.slice(this.start, this.pos));
+ case "\r":
+ this.input[this.pos + 1] === `
+` && ++this.pos;
+ // fall through
+ case `
+`:
+ case "\u2028":
+ case "\u2029":
+ ++this.curLine, this.lineStart = this.pos + 1;
+ break;
+ }
+ this.raise(this.start, "Unterminated template");
+ }, pp2.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos);
+ switch (++this.pos, ch) {
+ case 110:
+ return `
+`;
+ // 'n' -> '\n'
+ case 114:
+ return "\r";
+ // 'r' -> '\r'
+ case 120:
+ return String.fromCharCode(this.readHexChar(2));
+ // 'x'
+ case 117:
+ return codePointToString2(this.readCodePoint());
+ // 'u'
+ case 116:
+ return " ";
+ // 't' -> '\t'
+ case 98:
+ return "\b";
+ // 'b' -> '\b'
+ case 118:
+ return "\v";
+ // 'v' -> '\u000b'
+ case 102:
+ return "\f";
+ // 'f' -> '\f'
+ case 13:
+ this.input.charCodeAt(this.pos) === 10 && ++this.pos;
+ // '\r\n'
+ case 10:
+ return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
+ case 56:
+ case 57:
+ if (this.strict && this.invalidStringToken(
+ this.pos - 1,
+ "Invalid escape sequence"
+ ), inTemplate) {
+ var codePos = this.pos - 1;
+ this.invalidStringToken(
+ codePos,
+ "Invalid escape sequence in template string"
+ );
+ }
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], octal = parseInt(octalStr, 8);
+ return octal > 255 && (octalStr = octalStr.slice(0, -1), octal = parseInt(octalStr, 8)), this.pos += octalStr.length - 1, ch = this.input.charCodeAt(this.pos), (octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate) && this.invalidStringToken(
+ this.pos - 1 - octalStr.length,
+ inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
+ ), String.fromCharCode(octal);
+ }
+ return isNewLine2(ch) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(ch);
+ }
+ }, pp2.readHexChar = function(len) {
+ var codePos = this.pos, n = this.readInt(16, len);
+ return n === null && this.invalidStringToken(codePos, "Bad character escape sequence"), n;
+ }, pp2.readWord1 = function() {
+ this.containsEsc = !1;
+ for (var word = "", first = !0, chunkStart = this.pos, astral = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
+ var ch = this.fullCharCodeAtPos();
+ if (isIdentifierChar2(ch, astral))
+ this.pos += ch <= 65535 ? 1 : 2;
+ else if (ch === 92) {
+ this.containsEsc = !0, word += this.input.slice(chunkStart, this.pos);
+ var escStart = this.pos;
+ this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
+ var esc = this.readCodePoint();
+ (first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral) || this.invalidStringToken(escStart, "Invalid Unicode escape"), word += codePointToString2(esc), chunkStart = this.pos;
+ } else
+ break;
+ first = !1;
+ }
+ return word + this.input.slice(chunkStart, this.pos);
+ }, pp2.readWord = function() {
+ var word = this.readWord1(), type = types$12.name;
+ return this.keywords.test(word) && (type = keywords2[word]), this.finishToken(type, word);
+ };
+ var version2 = "8.15.0";
+ Parser3.acorn = {
+ Parser: Parser3,
+ version: version2,
+ defaultOptions: defaultOptions2,
+ Position: Position3,
+ SourceLocation: SourceLocation3,
+ getLineInfo: getLineInfo2,
+ Node: Node3,
+ TokenType: TokenType3,
+ tokTypes: types$12,
+ keywordTypes: keywords2,
+ TokContext: TokContext3,
+ tokContexts: types2,
+ isIdentifierChar: isIdentifierChar2,
+ isIdentifierStart: isIdentifierStart2,
+ Token: Token3,
+ isNewLine: isNewLine2,
+ lineBreak: lineBreak2,
+ lineBreakG: lineBreakG2,
+ nonASCIIwhitespace: nonASCIIwhitespace2
+ };
+ function parse4(input, options) {
+ return Parser3.parse(input, options);
+ }
+ function parseExpressionAt2(input, pos, options) {
+ return Parser3.parseExpressionAt(input, pos, options);
+ }
+ function tokenizer2(input, options) {
+ return Parser3.tokenizer(input, options);
+ }
+ exports2.Node = Node3, exports2.Parser = Parser3, exports2.Position = Position3, exports2.SourceLocation = SourceLocation3, exports2.TokContext = TokContext3, exports2.Token = Token3, exports2.TokenType = TokenType3, exports2.defaultOptions = defaultOptions2, exports2.getLineInfo = getLineInfo2, exports2.isIdentifierChar = isIdentifierChar2, exports2.isIdentifierStart = isIdentifierStart2, exports2.isNewLine = isNewLine2, exports2.keywordTypes = keywords2, exports2.lineBreak = lineBreak2, exports2.lineBreakG = lineBreakG2, exports2.nonASCIIwhitespace = nonASCIIwhitespace2, exports2.parse = parse4, exports2.parseExpressionAt = parseExpressionAt2, exports2.tokContexts = types2, exports2.tokTypes = types$12, exports2.tokenizer = tokenizer2, exports2.version = version2;
+ }));
+ }
+});
+
+// ../../../node_modules/@mdx-js/mdx/node_modules/acorn-jsx/index.js
+var require_acorn_jsx = __commonJS({
+ "../../../node_modules/@mdx-js/mdx/node_modules/acorn-jsx/index.js"(exports, module) {
+ "use strict";
+ var XHTMLEntities = require_xhtml(), hexNumber = /^[\da-fA-F]+$/, decimalNumber = /^\d+$/, acornJsxMap = /* @__PURE__ */ new WeakMap();
+ function getJsxTokens(acorn) {
+ acorn = acorn.Parser.acorn || acorn;
+ let acornJsx2 = acornJsxMap.get(acorn);
+ if (!acornJsx2) {
+ let tt = acorn.tokTypes, TokContext3 = acorn.TokContext, TokenType3 = acorn.TokenType, tc_oTag = new TokContext3("...", !0, !0), tokContexts = {
+ tc_oTag,
+ tc_cTag,
+ tc_expr
+ }, tokTypes = {
+ jsxName: new TokenType3("jsxName"),
+ jsxText: new TokenType3("jsxText", { beforeExpr: !0 }),
+ jsxTagStart: new TokenType3("jsxTagStart", { startsExpr: !0 }),
+ jsxTagEnd: new TokenType3("jsxTagEnd")
+ };
+ tokTypes.jsxTagStart.updateContext = function() {
+ this.context.push(tc_expr), this.context.push(tc_oTag), this.exprAllowed = !1;
+ }, tokTypes.jsxTagEnd.updateContext = function(prevType) {
+ let out = this.context.pop();
+ out === tc_oTag && prevType === tt.slash || out === tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === tc_expr) : this.exprAllowed = !0;
+ }, acornJsx2 = { tokContexts, tokTypes }, acornJsxMap.set(acorn, acornJsx2);
+ }
+ return acornJsx2;
+ }
+ function getQualifiedJSXName(object) {
+ if (!object)
+ return object;
+ if (object.type === "JSXIdentifier")
+ return object.name;
+ if (object.type === "JSXNamespacedName")
+ return object.namespace.name + ":" + object.name.name;
+ if (object.type === "JSXMemberExpression")
+ return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
+ }
+ module.exports = function(options) {
+ return options = options || {}, function(Parser3) {
+ return plugin({
+ allowNamespaces: options.allowNamespaces !== !1,
+ allowNamespacedObjects: !!options.allowNamespacedObjects
+ }, Parser3);
+ };
+ };
+ Object.defineProperty(module.exports, "tokTypes", {
+ get: function() {
+ return getJsxTokens(require_acorn()).tokTypes;
+ },
+ configurable: !0,
+ enumerable: !0
+ });
+ function plugin(options, Parser3) {
+ let acorn = Parser3.acorn || require_acorn(), acornJsx2 = getJsxTokens(acorn), tt = acorn.tokTypes, tok = acornJsx2.tokTypes, tokContexts = acorn.tokContexts, tc_oTag = acornJsx2.tokContexts.tc_oTag, tc_cTag = acornJsx2.tokContexts.tc_cTag, tc_expr = acornJsx2.tokContexts.tc_expr, isNewLine2 = acorn.isNewLine, isIdentifierStart2 = acorn.isIdentifierStart, isIdentifierChar2 = acorn.isIdentifierChar;
+ return class extends Parser3 {
+ // Expose actual `tokTypes` and `tokContexts` to other plugins.
+ static get acornJsx() {
+ return acornJsx2;
+ }
+ // Reads inline JSX contents token.
+ jsx_readToken() {
+ let out = "", chunkStart = this.pos;
+ for (; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated JSX contents");
+ let ch = this.input.charCodeAt(this.pos);
+ switch (ch) {
+ case 60:
+ // '<'
+ case 123:
+ return this.pos === this.start ? ch === 60 && this.exprAllowed ? (++this.pos, this.finishToken(tok.jsxTagStart)) : this.getTokenFromCode(ch) : (out += this.input.slice(chunkStart, this.pos), this.finishToken(tok.jsxText, out));
+ case 38:
+ out += this.input.slice(chunkStart, this.pos), out += this.jsx_readEntity(), chunkStart = this.pos;
+ break;
+ case 62:
+ // '>'
+ case 125:
+ this.raise(
+ this.pos,
+ "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?'
+ );
+ default:
+ isNewLine2(ch) ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readNewLine(!0), chunkStart = this.pos) : ++this.pos;
+ }
+ }
+ }
+ jsx_readNewLine(normalizeCRLF) {
+ let ch = this.input.charCodeAt(this.pos), out;
+ return ++this.pos, ch === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, out = normalizeCRLF ? `
+` : `\r
+`) : out = String.fromCharCode(ch), this.options.locations && (++this.curLine, this.lineStart = this.pos), out;
+ }
+ jsx_readString(quote) {
+ let out = "", chunkStart = ++this.pos;
+ for (; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
+ let ch = this.input.charCodeAt(this.pos);
+ if (ch === quote) break;
+ ch === 38 ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readEntity(), chunkStart = this.pos) : isNewLine2(ch) ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readNewLine(!1), chunkStart = this.pos) : ++this.pos;
+ }
+ return out += this.input.slice(chunkStart, this.pos++), this.finishToken(tt.string, out);
+ }
+ jsx_readEntity() {
+ let str = "", count = 0, entity, ch = this.input[this.pos];
+ ch !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
+ let startPos = ++this.pos;
+ for (; this.pos < this.input.length && count++ < 10; ) {
+ if (ch = this.input[this.pos++], ch === ";") {
+ str[0] === "#" ? str[1] === "x" ? (str = str.substr(2), hexNumber.test(str) && (entity = String.fromCharCode(parseInt(str, 16)))) : (str = str.substr(1), decimalNumber.test(str) && (entity = String.fromCharCode(parseInt(str, 10)))) : entity = XHTMLEntities[str];
+ break;
+ }
+ str += ch;
+ }
+ return entity || (this.pos = startPos, "&");
+ }
+ // Read a JSX identifier (valid tag or attribute name).
+ //
+ // Optimized version since JSX identifiers can't contain
+ // escape characters and so can be read as single slice.
+ // Also assumes that first character was already checked
+ // by isIdentifierStart in readToken.
+ jsx_readWord() {
+ let ch, start2 = this.pos;
+ do
+ ch = this.input.charCodeAt(++this.pos);
+ while (isIdentifierChar2(ch) || ch === 45);
+ return this.finishToken(tok.jsxName, this.input.slice(start2, this.pos));
+ }
+ // Parse next token as JSX identifier
+ jsx_parseIdentifier() {
+ let node2 = this.startNode();
+ return this.type === tok.jsxName ? node2.name = this.value : this.type.keyword ? node2.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(node2, "JSXIdentifier");
+ }
+ // Parse namespaced identifier.
+ jsx_parseNamespacedName() {
+ let startPos = this.start, startLoc = this.startLoc, name2 = this.jsx_parseIdentifier();
+ if (!options.allowNamespaces || !this.eat(tt.colon)) return name2;
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.namespace = name2, node2.name = this.jsx_parseIdentifier(), this.finishNode(node2, "JSXNamespacedName");
+ }
+ // Parses element name in any form - namespaced, member
+ // or single identifier.
+ jsx_parseElementName() {
+ if (this.type === tok.jsxTagEnd) return "";
+ let startPos = this.start, startLoc = this.startLoc, node2 = this.jsx_parseNamespacedName();
+ for (this.type === tt.dot && node2.type === "JSXNamespacedName" && !options.allowNamespacedObjects && this.unexpected(); this.eat(tt.dot); ) {
+ let newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node2, newNode.property = this.jsx_parseIdentifier(), node2 = this.finishNode(newNode, "JSXMemberExpression");
+ }
+ return node2;
+ }
+ // Parses any type of JSX attribute value.
+ jsx_parseAttributeValue() {
+ switch (this.type) {
+ case tt.braceL:
+ let node2 = this.jsx_parseExpressionContainer();
+ return node2.expression.type === "JSXEmptyExpression" && this.raise(node2.start, "JSX attributes must only be assigned a non-empty expression"), node2;
+ case tok.jsxTagStart:
+ case tt.string:
+ return this.parseExprAtom();
+ default:
+ this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
+ }
+ }
+ // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+ // and so it should start at the end of last read token (left brace) and finish
+ // at the beginning of the next one (right brace).
+ jsx_parseEmptyExpression() {
+ let node2 = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node2, "JSXEmptyExpression", this.start, this.startLoc);
+ }
+ // Parses JSX expression enclosed into curly brackets.
+ jsx_parseExpressionContainer() {
+ let node2 = this.startNode();
+ return this.next(), node2.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(tt.braceR), this.finishNode(node2, "JSXExpressionContainer");
+ }
+ // Parses following JSX attribute name-value pair.
+ jsx_parseAttribute() {
+ let node2 = this.startNode();
+ return this.eat(tt.braceL) ? (this.expect(tt.ellipsis), node2.argument = this.parseMaybeAssign(), this.expect(tt.braceR), this.finishNode(node2, "JSXSpreadAttribute")) : (node2.name = this.jsx_parseNamespacedName(), node2.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(node2, "JSXAttribute"));
+ }
+ // Parses JSX opening tag starting after '<'.
+ jsx_parseOpeningElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc);
+ node2.attributes = [];
+ let nodeName = this.jsx_parseElementName();
+ for (nodeName && (node2.name = nodeName); this.type !== tt.slash && this.type !== tok.jsxTagEnd; )
+ node2.attributes.push(this.jsx_parseAttribute());
+ return node2.selfClosing = this.eat(tt.slash), this.expect(tok.jsxTagEnd), this.finishNode(node2, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment");
+ }
+ // Parses JSX closing tag starting after ''.
+ jsx_parseClosingElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc), nodeName = this.jsx_parseElementName();
+ return nodeName && (node2.name = nodeName), this.expect(tok.jsxTagEnd), this.finishNode(node2, nodeName ? "JSXClosingElement" : "JSXClosingFragment");
+ }
+ // Parses entire JSX element, including it's opening tag
+ // (starting after '<'), attributes, contents and closing tag.
+ jsx_parseElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc), children = [], openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc), closingElement = null;
+ if (!openingElement.selfClosing) {
+ contents: for (; ; )
+ switch (this.type) {
+ case tok.jsxTagStart:
+ if (startPos = this.start, startLoc = this.startLoc, this.next(), this.eat(tt.slash)) {
+ closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+ children.push(this.jsx_parseElementAt(startPos, startLoc));
+ break;
+ case tok.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+ case tt.braceL:
+ children.push(this.jsx_parseExpressionContainer());
+ break;
+ default:
+ this.unexpected();
+ }
+ getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name) && this.raise(
+ closingElement.start,
+ "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"
+ );
+ }
+ let fragmentOrElement = openingElement.name ? "Element" : "Fragment";
+ return node2["opening" + fragmentOrElement] = openingElement, node2["closing" + fragmentOrElement] = closingElement, node2.children = children, this.type === tt.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(node2, "JSX" + fragmentOrElement);
+ }
+ // Parse JSX text
+ jsx_parseText() {
+ let node2 = this.parseLiteral(this.value);
+ return node2.type = "JSXText", node2;
+ }
+ // Parses entire JSX element from current position.
+ jsx_parseElement() {
+ let startPos = this.start, startLoc = this.startLoc;
+ return this.next(), this.jsx_parseElementAt(startPos, startLoc);
+ }
+ parseExprAtom(refShortHandDefaultPos) {
+ return this.type === tok.jsxText ? this.jsx_parseText() : this.type === tok.jsxTagStart ? this.jsx_parseElement() : super.parseExprAtom(refShortHandDefaultPos);
+ }
+ readToken(code2) {
+ let context = this.curContext();
+ if (context === tc_expr) return this.jsx_readToken();
+ if (context === tc_oTag || context === tc_cTag) {
+ if (isIdentifierStart2(code2)) return this.jsx_readWord();
+ if (code2 == 62)
+ return ++this.pos, this.finishToken(tok.jsxTagEnd);
+ if ((code2 === 34 || code2 === 39) && context == tc_oTag)
+ return this.jsx_readString(code2);
+ }
+ return code2 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33 ? (++this.pos, this.finishToken(tok.jsxTagStart)) : super.readToken(code2);
+ }
+ updateContext(prevType) {
+ if (this.type == tt.braceL) {
+ var curContext = this.curContext();
+ curContext == tc_oTag ? this.context.push(tokContexts.b_expr) : curContext == tc_expr ? this.context.push(tokContexts.b_tmpl) : super.updateContext(prevType), this.exprAllowed = !0;
+ } else if (this.type === tt.slash && prevType === tok.jsxTagStart)
+ this.context.length -= 2, this.context.push(tc_cTag), this.exprAllowed = !1;
+ else
+ return super.updateContext(prevType);
+ }
+ };
+ }
+ }
+});
+
+// ../../../node_modules/inline-style-parser/cjs/index.js
+var require_cjs = __commonJS({
+ "../../../node_modules/inline-style-parser/cjs/index.js"(exports, module) {
+ "use strict";
+ var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, NEWLINE_REGEX = /\n/g, WHITESPACE_REGEX = /^\s*/, PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, COLON_REGEX = /^:\s*/, VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, SEMICOLON_REGEX = /^[;\s]*/, TRIM_REGEX = /^\s+|\s+$/g, NEWLINE = `
+`, FORWARD_SLASH = "/", ASTERISK = "*", EMPTY_STRING = "", TYPE_COMMENT = "comment", TYPE_DECLARATION = "declaration";
+ function index2(style, options) {
+ if (typeof style != "string")
+ throw new TypeError("First argument must be a string");
+ if (!style) return [];
+ options = options || {};
+ var lineno = 1, column = 1;
+ function updatePosition(str) {
+ var lines = str.match(NEWLINE_REGEX);
+ lines && (lineno += lines.length);
+ var i = str.lastIndexOf(NEWLINE);
+ column = ~i ? str.length - i : column + str.length;
+ }
+ function position3() {
+ var start2 = { line: lineno, column };
+ return function(node2) {
+ return node2.position = new Position3(start2), whitespace2(), node2;
+ };
+ }
+ function Position3(start2) {
+ this.start = start2, this.end = { line: lineno, column }, this.source = options.source;
+ }
+ Position3.prototype.content = style;
+ function error(msg) {
+ var err = new Error(
+ options.source + ":" + lineno + ":" + column + ": " + msg
+ );
+ if (err.reason = msg, err.filename = options.source, err.line = lineno, err.column = column, err.source = style, !options.silent) throw err;
+ }
+ function match(re2) {
+ var m = re2.exec(style);
+ if (m) {
+ var str = m[0];
+ return updatePosition(str), style = style.slice(str.length), m;
+ }
+ }
+ function whitespace2() {
+ match(WHITESPACE_REGEX);
+ }
+ function comments(rules) {
+ var c;
+ for (rules = rules || []; c = comment2(); )
+ c !== !1 && rules.push(c);
+ return rules;
+ }
+ function comment2() {
+ var pos = position3();
+ if (!(FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1))) {
+ for (var i = 2; EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1)); )
+ ++i;
+ if (i += 2, EMPTY_STRING === style.charAt(i - 1))
+ return error("End of comment missing");
+ var str = style.slice(2, i - 2);
+ return column += 2, updatePosition(str), style = style.slice(i), column += 2, pos({
+ type: TYPE_COMMENT,
+ comment: str
+ });
+ }
+ }
+ function declaration() {
+ var pos = position3(), prop = match(PROPERTY_REGEX);
+ if (prop) {
+ if (comment2(), !match(COLON_REGEX)) return error("property missing ':'");
+ var val = match(VALUE_REGEX), ret = pos({
+ type: TYPE_DECLARATION,
+ property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
+ value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
+ });
+ return match(SEMICOLON_REGEX), ret;
+ }
+ }
+ function declarations() {
+ var decls = [];
+ comments(decls);
+ for (var decl; decl = declaration(); )
+ decl !== !1 && (decls.push(decl), comments(decls));
+ return decls;
+ }
+ return whitespace2(), declarations();
+ }
+ function trim(str) {
+ return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
+ }
+ module.exports = index2;
+ }
+});
+
+// ../../../node_modules/style-to-object/cjs/index.js
+var require_cjs2 = __commonJS({
+ "../../../node_modules/style-to-object/cjs/index.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: !0 });
+ exports.default = StyleToObject;
+ var inline_style_parser_1 = __importDefault(require_cjs());
+ function StyleToObject(style, iterator) {
+ let styleObject = null;
+ if (!style || typeof style != "string")
+ return styleObject;
+ let declarations = (0, inline_style_parser_1.default)(style), hasIterator = typeof iterator == "function";
+ return declarations.forEach((declaration) => {
+ if (declaration.type !== "declaration")
+ return;
+ let { property, value } = declaration;
+ hasIterator ? iterator(property, value, declaration) : value && (styleObject = styleObject || {}, styleObject[property] = value);
+ }), styleObject;
+ }
+ }
+});
+
+// ../../../node_modules/style-to-js/cjs/utilities.js
+var require_utilities = __commonJS({
+ "../../../node_modules/style-to-js/cjs/utilities.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: !0 });
+ exports.camelCase = void 0;
+ var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/, HYPHEN_REGEX = /-([a-z])/g, NO_HYPHEN_REGEX = /^[^-]+$/, VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/, MS_VENDOR_PREFIX_REGEX = /^-(ms)-/, skipCamelCase = function(property) {
+ return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
+ }, capitalize = function(match, character) {
+ return character.toUpperCase();
+ }, trimHyphen = function(match, prefix) {
+ return "".concat(prefix, "-");
+ }, camelCase = function(property, options) {
+ return options === void 0 && (options = {}), skipCamelCase(property) ? property : (property = property.toLowerCase(), options.reactCompat ? property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen) : property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen), property.replace(HYPHEN_REGEX, capitalize));
+ };
+ exports.camelCase = camelCase;
+ }
+});
+
+// ../../../node_modules/style-to-js/cjs/index.js
+var require_cjs3 = __commonJS({
+ "../../../node_modules/style-to-js/cjs/index.js"(exports, module) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ }, style_to_object_1 = __importDefault(require_cjs2()), utilities_1 = require_utilities();
+ function StyleToJS(style, options) {
+ var output = {};
+ return !style || typeof style != "string" || (0, style_to_object_1.default)(style, function(property, value) {
+ property && value && (output[(0, utilities_1.camelCase)(property, options)] = value);
+ }), output;
+ }
+ StyleToJS.default = StyleToJS;
+ module.exports = StyleToJS;
+ }
+});
+
+// ../../../node_modules/micromark-extension-mdxjs/node_modules/acorn-jsx/xhtml.js
+var require_xhtml2 = __commonJS({
+ "../../../node_modules/micromark-extension-mdxjs/node_modules/acorn-jsx/xhtml.js"(exports, module) {
+ module.exports = {
+ quot: '"',
+ amp: "&",
+ apos: "'",
+ lt: "<",
+ gt: ">",
+ nbsp: "\xA0",
+ iexcl: "\xA1",
+ cent: "\xA2",
+ pound: "\xA3",
+ curren: "\xA4",
+ yen: "\xA5",
+ brvbar: "\xA6",
+ sect: "\xA7",
+ uml: "\xA8",
+ copy: "\xA9",
+ ordf: "\xAA",
+ laquo: "\xAB",
+ not: "\xAC",
+ shy: "\xAD",
+ reg: "\xAE",
+ macr: "\xAF",
+ deg: "\xB0",
+ plusmn: "\xB1",
+ sup2: "\xB2",
+ sup3: "\xB3",
+ acute: "\xB4",
+ micro: "\xB5",
+ para: "\xB6",
+ middot: "\xB7",
+ cedil: "\xB8",
+ sup1: "\xB9",
+ ordm: "\xBA",
+ raquo: "\xBB",
+ frac14: "\xBC",
+ frac12: "\xBD",
+ frac34: "\xBE",
+ iquest: "\xBF",
+ Agrave: "\xC0",
+ Aacute: "\xC1",
+ Acirc: "\xC2",
+ Atilde: "\xC3",
+ Auml: "\xC4",
+ Aring: "\xC5",
+ AElig: "\xC6",
+ Ccedil: "\xC7",
+ Egrave: "\xC8",
+ Eacute: "\xC9",
+ Ecirc: "\xCA",
+ Euml: "\xCB",
+ Igrave: "\xCC",
+ Iacute: "\xCD",
+ Icirc: "\xCE",
+ Iuml: "\xCF",
+ ETH: "\xD0",
+ Ntilde: "\xD1",
+ Ograve: "\xD2",
+ Oacute: "\xD3",
+ Ocirc: "\xD4",
+ Otilde: "\xD5",
+ Ouml: "\xD6",
+ times: "\xD7",
+ Oslash: "\xD8",
+ Ugrave: "\xD9",
+ Uacute: "\xDA",
+ Ucirc: "\xDB",
+ Uuml: "\xDC",
+ Yacute: "\xDD",
+ THORN: "\xDE",
+ szlig: "\xDF",
+ agrave: "\xE0",
+ aacute: "\xE1",
+ acirc: "\xE2",
+ atilde: "\xE3",
+ auml: "\xE4",
+ aring: "\xE5",
+ aelig: "\xE6",
+ ccedil: "\xE7",
+ egrave: "\xE8",
+ eacute: "\xE9",
+ ecirc: "\xEA",
+ euml: "\xEB",
+ igrave: "\xEC",
+ iacute: "\xED",
+ icirc: "\xEE",
+ iuml: "\xEF",
+ eth: "\xF0",
+ ntilde: "\xF1",
+ ograve: "\xF2",
+ oacute: "\xF3",
+ ocirc: "\xF4",
+ otilde: "\xF5",
+ ouml: "\xF6",
+ divide: "\xF7",
+ oslash: "\xF8",
+ ugrave: "\xF9",
+ uacute: "\xFA",
+ ucirc: "\xFB",
+ uuml: "\xFC",
+ yacute: "\xFD",
+ thorn: "\xFE",
+ yuml: "\xFF",
+ OElig: "\u0152",
+ oelig: "\u0153",
+ Scaron: "\u0160",
+ scaron: "\u0161",
+ Yuml: "\u0178",
+ fnof: "\u0192",
+ circ: "\u02C6",
+ tilde: "\u02DC",
+ Alpha: "\u0391",
+ Beta: "\u0392",
+ Gamma: "\u0393",
+ Delta: "\u0394",
+ Epsilon: "\u0395",
+ Zeta: "\u0396",
+ Eta: "\u0397",
+ Theta: "\u0398",
+ Iota: "\u0399",
+ Kappa: "\u039A",
+ Lambda: "\u039B",
+ Mu: "\u039C",
+ Nu: "\u039D",
+ Xi: "\u039E",
+ Omicron: "\u039F",
+ Pi: "\u03A0",
+ Rho: "\u03A1",
+ Sigma: "\u03A3",
+ Tau: "\u03A4",
+ Upsilon: "\u03A5",
+ Phi: "\u03A6",
+ Chi: "\u03A7",
+ Psi: "\u03A8",
+ Omega: "\u03A9",
+ alpha: "\u03B1",
+ beta: "\u03B2",
+ gamma: "\u03B3",
+ delta: "\u03B4",
+ epsilon: "\u03B5",
+ zeta: "\u03B6",
+ eta: "\u03B7",
+ theta: "\u03B8",
+ iota: "\u03B9",
+ kappa: "\u03BA",
+ lambda: "\u03BB",
+ mu: "\u03BC",
+ nu: "\u03BD",
+ xi: "\u03BE",
+ omicron: "\u03BF",
+ pi: "\u03C0",
+ rho: "\u03C1",
+ sigmaf: "\u03C2",
+ sigma: "\u03C3",
+ tau: "\u03C4",
+ upsilon: "\u03C5",
+ phi: "\u03C6",
+ chi: "\u03C7",
+ psi: "\u03C8",
+ omega: "\u03C9",
+ thetasym: "\u03D1",
+ upsih: "\u03D2",
+ piv: "\u03D6",
+ ensp: "\u2002",
+ emsp: "\u2003",
+ thinsp: "\u2009",
+ zwnj: "\u200C",
+ zwj: "\u200D",
+ lrm: "\u200E",
+ rlm: "\u200F",
+ ndash: "\u2013",
+ mdash: "\u2014",
+ lsquo: "\u2018",
+ rsquo: "\u2019",
+ sbquo: "\u201A",
+ ldquo: "\u201C",
+ rdquo: "\u201D",
+ bdquo: "\u201E",
+ dagger: "\u2020",
+ Dagger: "\u2021",
+ bull: "\u2022",
+ hellip: "\u2026",
+ permil: "\u2030",
+ prime: "\u2032",
+ Prime: "\u2033",
+ lsaquo: "\u2039",
+ rsaquo: "\u203A",
+ oline: "\u203E",
+ frasl: "\u2044",
+ euro: "\u20AC",
+ image: "\u2111",
+ weierp: "\u2118",
+ real: "\u211C",
+ trade: "\u2122",
+ alefsym: "\u2135",
+ larr: "\u2190",
+ uarr: "\u2191",
+ rarr: "\u2192",
+ darr: "\u2193",
+ harr: "\u2194",
+ crarr: "\u21B5",
+ lArr: "\u21D0",
+ uArr: "\u21D1",
+ rArr: "\u21D2",
+ dArr: "\u21D3",
+ hArr: "\u21D4",
+ forall: "\u2200",
+ part: "\u2202",
+ exist: "\u2203",
+ empty: "\u2205",
+ nabla: "\u2207",
+ isin: "\u2208",
+ notin: "\u2209",
+ ni: "\u220B",
+ prod: "\u220F",
+ sum: "\u2211",
+ minus: "\u2212",
+ lowast: "\u2217",
+ radic: "\u221A",
+ prop: "\u221D",
+ infin: "\u221E",
+ ang: "\u2220",
+ and: "\u2227",
+ or: "\u2228",
+ cap: "\u2229",
+ cup: "\u222A",
+ int: "\u222B",
+ there4: "\u2234",
+ sim: "\u223C",
+ cong: "\u2245",
+ asymp: "\u2248",
+ ne: "\u2260",
+ equiv: "\u2261",
+ le: "\u2264",
+ ge: "\u2265",
+ sub: "\u2282",
+ sup: "\u2283",
+ nsub: "\u2284",
+ sube: "\u2286",
+ supe: "\u2287",
+ oplus: "\u2295",
+ otimes: "\u2297",
+ perp: "\u22A5",
+ sdot: "\u22C5",
+ lceil: "\u2308",
+ rceil: "\u2309",
+ lfloor: "\u230A",
+ rfloor: "\u230B",
+ lang: "\u2329",
+ rang: "\u232A",
+ loz: "\u25CA",
+ spades: "\u2660",
+ clubs: "\u2663",
+ hearts: "\u2665",
+ diams: "\u2666"
+ };
+ }
+});
+
+// ../../../node_modules/micromark-extension-mdxjs/node_modules/acorn/dist/acorn.js
+var require_acorn2 = __commonJS({
+ "../../../node_modules/micromark-extension-mdxjs/node_modules/acorn/dist/acorn.js"(exports, module) {
+ (function(global, factory) {
+ typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis < "u" ? globalThis : global || self, factory(global.acorn = {}));
+ })(exports, (function(exports2) {
+ "use strict";
+ var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65", nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC", reservedWords2 = {
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
+ 5: "class enum extends super const export import",
+ 6: "enum",
+ strict: "implements interface let package private protected public static yield",
+ strictBind: "eval arguments"
+ }, ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", keywords$12 = {
+ 5: ecma5AndLessKeywords2,
+ "5module": ecma5AndLessKeywords2 + " export import",
+ 6: ecma5AndLessKeywords2 + " const class extends export import super"
+ }, keywordRelationalOperator2 = /^in(stanceof)?$/, nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]"), nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
+ function isInAstralSet2(code2, set) {
+ for (var pos = 65536, i2 = 0; i2 < set.length; i2 += 2) {
+ if (pos += set[i2], pos > code2)
+ return !1;
+ if (pos += set[i2 + 1], pos >= code2)
+ return !0;
+ }
+ return !1;
+ }
+ function isIdentifierStart2(code2, astral) {
+ return code2 < 65 ? code2 === 36 : code2 < 91 ? !0 : code2 < 97 ? code2 === 95 : code2 < 123 ? !0 : code2 <= 65535 ? code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2)) : astral === !1 ? !1 : isInAstralSet2(code2, astralIdentifierStartCodes2);
+ }
+ function isIdentifierChar2(code2, astral) {
+ return code2 < 48 ? code2 === 36 : code2 < 58 ? !0 : code2 < 65 ? !1 : code2 < 91 ? !0 : code2 < 97 ? code2 === 95 : code2 < 123 ? !0 : code2 <= 65535 ? code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2)) : astral === !1 ? !1 : isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
+ }
+ var TokenType3 = function(label, conf) {
+ conf === void 0 && (conf = {}), this.label = label, this.keyword = conf.keyword, this.beforeExpr = !!conf.beforeExpr, this.startsExpr = !!conf.startsExpr, this.isLoop = !!conf.isLoop, this.isAssign = !!conf.isAssign, this.prefix = !!conf.prefix, this.postfix = !!conf.postfix, this.binop = conf.binop || null, this.updateContext = null;
+ };
+ function binop2(name2, prec) {
+ return new TokenType3(name2, { beforeExpr: !0, binop: prec });
+ }
+ var beforeExpr2 = { beforeExpr: !0 }, startsExpr2 = { startsExpr: !0 }, keywords2 = {};
+ function kw2(name2, options) {
+ return options === void 0 && (options = {}), options.keyword = name2, keywords2[name2] = new TokenType3(name2, options);
+ }
+ var types$12 = {
+ num: new TokenType3("num", startsExpr2),
+ regexp: new TokenType3("regexp", startsExpr2),
+ string: new TokenType3("string", startsExpr2),
+ name: new TokenType3("name", startsExpr2),
+ privateId: new TokenType3("privateId", startsExpr2),
+ eof: new TokenType3("eof"),
+ // Punctuation token types.
+ bracketL: new TokenType3("[", { beforeExpr: !0, startsExpr: !0 }),
+ bracketR: new TokenType3("]"),
+ braceL: new TokenType3("{", { beforeExpr: !0, startsExpr: !0 }),
+ braceR: new TokenType3("}"),
+ parenL: new TokenType3("(", { beforeExpr: !0, startsExpr: !0 }),
+ parenR: new TokenType3(")"),
+ comma: new TokenType3(",", beforeExpr2),
+ semi: new TokenType3(";", beforeExpr2),
+ colon: new TokenType3(":", beforeExpr2),
+ dot: new TokenType3("."),
+ question: new TokenType3("?", beforeExpr2),
+ questionDot: new TokenType3("?."),
+ arrow: new TokenType3("=>", beforeExpr2),
+ template: new TokenType3("template"),
+ invalidTemplate: new TokenType3("invalidTemplate"),
+ ellipsis: new TokenType3("...", beforeExpr2),
+ backQuote: new TokenType3("`", startsExpr2),
+ dollarBraceL: new TokenType3("${", { beforeExpr: !0, startsExpr: !0 }),
+ // Operators. These carry several kinds of properties to help the
+ // parser use them properly (the presence of these properties is
+ // what categorizes them as operators).
+ //
+ // `binop`, when present, specifies that this operator is a binary
+ // operator, and will refer to its precedence.
+ //
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
+ // unary operator.
+ //
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
+ // binary operators with a very low precedence, that should result
+ // in AssignmentExpression nodes.
+ eq: new TokenType3("=", { beforeExpr: !0, isAssign: !0 }),
+ assign: new TokenType3("_=", { beforeExpr: !0, isAssign: !0 }),
+ incDec: new TokenType3("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
+ prefix: new TokenType3("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ logicalOR: binop2("||", 1),
+ logicalAND: binop2("&&", 2),
+ bitwiseOR: binop2("|", 3),
+ bitwiseXOR: binop2("^", 4),
+ bitwiseAND: binop2("&", 5),
+ equality: binop2("==/!=/===/!==", 6),
+ relational: binop2(">/<=/>=", 7),
+ bitShift: binop2("<>>/>>>", 8),
+ plusMin: new TokenType3("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
+ modulo: binop2("%", 10),
+ star: binop2("*", 10),
+ slash: binop2("/", 10),
+ starstar: new TokenType3("**", { beforeExpr: !0 }),
+ coalesce: binop2("??", 1),
+ // Keyword token types.
+ _break: kw2("break"),
+ _case: kw2("case", beforeExpr2),
+ _catch: kw2("catch"),
+ _continue: kw2("continue"),
+ _debugger: kw2("debugger"),
+ _default: kw2("default", beforeExpr2),
+ _do: kw2("do", { isLoop: !0, beforeExpr: !0 }),
+ _else: kw2("else", beforeExpr2),
+ _finally: kw2("finally"),
+ _for: kw2("for", { isLoop: !0 }),
+ _function: kw2("function", startsExpr2),
+ _if: kw2("if"),
+ _return: kw2("return", beforeExpr2),
+ _switch: kw2("switch"),
+ _throw: kw2("throw", beforeExpr2),
+ _try: kw2("try"),
+ _var: kw2("var"),
+ _const: kw2("const"),
+ _while: kw2("while", { isLoop: !0 }),
+ _with: kw2("with"),
+ _new: kw2("new", { beforeExpr: !0, startsExpr: !0 }),
+ _this: kw2("this", startsExpr2),
+ _super: kw2("super", startsExpr2),
+ _class: kw2("class", startsExpr2),
+ _extends: kw2("extends", beforeExpr2),
+ _export: kw2("export"),
+ _import: kw2("import", startsExpr2),
+ _null: kw2("null", startsExpr2),
+ _true: kw2("true", startsExpr2),
+ _false: kw2("false", startsExpr2),
+ _in: kw2("in", { beforeExpr: !0, binop: 7 }),
+ _instanceof: kw2("instanceof", { beforeExpr: !0, binop: 7 }),
+ _typeof: kw2("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ _void: kw2("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
+ _delete: kw2("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
+ }, lineBreak2 = /\r\n?|\n|\u2028|\u2029/, lineBreakG2 = new RegExp(lineBreak2.source, "g");
+ function isNewLine2(code2) {
+ return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
+ }
+ function nextLineBreak2(code2, from, end) {
+ end === void 0 && (end = code2.length);
+ for (var i2 = from; i2 < end; i2++) {
+ var next = code2.charCodeAt(i2);
+ if (isNewLine2(next))
+ return i2 < end - 1 && next === 13 && code2.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
+ }
+ return -1;
+ }
+ var nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ref2 = Object.prototype, hasOwnProperty4 = ref2.hasOwnProperty, toString3 = ref2.toString, hasOwn2 = Object.hasOwn || (function(obj, propName) {
+ return hasOwnProperty4.call(obj, propName);
+ }), isArray2 = Array.isArray || (function(obj) {
+ return toString3.call(obj) === "[object Array]";
+ }), regexpCache2 = /* @__PURE__ */ Object.create(null);
+ function wordsRegexp2(words) {
+ return regexpCache2[words] || (regexpCache2[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
+ }
+ function codePointToString2(code2) {
+ return code2 <= 65535 ? String.fromCharCode(code2) : (code2 -= 65536, String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320));
+ }
+ var loneSurrogate2 = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Position3 = function(line, col) {
+ this.line = line, this.column = col;
+ };
+ Position3.prototype.offset = function(n) {
+ return new Position3(this.line, this.column + n);
+ };
+ var SourceLocation3 = function(p, start2, end) {
+ this.start = start2, this.end = end, p.sourceFile !== null && (this.source = p.sourceFile);
+ };
+ function getLineInfo2(input, offset2) {
+ for (var line = 1, cur = 0; ; ) {
+ var nextBreak = nextLineBreak2(input, cur, offset2);
+ if (nextBreak < 0)
+ return new Position3(line, offset2 - cur);
+ ++line, cur = nextBreak;
+ }
+ }
+ var defaultOptions2 = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must be
+ // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
+ // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
+ // (the latest version the library supports). This influences
+ // support for strict mode, the set of reserved words, and support
+ // for new syntax features.
+ ecmaVersion: null,
+ // `sourceType` indicates the mode the code should be parsed in.
+ // Can be either `"script"` or `"module"`. This influences global
+ // strict mode and parsing of `import` and `export` declarations.
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called when
+ // a semicolon is automatically inserted. It will be passed the
+ // position of the inserted semicolon as an offset, and if
+ // `locations` is enabled, it is given the location as a `{line,
+ // column}` object as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
+ // Set `allowReserved` to a boolean value to explicitly turn this on
+ // an off. When this option has the value "never", reserved words
+ // and keywords can also not be used as property names.
+ allowReserved: null,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: !1,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program, and an import.meta expression
+ // in a script isn't considered an error.
+ allowImportExportEverywhere: !1,
+ // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
+ // When enabled, await identifiers are allowed to appear at the top-level scope,
+ // but they are still not allowed in non-async functions.
+ allowAwaitOutsideFunction: null,
+ // When enabled, super identifiers are not constrained to
+ // appearing in methods and do not raise an error when they appear elsewhere.
+ allowSuperOutsideMethod: null,
+ // When enabled, hashbang directive in the beginning of file is
+ // allowed and treated as a line comment. Enabled by default when
+ // `ecmaVersion` >= 2023.
+ allowHashBang: !1,
+ // By default, the parser will verify that private properties are
+ // only used in places where they are valid and have been declared.
+ // Set this to false to turn such checks off.
+ checkPrivateFields: !0,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: !1,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokens returned from `tokenizer().getToken()`. Note
+ // that you are not allowed to call the parser from the
+ // callback—that will corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ // When this option has an array as value, objects representing the
+ // comments are pushed to it.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: !1,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: !1
+ }, warnedAboutEcmaVersion2 = !1;
+ function getOptions2(opts) {
+ var options = {};
+ for (var opt in defaultOptions2)
+ options[opt] = opts && hasOwn2(opts, opt) ? opts[opt] : defaultOptions2[opt];
+ if (options.ecmaVersion === "latest" ? options.ecmaVersion = 1e8 : options.ecmaVersion == null ? (!warnedAboutEcmaVersion2 && typeof console == "object" && console.warn && (warnedAboutEcmaVersion2 = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
+Defaulting to 2020, but this will stop working in the future.`)), options.ecmaVersion = 11) : options.ecmaVersion >= 2015 && (options.ecmaVersion -= 2009), options.allowReserved == null && (options.allowReserved = options.ecmaVersion < 5), (!opts || opts.allowHashBang == null) && (options.allowHashBang = options.ecmaVersion >= 14), isArray2(options.onToken)) {
+ var tokens = options.onToken;
+ options.onToken = function(token) {
+ return tokens.push(token);
+ };
+ }
+ return isArray2(options.onComment) && (options.onComment = pushComment2(options, options.onComment)), options;
+ }
+ function pushComment2(options, array) {
+ return function(block, text5, start2, end, startLoc, endLoc) {
+ var comment2 = {
+ type: block ? "Block" : "Line",
+ value: text5,
+ start: start2,
+ end
+ };
+ options.locations && (comment2.loc = new SourceLocation3(this, startLoc, endLoc)), options.ranges && (comment2.range = [start2, end]), array.push(comment2);
+ };
+ }
+ var SCOPE_TOP2 = 1, SCOPE_FUNCTION2 = 2, SCOPE_ASYNC2 = 4, SCOPE_GENERATOR2 = 8, SCOPE_ARROW2 = 16, SCOPE_SIMPLE_CATCH2 = 32, SCOPE_SUPER2 = 64, SCOPE_DIRECT_SUPER2 = 128, SCOPE_CLASS_STATIC_BLOCK2 = 256, SCOPE_CLASS_FIELD_INIT2 = 512, SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2;
+ function functionFlags2(async, generator) {
+ return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0);
+ }
+ var BIND_NONE2 = 0, BIND_VAR2 = 1, BIND_LEXICAL2 = 2, BIND_FUNCTION2 = 3, BIND_SIMPLE_CATCH2 = 4, BIND_OUTSIDE2 = 5, Parser3 = function(options, input, startPos) {
+ this.options = options = getOptions2(options), this.sourceFile = options.sourceFile, this.keywords = wordsRegexp2(keywords$12[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
+ var reserved = "";
+ options.allowReserved !== !0 && (reserved = reservedWords2[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3], options.sourceType === "module" && (reserved += " await")), this.reservedWords = wordsRegexp2(reserved);
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict;
+ this.reservedWordsStrict = wordsRegexp2(reservedStrict), this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind), this.input = String(input), this.containsEsc = !1, startPos ? (this.pos = startPos, this.lineStart = this.input.lastIndexOf(`
+`, startPos - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = types$12.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = options.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(SCOPE_TOP2), this.regexpState = null, this.privateNameStack = [];
+ }, prototypeAccessors2 = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
+ Parser3.prototype.parse = function() {
+ var node2 = this.options.program || this.startNode();
+ return this.nextToken(), this.parseTopLevel(node2);
+ }, prototypeAccessors2.inFunction.get = function() {
+ return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
+ }, prototypeAccessors2.inGenerator.get = function() {
+ return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0;
+ }, prototypeAccessors2.inAsync.get = function() {
+ return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0;
+ }, prototypeAccessors2.canAwait.get = function() {
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
+ var ref3 = this.scopeStack[i2], flags = ref3.flags;
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2))
+ return !1;
+ if (flags & SCOPE_FUNCTION2)
+ return (flags & SCOPE_ASYNC2) > 0;
+ }
+ return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
+ }, prototypeAccessors2.allowSuper.get = function() {
+ var ref3 = this.currentThisScope(), flags = ref3.flags;
+ return (flags & SCOPE_SUPER2) > 0 || this.options.allowSuperOutsideMethod;
+ }, prototypeAccessors2.allowDirectSuper.get = function() {
+ return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
+ }, prototypeAccessors2.treatFunctionsAsVar.get = function() {
+ return this.treatFunctionsAsVarInScope(this.currentScope());
+ }, prototypeAccessors2.allowNewDotTarget.get = function() {
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
+ var ref3 = this.scopeStack[i2], flags = ref3.flags;
+ if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2) || flags & SCOPE_FUNCTION2 && !(flags & SCOPE_ARROW2))
+ return !0;
+ }
+ return !1;
+ }, prototypeAccessors2.inClassStaticBlock.get = function() {
+ return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK2) > 0;
+ }, Parser3.extend = function() {
+ for (var plugins = [], len = arguments.length; len--; ) plugins[len] = arguments[len];
+ for (var cls = this, i2 = 0; i2 < plugins.length; i2++)
+ cls = plugins[i2](cls);
+ return cls;
+ }, Parser3.parse = function(input, options) {
+ return new this(options, input).parse();
+ }, Parser3.parseExpressionAt = function(input, pos, options) {
+ var parser = new this(options, input, pos);
+ return parser.nextToken(), parser.parseExpression();
+ }, Parser3.tokenizer = function(input, options) {
+ return new this(options, input);
+ }, Object.defineProperties(Parser3.prototype, prototypeAccessors2);
+ var pp$92 = Parser3.prototype, literal2 = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
+ pp$92.strictDirective = function(start2) {
+ if (this.options.ecmaVersion < 5)
+ return !1;
+ for (; ; ) {
+ skipWhiteSpace2.lastIndex = start2, start2 += skipWhiteSpace2.exec(this.input)[0].length;
+ var match = literal2.exec(this.input.slice(start2));
+ if (!match)
+ return !1;
+ if ((match[1] || match[2]) === "use strict") {
+ skipWhiteSpace2.lastIndex = start2 + match[0].length;
+ var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length, next = this.input.charAt(end);
+ return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
+ }
+ start2 += match[0].length, skipWhiteSpace2.lastIndex = start2, start2 += skipWhiteSpace2.exec(this.input)[0].length, this.input[start2] === ";" && start2++;
+ }
+ }, pp$92.eat = function(type) {
+ return this.type === type ? (this.next(), !0) : !1;
+ }, pp$92.isContextual = function(name2) {
+ return this.type === types$12.name && this.value === name2 && !this.containsEsc;
+ }, pp$92.eatContextual = function(name2) {
+ return this.isContextual(name2) ? (this.next(), !0) : !1;
+ }, pp$92.expectContextual = function(name2) {
+ this.eatContextual(name2) || this.unexpected();
+ }, pp$92.canInsertSemicolon = function() {
+ return this.type === types$12.eof || this.type === types$12.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
+ }, pp$92.insertSemicolon = function() {
+ if (this.canInsertSemicolon())
+ return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
+ }, pp$92.semicolon = function() {
+ !this.eat(types$12.semi) && !this.insertSemicolon() && this.unexpected();
+ }, pp$92.afterTrailingComma = function(tokType, notNext) {
+ if (this.type === tokType)
+ return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), notNext || this.next(), !0;
+ }, pp$92.expect = function(type) {
+ this.eat(type) || this.unexpected();
+ }, pp$92.unexpected = function(pos) {
+ this.raise(pos ?? this.start, "Unexpected token");
+ };
+ var DestructuringErrors3 = function() {
+ this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
+ };
+ pp$92.checkPatternErrors = function(refDestructuringErrors, isAssign) {
+ if (refDestructuringErrors) {
+ refDestructuringErrors.trailingComma > -1 && this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
+ parens > -1 && this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern");
+ }
+ }, pp$92.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
+ if (!refDestructuringErrors)
+ return !1;
+ var shorthandAssign = refDestructuringErrors.shorthandAssign, doubleProto = refDestructuringErrors.doubleProto;
+ if (!andThrow)
+ return shorthandAssign >= 0 || doubleProto >= 0;
+ shorthandAssign >= 0 && this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"), doubleProto >= 0 && this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
+ }, pp$92.checkYieldAwaitInDefaultParams = function() {
+ this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
+ }, pp$92.isSimpleAssignTarget = function(expr) {
+ return expr.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(expr.expression) : expr.type === "Identifier" || expr.type === "MemberExpression";
+ };
+ var pp$82 = Parser3.prototype;
+ pp$82.parseTopLevel = function(node2) {
+ var exports3 = /* @__PURE__ */ Object.create(null);
+ for (node2.body || (node2.body = []); this.type !== types$12.eof; ) {
+ var stmt = this.parseStatement(null, !0, exports3);
+ node2.body.push(stmt);
+ }
+ if (this.inModule)
+ for (var i2 = 0, list4 = Object.keys(this.undefinedExports); i2 < list4.length; i2 += 1) {
+ var name2 = list4[i2];
+ this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
+ }
+ return this.adaptDirectivePrologue(node2.body), this.next(), node2.sourceType = this.options.sourceType, this.finishNode(node2, "Program");
+ };
+ var loopLabel2 = { kind: "loop" }, switchLabel2 = { kind: "switch" };
+ pp$82.isLet = function(context) {
+ if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 91 || nextCh === 92)
+ return !0;
+ if (context)
+ return !1;
+ if (nextCh === 123 || nextCh > 55295 && nextCh < 56320)
+ return !0;
+ if (isIdentifierStart2(nextCh, !0)) {
+ for (var pos = next + 1; isIdentifierChar2(nextCh = this.input.charCodeAt(pos), !0); )
+ ++pos;
+ if (nextCh === 92 || nextCh > 55295 && nextCh < 56320)
+ return !0;
+ var ident = this.input.slice(next, pos);
+ if (!keywordRelationalOperator2.test(ident))
+ return !0;
+ }
+ return !1;
+ }, pp$82.isAsyncFunction = function() {
+ if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, after;
+ return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
+ }, pp$82.isUsingKeyword = function(isAwaitUsing, isFor) {
+ if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using"))
+ return !1;
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length;
+ if (lineBreak2.test(this.input.slice(this.pos, next)))
+ return !1;
+ if (isAwaitUsing) {
+ var awaitEndPos = next + 5, after;
+ if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar2(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320)
+ return !1;
+ skipWhiteSpace2.lastIndex = awaitEndPos;
+ var skipAfterUsing = skipWhiteSpace2.exec(this.input);
+ if (skipAfterUsing && lineBreak2.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length)))
+ return !1;
+ }
+ if (isFor) {
+ var ofEndPos = next + 2, after$1;
+ if (this.input.slice(next, ofEndPos) === "of" && (ofEndPos === this.input.length || !isIdentifierChar2(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)))
+ return !1;
+ }
+ var ch = this.input.charCodeAt(next);
+ return isIdentifierStart2(ch, !0) || ch === 92;
+ }, pp$82.isAwaitUsing = function(isFor) {
+ return this.isUsingKeyword(!0, isFor);
+ }, pp$82.isUsing = function(isFor) {
+ return this.isUsingKeyword(!1, isFor);
+ }, pp$82.parseStatement = function(context, topLevel, exports3) {
+ var starttype = this.type, node2 = this.startNode(), kind;
+ switch (this.isLet(context) && (starttype = types$12._var, kind = "let"), starttype) {
+ case types$12._break:
+ case types$12._continue:
+ return this.parseBreakContinueStatement(node2, starttype.keyword);
+ case types$12._debugger:
+ return this.parseDebuggerStatement(node2);
+ case types$12._do:
+ return this.parseDoStatement(node2);
+ case types$12._for:
+ return this.parseForStatement(node2);
+ case types$12._function:
+ return context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(node2, !1, !context);
+ case types$12._class:
+ return context && this.unexpected(), this.parseClass(node2, !0);
+ case types$12._if:
+ return this.parseIfStatement(node2);
+ case types$12._return:
+ return this.parseReturnStatement(node2);
+ case types$12._switch:
+ return this.parseSwitchStatement(node2);
+ case types$12._throw:
+ return this.parseThrowStatement(node2);
+ case types$12._try:
+ return this.parseTryStatement(node2);
+ case types$12._const:
+ case types$12._var:
+ return kind = kind || this.value, context && kind !== "var" && this.unexpected(), this.parseVarStatement(node2, kind);
+ case types$12._while:
+ return this.parseWhileStatement(node2);
+ case types$12._with:
+ return this.parseWithStatement(node2);
+ case types$12.braceL:
+ return this.parseBlock(!0, node2);
+ case types$12.semi:
+ return this.parseEmptyStatement(node2);
+ case types$12._export:
+ case types$12._import:
+ if (this.options.ecmaVersion > 10 && starttype === types$12._import) {
+ skipWhiteSpace2.lastIndex = this.pos;
+ var skip = skipWhiteSpace2.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
+ if (nextCh === 40 || nextCh === 46)
+ return this.parseExpressionStatement(node2, this.parseExpression());
+ }
+ return this.options.allowImportExportEverywhere || (topLevel || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports3);
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ if (this.isAsyncFunction())
+ return context && this.unexpected(), this.next(), this.parseFunctionStatement(node2, !0, !context);
+ var usingKind = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
+ if (usingKind)
+ return topLevel && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), usingKind === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(node2, !1, usingKind), this.semicolon(), this.finishNode(node2, "VariableDeclaration");
+ var maybeName = this.value, expr = this.parseExpression();
+ return starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon) ? this.parseLabeledStatement(node2, maybeName, expr, context) : this.parseExpressionStatement(node2, expr);
+ }
+ }, pp$82.parseBreakContinueStatement = function(node2, keyword) {
+ var isBreak = keyword === "break";
+ this.next(), this.eat(types$12.semi) || this.insertSemicolon() ? node2.label = null : this.type !== types$12.name ? this.unexpected() : (node2.label = this.parseIdent(), this.semicolon());
+ for (var i2 = 0; i2 < this.labels.length; ++i2) {
+ var lab = this.labels[i2];
+ if ((node2.label == null || lab.name === node2.label.name) && (lab.kind != null && (isBreak || lab.kind === "loop") || node2.label && isBreak))
+ break;
+ }
+ return i2 === this.labels.length && this.raise(node2.start, "Unsyntactic " + keyword), this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement");
+ }, pp$82.parseDebuggerStatement = function(node2) {
+ return this.next(), this.semicolon(), this.finishNode(node2, "DebuggerStatement");
+ }, pp$82.parseDoStatement = function(node2) {
+ return this.next(), this.labels.push(loopLabel2), node2.body = this.parseStatement("do"), this.labels.pop(), this.expect(types$12._while), node2.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(types$12.semi) : this.semicolon(), this.finishNode(node2, "DoWhileStatement");
+ }, pp$82.parseForStatement = function(node2) {
+ this.next();
+ var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
+ if (this.labels.push(loopLabel2), this.enterScope(0), this.expect(types$12.parenL), this.type === types$12.semi)
+ return awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, null);
+ var isLet = this.isLet();
+ if (this.type === types$12._var || this.type === types$12._const || isLet) {
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
+ return this.next(), this.parseVar(init$1, !0, kind), this.finishNode(init$1, "VariableDeclaration"), this.parseForAfterInit(node2, init$1, awaitAt);
+ }
+ var startsWithLet = this.isContextual("let"), isForOf = !1, usingKind = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
+ if (usingKind) {
+ var init$2 = this.startNode();
+ return this.next(), usingKind === "await using" && this.next(), this.parseVar(init$2, !0, usingKind), this.finishNode(init$2, "VariableDeclaration"), this.parseForAfterInit(node2, init$2, awaitAt);
+ }
+ var containsEsc = this.containsEsc, refDestructuringErrors = new DestructuringErrors3(), initPos = this.start, init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(!0, refDestructuringErrors);
+ return this.type === types$12._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (awaitAt > -1 ? (this.type === types$12._in && this.unexpected(awaitAt), node2.await = !0) : isForOf && this.options.ecmaVersion >= 8 && (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (node2.await = !1)), startsWithLet && isForOf && this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(init, !1, refDestructuringErrors), this.checkLValPattern(init), this.parseForIn(node2, init)) : (this.checkExpressionErrors(refDestructuringErrors, !0), awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, init));
+ }, pp$82.parseForAfterInit = function(node2, init, awaitAt) {
+ return (this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === types$12._in ? awaitAt > -1 && this.unexpected(awaitAt) : node2.await = awaitAt > -1), this.parseForIn(node2, init)) : (awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node2, init));
+ }, pp$82.parseFunctionStatement = function(node2, isAsync, declarationPosition) {
+ return this.next(), this.parseFunction(node2, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), !1, isAsync);
+ }, pp$82.parseIfStatement = function(node2) {
+ return this.next(), node2.test = this.parseParenExpression(), node2.consequent = this.parseStatement("if"), node2.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null, this.finishNode(node2, "IfStatement");
+ }, pp$82.parseReturnStatement = function(node2) {
+ return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(types$12.semi) || this.insertSemicolon() ? node2.argument = null : (node2.argument = this.parseExpression(), this.semicolon()), this.finishNode(node2, "ReturnStatement");
+ }, pp$82.parseSwitchStatement = function(node2) {
+ this.next(), node2.discriminant = this.parseParenExpression(), node2.cases = [], this.expect(types$12.braceL), this.labels.push(switchLabel2), this.enterScope(0);
+ for (var cur, sawDefault = !1; this.type !== types$12.braceR; )
+ if (this.type === types$12._case || this.type === types$12._default) {
+ var isCase = this.type === types$12._case;
+ cur && this.finishNode(cur, "SwitchCase"), node2.cases.push(cur = this.startNode()), cur.consequent = [], this.next(), isCase ? cur.test = this.parseExpression() : (sawDefault && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), sawDefault = !0, cur.test = null), this.expect(types$12.colon);
+ } else
+ cur || this.unexpected(), cur.consequent.push(this.parseStatement(null));
+ return this.exitScope(), cur && this.finishNode(cur, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(node2, "SwitchStatement");
+ }, pp$82.parseThrowStatement = function(node2) {
+ return this.next(), lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), node2.argument = this.parseExpression(), this.semicolon(), this.finishNode(node2, "ThrowStatement");
+ };
+ var empty$12 = [];
+ pp$82.parseCatchClauseParam = function() {
+ var param = this.parseBindingAtom(), simple = param.type === "Identifier";
+ return this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0), this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2), this.expect(types$12.parenR), param;
+ }, pp$82.parseTryStatement = function(node2) {
+ if (this.next(), node2.block = this.parseBlock(), node2.handler = null, this.type === types$12._catch) {
+ var clause = this.startNode();
+ this.next(), this.eat(types$12.parenL) ? clause.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), clause.param = null, this.enterScope(0)), clause.body = this.parseBlock(!1), this.exitScope(), node2.handler = this.finishNode(clause, "CatchClause");
+ }
+ return node2.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null, !node2.handler && !node2.finalizer && this.raise(node2.start, "Missing catch or finally clause"), this.finishNode(node2, "TryStatement");
+ }, pp$82.parseVarStatement = function(node2, kind, allowMissingInitializer) {
+ return this.next(), this.parseVar(node2, !1, kind, allowMissingInitializer), this.semicolon(), this.finishNode(node2, "VariableDeclaration");
+ }, pp$82.parseWhileStatement = function(node2) {
+ return this.next(), node2.test = this.parseParenExpression(), this.labels.push(loopLabel2), node2.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(node2, "WhileStatement");
+ }, pp$82.parseWithStatement = function(node2) {
+ return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), node2.object = this.parseParenExpression(), node2.body = this.parseStatement("with"), this.finishNode(node2, "WithStatement");
+ }, pp$82.parseEmptyStatement = function(node2) {
+ return this.next(), this.finishNode(node2, "EmptyStatement");
+ }, pp$82.parseLabeledStatement = function(node2, maybeName, expr, context) {
+ for (var i$1 = 0, list4 = this.labels; i$1 < list4.length; i$1 += 1) {
+ var label = list4[i$1];
+ label.name === maybeName && this.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ }
+ for (var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null, i2 = this.labels.length - 1; i2 >= 0; i2--) {
+ var label$1 = this.labels[i2];
+ if (label$1.statementStart === node2.start)
+ label$1.statementStart = this.start, label$1.kind = kind;
+ else
+ break;
+ }
+ return this.labels.push({ name: maybeName, kind, statementStart: this.start }), node2.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"), this.labels.pop(), node2.label = expr, this.finishNode(node2, "LabeledStatement");
+ }, pp$82.parseExpressionStatement = function(node2, expr) {
+ return node2.expression = expr, this.semicolon(), this.finishNode(node2, "ExpressionStatement");
+ }, pp$82.parseBlock = function(createNewLexicalScope, node2, exitStrict) {
+ for (createNewLexicalScope === void 0 && (createNewLexicalScope = !0), node2 === void 0 && (node2 = this.startNode()), node2.body = [], this.expect(types$12.braceL), createNewLexicalScope && this.enterScope(0); this.type !== types$12.braceR; ) {
+ var stmt = this.parseStatement(null);
+ node2.body.push(stmt);
+ }
+ return exitStrict && (this.strict = !1), this.next(), createNewLexicalScope && this.exitScope(), this.finishNode(node2, "BlockStatement");
+ }, pp$82.parseFor = function(node2, init) {
+ return node2.init = init, this.expect(types$12.semi), node2.test = this.type === types$12.semi ? null : this.parseExpression(), this.expect(types$12.semi), node2.update = this.type === types$12.parenR ? null : this.parseExpression(), this.expect(types$12.parenR), node2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node2, "ForStatement");
+ }, pp$82.parseForIn = function(node2, init) {
+ var isForIn = this.type === types$12._in;
+ return this.next(), init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier") && this.raise(
+ init.start,
+ (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
+ ), node2.left = init, node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(), this.expect(types$12.parenR), node2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement");
+ }, pp$82.parseVar = function(node2, isFor, kind, allowMissingInitializer) {
+ for (node2.declarations = [], node2.kind = kind; ; ) {
+ var decl = this.startNode();
+ if (this.parseVarId(decl, kind), this.eat(types$12.eq) ? decl.init = this.parseMaybeAssign(isFor) : !allowMissingInitializer && kind === "const" && !(this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$12._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration") : !allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$12._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : decl.init = null, node2.declarations.push(this.finishNode(decl, "VariableDeclarator")), !this.eat(types$12.comma))
+ break;
+ }
+ return node2;
+ }, pp$82.parseVarId = function(decl, kind) {
+ decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, !1);
+ };
+ var FUNC_STATEMENT2 = 1, FUNC_HANGING_STATEMENT2 = 2, FUNC_NULLABLE_ID2 = 4;
+ pp$82.parseFunction = function(node2, statement, allowExpressionBody, isAsync, forInit) {
+ this.initFunction(node2), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) && (this.type === types$12.star && statement & FUNC_HANGING_STATEMENT2 && this.unexpected(), node2.generator = this.eat(types$12.star)), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), statement & FUNC_STATEMENT2 && (node2.id = statement & FUNC_NULLABLE_ID2 && this.type !== types$12.name ? null : this.parseIdent(), node2.id && !(statement & FUNC_HANGING_STATEMENT2) && this.checkLValSimple(node2.id, this.strict || node2.generator || node2.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2));
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags2(node2.async, node2.generator)), statement & FUNC_STATEMENT2 || (node2.id = this.type === types$12.name ? this.parseIdent() : null), this.parseFunctionParams(node2), this.parseFunctionBody(node2, allowExpressionBody, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression");
+ }, pp$82.parseFunctionParams = function(node2) {
+ this.expect(types$12.parenL), node2.params = this.parseBindingList(types$12.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
+ }, pp$82.parseClass = function(node2, isStatement) {
+ this.next();
+ var oldStrict = this.strict;
+ this.strict = !0, this.parseClassId(node2, isStatement), this.parseClassSuper(node2);
+ var privateNameMap = this.enterClassBody(), classBody = this.startNode(), hadConstructor = !1;
+ for (classBody.body = [], this.expect(types$12.braceL); this.type !== types$12.braceR; ) {
+ var element2 = this.parseClassElement(node2.superClass !== null);
+ element2 && (classBody.body.push(element2), element2.type === "MethodDefinition" && element2.kind === "constructor" ? (hadConstructor && this.raiseRecoverable(element2.start, "Duplicate constructor in the same class"), hadConstructor = !0) : element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted2(privateNameMap, element2) && this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared"));
+ }
+ return this.strict = oldStrict, this.next(), node2.body = this.finishNode(classBody, "ClassBody"), this.exitClassBody(), this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression");
+ }, pp$82.parseClassElement = function(constructorAllowsSuper) {
+ if (this.eat(types$12.semi))
+ return null;
+ var ecmaVersion2 = this.options.ecmaVersion, node2 = this.startNode(), keyName = "", isGenerator = !1, isAsync = !1, kind = "method", isStatic = !1;
+ if (this.eatContextual("static")) {
+ if (ecmaVersion2 >= 13 && this.eat(types$12.braceL))
+ return this.parseClassStaticBlock(node2), node2;
+ this.isClassElementNameStart() || this.type === types$12.star ? isStatic = !0 : keyName = "static";
+ }
+ if (node2.static = isStatic, !keyName && ecmaVersion2 >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon() ? isAsync = !0 : keyName = "async"), !keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$12.star) && (isGenerator = !0), !keyName && !isAsync && !isGenerator) {
+ var lastValue = this.value;
+ (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? kind = lastValue : keyName = lastValue);
+ }
+ if (keyName ? (node2.computed = !1, node2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), node2.key.name = keyName, this.finishNode(node2.key, "Identifier")) : this.parseClassElementName(node2), ecmaVersion2 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) {
+ var isConstructor = !node2.static && checkKeyName2(node2, "constructor"), allowsDirectSuper = isConstructor && constructorAllowsSuper;
+ isConstructor && kind !== "method" && this.raise(node2.key.start, "Constructor can't have get/set modifier"), node2.kind = isConstructor ? "constructor" : kind, this.parseClassMethod(node2, isGenerator, isAsync, allowsDirectSuper);
+ } else
+ this.parseClassField(node2);
+ return node2;
+ }, pp$82.isClassElementNameStart = function() {
+ return this.type === types$12.name || this.type === types$12.privateId || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword;
+ }, pp$82.parseClassElementName = function(element2) {
+ this.type === types$12.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), element2.computed = !1, element2.key = this.parsePrivateIdent()) : this.parsePropertyName(element2);
+ }, pp$82.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
+ var key2 = method.key;
+ method.kind === "constructor" ? (isGenerator && this.raise(key2.start, "Constructor can't be a generator"), isAsync && this.raise(key2.start, "Constructor can't be an async method")) : method.static && checkKeyName2(method, "prototype") && this.raise(key2.start, "Classes may not have a static property named prototype");
+ var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
+ return method.kind === "get" && value.params.length !== 0 && this.raiseRecoverable(value.start, "getter should have no params"), method.kind === "set" && value.params.length !== 1 && this.raiseRecoverable(value.start, "setter should have exactly one param"), method.kind === "set" && value.params[0].type === "RestElement" && this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"), this.finishNode(method, "MethodDefinition");
+ }, pp$82.parseClassField = function(field) {
+ return checkKeyName2(field, "constructor") ? this.raise(field.key.start, "Classes can't have a field named 'constructor'") : field.static && checkKeyName2(field, "prototype") && this.raise(field.key.start, "Classes can't have a static field named 'prototype'"), this.eat(types$12.eq) ? (this.enterScope(SCOPE_CLASS_FIELD_INIT2 | SCOPE_SUPER2), field.value = this.parseMaybeAssign(), this.exitScope()) : field.value = null, this.semicolon(), this.finishNode(field, "PropertyDefinition");
+ }, pp$82.parseClassStaticBlock = function(node2) {
+ node2.body = [];
+ var oldLabels = this.labels;
+ for (this.labels = [], this.enterScope(SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_SUPER2); this.type !== types$12.braceR; ) {
+ var stmt = this.parseStatement(null);
+ node2.body.push(stmt);
+ }
+ return this.next(), this.exitScope(), this.labels = oldLabels, this.finishNode(node2, "StaticBlock");
+ }, pp$82.parseClassId = function(node2, isStatement) {
+ this.type === types$12.name ? (node2.id = this.parseIdent(), isStatement && this.checkLValSimple(node2.id, BIND_LEXICAL2, !1)) : (isStatement === !0 && this.unexpected(), node2.id = null);
+ }, pp$82.parseClassSuper = function(node2) {
+ node2.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts(null, !1) : null;
+ }, pp$82.enterClassBody = function() {
+ var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
+ return this.privateNameStack.push(element2), element2.declared;
+ }, pp$82.exitClassBody = function() {
+ var ref3 = this.privateNameStack.pop(), declared = ref3.declared, used = ref3.used;
+ if (this.options.checkPrivateFields)
+ for (var len = this.privateNameStack.length, parent = len === 0 ? null : this.privateNameStack[len - 1], i2 = 0; i2 < used.length; ++i2) {
+ var id = used[i2];
+ hasOwn2(declared, id.name) || (parent ? parent.used.push(id) : this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"));
+ }
+ };
+ function isPrivateNameConflicted2(privateNameMap, element2) {
+ var name2 = element2.key.name, curr = privateNameMap[name2], next = "true";
+ return element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set") && (next = (element2.static ? "s" : "i") + element2.kind), curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget" ? (privateNameMap[name2] = "true", !1) : curr ? !0 : (privateNameMap[name2] = next, !1);
+ }
+ function checkKeyName2(node2, name2) {
+ var computed = node2.computed, key2 = node2.key;
+ return !computed && (key2.type === "Identifier" && key2.name === name2 || key2.type === "Literal" && key2.value === name2);
+ }
+ pp$82.parseExportAllDeclaration = function(node2, exports3) {
+ return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node2.exported = this.parseModuleExportName(), this.checkExport(exports3, node2.exported, this.lastTokStart)) : node2.exported = null), this.expectContextual("from"), this.type !== types$12.string && this.unexpected(), node2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node2, "ExportAllDeclaration");
+ }, pp$82.parseExport = function(node2, exports3) {
+ if (this.next(), this.eat(types$12.star))
+ return this.parseExportAllDeclaration(node2, exports3);
+ if (this.eat(types$12._default))
+ return this.checkExport(exports3, "default", this.lastTokStart), node2.declaration = this.parseExportDefaultDeclaration(), this.finishNode(node2, "ExportDefaultDeclaration");
+ if (this.shouldParseExportStatement())
+ node2.declaration = this.parseExportDeclaration(node2), node2.declaration.type === "VariableDeclaration" ? this.checkVariableExport(exports3, node2.declaration.declarations) : this.checkExport(exports3, node2.declaration.id, node2.declaration.id.start), node2.specifiers = [], node2.source = null, this.options.ecmaVersion >= 16 && (node2.attributes = []);
+ else {
+ if (node2.declaration = null, node2.specifiers = this.parseExportSpecifiers(exports3), this.eatContextual("from"))
+ this.type !== types$12.string && this.unexpected(), node2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause());
+ else {
+ for (var i2 = 0, list4 = node2.specifiers; i2 < list4.length; i2 += 1) {
+ var spec = list4[i2];
+ this.checkUnreserved(spec.local), this.checkLocalExport(spec.local), spec.local.type === "Literal" && this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
+ }
+ node2.source = null, this.options.ecmaVersion >= 16 && (node2.attributes = []);
+ }
+ this.semicolon();
+ }
+ return this.finishNode(node2, "ExportNamedDeclaration");
+ }, pp$82.parseExportDeclaration = function(node2) {
+ return this.parseStatement(null);
+ }, pp$82.parseExportDefaultDeclaration = function() {
+ var isAsync;
+ if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
+ var fNode = this.startNode();
+ return this.next(), isAsync && this.next(), this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, !1, isAsync);
+ } else if (this.type === types$12._class) {
+ var cNode = this.startNode();
+ return this.parseClass(cNode, "nullableID");
+ } else {
+ var declaration = this.parseMaybeAssign();
+ return this.semicolon(), declaration;
+ }
+ }, pp$82.checkExport = function(exports3, name2, pos) {
+ exports3 && (typeof name2 != "string" && (name2 = name2.type === "Identifier" ? name2.name : name2.value), hasOwn2(exports3, name2) && this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'"), exports3[name2] = !0);
+ }, pp$82.checkPatternExport = function(exports3, pat) {
+ var type = pat.type;
+ if (type === "Identifier")
+ this.checkExport(exports3, pat, pat.start);
+ else if (type === "ObjectPattern")
+ for (var i2 = 0, list4 = pat.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.checkPatternExport(exports3, prop);
+ }
+ else if (type === "ArrayPattern")
+ for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
+ var elt = list$1[i$1];
+ elt && this.checkPatternExport(exports3, elt);
+ }
+ else type === "Property" ? this.checkPatternExport(exports3, pat.value) : type === "AssignmentPattern" ? this.checkPatternExport(exports3, pat.left) : type === "RestElement" && this.checkPatternExport(exports3, pat.argument);
+ }, pp$82.checkVariableExport = function(exports3, decls) {
+ if (exports3)
+ for (var i2 = 0, list4 = decls; i2 < list4.length; i2 += 1) {
+ var decl = list4[i2];
+ this.checkPatternExport(exports3, decl.id);
+ }
+ }, pp$82.shouldParseExportStatement = function() {
+ return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
+ }, pp$82.parseExportSpecifier = function(exports3) {
+ var node2 = this.startNode();
+ return node2.local = this.parseModuleExportName(), node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local, this.checkExport(
+ exports3,
+ node2.exported,
+ node2.exported.start
+ ), this.finishNode(node2, "ExportSpecifier");
+ }, pp$82.parseExportSpecifiers = function(exports3) {
+ var nodes = [], first = !0;
+ for (this.expect(types$12.braceL); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ nodes.push(this.parseExportSpecifier(exports3));
+ }
+ return nodes;
+ }, pp$82.parseImport = function(node2) {
+ return this.next(), this.type === types$12.string ? (node2.specifiers = empty$12, node2.source = this.parseExprAtom()) : (node2.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), node2.source = this.type === types$12.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (node2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(node2, "ImportDeclaration");
+ }, pp$82.parseImportSpecifier = function() {
+ var node2 = this.startNode();
+ return node2.imported = this.parseModuleExportName(), this.eatContextual("as") ? node2.local = this.parseIdent() : (this.checkUnreserved(node2.imported), node2.local = node2.imported), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportSpecifier");
+ }, pp$82.parseImportDefaultSpecifier = function() {
+ var node2 = this.startNode();
+ return node2.local = this.parseIdent(), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportDefaultSpecifier");
+ }, pp$82.parseImportNamespaceSpecifier = function() {
+ var node2 = this.startNode();
+ return this.next(), this.expectContextual("as"), node2.local = this.parseIdent(), this.checkLValSimple(node2.local, BIND_LEXICAL2), this.finishNode(node2, "ImportNamespaceSpecifier");
+ }, pp$82.parseImportSpecifiers = function() {
+ var nodes = [], first = !0;
+ if (this.type === types$12.name && (nodes.push(this.parseImportDefaultSpecifier()), !this.eat(types$12.comma)))
+ return nodes;
+ if (this.type === types$12.star)
+ return nodes.push(this.parseImportNamespaceSpecifier()), nodes;
+ for (this.expect(types$12.braceL); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ nodes.push(this.parseImportSpecifier());
+ }
+ return nodes;
+ }, pp$82.parseWithClause = function() {
+ var nodes = [];
+ if (!this.eat(types$12._with))
+ return nodes;
+ this.expect(types$12.braceL);
+ for (var attributeKeys = {}, first = !0; !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.afterTrailingComma(types$12.braceR))
+ break;
+ var attr = this.parseImportAttribute(), keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value;
+ hasOwn2(attributeKeys, keyName) && this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"), attributeKeys[keyName] = !0, nodes.push(attr);
+ }
+ return nodes;
+ }, pp$82.parseImportAttribute = function() {
+ var node2 = this.startNode();
+ return node2.key = this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(types$12.colon), this.type !== types$12.string && this.unexpected(), node2.value = this.parseExprAtom(), this.finishNode(node2, "ImportAttribute");
+ }, pp$82.parseModuleExportName = function() {
+ if (this.options.ecmaVersion >= 13 && this.type === types$12.string) {
+ var stringLiteral = this.parseLiteral(this.value);
+ return loneSurrogate2.test(stringLiteral.value) && this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."), stringLiteral;
+ }
+ return this.parseIdent(!0);
+ }, pp$82.adaptDirectivePrologue = function(statements) {
+ for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2)
+ statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
+ }, pp$82.isDirectiveCandidate = function(statement) {
+ return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value == "string" && // Reject parenthesized strings.
+ (this.input[statement.start] === '"' || this.input[statement.start] === "'");
+ };
+ var pp$72 = Parser3.prototype;
+ pp$72.toAssignable = function(node2, isBinding, refDestructuringErrors) {
+ if (this.options.ecmaVersion >= 6 && node2)
+ switch (node2.type) {
+ case "Identifier":
+ this.inAsync && node2.name === "await" && this.raise(node2.start, "Cannot use 'await' as identifier inside an async function");
+ break;
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ case "RestElement":
+ break;
+ case "ObjectExpression":
+ node2.type = "ObjectPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
+ for (var i2 = 0, list4 = node2.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.toAssignable(prop, isBinding), prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") && this.raise(prop.argument.start, "Unexpected token");
+ }
+ break;
+ case "Property":
+ node2.kind !== "init" && this.raise(node2.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(node2.value, isBinding);
+ break;
+ case "ArrayExpression":
+ node2.type = "ArrayPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0), this.toAssignableList(node2.elements, isBinding);
+ break;
+ case "SpreadElement":
+ node2.type = "RestElement", this.toAssignable(node2.argument, isBinding), node2.argument.type === "AssignmentPattern" && this.raise(node2.argument.start, "Rest elements cannot have a default value");
+ break;
+ case "AssignmentExpression":
+ node2.operator !== "=" && this.raise(node2.left.end, "Only '=' operator can be used for specifying default value."), node2.type = "AssignmentPattern", delete node2.operator, this.toAssignable(node2.left, isBinding);
+ break;
+ case "ParenthesizedExpression":
+ this.toAssignable(node2.expression, isBinding, refDestructuringErrors);
+ break;
+ case "ChainExpression":
+ this.raiseRecoverable(node2.start, "Optional chaining cannot appear in left-hand side");
+ break;
+ case "MemberExpression":
+ if (!isBinding)
+ break;
+ default:
+ this.raise(node2.start, "Assigning to rvalue");
+ }
+ else refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
+ return node2;
+ }, pp$72.toAssignableList = function(exprList, isBinding) {
+ for (var end = exprList.length, i2 = 0; i2 < end; i2++) {
+ var elt = exprList[i2];
+ elt && this.toAssignable(elt, isBinding);
+ }
+ if (end) {
+ var last = exprList[end - 1];
+ this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier" && this.unexpected(last.argument.start);
+ }
+ return exprList;
+ }, pp$72.parseSpread = function(refDestructuringErrors) {
+ var node2 = this.startNode();
+ return this.next(), node2.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.finishNode(node2, "SpreadElement");
+ }, pp$72.parseRestBinding = function() {
+ var node2 = this.startNode();
+ return this.next(), this.options.ecmaVersion === 6 && this.type !== types$12.name && this.unexpected(), node2.argument = this.parseBindingAtom(), this.finishNode(node2, "RestElement");
+ }, pp$72.parseBindingAtom = function() {
+ if (this.options.ecmaVersion >= 6)
+ switch (this.type) {
+ case types$12.bracketL:
+ var node2 = this.startNode();
+ return this.next(), node2.elements = this.parseBindingList(types$12.bracketR, !0, !0), this.finishNode(node2, "ArrayPattern");
+ case types$12.braceL:
+ return this.parseObj(!0);
+ }
+ return this.parseIdent();
+ }, pp$72.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
+ for (var elts = [], first = !0; !this.eat(close); )
+ if (first ? first = !1 : this.expect(types$12.comma), allowEmpty && this.type === types$12.comma)
+ elts.push(null);
+ else {
+ if (allowTrailingComma && this.afterTrailingComma(close))
+ break;
+ if (this.type === types$12.ellipsis) {
+ var rest = this.parseRestBinding();
+ this.parseBindingListItem(rest), elts.push(rest), this.type === types$12.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(close);
+ break;
+ } else
+ elts.push(this.parseAssignableListItem(allowModifiers));
+ }
+ return elts;
+ }, pp$72.parseAssignableListItem = function(allowModifiers) {
+ var elem = this.parseMaybeDefault(this.start, this.startLoc);
+ return this.parseBindingListItem(elem), elem;
+ }, pp$72.parseBindingListItem = function(param) {
+ return param;
+ }, pp$72.parseMaybeDefault = function(startPos, startLoc, left) {
+ if (left = left || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(types$12.eq))
+ return left;
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.left = left, node2.right = this.parseMaybeAssign(), this.finishNode(node2, "AssignmentPattern");
+ }, pp$72.checkLValSimple = function(expr, bindingType, checkClashes) {
+ bindingType === void 0 && (bindingType = BIND_NONE2);
+ var isBind = bindingType !== BIND_NONE2;
+ switch (expr.type) {
+ case "Identifier":
+ this.strict && this.reservedWordsStrictBind.test(expr.name) && this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"), isBind && (bindingType === BIND_LEXICAL2 && expr.name === "let" && this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"), checkClashes && (hasOwn2(checkClashes, expr.name) && this.raiseRecoverable(expr.start, "Argument name clash"), checkClashes[expr.name] = !0), bindingType !== BIND_OUTSIDE2 && this.declareName(expr.name, bindingType, expr.start));
+ break;
+ case "ChainExpression":
+ this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
+ break;
+ case "MemberExpression":
+ isBind && this.raiseRecoverable(expr.start, "Binding member expression");
+ break;
+ case "ParenthesizedExpression":
+ return isBind && this.raiseRecoverable(expr.start, "Binding parenthesized expression"), this.checkLValSimple(expr.expression, bindingType, checkClashes);
+ default:
+ this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
+ }
+ }, pp$72.checkLValPattern = function(expr, bindingType, checkClashes) {
+ switch (bindingType === void 0 && (bindingType = BIND_NONE2), expr.type) {
+ case "ObjectPattern":
+ for (var i2 = 0, list4 = expr.properties; i2 < list4.length; i2 += 1) {
+ var prop = list4[i2];
+ this.checkLValInnerPattern(prop, bindingType, checkClashes);
+ }
+ break;
+ case "ArrayPattern":
+ for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
+ var elem = list$1[i$1];
+ elem && this.checkLValInnerPattern(elem, bindingType, checkClashes);
+ }
+ break;
+ default:
+ this.checkLValSimple(expr, bindingType, checkClashes);
+ }
+ }, pp$72.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
+ switch (bindingType === void 0 && (bindingType = BIND_NONE2), expr.type) {
+ case "Property":
+ this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
+ break;
+ case "AssignmentPattern":
+ this.checkLValPattern(expr.left, bindingType, checkClashes);
+ break;
+ case "RestElement":
+ this.checkLValPattern(expr.argument, bindingType, checkClashes);
+ break;
+ default:
+ this.checkLValPattern(expr, bindingType, checkClashes);
+ }
+ };
+ var TokContext3 = function(token, isExpr, preserveSpace, override, generator) {
+ this.token = token, this.isExpr = !!isExpr, this.preserveSpace = !!preserveSpace, this.override = override, this.generator = !!generator;
+ }, types2 = {
+ b_stat: new TokContext3("{", !1),
+ b_expr: new TokContext3("{", !0),
+ b_tmpl: new TokContext3("${", !1),
+ p_stat: new TokContext3("(", !1),
+ p_expr: new TokContext3("(", !0),
+ q_tmpl: new TokContext3("`", !0, !0, function(p) {
+ return p.tryReadTemplateToken();
+ }),
+ f_stat: new TokContext3("function", !1),
+ f_expr: new TokContext3("function", !0),
+ f_expr_gen: new TokContext3("function", !0, !1, null, !0),
+ f_gen: new TokContext3("function", !1, !1, null, !0)
+ }, pp$62 = Parser3.prototype;
+ pp$62.initialContext = function() {
+ return [types2.b_stat];
+ }, pp$62.curContext = function() {
+ return this.context[this.context.length - 1];
+ }, pp$62.braceIsBlock = function(prevType) {
+ var parent = this.curContext();
+ return parent === types2.f_expr || parent === types2.f_stat ? !0 : prevType === types$12.colon && (parent === types2.b_stat || parent === types2.b_expr) ? !parent.isExpr : prevType === types$12._return || prevType === types$12.name && this.exprAllowed ? lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)) : prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow ? !0 : prevType === types$12.braceL ? parent === types2.b_stat : prevType === types$12._var || prevType === types$12._const || prevType === types$12.name ? !1 : !this.exprAllowed;
+ }, pp$62.inGeneratorContext = function() {
+ for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
+ var context = this.context[i2];
+ if (context.token === "function")
+ return context.generator;
+ }
+ return !1;
+ }, pp$62.updateContext = function(prevType) {
+ var update, type = this.type;
+ type.keyword && prevType === types$12.dot ? this.exprAllowed = !1 : (update = type.updateContext) ? update.call(this, prevType) : this.exprAllowed = type.beforeExpr;
+ }, pp$62.overrideContext = function(tokenCtx) {
+ this.curContext() !== tokenCtx && (this.context[this.context.length - 1] = tokenCtx);
+ }, types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
+ if (this.context.length === 1) {
+ this.exprAllowed = !0;
+ return;
+ }
+ var out = this.context.pop();
+ out === types2.b_stat && this.curContext().token === "function" && (out = this.context.pop()), this.exprAllowed = !out.isExpr;
+ }, types$12.braceL.updateContext = function(prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types2.b_stat : types2.b_expr), this.exprAllowed = !0;
+ }, types$12.dollarBraceL.updateContext = function() {
+ this.context.push(types2.b_tmpl), this.exprAllowed = !0;
+ }, types$12.parenL.updateContext = function(prevType) {
+ var statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
+ this.context.push(statementParens ? types2.p_stat : types2.p_expr), this.exprAllowed = !0;
+ }, types$12.incDec.updateContext = function() {
+ }, types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
+ prevType.beforeExpr && prevType !== types$12._else && !(prevType === types$12.semi && this.curContext() !== types2.p_stat) && !(prevType === types$12._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat) ? this.context.push(types2.f_expr) : this.context.push(types2.f_stat), this.exprAllowed = !1;
+ }, types$12.colon.updateContext = function() {
+ this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
+ }, types$12.backQuote.updateContext = function() {
+ this.curContext() === types2.q_tmpl ? this.context.pop() : this.context.push(types2.q_tmpl), this.exprAllowed = !1;
+ }, types$12.star.updateContext = function(prevType) {
+ if (prevType === types$12._function) {
+ var index2 = this.context.length - 1;
+ this.context[index2] === types2.f_expr ? this.context[index2] = types2.f_expr_gen : this.context[index2] = types2.f_gen;
+ }
+ this.exprAllowed = !0;
+ }, types$12.name.updateContext = function(prevType) {
+ var allowed = !1;
+ this.options.ecmaVersion >= 6 && prevType !== types$12.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (allowed = !0), this.exprAllowed = allowed;
+ };
+ var pp$52 = Parser3.prototype;
+ pp$52.checkPropClash = function(prop, propHash, refDestructuringErrors) {
+ if (!(this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))) {
+ var key2 = prop.key, name2;
+ switch (key2.type) {
+ case "Identifier":
+ name2 = key2.name;
+ break;
+ case "Literal":
+ name2 = String(key2.value);
+ break;
+ default:
+ return;
+ }
+ var kind = prop.kind;
+ if (this.options.ecmaVersion >= 6) {
+ name2 === "__proto__" && kind === "init" && (propHash.proto && (refDestructuringErrors ? refDestructuringErrors.doubleProto < 0 && (refDestructuringErrors.doubleProto = key2.start) : this.raiseRecoverable(key2.start, "Redefinition of __proto__ property")), propHash.proto = !0);
+ return;
+ }
+ name2 = "$" + name2;
+ var other = propHash[name2];
+ if (other) {
+ var redefinition;
+ kind === "init" ? redefinition = this.strict && other.init || other.get || other.set : redefinition = other.init || other[kind], redefinition && this.raiseRecoverable(key2.start, "Redefinition of property");
+ } else
+ other = propHash[name2] = {
+ init: !1,
+ get: !1,
+ set: !1
+ };
+ other[kind] = !0;
+ }
+ }, pp$52.parseExpression = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
+ if (this.type === types$12.comma) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ for (node2.expressions = [expr]; this.eat(types$12.comma); )
+ node2.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
+ return this.finishNode(node2, "SequenceExpression");
+ }
+ return expr;
+ }, pp$52.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
+ if (this.isContextual("yield")) {
+ if (this.inGenerator)
+ return this.parseYield(forInit);
+ this.exprAllowed = !1;
+ }
+ var ownDestructuringErrors = !1, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
+ refDestructuringErrors ? (oldParenAssign = refDestructuringErrors.parenthesizedAssign, oldTrailingComma = refDestructuringErrors.trailingComma, oldDoubleProto = refDestructuringErrors.doubleProto, refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1) : (refDestructuringErrors = new DestructuringErrors3(), ownDestructuringErrors = !0);
+ var startPos = this.start, startLoc = this.startLoc;
+ (this.type === types$12.parenL || this.type === types$12.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = forInit === "await");
+ var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
+ if (afterLeftParse && (left = afterLeftParse.call(this, left, startPos, startLoc)), this.type.isAssign) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.operator = this.value, this.type === types$12.eq && (left = this.toAssignable(left, !1, refDestructuringErrors)), ownDestructuringErrors || (refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1), refDestructuringErrors.shorthandAssign >= left.start && (refDestructuringErrors.shorthandAssign = -1), this.type === types$12.eq ? this.checkLValPattern(left) : this.checkLValSimple(left), node2.left = left, this.next(), node2.right = this.parseMaybeAssign(forInit), oldDoubleProto > -1 && (refDestructuringErrors.doubleProto = oldDoubleProto), this.finishNode(node2, "AssignmentExpression");
+ } else
+ ownDestructuringErrors && this.checkExpressionErrors(refDestructuringErrors, !0);
+ return oldParenAssign > -1 && (refDestructuringErrors.parenthesizedAssign = oldParenAssign), oldTrailingComma > -1 && (refDestructuringErrors.trailingComma = oldTrailingComma), left;
+ }, pp$52.parseMaybeConditional = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprOps(forInit, refDestructuringErrors);
+ if (this.checkExpressionErrors(refDestructuringErrors))
+ return expr;
+ if (this.eat(types$12.question)) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.test = expr, node2.consequent = this.parseMaybeAssign(), this.expect(types$12.colon), node2.alternate = this.parseMaybeAssign(forInit), this.finishNode(node2, "ConditionalExpression");
+ }
+ return expr;
+ }, pp$52.parseExprOps = function(forInit, refDestructuringErrors) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseMaybeUnary(refDestructuringErrors, !1, !1, forInit);
+ return this.checkExpressionErrors(refDestructuringErrors) || expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
+ }, pp$52.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
+ var prec = this.type.binop;
+ if (prec != null && (!forInit || this.type !== types$12._in) && prec > minPrec) {
+ var logical = this.type === types$12.logicalOR || this.type === types$12.logicalAND, coalesce = this.type === types$12.coalesce;
+ coalesce && (prec = types$12.logicalAND.binop);
+ var op = this.value;
+ this.next();
+ var startPos = this.start, startLoc = this.startLoc, right = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, forInit), startPos, startLoc, prec, forInit), node2 = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
+ return (logical && this.type === types$12.coalesce || coalesce && (this.type === types$12.logicalOR || this.type === types$12.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(node2, leftStartPos, leftStartLoc, minPrec, forInit);
+ }
+ return left;
+ }, pp$52.buildBinary = function(startPos, startLoc, left, right, op, logical) {
+ right.type === "PrivateIdentifier" && this.raise(right.start, "Private identifier can only be left side of binary expression");
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.left = left, node2.operator = op, node2.right = right, this.finishNode(node2, logical ? "LogicalExpression" : "BinaryExpression");
+ }, pp$52.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, expr;
+ if (this.isContextual("await") && this.canAwait)
+ expr = this.parseAwait(forInit), sawUnary = !0;
+ else if (this.type.prefix) {
+ var node2 = this.startNode(), update = this.type === types$12.incDec;
+ node2.operator = this.value, node2.prefix = !0, this.next(), node2.argument = this.parseMaybeUnary(null, !0, update, forInit), this.checkExpressionErrors(refDestructuringErrors, !0), update ? this.checkLValSimple(node2.argument) : this.strict && node2.operator === "delete" && isLocalVariableAccess2(node2.argument) ? this.raiseRecoverable(node2.start, "Deleting local variable in strict mode") : node2.operator === "delete" && isPrivateFieldAccess2(node2.argument) ? this.raiseRecoverable(node2.start, "Private fields can not be deleted") : sawUnary = !0, expr = this.finishNode(node2, update ? "UpdateExpression" : "UnaryExpression");
+ } else if (!sawUnary && this.type === types$12.privateId)
+ (forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), expr = this.parsePrivateIdent(), this.type !== types$12._in && this.unexpected();
+ else {
+ if (expr = this.parseExprSubscripts(refDestructuringErrors, forInit), this.checkExpressionErrors(refDestructuringErrors))
+ return expr;
+ for (; this.type.postfix && !this.canInsertSemicolon(); ) {
+ var node$1 = this.startNodeAt(startPos, startLoc);
+ node$1.operator = this.value, node$1.prefix = !1, node$1.argument = expr, this.checkLValSimple(expr), this.next(), expr = this.finishNode(node$1, "UpdateExpression");
+ }
+ }
+ if (!incDec && this.eat(types$12.starstar))
+ if (sawUnary)
+ this.unexpected(this.lastTokStart);
+ else
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, !1, !1, forInit), "**", !1);
+ else
+ return expr;
+ };
+ function isLocalVariableAccess2(node2) {
+ return node2.type === "Identifier" || node2.type === "ParenthesizedExpression" && isLocalVariableAccess2(node2.expression);
+ }
+ function isPrivateFieldAccess2(node2) {
+ return node2.type === "MemberExpression" && node2.property.type === "PrivateIdentifier" || node2.type === "ChainExpression" && isPrivateFieldAccess2(node2.expression) || node2.type === "ParenthesizedExpression" && isPrivateFieldAccess2(node2.expression);
+ }
+ pp$52.parseExprSubscripts = function(refDestructuringErrors, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, expr = this.parseExprAtom(refDestructuringErrors, forInit);
+ if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
+ return expr;
+ var result = this.parseSubscripts(expr, startPos, startLoc, !1, forInit);
+ return refDestructuringErrors && result.type === "MemberExpression" && (refDestructuringErrors.parenthesizedAssign >= result.start && (refDestructuringErrors.parenthesizedAssign = -1), refDestructuringErrors.parenthesizedBind >= result.start && (refDestructuringErrors.parenthesizedBind = -1), refDestructuringErrors.trailingComma >= result.start && (refDestructuringErrors.trailingComma = -1)), result;
+ }, pp$52.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
+ for (var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start, optionalChained = !1; ; ) {
+ var element2 = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
+ if (element2.optional && (optionalChained = !0), element2 === base || element2.type === "ArrowFunctionExpression") {
+ if (optionalChained) {
+ var chainNode = this.startNodeAt(startPos, startLoc);
+ chainNode.expression = element2, element2 = this.finishNode(chainNode, "ChainExpression");
+ }
+ return element2;
+ }
+ base = element2;
+ }
+ }, pp$52.shouldParseAsyncArrow = function() {
+ return !this.canInsertSemicolon() && this.eat(types$12.arrow);
+ }, pp$52.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !0, forInit);
+ }, pp$52.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
+ var optionalSupported = this.options.ecmaVersion >= 11, optional = optionalSupported && this.eat(types$12.questionDot);
+ noCalls && optional && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
+ var computed = this.eat(types$12.bracketL);
+ if (computed || optional && this.type !== types$12.parenL && this.type !== types$12.backQuote || this.eat(types$12.dot)) {
+ var node2 = this.startNodeAt(startPos, startLoc);
+ node2.object = base, computed ? (node2.property = this.parseExpression(), this.expect(types$12.bracketR)) : this.type === types$12.privateId && base.type !== "Super" ? node2.property = this.parsePrivateIdent() : node2.property = this.parseIdent(this.options.allowReserved !== "never"), node2.computed = !!computed, optionalSupported && (node2.optional = optional), base = this.finishNode(node2, "MemberExpression");
+ } else if (!noCalls && this.eat(types$12.parenL)) {
+ var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
+ var exprList = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, !1, refDestructuringErrors);
+ if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow())
+ return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit);
+ this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
+ var node$1 = this.startNodeAt(startPos, startLoc);
+ node$1.callee = base, node$1.arguments = exprList, optionalSupported && (node$1.optional = optional), base = this.finishNode(node$1, "CallExpression");
+ } else if (this.type === types$12.backQuote) {
+ (optional || optionalChained) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
+ var node$2 = this.startNodeAt(startPos, startLoc);
+ node$2.tag = base, node$2.quasi = this.parseTemplate({ isTagged: !0 }), base = this.finishNode(node$2, "TaggedTemplateExpression");
+ }
+ return base;
+ }, pp$52.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
+ this.type === types$12.slash && this.readRegexp();
+ var node2, canBeArrow = this.potentialArrowAt === this.start;
+ switch (this.type) {
+ case types$12._super:
+ return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), node2 = this.startNode(), this.next(), this.type === types$12.parenL && !this.allowDirectSuper && this.raise(node2.start, "super() call outside constructor of a subclass"), this.type !== types$12.dot && this.type !== types$12.bracketL && this.type !== types$12.parenL && this.unexpected(), this.finishNode(node2, "Super");
+ case types$12._this:
+ return node2 = this.startNode(), this.next(), this.finishNode(node2, "ThisExpression");
+ case types$12.name:
+ var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc, id = this.parseIdent(!1);
+ if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$12._function))
+ return this.overrideContext(types2.f_expr), this.parseFunction(this.startNodeAt(startPos, startLoc), 0, !1, !0, forInit);
+ if (canBeArrow && !this.canInsertSemicolon()) {
+ if (this.eat(types$12.arrow))
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], !1, forInit);
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$12.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc))
+ return id = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(types$12.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], !0, forInit);
+ }
+ return id;
+ case types$12.regexp:
+ var value = this.value;
+ return node2 = this.parseLiteral(value.value), node2.regex = { pattern: value.pattern, flags: value.flags }, node2;
+ case types$12.num:
+ case types$12.string:
+ return this.parseLiteral(this.value);
+ case types$12._null:
+ case types$12._true:
+ case types$12._false:
+ return node2 = this.startNode(), node2.value = this.type === types$12._null ? null : this.type === types$12._true, node2.raw = this.type.keyword, this.next(), this.finishNode(node2, "Literal");
+ case types$12.parenL:
+ var start2 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
+ return refDestructuringErrors && (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr) && (refDestructuringErrors.parenthesizedAssign = start2), refDestructuringErrors.parenthesizedBind < 0 && (refDestructuringErrors.parenthesizedBind = start2)), expr;
+ case types$12.bracketL:
+ return node2 = this.startNode(), this.next(), node2.elements = this.parseExprList(types$12.bracketR, !0, !0, refDestructuringErrors), this.finishNode(node2, "ArrayExpression");
+ case types$12.braceL:
+ return this.overrideContext(types2.b_expr), this.parseObj(!1, refDestructuringErrors);
+ case types$12._function:
+ return node2 = this.startNode(), this.next(), this.parseFunction(node2, 0);
+ case types$12._class:
+ return this.parseClass(this.startNode(), !1);
+ case types$12._new:
+ return this.parseNew();
+ case types$12.backQuote:
+ return this.parseTemplate();
+ case types$12._import:
+ return this.options.ecmaVersion >= 11 ? this.parseExprImport(forNew) : this.unexpected();
+ default:
+ return this.parseExprAtomDefault();
+ }
+ }, pp$52.parseExprAtomDefault = function() {
+ this.unexpected();
+ }, pp$52.parseExprImport = function(forNew) {
+ var node2 = this.startNode();
+ if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === types$12.parenL && !forNew)
+ return this.parseDynamicImport(node2);
+ if (this.type === types$12.dot) {
+ var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
+ return meta.name = "import", node2.meta = this.finishNode(meta, "Identifier"), this.parseImportMeta(node2);
+ } else
+ this.unexpected();
+ }, pp$52.parseDynamicImport = function(node2) {
+ if (this.next(), node2.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
+ this.eat(types$12.parenR) ? node2.options = null : (this.expect(types$12.comma), this.afterTrailingComma(types$12.parenR) ? node2.options = null : (node2.options = this.parseMaybeAssign(), this.eat(types$12.parenR) || (this.expect(types$12.comma), this.afterTrailingComma(types$12.parenR) || this.unexpected())));
+ else if (!this.eat(types$12.parenR)) {
+ var errorPos = this.start;
+ this.eat(types$12.comma) && this.eat(types$12.parenR) ? this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()") : this.unexpected(errorPos);
+ }
+ return this.finishNode(node2, "ImportExpression");
+ }, pp$52.parseImportMeta = function(node2) {
+ this.next();
+ var containsEsc = this.containsEsc;
+ return node2.property = this.parseIdent(!0), node2.property.name !== "meta" && this.raiseRecoverable(node2.property.start, "The only valid meta property for import is 'import.meta'"), containsEsc && this.raiseRecoverable(node2.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(node2.start, "Cannot use 'import.meta' outside a module"), this.finishNode(node2, "MetaProperty");
+ }, pp$52.parseLiteral = function(value) {
+ var node2 = this.startNode();
+ return node2.value = value, node2.raw = this.input.slice(this.start, this.end), node2.raw.charCodeAt(node2.raw.length - 1) === 110 && (node2.bigint = node2.value != null ? node2.value.toString() : node2.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(node2, "Literal");
+ }, pp$52.parseParenExpression = function() {
+ this.expect(types$12.parenL);
+ var val = this.parseExpression();
+ return this.expect(types$12.parenR), val;
+ }, pp$52.shouldParseArrow = function(exprList) {
+ return !this.canInsertSemicolon();
+ }, pp$52.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
+ if (this.options.ecmaVersion >= 6) {
+ this.next();
+ var innerStartPos = this.start, innerStartLoc = this.startLoc, exprList = [], first = !0, lastIsComma = !1, refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
+ for (this.yieldPos = 0, this.awaitPos = 0; this.type !== types$12.parenR; )
+ if (first ? first = !1 : this.expect(types$12.comma), allowTrailingComma && this.afterTrailingComma(types$12.parenR, !0)) {
+ lastIsComma = !0;
+ break;
+ } else if (this.type === types$12.ellipsis) {
+ spreadStart = this.start, exprList.push(this.parseParenItem(this.parseRestBinding())), this.type === types$12.comma && this.raiseRecoverable(
+ this.start,
+ "Comma is not permitted after the rest element"
+ );
+ break;
+ } else
+ exprList.push(this.parseMaybeAssign(!1, refDestructuringErrors, this.parseParenItem));
+ var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
+ if (this.expect(types$12.parenR), canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$12.arrow))
+ return this.checkPatternErrors(refDestructuringErrors, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.parseParenArrowList(startPos, startLoc, exprList, forInit);
+ (!exprList.length || lastIsComma) && this.unexpected(this.lastTokStart), spreadStart && this.unexpected(spreadStart), this.checkExpressionErrors(refDestructuringErrors, !0), this.yieldPos = oldYieldPos || this.yieldPos, this.awaitPos = oldAwaitPos || this.awaitPos, exprList.length > 1 ? (val = this.startNodeAt(innerStartPos, innerStartLoc), val.expressions = exprList, this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)) : val = exprList[0];
+ } else
+ val = this.parseParenExpression();
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(startPos, startLoc);
+ return par.expression = val, this.finishNode(par, "ParenthesizedExpression");
+ } else
+ return val;
+ }, pp$52.parseParenItem = function(item) {
+ return item;
+ }, pp$52.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, !1, forInit);
+ };
+ var empty4 = [];
+ pp$52.parseNew = function() {
+ this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
+ var node2 = this.startNode();
+ if (this.next(), this.options.ecmaVersion >= 6 && this.type === types$12.dot) {
+ var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
+ meta.name = "new", node2.meta = this.finishNode(meta, "Identifier"), this.next();
+ var containsEsc = this.containsEsc;
+ return node2.property = this.parseIdent(!0), node2.property.name !== "target" && this.raiseRecoverable(node2.property.start, "The only valid meta property for new is 'new.target'"), containsEsc && this.raiseRecoverable(node2.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(node2.start, "'new.target' can only be used in functions and class static block"), this.finishNode(node2, "MetaProperty");
+ }
+ var startPos = this.start, startLoc = this.startLoc;
+ return node2.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), startPos, startLoc, !0, !1), this.eat(types$12.parenL) ? node2.arguments = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, !1) : node2.arguments = empty4, this.finishNode(node2, "NewExpression");
+ }, pp$52.parseTemplateElement = function(ref3) {
+ var isTagged = ref3.isTagged, elem = this.startNode();
+ return this.type === types$12.invalidTemplate ? (isTagged || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), elem.value = {
+ raw: this.value.replace(/\r\n?/g, `
+`),
+ cooked: null
+ }) : elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, `
+`),
+ cooked: this.value
+ }, this.next(), elem.tail = this.type === types$12.backQuote, this.finishNode(elem, "TemplateElement");
+ }, pp$52.parseTemplate = function(ref3) {
+ ref3 === void 0 && (ref3 = {});
+ var isTagged = ref3.isTagged;
+ isTagged === void 0 && (isTagged = !1);
+ var node2 = this.startNode();
+ this.next(), node2.expressions = [];
+ var curElt = this.parseTemplateElement({ isTagged });
+ for (node2.quasis = [curElt]; !curElt.tail; )
+ this.type === types$12.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(types$12.dollarBraceL), node2.expressions.push(this.parseExpression()), this.expect(types$12.braceR), node2.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
+ return this.next(), this.finishNode(node2, "TemplateLiteral");
+ }, pp$52.isAsyncProp = function(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$12.name || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$12.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
+ }, pp$52.parseObj = function(isPattern, refDestructuringErrors) {
+ var node2 = this.startNode(), first = !0, propHash = {};
+ for (node2.properties = [], this.next(); !this.eat(types$12.braceR); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$12.braceR))
+ break;
+ var prop = this.parseProperty(isPattern, refDestructuringErrors);
+ isPattern || this.checkPropClash(prop, propHash, refDestructuringErrors), node2.properties.push(prop);
+ }
+ return this.finishNode(node2, isPattern ? "ObjectPattern" : "ObjectExpression");
+ }, pp$52.parseProperty = function(isPattern, refDestructuringErrors) {
+ var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
+ if (this.options.ecmaVersion >= 9 && this.eat(types$12.ellipsis))
+ return isPattern ? (prop.argument = this.parseIdent(!1), this.type === types$12.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(prop, "RestElement")) : (prop.argument = this.parseMaybeAssign(!1, refDestructuringErrors), this.type === types$12.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start), this.finishNode(prop, "SpreadElement"));
+ this.options.ecmaVersion >= 6 && (prop.method = !1, prop.shorthand = !1, (isPattern || refDestructuringErrors) && (startPos = this.start, startLoc = this.startLoc), isPattern || (isGenerator = this.eat(types$12.star)));
+ var containsEsc = this.containsEsc;
+ return this.parsePropertyName(prop), !isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop) ? (isAsync = !0, isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$12.star), this.parsePropertyName(prop)) : isAsync = !1, this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc), this.finishNode(prop, "Property");
+ }, pp$52.parseGetterSetter = function(prop) {
+ var kind = prop.key.name;
+ this.parsePropertyName(prop), prop.value = this.parseMethod(!1), prop.kind = kind;
+ var paramCount = prop.kind === "get" ? 0 : 1;
+ if (prop.value.params.length !== paramCount) {
+ var start2 = prop.value.start;
+ prop.kind === "get" ? this.raiseRecoverable(start2, "getter should have no params") : this.raiseRecoverable(start2, "setter should have exactly one param");
+ } else
+ prop.kind === "set" && prop.value.params[0].type === "RestElement" && this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
+ }, pp$52.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
+ (isGenerator || isAsync) && this.type === types$12.colon && this.unexpected(), this.eat(types$12.colon) ? (prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, refDestructuringErrors), prop.kind = "init") : this.options.ecmaVersion >= 6 && this.type === types$12.parenL ? (isPattern && this.unexpected(), prop.method = !0, prop.value = this.parseMethod(isGenerator, isAsync), prop.kind = "init") : !isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types$12.comma && this.type !== types$12.braceR && this.type !== types$12.eq ? ((isGenerator || isAsync) && this.unexpected(), this.parseGetterSetter(prop)) : this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier" ? ((isGenerator || isAsync) && this.unexpected(), this.checkUnreserved(prop.key), prop.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = startPos), isPattern ? prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)) : this.type === types$12.eq && refDestructuringErrors ? (refDestructuringErrors.shorthandAssign < 0 && (refDestructuringErrors.shorthandAssign = this.start), prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))) : prop.value = this.copyNode(prop.key), prop.kind = "init", prop.shorthand = !0) : this.unexpected();
+ }, pp$52.parsePropertyName = function(prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(types$12.bracketL))
+ return prop.computed = !0, prop.key = this.parseMaybeAssign(), this.expect(types$12.bracketR), prop.key;
+ prop.computed = !1;
+ }
+ return prop.key = this.type === types$12.num || this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
+ }, pp$52.initFunction = function(node2) {
+ node2.id = null, this.options.ecmaVersion >= 6 && (node2.generator = node2.expression = !1), this.options.ecmaVersion >= 8 && (node2.async = !1);
+ }, pp$52.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
+ var node2 = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.initFunction(node2), this.options.ecmaVersion >= 6 && (node2.generator = isGenerator), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags2(isAsync, node2.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0)), this.expect(types$12.parenL), node2.params = this.parseBindingList(types$12.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(node2, !1, !0, !1), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, "FunctionExpression");
+ }, pp$52.parseArrowExpression = function(node2, params, isAsync, forInit) {
+ var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
+ return this.enterScope(functionFlags2(isAsync, !1) | SCOPE_ARROW2), this.initFunction(node2), this.options.ecmaVersion >= 8 && (node2.async = !!isAsync), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, node2.params = this.toAssignableList(params, !0), this.parseFunctionBody(node2, !0, !1, forInit), this.yieldPos = oldYieldPos, this.awaitPos = oldAwaitPos, this.awaitIdentPos = oldAwaitIdentPos, this.finishNode(node2, "ArrowFunctionExpression");
+ }, pp$52.parseFunctionBody = function(node2, isArrowFunction, isMethod, forInit) {
+ var isExpression = isArrowFunction && this.type !== types$12.braceL, oldStrict = this.strict, useStrict = !1;
+ if (isExpression)
+ node2.body = this.parseMaybeAssign(forInit), node2.expression = !0, this.checkParams(node2, !1);
+ else {
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node2.params);
+ (!oldStrict || nonSimple) && (useStrict = this.strictDirective(this.end), useStrict && nonSimple && this.raiseRecoverable(node2.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
+ var oldLabels = this.labels;
+ this.labels = [], useStrict && (this.strict = !0), this.checkParams(node2, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node2.params)), this.strict && node2.id && this.checkLValSimple(node2.id, BIND_OUTSIDE2), node2.body = this.parseBlock(!1, void 0, useStrict && !oldStrict), node2.expression = !1, this.adaptDirectivePrologue(node2.body.body), this.labels = oldLabels;
+ }
+ this.exitScope();
+ }, pp$52.isSimpleParamList = function(params) {
+ for (var i2 = 0, list4 = params; i2 < list4.length; i2 += 1) {
+ var param = list4[i2];
+ if (param.type !== "Identifier")
+ return !1;
+ }
+ return !0;
+ }, pp$52.checkParams = function(node2, allowDuplicates) {
+ for (var nameHash = /* @__PURE__ */ Object.create(null), i2 = 0, list4 = node2.params; i2 < list4.length; i2 += 1) {
+ var param = list4[i2];
+ this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash);
+ }
+ }, pp$52.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
+ for (var elts = [], first = !0; !this.eat(close); ) {
+ if (first)
+ first = !1;
+ else if (this.expect(types$12.comma), allowTrailingComma && this.afterTrailingComma(close))
+ break;
+ var elt = void 0;
+ allowEmpty && this.type === types$12.comma ? elt = null : this.type === types$12.ellipsis ? (elt = this.parseSpread(refDestructuringErrors), refDestructuringErrors && this.type === types$12.comma && refDestructuringErrors.trailingComma < 0 && (refDestructuringErrors.trailingComma = this.start)) : elt = this.parseMaybeAssign(!1, refDestructuringErrors), elts.push(elt);
+ }
+ return elts;
+ }, pp$52.checkUnreserved = function(ref3) {
+ var start2 = ref3.start, end = ref3.end, name2 = ref3.name;
+ if (this.inGenerator && name2 === "yield" && this.raiseRecoverable(start2, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && name2 === "await" && this.raiseRecoverable(start2, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & SCOPE_VAR2) && name2 === "arguments" && this.raiseRecoverable(start2, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (name2 === "arguments" || name2 === "await") && this.raise(start2, "Cannot use " + name2 + " in class static initialization block"), this.keywords.test(name2) && this.raise(start2, "Unexpected keyword '" + name2 + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(start2, end).indexOf("\\") !== -1)) {
+ var re2 = this.strict ? this.reservedWordsStrict : this.reservedWords;
+ re2.test(name2) && (!this.inAsync && name2 === "await" && this.raiseRecoverable(start2, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(start2, "The keyword '" + name2 + "' is reserved"));
+ }
+ }, pp$52.parseIdent = function(liberal) {
+ var node2 = this.parseIdentNode();
+ return this.next(!!liberal), this.finishNode(node2, "Identifier"), liberal || (this.checkUnreserved(node2), node2.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = node2.start)), node2;
+ }, pp$52.parseIdentNode = function() {
+ var node2 = this.startNode();
+ return this.type === types$12.name ? node2.name = this.value : this.type.keyword ? (node2.name = this.type.keyword, (node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = types$12.name) : this.unexpected(), node2;
+ }, pp$52.parsePrivateIdent = function() {
+ var node2 = this.startNode();
+ return this.type === types$12.privateId ? node2.name = this.value : this.unexpected(), this.next(), this.finishNode(node2, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(node2.start, "Private field '#" + node2.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(node2)), node2;
+ }, pp$52.parseYield = function(forInit) {
+ this.yieldPos || (this.yieldPos = this.start);
+ var node2 = this.startNode();
+ return this.next(), this.type === types$12.semi || this.canInsertSemicolon() || this.type !== types$12.star && !this.type.startsExpr ? (node2.delegate = !1, node2.argument = null) : (node2.delegate = this.eat(types$12.star), node2.argument = this.parseMaybeAssign(forInit)), this.finishNode(node2, "YieldExpression");
+ }, pp$52.parseAwait = function(forInit) {
+ this.awaitPos || (this.awaitPos = this.start);
+ var node2 = this.startNode();
+ return this.next(), node2.argument = this.parseMaybeUnary(null, !0, !1, forInit), this.finishNode(node2, "AwaitExpression");
+ };
+ var pp$42 = Parser3.prototype;
+ pp$42.raise = function(pos, message) {
+ var loc = getLineInfo2(this.input, pos);
+ message += " (" + loc.line + ":" + loc.column + ")", this.sourceFile && (message += " in " + this.sourceFile);
+ var err = new SyntaxError(message);
+ throw err.pos = pos, err.loc = loc, err.raisedAt = this.pos, err;
+ }, pp$42.raiseRecoverable = pp$42.raise, pp$42.curPosition = function() {
+ if (this.options.locations)
+ return new Position3(this.curLine, this.pos - this.lineStart);
+ };
+ var pp$32 = Parser3.prototype, Scope3 = function(flags) {
+ this.flags = flags, this.var = [], this.lexical = [], this.functions = [];
+ };
+ pp$32.enterScope = function(flags) {
+ this.scopeStack.push(new Scope3(flags));
+ }, pp$32.exitScope = function() {
+ this.scopeStack.pop();
+ }, pp$32.treatFunctionsAsVarInScope = function(scope) {
+ return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2;
+ }, pp$32.declareName = function(name2, bindingType, pos) {
+ var redeclared = !1;
+ if (bindingType === BIND_LEXICAL2) {
+ var scope = this.currentScope();
+ redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1, scope.lexical.push(name2), this.inModule && scope.flags & SCOPE_TOP2 && delete this.undefinedExports[name2];
+ } else if (bindingType === BIND_SIMPLE_CATCH2) {
+ var scope$1 = this.currentScope();
+ scope$1.lexical.push(name2);
+ } else if (bindingType === BIND_FUNCTION2) {
+ var scope$2 = this.currentScope();
+ this.treatFunctionsAsVar ? redeclared = scope$2.lexical.indexOf(name2) > -1 : redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1, scope$2.functions.push(name2);
+ } else
+ for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
+ var scope$3 = this.scopeStack[i2];
+ if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
+ redeclared = !0;
+ break;
+ }
+ if (scope$3.var.push(name2), this.inModule && scope$3.flags & SCOPE_TOP2 && delete this.undefinedExports[name2], scope$3.flags & SCOPE_VAR2)
+ break;
+ }
+ redeclared && this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
+ }, pp$32.checkLocalExport = function(id) {
+ this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && (this.undefinedExports[id.name] = id);
+ }, pp$32.currentScope = function() {
+ return this.scopeStack[this.scopeStack.length - 1];
+ }, pp$32.currentVarScope = function() {
+ for (var i2 = this.scopeStack.length - 1; ; i2--) {
+ var scope = this.scopeStack[i2];
+ if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2))
+ return scope;
+ }
+ }, pp$32.currentThisScope = function() {
+ for (var i2 = this.scopeStack.length - 1; ; i2--) {
+ var scope = this.scopeStack[i2];
+ if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2) && !(scope.flags & SCOPE_ARROW2))
+ return scope;
+ }
+ };
+ var Node3 = function(parser, pos, loc) {
+ this.type = "", this.start = pos, this.end = 0, parser.options.locations && (this.loc = new SourceLocation3(parser, loc)), parser.options.directSourceFile && (this.sourceFile = parser.options.directSourceFile), parser.options.ranges && (this.range = [pos, 0]);
+ }, pp$22 = Parser3.prototype;
+ pp$22.startNode = function() {
+ return new Node3(this, this.start, this.startLoc);
+ }, pp$22.startNodeAt = function(pos, loc) {
+ return new Node3(this, pos, loc);
+ };
+ function finishNodeAt2(node2, type, pos, loc) {
+ return node2.type = type, node2.end = pos, this.options.locations && (node2.loc.end = loc), this.options.ranges && (node2.range[1] = pos), node2;
+ }
+ pp$22.finishNode = function(node2, type) {
+ return finishNodeAt2.call(this, node2, type, this.lastTokEnd, this.lastTokEndLoc);
+ }, pp$22.finishNodeAt = function(node2, type, pos, loc) {
+ return finishNodeAt2.call(this, node2, type, pos, loc);
+ }, pp$22.copyNode = function(node2) {
+ var newNode = new Node3(this, node2.start, this.startLoc);
+ for (var prop in node2)
+ newNode[prop] = node2[prop];
+ return newNode;
+ };
+ var scriptValuesAddedInUnicode2 = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic", ecma11BinaryProperties2 = ecma10BinaryProperties2, ecma12BinaryProperties2 = ecma11BinaryProperties2 + " EBase EComp EMod EPres ExtPict", ecma13BinaryProperties2 = ecma12BinaryProperties2, ecma14BinaryProperties2 = ecma13BinaryProperties2, unicodeBinaryProperties2 = {
+ 9: ecma9BinaryProperties2,
+ 10: ecma10BinaryProperties2,
+ 11: ecma11BinaryProperties2,
+ 12: ecma12BinaryProperties2,
+ 13: ecma13BinaryProperties2,
+ 14: ecma14BinaryProperties2
+ }, ecma14BinaryPropertiesOfStrings2 = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", unicodeBinaryPropertiesOfStrings2 = {
+ 9: "",
+ 10: "",
+ 11: "",
+ 12: "",
+ 13: "",
+ 14: ecma14BinaryPropertiesOfStrings2
+ }, unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ecma9ScriptValues2 = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ecma12ScriptValues2 = ecma11ScriptValues2 + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ecma13ScriptValues2 = ecma12ScriptValues2 + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", ecma14ScriptValues2 = ecma13ScriptValues2 + " " + scriptValuesAddedInUnicode2, unicodeScriptValues2 = {
+ 9: ecma9ScriptValues2,
+ 10: ecma10ScriptValues2,
+ 11: ecma11ScriptValues2,
+ 12: ecma12ScriptValues2,
+ 13: ecma13ScriptValues2,
+ 14: ecma14ScriptValues2
+ }, data2 = {};
+ function buildUnicodeData2(ecmaVersion2) {
+ var d = data2[ecmaVersion2] = {
+ binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion2] + " " + unicodeGeneralCategoryValues2),
+ binaryOfStrings: wordsRegexp2(unicodeBinaryPropertiesOfStrings2[ecmaVersion2]),
+ nonBinary: {
+ General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
+ Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion2])
+ }
+ };
+ d.nonBinary.Script_Extensions = d.nonBinary.Script, d.nonBinary.gc = d.nonBinary.General_Category, d.nonBinary.sc = d.nonBinary.Script, d.nonBinary.scx = d.nonBinary.Script_Extensions;
+ }
+ for (var i = 0, list3 = [9, 10, 11, 12, 13, 14]; i < list3.length; i += 1) {
+ var ecmaVersion = list3[i];
+ buildUnicodeData2(ecmaVersion);
+ }
+ var pp$12 = Parser3.prototype, BranchID3 = function(parent, base) {
+ this.parent = parent, this.base = base || this;
+ };
+ BranchID3.prototype.separatedFrom = function(alt) {
+ for (var self2 = this; self2; self2 = self2.parent)
+ for (var other = alt; other; other = other.parent)
+ if (self2.base === other.base && self2 !== other)
+ return !0;
+ return !1;
+ }, BranchID3.prototype.sibling = function() {
+ return new BranchID3(this.parent, this.base);
+ };
+ var RegExpValidationState3 = function(parser) {
+ this.parser = parser, this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = data2[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
+ };
+ RegExpValidationState3.prototype.reset = function(start2, pattern, flags) {
+ var unicodeSets = flags.indexOf("v") !== -1, unicode = flags.indexOf("u") !== -1;
+ this.start = start2 | 0, this.source = pattern + "", this.flags = flags, unicodeSets && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = unicode && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = unicode && this.parser.options.ecmaVersion >= 9);
+ }, RegExpValidationState3.prototype.raise = function(message) {
+ this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
+ }, RegExpValidationState3.prototype.at = function(i2, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var s = this.source, l = s.length;
+ if (i2 >= l)
+ return -1;
+ var c = s.charCodeAt(i2);
+ if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l)
+ return c;
+ var next = s.charCodeAt(i2 + 1);
+ return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
+ }, RegExpValidationState3.prototype.nextIndex = function(i2, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var s = this.source, l = s.length;
+ if (i2 >= l)
+ return l;
+ var c = s.charCodeAt(i2), next;
+ return !(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343 ? i2 + 1 : i2 + 2;
+ }, RegExpValidationState3.prototype.current = function(forceU) {
+ return forceU === void 0 && (forceU = !1), this.at(this.pos, forceU);
+ }, RegExpValidationState3.prototype.lookahead = function(forceU) {
+ return forceU === void 0 && (forceU = !1), this.at(this.nextIndex(this.pos, forceU), forceU);
+ }, RegExpValidationState3.prototype.advance = function(forceU) {
+ forceU === void 0 && (forceU = !1), this.pos = this.nextIndex(this.pos, forceU);
+ }, RegExpValidationState3.prototype.eat = function(ch, forceU) {
+ return forceU === void 0 && (forceU = !1), this.current(forceU) === ch ? (this.advance(forceU), !0) : !1;
+ }, RegExpValidationState3.prototype.eatChars = function(chs, forceU) {
+ forceU === void 0 && (forceU = !1);
+ for (var pos = this.pos, i2 = 0, list4 = chs; i2 < list4.length; i2 += 1) {
+ var ch = list4[i2], current2 = this.at(pos, forceU);
+ if (current2 === -1 || current2 !== ch)
+ return !1;
+ pos = this.nextIndex(pos, forceU);
+ }
+ return this.pos = pos, !0;
+ }, pp$12.validateRegExpFlags = function(state) {
+ for (var validFlags = state.validFlags, flags = state.flags, u = !1, v = !1, i2 = 0; i2 < flags.length; i2++) {
+ var flag = flags.charAt(i2);
+ validFlags.indexOf(flag) === -1 && this.raise(state.start, "Invalid regular expression flag"), flags.indexOf(flag, i2 + 1) > -1 && this.raise(state.start, "Duplicate regular expression flag"), flag === "u" && (u = !0), flag === "v" && (v = !0);
+ }
+ this.options.ecmaVersion >= 15 && u && v && this.raise(state.start, "Invalid regular expression flag");
+ };
+ function hasProp2(obj) {
+ for (var _ in obj)
+ return !0;
+ return !1;
+ }
+ pp$12.validateRegExpPattern = function(state) {
+ this.regexp_pattern(state), !state.switchN && this.options.ecmaVersion >= 9 && hasProp2(state.groupNames) && (state.switchN = !0, this.regexp_pattern(state));
+ }, pp$12.regexp_pattern = function(state) {
+ state.pos = 0, state.lastIntValue = 0, state.lastStringValue = "", state.lastAssertionIsQuantifiable = !1, state.numCapturingParens = 0, state.maxBackReference = 0, state.groupNames = /* @__PURE__ */ Object.create(null), state.backReferenceNames.length = 0, state.branchID = null, this.regexp_disjunction(state), state.pos !== state.source.length && (state.eat(
+ 41
+ /* ) */
+ ) && state.raise("Unmatched ')'"), (state.eat(
+ 93
+ /* ] */
+ ) || state.eat(
+ 125
+ /* } */
+ )) && state.raise("Lone quantifier brackets")), state.maxBackReference > state.numCapturingParens && state.raise("Invalid escape");
+ for (var i2 = 0, list4 = state.backReferenceNames; i2 < list4.length; i2 += 1) {
+ var name2 = list4[i2];
+ state.groupNames[name2] || state.raise("Invalid named capture referenced");
+ }
+ }, pp$12.regexp_disjunction = function(state) {
+ var trackDisjunction = this.options.ecmaVersion >= 16;
+ for (trackDisjunction && (state.branchID = new BranchID3(state.branchID, null)), this.regexp_alternative(state); state.eat(
+ 124
+ /* | */
+ ); )
+ trackDisjunction && (state.branchID = state.branchID.sibling()), this.regexp_alternative(state);
+ trackDisjunction && (state.branchID = state.branchID.parent), this.regexp_eatQuantifier(state, !0) && state.raise("Nothing to repeat"), state.eat(
+ 123
+ /* { */
+ ) && state.raise("Lone quantifier brackets");
+ }, pp$12.regexp_alternative = function(state) {
+ for (; state.pos < state.source.length && this.regexp_eatTerm(state); )
+ ;
+ }, pp$12.regexp_eatTerm = function(state) {
+ return this.regexp_eatAssertion(state) ? (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state) && state.switchU && state.raise("Invalid quantifier"), !0) : (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) ? (this.regexp_eatQuantifier(state), !0) : !1;
+ }, pp$12.regexp_eatAssertion = function(state) {
+ var start2 = state.pos;
+ if (state.lastAssertionIsQuantifiable = !1, state.eat(
+ 94
+ /* ^ */
+ ) || state.eat(
+ 36
+ /* $ */
+ ))
+ return !0;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (state.eat(
+ 66
+ /* B */
+ ) || state.eat(
+ 98
+ /* b */
+ ))
+ return !0;
+ state.pos = start2;
+ }
+ if (state.eat(
+ 40
+ /* ( */
+ ) && state.eat(
+ 63
+ /* ? */
+ )) {
+ var lookbehind = !1;
+ if (this.options.ecmaVersion >= 9 && (lookbehind = state.eat(
+ 60
+ /* < */
+ )), state.eat(
+ 61
+ /* = */
+ ) || state.eat(
+ 33
+ /* ! */
+ ))
+ return this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ) || state.raise("Unterminated group"), state.lastAssertionIsQuantifiable = !lookbehind, !0;
+ }
+ return state.pos = start2, !1;
+ }, pp$12.regexp_eatQuantifier = function(state, noError) {
+ return noError === void 0 && (noError = !1), this.regexp_eatQuantifierPrefix(state, noError) ? (state.eat(
+ 63
+ /* ? */
+ ), !0) : !1;
+ }, pp$12.regexp_eatQuantifierPrefix = function(state, noError) {
+ return state.eat(
+ 42
+ /* * */
+ ) || state.eat(
+ 43
+ /* + */
+ ) || state.eat(
+ 63
+ /* ? */
+ ) || this.regexp_eatBracedQuantifier(state, noError);
+ }, pp$12.regexp_eatBracedQuantifier = function(state, noError) {
+ var start2 = state.pos;
+ if (state.eat(
+ 123
+ /* { */
+ )) {
+ var min = 0, max = -1;
+ if (this.regexp_eatDecimalDigits(state) && (min = state.lastIntValue, state.eat(
+ 44
+ /* , */
+ ) && this.regexp_eatDecimalDigits(state) && (max = state.lastIntValue), state.eat(
+ 125
+ /* } */
+ )))
+ return max !== -1 && max < min && !noError && state.raise("numbers out of order in {} quantifier"), !0;
+ state.switchU && !noError && state.raise("Incomplete quantifier"), state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatAtom = function(state) {
+ return this.regexp_eatPatternCharacters(state) || state.eat(
+ 46
+ /* . */
+ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
+ }, pp$12.regexp_eatReverseSolidusAtomEscape = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (this.regexp_eatAtomEscape(state))
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatUncapturingGroup = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 40
+ /* ( */
+ )) {
+ if (state.eat(
+ 63
+ /* ? */
+ )) {
+ if (this.options.ecmaVersion >= 16) {
+ var addModifiers = this.regexp_eatModifiers(state), hasHyphen = state.eat(
+ 45
+ /* - */
+ );
+ if (addModifiers || hasHyphen) {
+ for (var i2 = 0; i2 < addModifiers.length; i2++) {
+ var modifier = addModifiers.charAt(i2);
+ addModifiers.indexOf(modifier, i2 + 1) > -1 && state.raise("Duplicate regular expression modifiers");
+ }
+ if (hasHyphen) {
+ var removeModifiers = this.regexp_eatModifiers(state);
+ !addModifiers && !removeModifiers && state.current() === 58 && state.raise("Invalid regular expression modifiers");
+ for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) {
+ var modifier$1 = removeModifiers.charAt(i$1);
+ (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) && state.raise("Duplicate regular expression modifiers");
+ }
+ }
+ }
+ }
+ if (state.eat(
+ 58
+ /* : */
+ )) {
+ if (this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ))
+ return !0;
+ state.raise("Unterminated group");
+ }
+ }
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatCapturingGroup = function(state) {
+ if (state.eat(
+ 40
+ /* ( */
+ )) {
+ if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(state) : state.current() === 63 && state.raise("Invalid group"), this.regexp_disjunction(state), state.eat(
+ 41
+ /* ) */
+ ))
+ return state.numCapturingParens += 1, !0;
+ state.raise("Unterminated group");
+ }
+ return !1;
+ }, pp$12.regexp_eatModifiers = function(state) {
+ for (var modifiers = "", ch = 0; (ch = state.current()) !== -1 && isRegularExpressionModifier2(ch); )
+ modifiers += codePointToString2(ch), state.advance();
+ return modifiers;
+ };
+ function isRegularExpressionModifier2(ch) {
+ return ch === 105 || ch === 109 || ch === 115;
+ }
+ pp$12.regexp_eatExtendedAtom = function(state) {
+ return state.eat(
+ 46
+ /* . */
+ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
+ }, pp$12.regexp_eatInvalidBracedQuantifier = function(state) {
+ return this.regexp_eatBracedQuantifier(state, !0) && state.raise("Nothing to repeat"), !1;
+ }, pp$12.regexp_eatSyntaxCharacter = function(state) {
+ var ch = state.current();
+ return isSyntaxCharacter2(ch) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ };
+ function isSyntaxCharacter2(ch) {
+ return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
+ }
+ pp$12.regexp_eatPatternCharacters = function(state) {
+ for (var start2 = state.pos, ch = 0; (ch = state.current()) !== -1 && !isSyntaxCharacter2(ch); )
+ state.advance();
+ return state.pos !== start2;
+ }, pp$12.regexp_eatExtendedPatternCharacter = function(state) {
+ var ch = state.current();
+ return ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124 ? (state.advance(), !0) : !1;
+ }, pp$12.regexp_groupSpecifier = function(state) {
+ if (state.eat(
+ 63
+ /* ? */
+ )) {
+ this.regexp_eatGroupName(state) || state.raise("Invalid group");
+ var trackDisjunction = this.options.ecmaVersion >= 16, known = state.groupNames[state.lastStringValue];
+ if (known)
+ if (trackDisjunction)
+ for (var i2 = 0, list4 = known; i2 < list4.length; i2 += 1) {
+ var altID = list4[i2];
+ altID.separatedFrom(state.branchID) || state.raise("Duplicate capture group name");
+ }
+ else
+ state.raise("Duplicate capture group name");
+ trackDisjunction ? (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID) : state.groupNames[state.lastStringValue] = !0;
+ }
+ }, pp$12.regexp_eatGroupName = function(state) {
+ if (state.lastStringValue = "", state.eat(
+ 60
+ /* < */
+ )) {
+ if (this.regexp_eatRegExpIdentifierName(state) && state.eat(
+ 62
+ /* > */
+ ))
+ return !0;
+ state.raise("Invalid capture group name");
+ }
+ return !1;
+ }, pp$12.regexp_eatRegExpIdentifierName = function(state) {
+ if (state.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(state)) {
+ for (state.lastStringValue += codePointToString2(state.lastIntValue); this.regexp_eatRegExpIdentifierPart(state); )
+ state.lastStringValue += codePointToString2(state.lastIntValue);
+ return !0;
+ }
+ return !1;
+ }, pp$12.regexp_eatRegExpIdentifierStart = function(state) {
+ var start2 = state.pos, forceU = this.options.ecmaVersion >= 11, ch = state.current(forceU);
+ return state.advance(forceU), ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch = state.lastIntValue), isRegExpIdentifierStart2(ch) ? (state.lastIntValue = ch, !0) : (state.pos = start2, !1);
+ };
+ function isRegExpIdentifierStart2(ch) {
+ return isIdentifierStart2(ch, !0) || ch === 36 || ch === 95;
+ }
+ pp$12.regexp_eatRegExpIdentifierPart = function(state) {
+ var start2 = state.pos, forceU = this.options.ecmaVersion >= 11, ch = state.current(forceU);
+ return state.advance(forceU), ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU) && (ch = state.lastIntValue), isRegExpIdentifierPart2(ch) ? (state.lastIntValue = ch, !0) : (state.pos = start2, !1);
+ };
+ function isRegExpIdentifierPart2(ch) {
+ return isIdentifierChar2(ch, !0) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
+ }
+ pp$12.regexp_eatAtomEscape = function(state) {
+ return this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state) ? !0 : (state.switchU && (state.current() === 99 && state.raise("Invalid unicode escape"), state.raise("Invalid escape")), !1);
+ }, pp$12.regexp_eatBackReference = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatDecimalEscape(state)) {
+ var n = state.lastIntValue;
+ if (state.switchU)
+ return n > state.maxBackReference && (state.maxBackReference = n), !0;
+ if (n <= state.numCapturingParens)
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatKGroupName = function(state) {
+ if (state.eat(
+ 107
+ /* k */
+ )) {
+ if (this.regexp_eatGroupName(state))
+ return state.backReferenceNames.push(state.lastStringValue), !0;
+ state.raise("Invalid named reference");
+ }
+ return !1;
+ }, pp$12.regexp_eatCharacterEscape = function(state) {
+ return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, !1) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
+ }, pp$12.regexp_eatCControlLetter = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 99
+ /* c */
+ )) {
+ if (this.regexp_eatControlLetter(state))
+ return !0;
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatZero = function(state) {
+ return state.current() === 48 && !isDecimalDigit2(state.lookahead()) ? (state.lastIntValue = 0, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatControlEscape = function(state) {
+ var ch = state.current();
+ return ch === 116 ? (state.lastIntValue = 9, state.advance(), !0) : ch === 110 ? (state.lastIntValue = 10, state.advance(), !0) : ch === 118 ? (state.lastIntValue = 11, state.advance(), !0) : ch === 102 ? (state.lastIntValue = 12, state.advance(), !0) : ch === 114 ? (state.lastIntValue = 13, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatControlLetter = function(state) {
+ var ch = state.current();
+ return isControlLetter2(ch) ? (state.lastIntValue = ch % 32, state.advance(), !0) : !1;
+ };
+ function isControlLetter2(ch) {
+ return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
+ }
+ pp$12.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
+ forceU === void 0 && (forceU = !1);
+ var start2 = state.pos, switchU = forceU || state.switchU;
+ if (state.eat(
+ 117
+ /* u */
+ )) {
+ if (this.regexp_eatFixedHexDigits(state, 4)) {
+ var lead = state.lastIntValue;
+ if (switchU && lead >= 55296 && lead <= 56319) {
+ var leadSurrogateEnd = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ ) && state.eat(
+ 117
+ /* u */
+ ) && this.regexp_eatFixedHexDigits(state, 4)) {
+ var trail = state.lastIntValue;
+ if (trail >= 56320 && trail <= 57343)
+ return state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536, !0;
+ }
+ state.pos = leadSurrogateEnd, state.lastIntValue = lead;
+ }
+ return !0;
+ }
+ if (switchU && state.eat(
+ 123
+ /* { */
+ ) && this.regexp_eatHexDigits(state) && state.eat(
+ 125
+ /* } */
+ ) && isValidUnicode2(state.lastIntValue))
+ return !0;
+ switchU && state.raise("Invalid unicode escape"), state.pos = start2;
+ }
+ return !1;
+ };
+ function isValidUnicode2(ch) {
+ return ch >= 0 && ch <= 1114111;
+ }
+ pp$12.regexp_eatIdentityEscape = function(state) {
+ if (state.switchU)
+ return this.regexp_eatSyntaxCharacter(state) ? !0 : state.eat(
+ 47
+ /* / */
+ ) ? (state.lastIntValue = 47, !0) : !1;
+ var ch = state.current();
+ return ch !== 99 && (!state.switchN || ch !== 107) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatDecimalEscape = function(state) {
+ state.lastIntValue = 0;
+ var ch = state.current();
+ if (ch >= 49 && ch <= 57) {
+ do
+ state.lastIntValue = 10 * state.lastIntValue + (ch - 48), state.advance();
+ while ((ch = state.current()) >= 48 && ch <= 57);
+ return !0;
+ }
+ return !1;
+ };
+ var CharSetNone2 = 0, CharSetOk2 = 1, CharSetString2 = 2;
+ pp$12.regexp_eatCharacterClassEscape = function(state) {
+ var ch = state.current();
+ if (isCharacterClassEscape2(ch))
+ return state.lastIntValue = -1, state.advance(), CharSetOk2;
+ var negate = !1;
+ if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 80) || ch === 112)) {
+ state.lastIntValue = -1, state.advance();
+ var result;
+ if (state.eat(
+ 123
+ /* { */
+ ) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat(
+ 125
+ /* } */
+ ))
+ return negate && result === CharSetString2 && state.raise("Invalid property name"), result;
+ state.raise("Invalid property name");
+ }
+ return CharSetNone2;
+ };
+ function isCharacterClassEscape2(ch) {
+ return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
+ }
+ pp$12.regexp_eatUnicodePropertyValueExpression = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatUnicodePropertyName(state) && state.eat(
+ 61
+ /* = */
+ )) {
+ var name2 = state.lastStringValue;
+ if (this.regexp_eatUnicodePropertyValue(state)) {
+ var value = state.lastStringValue;
+ return this.regexp_validateUnicodePropertyNameAndValue(state, name2, value), CharSetOk2;
+ }
+ }
+ if (state.pos = start2, this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
+ var nameOrValue = state.lastStringValue;
+ return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
+ }
+ return CharSetNone2;
+ }, pp$12.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
+ hasOwn2(state.unicodeProperties.nonBinary, name2) || state.raise("Invalid property name"), state.unicodeProperties.nonBinary[name2].test(value) || state.raise("Invalid property value");
+ }, pp$12.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
+ if (state.unicodeProperties.binary.test(nameOrValue))
+ return CharSetOk2;
+ if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue))
+ return CharSetString2;
+ state.raise("Invalid property name");
+ }, pp$12.regexp_eatUnicodePropertyName = function(state) {
+ var ch = 0;
+ for (state.lastStringValue = ""; isUnicodePropertyNameCharacter2(ch = state.current()); )
+ state.lastStringValue += codePointToString2(ch), state.advance();
+ return state.lastStringValue !== "";
+ };
+ function isUnicodePropertyNameCharacter2(ch) {
+ return isControlLetter2(ch) || ch === 95;
+ }
+ pp$12.regexp_eatUnicodePropertyValue = function(state) {
+ var ch = 0;
+ for (state.lastStringValue = ""; isUnicodePropertyValueCharacter2(ch = state.current()); )
+ state.lastStringValue += codePointToString2(ch), state.advance();
+ return state.lastStringValue !== "";
+ };
+ function isUnicodePropertyValueCharacter2(ch) {
+ return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch);
+ }
+ pp$12.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
+ return this.regexp_eatUnicodePropertyValue(state);
+ }, pp$12.regexp_eatCharacterClass = function(state) {
+ if (state.eat(
+ 91
+ /* [ */
+ )) {
+ var negate = state.eat(
+ 94
+ /* ^ */
+ ), result = this.regexp_classContents(state);
+ return state.eat(
+ 93
+ /* ] */
+ ) || state.raise("Unterminated character class"), negate && result === CharSetString2 && state.raise("Negated character class may contain strings"), !0;
+ }
+ return !1;
+ }, pp$12.regexp_classContents = function(state) {
+ return state.current() === 93 ? CharSetOk2 : state.switchV ? this.regexp_classSetExpression(state) : (this.regexp_nonEmptyClassRanges(state), CharSetOk2);
+ }, pp$12.regexp_nonEmptyClassRanges = function(state) {
+ for (; this.regexp_eatClassAtom(state); ) {
+ var left = state.lastIntValue;
+ if (state.eat(
+ 45
+ /* - */
+ ) && this.regexp_eatClassAtom(state)) {
+ var right = state.lastIntValue;
+ state.switchU && (left === -1 || right === -1) && state.raise("Invalid character class"), left !== -1 && right !== -1 && left > right && state.raise("Range out of order in character class");
+ }
+ }
+ }, pp$12.regexp_eatClassAtom = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ if (this.regexp_eatClassEscape(state))
+ return !0;
+ if (state.switchU) {
+ var ch$1 = state.current();
+ (ch$1 === 99 || isOctalDigit2(ch$1)) && state.raise("Invalid class escape"), state.raise("Invalid escape");
+ }
+ state.pos = start2;
+ }
+ var ch = state.current();
+ return ch !== 93 ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatClassEscape = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 98
+ /* b */
+ ))
+ return state.lastIntValue = 8, !0;
+ if (state.switchU && state.eat(
+ 45
+ /* - */
+ ))
+ return state.lastIntValue = 45, !0;
+ if (!state.switchU && state.eat(
+ 99
+ /* c */
+ )) {
+ if (this.regexp_eatClassControlLetter(state))
+ return !0;
+ state.pos = start2;
+ }
+ return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
+ }, pp$12.regexp_classSetExpression = function(state) {
+ var result = CharSetOk2, subResult;
+ if (!this.regexp_eatClassSetRange(state)) if (subResult = this.regexp_eatClassSetOperand(state)) {
+ subResult === CharSetString2 && (result = CharSetString2);
+ for (var start2 = state.pos; state.eatChars(
+ [38, 38]
+ /* && */
+ ); ) {
+ if (state.current() !== 38 && (subResult = this.regexp_eatClassSetOperand(state))) {
+ subResult !== CharSetString2 && (result = CharSetOk2);
+ continue;
+ }
+ state.raise("Invalid character in character class");
+ }
+ if (start2 !== state.pos)
+ return result;
+ for (; state.eatChars(
+ [45, 45]
+ /* -- */
+ ); )
+ this.regexp_eatClassSetOperand(state) || state.raise("Invalid character in character class");
+ if (start2 !== state.pos)
+ return result;
+ } else
+ state.raise("Invalid character in character class");
+ for (; ; )
+ if (!this.regexp_eatClassSetRange(state)) {
+ if (subResult = this.regexp_eatClassSetOperand(state), !subResult)
+ return result;
+ subResult === CharSetString2 && (result = CharSetString2);
+ }
+ }, pp$12.regexp_eatClassSetRange = function(state) {
+ var start2 = state.pos;
+ if (this.regexp_eatClassSetCharacter(state)) {
+ var left = state.lastIntValue;
+ if (state.eat(
+ 45
+ /* - */
+ ) && this.regexp_eatClassSetCharacter(state)) {
+ var right = state.lastIntValue;
+ return left !== -1 && right !== -1 && left > right && state.raise("Range out of order in character class"), !0;
+ }
+ state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatClassSetOperand = function(state) {
+ return this.regexp_eatClassSetCharacter(state) ? CharSetOk2 : this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state);
+ }, pp$12.regexp_eatNestedClass = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 91
+ /* [ */
+ )) {
+ var negate = state.eat(
+ 94
+ /* ^ */
+ ), result = this.regexp_classContents(state);
+ if (state.eat(
+ 93
+ /* ] */
+ ))
+ return negate && result === CharSetString2 && state.raise("Negated character class may contain strings"), result;
+ state.pos = start2;
+ }
+ if (state.eat(
+ 92
+ /* \ */
+ )) {
+ var result$1 = this.regexp_eatCharacterClassEscape(state);
+ if (result$1)
+ return result$1;
+ state.pos = start2;
+ }
+ return null;
+ }, pp$12.regexp_eatClassStringDisjunction = function(state) {
+ var start2 = state.pos;
+ if (state.eatChars(
+ [92, 113]
+ /* \q */
+ )) {
+ if (state.eat(
+ 123
+ /* { */
+ )) {
+ var result = this.regexp_classStringDisjunctionContents(state);
+ if (state.eat(
+ 125
+ /* } */
+ ))
+ return result;
+ } else
+ state.raise("Invalid escape");
+ state.pos = start2;
+ }
+ return null;
+ }, pp$12.regexp_classStringDisjunctionContents = function(state) {
+ for (var result = this.regexp_classString(state); state.eat(
+ 124
+ /* | */
+ ); )
+ this.regexp_classString(state) === CharSetString2 && (result = CharSetString2);
+ return result;
+ }, pp$12.regexp_classString = function(state) {
+ for (var count = 0; this.regexp_eatClassSetCharacter(state); )
+ count++;
+ return count === 1 ? CharSetOk2 : CharSetString2;
+ }, pp$12.regexp_eatClassSetCharacter = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 92
+ /* \ */
+ ))
+ return this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state) ? !0 : state.eat(
+ 98
+ /* b */
+ ) ? (state.lastIntValue = 8, !0) : (state.pos = start2, !1);
+ var ch = state.current();
+ return ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter2(ch) || isClassSetSyntaxCharacter2(ch) ? !1 : (state.advance(), state.lastIntValue = ch, !0);
+ };
+ function isClassSetReservedDoublePunctuatorCharacter2(ch) {
+ return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126;
+ }
+ function isClassSetSyntaxCharacter2(ch) {
+ return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125;
+ }
+ pp$12.regexp_eatClassSetReservedPunctuator = function(state) {
+ var ch = state.current();
+ return isClassSetReservedPunctuator2(ch) ? (state.lastIntValue = ch, state.advance(), !0) : !1;
+ };
+ function isClassSetReservedPunctuator2(ch) {
+ return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126;
+ }
+ pp$12.regexp_eatClassControlLetter = function(state) {
+ var ch = state.current();
+ return isDecimalDigit2(ch) || ch === 95 ? (state.lastIntValue = ch % 32, state.advance(), !0) : !1;
+ }, pp$12.regexp_eatHexEscapeSequence = function(state) {
+ var start2 = state.pos;
+ if (state.eat(
+ 120
+ /* x */
+ )) {
+ if (this.regexp_eatFixedHexDigits(state, 2))
+ return !0;
+ state.switchU && state.raise("Invalid escape"), state.pos = start2;
+ }
+ return !1;
+ }, pp$12.regexp_eatDecimalDigits = function(state) {
+ var start2 = state.pos, ch = 0;
+ for (state.lastIntValue = 0; isDecimalDigit2(ch = state.current()); )
+ state.lastIntValue = 10 * state.lastIntValue + (ch - 48), state.advance();
+ return state.pos !== start2;
+ };
+ function isDecimalDigit2(ch) {
+ return ch >= 48 && ch <= 57;
+ }
+ pp$12.regexp_eatHexDigits = function(state) {
+ var start2 = state.pos, ch = 0;
+ for (state.lastIntValue = 0; isHexDigit2(ch = state.current()); )
+ state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch), state.advance();
+ return state.pos !== start2;
+ };
+ function isHexDigit2(ch) {
+ return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
+ }
+ function hexToInt2(ch) {
+ return ch >= 65 && ch <= 70 ? 10 + (ch - 65) : ch >= 97 && ch <= 102 ? 10 + (ch - 97) : ch - 48;
+ }
+ pp$12.regexp_eatLegacyOctalEscapeSequence = function(state) {
+ if (this.regexp_eatOctalDigit(state)) {
+ var n1 = state.lastIntValue;
+ if (this.regexp_eatOctalDigit(state)) {
+ var n2 = state.lastIntValue;
+ n1 <= 3 && this.regexp_eatOctalDigit(state) ? state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue : state.lastIntValue = n1 * 8 + n2;
+ } else
+ state.lastIntValue = n1;
+ return !0;
+ }
+ return !1;
+ }, pp$12.regexp_eatOctalDigit = function(state) {
+ var ch = state.current();
+ return isOctalDigit2(ch) ? (state.lastIntValue = ch - 48, state.advance(), !0) : (state.lastIntValue = 0, !1);
+ };
+ function isOctalDigit2(ch) {
+ return ch >= 48 && ch <= 55;
+ }
+ pp$12.regexp_eatFixedHexDigits = function(state, length) {
+ var start2 = state.pos;
+ state.lastIntValue = 0;
+ for (var i2 = 0; i2 < length; ++i2) {
+ var ch = state.current();
+ if (!isHexDigit2(ch))
+ return state.pos = start2, !1;
+ state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch), state.advance();
+ }
+ return !0;
+ };
+ var Token3 = function(p) {
+ this.type = p.type, this.value = p.value, this.start = p.start, this.end = p.end, p.options.locations && (this.loc = new SourceLocation3(p, p.startLoc, p.endLoc)), p.options.ranges && (this.range = [p.start, p.end]);
+ }, pp2 = Parser3.prototype;
+ pp2.next = function(ignoreEscapeSequenceInKeyword) {
+ !ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Token3(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
+ }, pp2.getToken = function() {
+ return this.next(), new Token3(this);
+ }, typeof Symbol < "u" && (pp2[Symbol.iterator] = function() {
+ var this$1$1 = this;
+ return {
+ next: function() {
+ var token = this$1$1.getToken();
+ return {
+ done: token.type === types$12.eof,
+ value: token
+ };
+ }
+ };
+ }), pp2.nextToken = function() {
+ var curContext = this.curContext();
+ if ((!curContext || !curContext.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
+ return this.finishToken(types$12.eof);
+ if (curContext.override)
+ return curContext.override(this);
+ this.readToken(this.fullCharCodeAtPos());
+ }, pp2.readToken = function(code2) {
+ return isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92 ? this.readWord() : this.getTokenFromCode(code2);
+ }, pp2.fullCharCodeAtPos = function() {
+ var code2 = this.input.charCodeAt(this.pos);
+ if (code2 <= 55295 || code2 >= 56320)
+ return code2;
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
+ }, pp2.skipBlockComment = function() {
+ var startLoc = this.options.onComment && this.curPosition(), start2 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
+ if (end === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = end + 2, this.options.locations)
+ for (var nextBreak = void 0, pos = start2; (nextBreak = nextLineBreak2(this.input, pos, this.pos)) > -1; )
+ ++this.curLine, pos = this.lineStart = nextBreak;
+ this.options.onComment && this.options.onComment(
+ !0,
+ this.input.slice(start2 + 2, end),
+ start2,
+ this.pos,
+ startLoc,
+ this.curPosition()
+ );
+ }, pp2.skipLineComment = function(startSkip) {
+ for (var start2 = this.pos, startLoc = this.options.onComment && this.curPosition(), ch = this.input.charCodeAt(this.pos += startSkip); this.pos < this.input.length && !isNewLine2(ch); )
+ ch = this.input.charCodeAt(++this.pos);
+ this.options.onComment && this.options.onComment(
+ !1,
+ this.input.slice(start2 + startSkip, this.pos),
+ start2,
+ this.pos,
+ startLoc,
+ this.curPosition()
+ );
+ }, pp2.skipSpace = function() {
+ loop: for (; this.pos < this.input.length; ) {
+ var ch = this.input.charCodeAt(this.pos);
+ switch (ch) {
+ case 32:
+ case 160:
+ ++this.pos;
+ break;
+ case 13:
+ this.input.charCodeAt(this.pos + 1) === 10 && ++this.pos;
+ case 10:
+ case 8232:
+ case 8233:
+ ++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
+ break;
+ case 47:
+ switch (this.input.charCodeAt(this.pos + 1)) {
+ case 42:
+ this.skipBlockComment();
+ break;
+ case 47:
+ this.skipLineComment(2);
+ break;
+ default:
+ break loop;
+ }
+ break;
+ default:
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch)))
+ ++this.pos;
+ else
+ break loop;
+ }
+ }
+ }, pp2.finishToken = function(type, val) {
+ this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
+ var prevType = this.type;
+ this.type = type, this.value = val, this.updateContext(prevType);
+ }, pp2.readToken_dot = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next >= 48 && next <= 57)
+ return this.readNumber(!0);
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ return this.options.ecmaVersion >= 6 && next === 46 && next2 === 46 ? (this.pos += 3, this.finishToken(types$12.ellipsis)) : (++this.pos, this.finishToken(types$12.dot));
+ }, pp2.readToken_slash = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return this.exprAllowed ? (++this.pos, this.readRegexp()) : next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.slash, 1);
+ }, pp2.readToken_mult_modulo_exp = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1), size = 1, tokentype = code2 === 42 ? types$12.star : types$12.modulo;
+ return this.options.ecmaVersion >= 7 && code2 === 42 && next === 42 && (++size, tokentype = types$12.starstar, next = this.input.charCodeAt(this.pos + 2)), next === 61 ? this.finishOp(types$12.assign, size + 1) : this.finishOp(tokentype, size);
+ }, pp2.readToken_pipe_amp = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code2) {
+ if (this.options.ecmaVersion >= 12) {
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ if (next2 === 61)
+ return this.finishOp(types$12.assign, 3);
+ }
+ return this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
+ }
+ return next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
+ }, pp2.readToken_caret = function() {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.bitwiseXOR, 1);
+ }, pp2.readToken_plus_min = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === code2 ? next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(types$12.incDec, 2) : next === 61 ? this.finishOp(types$12.assign, 2) : this.finishOp(types$12.plusMin, 1);
+ }, pp2.readToken_lt_gt = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1), size = 1;
+ return next === code2 ? (size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + size) === 61 ? this.finishOp(types$12.assign, size + 1) : this.finishOp(types$12.bitShift, size)) : next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (next === 61 && (size = 2), this.finishOp(types$12.relational, size));
+ }, pp2.readToken_eq_excl = function(code2) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ return next === 61 ? this.finishOp(types$12.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : code2 === 61 && next === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(types$12.arrow)) : this.finishOp(code2 === 61 ? types$12.eq : types$12.prefix, 1);
+ }, pp2.readToken_question = function() {
+ var ecmaVersion2 = this.options.ecmaVersion;
+ if (ecmaVersion2 >= 11) {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 46) {
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ if (next2 < 48 || next2 > 57)
+ return this.finishOp(types$12.questionDot, 2);
+ }
+ if (next === 63) {
+ if (ecmaVersion2 >= 12) {
+ var next2$1 = this.input.charCodeAt(this.pos + 2);
+ if (next2$1 === 61)
+ return this.finishOp(types$12.assign, 3);
+ }
+ return this.finishOp(types$12.coalesce, 2);
+ }
+ }
+ return this.finishOp(types$12.question, 1);
+ }, pp2.readToken_numberSign = function() {
+ var ecmaVersion2 = this.options.ecmaVersion, code2 = 35;
+ if (ecmaVersion2 >= 13 && (++this.pos, code2 = this.fullCharCodeAtPos(), isIdentifierStart2(code2, !0) || code2 === 92))
+ return this.finishToken(types$12.privateId, this.readWord1());
+ this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
+ }, pp2.getTokenFromCode = function(code2) {
+ switch (code2) {
+ // The interpretation of a dot depends on whether it is followed
+ // by a digit or another two dots.
+ case 46:
+ return this.readToken_dot();
+ // Punctuation tokens.
+ case 40:
+ return ++this.pos, this.finishToken(types$12.parenL);
+ case 41:
+ return ++this.pos, this.finishToken(types$12.parenR);
+ case 59:
+ return ++this.pos, this.finishToken(types$12.semi);
+ case 44:
+ return ++this.pos, this.finishToken(types$12.comma);
+ case 91:
+ return ++this.pos, this.finishToken(types$12.bracketL);
+ case 93:
+ return ++this.pos, this.finishToken(types$12.bracketR);
+ case 123:
+ return ++this.pos, this.finishToken(types$12.braceL);
+ case 125:
+ return ++this.pos, this.finishToken(types$12.braceR);
+ case 58:
+ return ++this.pos, this.finishToken(types$12.colon);
+ case 96:
+ if (this.options.ecmaVersion < 6)
+ break;
+ return ++this.pos, this.finishToken(types$12.backQuote);
+ case 48:
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 120 || next === 88)
+ return this.readRadixNumber(16);
+ if (this.options.ecmaVersion >= 6) {
+ if (next === 111 || next === 79)
+ return this.readRadixNumber(8);
+ if (next === 98 || next === 66)
+ return this.readRadixNumber(2);
+ }
+ // Anything else beginning with a digit is an integer, octal
+ // number, or float.
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ return this.readNumber(!1);
+ // Quotes produce strings.
+ case 34:
+ case 39:
+ return this.readString(code2);
+ // Operators are parsed inline in tiny state machines. '=' (61) is
+ // often referred to. `finishOp` simply skips the amount of
+ // characters it is given as second argument, and returns a token
+ // of the type given by its first argument.
+ case 47:
+ return this.readToken_slash();
+ case 37:
+ case 42:
+ return this.readToken_mult_modulo_exp(code2);
+ case 124:
+ case 38:
+ return this.readToken_pipe_amp(code2);
+ case 94:
+ return this.readToken_caret();
+ case 43:
+ case 45:
+ return this.readToken_plus_min(code2);
+ case 60:
+ case 62:
+ return this.readToken_lt_gt(code2);
+ case 61:
+ case 33:
+ return this.readToken_eq_excl(code2);
+ case 63:
+ return this.readToken_question();
+ case 126:
+ return this.finishOp(types$12.prefix, 1);
+ case 35:
+ return this.readToken_numberSign();
+ }
+ this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
+ }, pp2.finishOp = function(type, size) {
+ var str = this.input.slice(this.pos, this.pos + size);
+ return this.pos += size, this.finishToken(type, str);
+ }, pp2.readRegexp = function() {
+ for (var escaped, inClass, start2 = this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(start2, "Unterminated regular expression");
+ var ch = this.input.charAt(this.pos);
+ if (lineBreak2.test(ch) && this.raise(start2, "Unterminated regular expression"), escaped)
+ escaped = !1;
+ else {
+ if (ch === "[")
+ inClass = !0;
+ else if (ch === "]" && inClass)
+ inClass = !1;
+ else if (ch === "/" && !inClass)
+ break;
+ escaped = ch === "\\";
+ }
+ ++this.pos;
+ }
+ var pattern = this.input.slice(start2, this.pos);
+ ++this.pos;
+ var flagsStart = this.pos, flags = this.readWord1();
+ this.containsEsc && this.unexpected(flagsStart);
+ var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this));
+ state.reset(start2, pattern, flags), this.validateRegExpFlags(state), this.validateRegExpPattern(state);
+ var value = null;
+ try {
+ value = new RegExp(pattern, flags);
+ } catch {
+ }
+ return this.finishToken(types$12.regexp, { pattern, flags, value });
+ }, pp2.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
+ for (var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0, isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48, start2 = this.pos, total = 0, lastCode = 0, i2 = 0, e = len ?? 1 / 0; i2 < e; ++i2, ++this.pos) {
+ var code2 = this.input.charCodeAt(this.pos), val = void 0;
+ if (allowSeparators && code2 === 95) {
+ isLegacyOctalNumericLiteral && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), lastCode === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), i2 === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), lastCode = code2;
+ continue;
+ }
+ if (code2 >= 97 ? val = code2 - 97 + 10 : code2 >= 65 ? val = code2 - 65 + 10 : code2 >= 48 && code2 <= 57 ? val = code2 - 48 : val = 1 / 0, val >= radix)
+ break;
+ lastCode = code2, total = total * radix + val;
+ }
+ return allowSeparators && lastCode === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === start2 || len != null && this.pos - start2 !== len ? null : total;
+ };
+ function stringToNumber2(str, isLegacyOctalNumericLiteral) {
+ return isLegacyOctalNumericLiteral ? parseInt(str, 8) : parseFloat(str.replace(/_/g, ""));
+ }
+ function stringToBigInt2(str) {
+ return typeof BigInt != "function" ? null : BigInt(str.replace(/_/g, ""));
+ }
+ pp2.readRadixNumber = function(radix) {
+ var start2 = this.pos;
+ this.pos += 2;
+ var val = this.readInt(radix);
+ return val == null && this.raise(this.start + 2, "Expected number in radix " + radix), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (val = stringToBigInt2(this.input.slice(start2, this.pos)), ++this.pos) : isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$12.num, val);
+ }, pp2.readNumber = function(startsWithDot) {
+ var start2 = this.pos;
+ !startsWithDot && this.readInt(10, void 0, !0) === null && this.raise(start2, "Invalid number");
+ var octal = this.pos - start2 >= 2 && this.input.charCodeAt(start2) === 48;
+ octal && this.strict && this.raise(start2, "Invalid number");
+ var next = this.input.charCodeAt(this.pos);
+ if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
+ var val$1 = stringToBigInt2(this.input.slice(start2, this.pos));
+ return ++this.pos, isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(types$12.num, val$1);
+ }
+ octal && /[89]/.test(this.input.slice(start2, this.pos)) && (octal = !1), next === 46 && !octal && (++this.pos, this.readInt(10), next = this.input.charCodeAt(this.pos)), (next === 69 || next === 101) && !octal && (next = this.input.charCodeAt(++this.pos), (next === 43 || next === 45) && ++this.pos, this.readInt(10) === null && this.raise(start2, "Invalid number")), isIdentifierStart2(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
+ var val = stringToNumber2(this.input.slice(start2, this.pos), octal);
+ return this.finishToken(types$12.num, val);
+ }, pp2.readCodePoint = function() {
+ var ch = this.input.charCodeAt(this.pos), code2;
+ if (ch === 123) {
+ this.options.ecmaVersion < 6 && this.unexpected();
+ var codePos = ++this.pos;
+ code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, code2 > 1114111 && this.invalidStringToken(codePos, "Code point out of bounds");
+ } else
+ code2 = this.readHexChar(4);
+ return code2;
+ }, pp2.readString = function(quote) {
+ for (var out = "", chunkStart = ++this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === quote)
+ break;
+ ch === 92 ? (out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!1), chunkStart = this.pos) : ch === 8232 || ch === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine2(ch) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
+ }
+ return out += this.input.slice(chunkStart, this.pos++), this.finishToken(types$12.string, out);
+ };
+ var INVALID_TEMPLATE_ESCAPE_ERROR2 = {};
+ pp2.tryReadTemplateToken = function() {
+ this.inTemplateElement = !0;
+ try {
+ this.readTmplToken();
+ } catch (err) {
+ if (err === INVALID_TEMPLATE_ESCAPE_ERROR2)
+ this.readInvalidTemplateToken();
+ else
+ throw err;
+ }
+ this.inTemplateElement = !1;
+ }, pp2.invalidStringToken = function(position3, message) {
+ if (this.inTemplateElement && this.options.ecmaVersion >= 9)
+ throw INVALID_TEMPLATE_ESCAPE_ERROR2;
+ this.raise(position3, message);
+ }, pp2.readTmplToken = function() {
+ for (var out = "", chunkStart = this.pos; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123)
+ return this.pos === this.start && (this.type === types$12.template || this.type === types$12.invalidTemplate) ? ch === 36 ? (this.pos += 2, this.finishToken(types$12.dollarBraceL)) : (++this.pos, this.finishToken(types$12.backQuote)) : (out += this.input.slice(chunkStart, this.pos), this.finishToken(types$12.template, out));
+ if (ch === 92)
+ out += this.input.slice(chunkStart, this.pos), out += this.readEscapedChar(!0), chunkStart = this.pos;
+ else if (isNewLine2(ch)) {
+ switch (out += this.input.slice(chunkStart, this.pos), ++this.pos, ch) {
+ case 13:
+ this.input.charCodeAt(this.pos) === 10 && ++this.pos;
+ case 10:
+ out += `
+`;
+ break;
+ default:
+ out += String.fromCharCode(ch);
+ break;
+ }
+ this.options.locations && (++this.curLine, this.lineStart = this.pos), chunkStart = this.pos;
+ } else
+ ++this.pos;
+ }
+ }, pp2.readInvalidTemplateToken = function() {
+ for (; this.pos < this.input.length; this.pos++)
+ switch (this.input[this.pos]) {
+ case "\\":
+ ++this.pos;
+ break;
+ case "$":
+ if (this.input[this.pos + 1] !== "{")
+ break;
+ // fall through
+ case "`":
+ return this.finishToken(types$12.invalidTemplate, this.input.slice(this.start, this.pos));
+ case "\r":
+ this.input[this.pos + 1] === `
+` && ++this.pos;
+ // fall through
+ case `
+`:
+ case "\u2028":
+ case "\u2029":
+ ++this.curLine, this.lineStart = this.pos + 1;
+ break;
+ }
+ this.raise(this.start, "Unterminated template");
+ }, pp2.readEscapedChar = function(inTemplate) {
+ var ch = this.input.charCodeAt(++this.pos);
+ switch (++this.pos, ch) {
+ case 110:
+ return `
+`;
+ // 'n' -> '\n'
+ case 114:
+ return "\r";
+ // 'r' -> '\r'
+ case 120:
+ return String.fromCharCode(this.readHexChar(2));
+ // 'x'
+ case 117:
+ return codePointToString2(this.readCodePoint());
+ // 'u'
+ case 116:
+ return " ";
+ // 't' -> '\t'
+ case 98:
+ return "\b";
+ // 'b' -> '\b'
+ case 118:
+ return "\v";
+ // 'v' -> '\u000b'
+ case 102:
+ return "\f";
+ // 'f' -> '\f'
+ case 13:
+ this.input.charCodeAt(this.pos) === 10 && ++this.pos;
+ // '\r\n'
+ case 10:
+ return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
+ case 56:
+ case 57:
+ if (this.strict && this.invalidStringToken(
+ this.pos - 1,
+ "Invalid escape sequence"
+ ), inTemplate) {
+ var codePos = this.pos - 1;
+ this.invalidStringToken(
+ codePos,
+ "Invalid escape sequence in template string"
+ );
+ }
+ default:
+ if (ch >= 48 && ch <= 55) {
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], octal = parseInt(octalStr, 8);
+ return octal > 255 && (octalStr = octalStr.slice(0, -1), octal = parseInt(octalStr, 8)), this.pos += octalStr.length - 1, ch = this.input.charCodeAt(this.pos), (octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate) && this.invalidStringToken(
+ this.pos - 1 - octalStr.length,
+ inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
+ ), String.fromCharCode(octal);
+ }
+ return isNewLine2(ch) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(ch);
+ }
+ }, pp2.readHexChar = function(len) {
+ var codePos = this.pos, n = this.readInt(16, len);
+ return n === null && this.invalidStringToken(codePos, "Bad character escape sequence"), n;
+ }, pp2.readWord1 = function() {
+ this.containsEsc = !1;
+ for (var word = "", first = !0, chunkStart = this.pos, astral = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
+ var ch = this.fullCharCodeAtPos();
+ if (isIdentifierChar2(ch, astral))
+ this.pos += ch <= 65535 ? 1 : 2;
+ else if (ch === 92) {
+ this.containsEsc = !0, word += this.input.slice(chunkStart, this.pos);
+ var escStart = this.pos;
+ this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
+ var esc = this.readCodePoint();
+ (first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral) || this.invalidStringToken(escStart, "Invalid Unicode escape"), word += codePointToString2(esc), chunkStart = this.pos;
+ } else
+ break;
+ first = !1;
+ }
+ return word + this.input.slice(chunkStart, this.pos);
+ }, pp2.readWord = function() {
+ var word = this.readWord1(), type = types$12.name;
+ return this.keywords.test(word) && (type = keywords2[word]), this.finishToken(type, word);
+ };
+ var version2 = "8.15.0";
+ Parser3.acorn = {
+ Parser: Parser3,
+ version: version2,
+ defaultOptions: defaultOptions2,
+ Position: Position3,
+ SourceLocation: SourceLocation3,
+ getLineInfo: getLineInfo2,
+ Node: Node3,
+ TokenType: TokenType3,
+ tokTypes: types$12,
+ keywordTypes: keywords2,
+ TokContext: TokContext3,
+ tokContexts: types2,
+ isIdentifierChar: isIdentifierChar2,
+ isIdentifierStart: isIdentifierStart2,
+ Token: Token3,
+ isNewLine: isNewLine2,
+ lineBreak: lineBreak2,
+ lineBreakG: lineBreakG2,
+ nonASCIIwhitespace: nonASCIIwhitespace2
+ };
+ function parse4(input, options) {
+ return Parser3.parse(input, options);
+ }
+ function parseExpressionAt2(input, pos, options) {
+ return Parser3.parseExpressionAt(input, pos, options);
+ }
+ function tokenizer2(input, options) {
+ return Parser3.tokenizer(input, options);
+ }
+ exports2.Node = Node3, exports2.Parser = Parser3, exports2.Position = Position3, exports2.SourceLocation = SourceLocation3, exports2.TokContext = TokContext3, exports2.Token = Token3, exports2.TokenType = TokenType3, exports2.defaultOptions = defaultOptions2, exports2.getLineInfo = getLineInfo2, exports2.isIdentifierChar = isIdentifierChar2, exports2.isIdentifierStart = isIdentifierStart2, exports2.isNewLine = isNewLine2, exports2.keywordTypes = keywords2, exports2.lineBreak = lineBreak2, exports2.lineBreakG = lineBreakG2, exports2.nonASCIIwhitespace = nonASCIIwhitespace2, exports2.parse = parse4, exports2.parseExpressionAt = parseExpressionAt2, exports2.tokContexts = types2, exports2.tokTypes = types$12, exports2.tokenizer = tokenizer2, exports2.version = version2;
+ }));
+ }
+});
+
+// ../../../node_modules/micromark-extension-mdxjs/node_modules/acorn-jsx/index.js
+var require_acorn_jsx2 = __commonJS({
+ "../../../node_modules/micromark-extension-mdxjs/node_modules/acorn-jsx/index.js"(exports, module) {
+ "use strict";
+ var XHTMLEntities = require_xhtml2(), hexNumber = /^[\da-fA-F]+$/, decimalNumber = /^\d+$/, acornJsxMap = /* @__PURE__ */ new WeakMap();
+ function getJsxTokens(acorn) {
+ acorn = acorn.Parser.acorn || acorn;
+ let acornJsx2 = acornJsxMap.get(acorn);
+ if (!acornJsx2) {
+ let tt = acorn.tokTypes, TokContext3 = acorn.TokContext, TokenType3 = acorn.TokenType, tc_oTag = new TokContext3("...", !0, !0), tokContexts = {
+ tc_oTag,
+ tc_cTag,
+ tc_expr
+ }, tokTypes = {
+ jsxName: new TokenType3("jsxName"),
+ jsxText: new TokenType3("jsxText", { beforeExpr: !0 }),
+ jsxTagStart: new TokenType3("jsxTagStart", { startsExpr: !0 }),
+ jsxTagEnd: new TokenType3("jsxTagEnd")
+ };
+ tokTypes.jsxTagStart.updateContext = function() {
+ this.context.push(tc_expr), this.context.push(tc_oTag), this.exprAllowed = !1;
+ }, tokTypes.jsxTagEnd.updateContext = function(prevType) {
+ let out = this.context.pop();
+ out === tc_oTag && prevType === tt.slash || out === tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === tc_expr) : this.exprAllowed = !0;
+ }, acornJsx2 = { tokContexts, tokTypes }, acornJsxMap.set(acorn, acornJsx2);
+ }
+ return acornJsx2;
+ }
+ function getQualifiedJSXName(object) {
+ if (!object)
+ return object;
+ if (object.type === "JSXIdentifier")
+ return object.name;
+ if (object.type === "JSXNamespacedName")
+ return object.namespace.name + ":" + object.name.name;
+ if (object.type === "JSXMemberExpression")
+ return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
+ }
+ module.exports = function(options) {
+ return options = options || {}, function(Parser3) {
+ return plugin({
+ allowNamespaces: options.allowNamespaces !== !1,
+ allowNamespacedObjects: !!options.allowNamespacedObjects
+ }, Parser3);
+ };
+ };
+ Object.defineProperty(module.exports, "tokTypes", {
+ get: function() {
+ return getJsxTokens(require_acorn2()).tokTypes;
+ },
+ configurable: !0,
+ enumerable: !0
+ });
+ function plugin(options, Parser3) {
+ let acorn = Parser3.acorn || require_acorn2(), acornJsx2 = getJsxTokens(acorn), tt = acorn.tokTypes, tok = acornJsx2.tokTypes, tokContexts = acorn.tokContexts, tc_oTag = acornJsx2.tokContexts.tc_oTag, tc_cTag = acornJsx2.tokContexts.tc_cTag, tc_expr = acornJsx2.tokContexts.tc_expr, isNewLine2 = acorn.isNewLine, isIdentifierStart2 = acorn.isIdentifierStart, isIdentifierChar2 = acorn.isIdentifierChar;
+ return class extends Parser3 {
+ // Expose actual `tokTypes` and `tokContexts` to other plugins.
+ static get acornJsx() {
+ return acornJsx2;
+ }
+ // Reads inline JSX contents token.
+ jsx_readToken() {
+ let out = "", chunkStart = this.pos;
+ for (; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated JSX contents");
+ let ch = this.input.charCodeAt(this.pos);
+ switch (ch) {
+ case 60:
+ // '<'
+ case 123:
+ return this.pos === this.start ? ch === 60 && this.exprAllowed ? (++this.pos, this.finishToken(tok.jsxTagStart)) : this.getTokenFromCode(ch) : (out += this.input.slice(chunkStart, this.pos), this.finishToken(tok.jsxText, out));
+ case 38:
+ out += this.input.slice(chunkStart, this.pos), out += this.jsx_readEntity(), chunkStart = this.pos;
+ break;
+ case 62:
+ // '>'
+ case 125:
+ this.raise(
+ this.pos,
+ "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?'
+ );
+ default:
+ isNewLine2(ch) ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readNewLine(!0), chunkStart = this.pos) : ++this.pos;
+ }
+ }
+ }
+ jsx_readNewLine(normalizeCRLF) {
+ let ch = this.input.charCodeAt(this.pos), out;
+ return ++this.pos, ch === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, out = normalizeCRLF ? `
+` : `\r
+`) : out = String.fromCharCode(ch), this.options.locations && (++this.curLine, this.lineStart = this.pos), out;
+ }
+ jsx_readString(quote) {
+ let out = "", chunkStart = ++this.pos;
+ for (; ; ) {
+ this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
+ let ch = this.input.charCodeAt(this.pos);
+ if (ch === quote) break;
+ ch === 38 ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readEntity(), chunkStart = this.pos) : isNewLine2(ch) ? (out += this.input.slice(chunkStart, this.pos), out += this.jsx_readNewLine(!1), chunkStart = this.pos) : ++this.pos;
+ }
+ return out += this.input.slice(chunkStart, this.pos++), this.finishToken(tt.string, out);
+ }
+ jsx_readEntity() {
+ let str = "", count = 0, entity, ch = this.input[this.pos];
+ ch !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
+ let startPos = ++this.pos;
+ for (; this.pos < this.input.length && count++ < 10; ) {
+ if (ch = this.input[this.pos++], ch === ";") {
+ str[0] === "#" ? str[1] === "x" ? (str = str.substr(2), hexNumber.test(str) && (entity = String.fromCharCode(parseInt(str, 16)))) : (str = str.substr(1), decimalNumber.test(str) && (entity = String.fromCharCode(parseInt(str, 10)))) : entity = XHTMLEntities[str];
+ break;
+ }
+ str += ch;
+ }
+ return entity || (this.pos = startPos, "&");
+ }
+ // Read a JSX identifier (valid tag or attribute name).
+ //
+ // Optimized version since JSX identifiers can't contain
+ // escape characters and so can be read as single slice.
+ // Also assumes that first character was already checked
+ // by isIdentifierStart in readToken.
+ jsx_readWord() {
+ let ch, start2 = this.pos;
+ do
+ ch = this.input.charCodeAt(++this.pos);
+ while (isIdentifierChar2(ch) || ch === 45);
+ return this.finishToken(tok.jsxName, this.input.slice(start2, this.pos));
+ }
+ // Parse next token as JSX identifier
+ jsx_parseIdentifier() {
+ let node2 = this.startNode();
+ return this.type === tok.jsxName ? node2.name = this.value : this.type.keyword ? node2.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(node2, "JSXIdentifier");
+ }
+ // Parse namespaced identifier.
+ jsx_parseNamespacedName() {
+ let startPos = this.start, startLoc = this.startLoc, name2 = this.jsx_parseIdentifier();
+ if (!options.allowNamespaces || !this.eat(tt.colon)) return name2;
+ var node2 = this.startNodeAt(startPos, startLoc);
+ return node2.namespace = name2, node2.name = this.jsx_parseIdentifier(), this.finishNode(node2, "JSXNamespacedName");
+ }
+ // Parses element name in any form - namespaced, member
+ // or single identifier.
+ jsx_parseElementName() {
+ if (this.type === tok.jsxTagEnd) return "";
+ let startPos = this.start, startLoc = this.startLoc, node2 = this.jsx_parseNamespacedName();
+ for (this.type === tt.dot && node2.type === "JSXNamespacedName" && !options.allowNamespacedObjects && this.unexpected(); this.eat(tt.dot); ) {
+ let newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node2, newNode.property = this.jsx_parseIdentifier(), node2 = this.finishNode(newNode, "JSXMemberExpression");
+ }
+ return node2;
+ }
+ // Parses any type of JSX attribute value.
+ jsx_parseAttributeValue() {
+ switch (this.type) {
+ case tt.braceL:
+ let node2 = this.jsx_parseExpressionContainer();
+ return node2.expression.type === "JSXEmptyExpression" && this.raise(node2.start, "JSX attributes must only be assigned a non-empty expression"), node2;
+ case tok.jsxTagStart:
+ case tt.string:
+ return this.parseExprAtom();
+ default:
+ this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
+ }
+ }
+ // JSXEmptyExpression is unique type since it doesn't actually parse anything,
+ // and so it should start at the end of last read token (left brace) and finish
+ // at the beginning of the next one (right brace).
+ jsx_parseEmptyExpression() {
+ let node2 = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node2, "JSXEmptyExpression", this.start, this.startLoc);
+ }
+ // Parses JSX expression enclosed into curly brackets.
+ jsx_parseExpressionContainer() {
+ let node2 = this.startNode();
+ return this.next(), node2.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(tt.braceR), this.finishNode(node2, "JSXExpressionContainer");
+ }
+ // Parses following JSX attribute name-value pair.
+ jsx_parseAttribute() {
+ let node2 = this.startNode();
+ return this.eat(tt.braceL) ? (this.expect(tt.ellipsis), node2.argument = this.parseMaybeAssign(), this.expect(tt.braceR), this.finishNode(node2, "JSXSpreadAttribute")) : (node2.name = this.jsx_parseNamespacedName(), node2.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(node2, "JSXAttribute"));
+ }
+ // Parses JSX opening tag starting after '<'.
+ jsx_parseOpeningElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc);
+ node2.attributes = [];
+ let nodeName = this.jsx_parseElementName();
+ for (nodeName && (node2.name = nodeName); this.type !== tt.slash && this.type !== tok.jsxTagEnd; )
+ node2.attributes.push(this.jsx_parseAttribute());
+ return node2.selfClosing = this.eat(tt.slash), this.expect(tok.jsxTagEnd), this.finishNode(node2, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment");
+ }
+ // Parses JSX closing tag starting after ''.
+ jsx_parseClosingElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc), nodeName = this.jsx_parseElementName();
+ return nodeName && (node2.name = nodeName), this.expect(tok.jsxTagEnd), this.finishNode(node2, nodeName ? "JSXClosingElement" : "JSXClosingFragment");
+ }
+ // Parses entire JSX element, including it's opening tag
+ // (starting after '<'), attributes, contents and closing tag.
+ jsx_parseElementAt(startPos, startLoc) {
+ let node2 = this.startNodeAt(startPos, startLoc), children = [], openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc), closingElement = null;
+ if (!openingElement.selfClosing) {
+ contents: for (; ; )
+ switch (this.type) {
+ case tok.jsxTagStart:
+ if (startPos = this.start, startLoc = this.startLoc, this.next(), this.eat(tt.slash)) {
+ closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+ children.push(this.jsx_parseElementAt(startPos, startLoc));
+ break;
+ case tok.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+ case tt.braceL:
+ children.push(this.jsx_parseExpressionContainer());
+ break;
+ default:
+ this.unexpected();
+ }
+ getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name) && this.raise(
+ closingElement.start,
+ "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"
+ );
+ }
+ let fragmentOrElement = openingElement.name ? "Element" : "Fragment";
+ return node2["opening" + fragmentOrElement] = openingElement, node2["closing" + fragmentOrElement] = closingElement, node2.children = children, this.type === tt.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(node2, "JSX" + fragmentOrElement);
+ }
+ // Parse JSX text
+ jsx_parseText() {
+ let node2 = this.parseLiteral(this.value);
+ return node2.type = "JSXText", node2;
+ }
+ // Parses entire JSX element from current position.
+ jsx_parseElement() {
+ let startPos = this.start, startLoc = this.startLoc;
+ return this.next(), this.jsx_parseElementAt(startPos, startLoc);
+ }
+ parseExprAtom(refShortHandDefaultPos) {
+ return this.type === tok.jsxText ? this.jsx_parseText() : this.type === tok.jsxTagStart ? this.jsx_parseElement() : super.parseExprAtom(refShortHandDefaultPos);
+ }
+ readToken(code2) {
+ let context = this.curContext();
+ if (context === tc_expr) return this.jsx_readToken();
+ if (context === tc_oTag || context === tc_cTag) {
+ if (isIdentifierStart2(code2)) return this.jsx_readWord();
+ if (code2 == 62)
+ return ++this.pos, this.finishToken(tok.jsxTagEnd);
+ if ((code2 === 34 || code2 === 39) && context == tc_oTag)
+ return this.jsx_readString(code2);
+ }
+ return code2 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33 ? (++this.pos, this.finishToken(tok.jsxTagStart)) : super.readToken(code2);
+ }
+ updateContext(prevType) {
+ if (this.type == tt.braceL) {
+ var curContext = this.curContext();
+ curContext == tc_oTag ? this.context.push(tokContexts.b_expr) : curContext == tc_expr ? this.context.push(tokContexts.b_tmpl) : super.updateContext(prevType), this.exprAllowed = !0;
+ } else if (this.type === tt.slash && prevType === tok.jsxTagStart)
+ this.context.length -= 2, this.context.push(tc_cTag), this.exprAllowed = !1;
+ else
+ return super.updateContext(prevType);
+ }
+ };
+ }
+ }
+});
+
+// ../../../node_modules/extend/index.js
+var require_extend = __commonJS({
+ "../../../node_modules/extend/index.js"(exports, module) {
+ "use strict";
+ var hasOwn2 = Object.prototype.hasOwnProperty, toStr = Object.prototype.toString, defineProperty = Object.defineProperty, gOPD = Object.getOwnPropertyDescriptor, isArray2 = function(arr) {
+ return typeof Array.isArray == "function" ? Array.isArray(arr) : toStr.call(arr) === "[object Array]";
+ }, isPlainObject2 = function(obj) {
+ if (!obj || toStr.call(obj) !== "[object Object]")
+ return !1;
+ var hasOwnConstructor = hasOwn2.call(obj, "constructor"), hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf)
+ return !1;
+ var key2;
+ for (key2 in obj)
+ ;
+ return typeof key2 > "u" || hasOwn2.call(obj, key2);
+ }, setProperty = function(target, options) {
+ defineProperty && options.name === "__proto__" ? defineProperty(target, options.name, {
+ enumerable: !0,
+ configurable: !0,
+ value: options.newValue,
+ writable: !0
+ }) : target[options.name] = options.newValue;
+ }, getProperty = function(obj, name2) {
+ if (name2 === "__proto__")
+ if (hasOwn2.call(obj, name2)) {
+ if (gOPD)
+ return gOPD(obj, name2).value;
+ } else return;
+ return obj[name2];
+ };
+ module.exports = function extend3() {
+ var options, name2, src, copy, copyIsArray, clone, target = arguments[0], i = 1, length = arguments.length, deep = !1;
+ for (typeof target == "boolean" && (deep = target, target = arguments[1] || {}, i = 2), (target == null || typeof target != "object" && typeof target != "function") && (target = {}); i < length; ++i)
+ if (options = arguments[i], options != null)
+ for (name2 in options)
+ src = getProperty(target, name2), copy = getProperty(options, name2), target !== copy && (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy))) ? (copyIsArray ? (copyIsArray = !1, clone = src && isArray2(src) ? src : []) : clone = src && isPlainObject2(src) ? src : {}, setProperty(target, { name: name2, newValue: extend3(deep, clone, copy) })) : typeof copy < "u" && setProperty(target, { name: name2, newValue: copy }));
+ return target;
+ };
+ }
+});
+
+// ../../../node_modules/unist-util-stringify-position/lib/index.js
+function stringifyPosition(value) {
+ return !value || typeof value != "object" ? "" : "position" in value || "type" in value ? position(value.position) : "start" in value || "end" in value ? position(value) : "line" in value || "column" in value ? point(value) : "";
+}
+function point(point4) {
+ return index(point4 && point4.line) + ":" + index(point4 && point4.column);
+}
+function position(pos) {
+ return point(pos && pos.start) + "-" + point(pos && pos.end);
+}
+function index(value) {
+ return value && typeof value == "number" ? value : 1;
+}
+
+// ../../../node_modules/vfile-message/lib/index.js
+var VFileMessage = class extends Error {
+ /**
+ * Create a message for `reason`.
+ *
+ * > 🪦 **Note**: also has obsolete signatures.
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Options | null | undefined} [options]
+ * @returns
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @overload
+ * @param {string} reason
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {string | null | undefined} [origin]
+ * @returns
+ *
+ * @param {Error | VFileMessage | string} causeOrReason
+ * Reason for message, should use markdown.
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
+ * Configuration (optional).
+ * @param {string | null | undefined} [origin]
+ * Place in code where the message originates (example:
+ * `'my-package:my-rule'` or `'my-rule'`).
+ * @returns
+ * Instance of `VFileMessage`.
+ */
+ // eslint-disable-next-line complexity
+ constructor(causeOrReason, optionsOrParentOrPlace, origin) {
+ super(), typeof optionsOrParentOrPlace == "string" && (origin = optionsOrParentOrPlace, optionsOrParentOrPlace = void 0);
+ let reason = "", options = {}, legacyCause = !1;
+ if (optionsOrParentOrPlace && ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace ? options = { place: optionsOrParentOrPlace } : "start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace ? options = { place: optionsOrParentOrPlace } : "type" in optionsOrParentOrPlace ? options = {
+ ancestors: [optionsOrParentOrPlace],
+ place: optionsOrParentOrPlace.position
+ } : options = { ...optionsOrParentOrPlace }), typeof causeOrReason == "string" ? reason = causeOrReason : !options.cause && causeOrReason && (legacyCause = !0, reason = causeOrReason.message, options.cause = causeOrReason), !options.ruleId && !options.source && typeof origin == "string") {
+ let index2 = origin.indexOf(":");
+ index2 === -1 ? options.ruleId = origin : (options.source = origin.slice(0, index2), options.ruleId = origin.slice(index2 + 1));
+ }
+ if (!options.place && options.ancestors && options.ancestors) {
+ let parent = options.ancestors[options.ancestors.length - 1];
+ parent && (options.place = parent.position);
+ }
+ let start2 = options.place && "start" in options.place ? options.place.start : options.place;
+ this.ancestors = options.ancestors || void 0, this.cause = options.cause || void 0, this.column = start2 ? start2.column : void 0, this.fatal = void 0, this.file = "", this.message = reason, this.line = start2 ? start2.line : void 0, this.name = stringifyPosition(options.place) || "1:1", this.place = options.place || void 0, this.reason = this.message, this.ruleId = options.ruleId || void 0, this.source = options.source || void 0, this.stack = legacyCause && options.cause && typeof options.cause.stack == "string" ? options.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
+ }
+};
+VFileMessage.prototype.file = "";
+VFileMessage.prototype.name = "";
+VFileMessage.prototype.reason = "";
+VFileMessage.prototype.message = "";
+VFileMessage.prototype.stack = "";
+VFileMessage.prototype.column = void 0;
+VFileMessage.prototype.line = void 0;
+VFileMessage.prototype.ancestors = void 0;
+VFileMessage.prototype.cause = void 0;
+VFileMessage.prototype.fatal = void 0;
+VFileMessage.prototype.place = void 0;
+VFileMessage.prototype.ruleId = void 0;
+VFileMessage.prototype.source = void 0;
+
+// ../../../node_modules/vfile/lib/minpath.js
+import { default as default2 } from "node:path";
+
+// ../../../node_modules/vfile/lib/minproc.js
+import { default as default3 } from "node:process";
+
+// ../../../node_modules/vfile/lib/minurl.js
+import { fileURLToPath } from "node:url";
+
+// ../../../node_modules/vfile/lib/minurl.shared.js
+function isUrl(fileUrlOrPath) {
+ return !!(fileUrlOrPath !== null && typeof fileUrlOrPath == "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && // @ts-expect-error: indexing is fine.
+ fileUrlOrPath.auth === void 0);
+}
+
+// ../../../node_modules/vfile/lib/index.js
+var order = (
+ /** @type {const} */
+ [
+ "history",
+ "path",
+ "basename",
+ "stem",
+ "extname",
+ "dirname"
+ ]
+), VFile = class {
+ /**
+ * Create a new virtual file.
+ *
+ * `options` is treated as:
+ *
+ * * `string` or `Uint8Array` — `{value: options}`
+ * * `URL` — `{path: options}`
+ * * `VFile` — shallow copies its data over to the new file
+ * * `object` — all fields are shallow copied over to the new file
+ *
+ * Path related fields are set in the following order (least specific to
+ * most specific): `history`, `path`, `basename`, `stem`, `extname`,
+ * `dirname`.
+ *
+ * You cannot set `dirname` or `extname` without setting either `history`,
+ * `path`, `basename`, or `stem` too.
+ *
+ * @param {Compatible | null | undefined} [value]
+ * File value.
+ * @returns
+ * New instance.
+ */
+ constructor(value) {
+ let options;
+ value ? isUrl(value) ? options = { path: value } : typeof value == "string" || isUint8Array(value) ? options = { value } : options = value : options = {}, this.cwd = "cwd" in options ? "" : default3.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
+ let index2 = -1;
+ for (; ++index2 < order.length; ) {
+ let field2 = order[index2];
+ field2 in options && options[field2] !== void 0 && options[field2] !== null && (this[field2] = field2 === "history" ? [...options[field2]] : options[field2]);
+ }
+ let field;
+ for (field in options)
+ order.includes(field) || (this[field] = options[field]);
+ }
+ /**
+ * Get the basename (including extname) (example: `'index.min.js'`).
+ *
+ * @returns {string | undefined}
+ * Basename.
+ */
+ get basename() {
+ return typeof this.path == "string" ? default2.basename(this.path) : void 0;
+ }
+ /**
+ * Set basename (including extname) (`'index.min.js'`).
+ *
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
+ * on windows).
+ * Cannot be nullified (use `file.path = file.dirname` instead).
+ *
+ * @param {string} basename
+ * Basename.
+ * @returns {undefined}
+ * Nothing.
+ */
+ set basename(basename) {
+ assertNonEmpty(basename, "basename"), assertPart(basename, "basename"), this.path = default2.join(this.dirname || "", basename);
+ }
+ /**
+ * Get the parent path (example: `'~'`).
+ *
+ * @returns {string | undefined}
+ * Dirname.
+ */
+ get dirname() {
+ return typeof this.path == "string" ? default2.dirname(this.path) : void 0;
+ }
+ /**
+ * Set the parent path (example: `'~'`).
+ *
+ * Cannot be set if there’s no `path` yet.
+ *
+ * @param {string | undefined} dirname
+ * Dirname.
+ * @returns {undefined}
+ * Nothing.
+ */
+ set dirname(dirname) {
+ assertPath(this.basename, "dirname"), this.path = default2.join(dirname || "", this.basename);
+ }
+ /**
+ * Get the extname (including dot) (example: `'.js'`).
+ *
+ * @returns {string | undefined}
+ * Extname.
+ */
+ get extname() {
+ return typeof this.path == "string" ? default2.extname(this.path) : void 0;
+ }
+ /**
+ * Set the extname (including dot) (example: `'.js'`).
+ *
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
+ * on windows).
+ * Cannot be set if there’s no `path` yet.
+ *
+ * @param {string | undefined} extname
+ * Extname.
+ * @returns {undefined}
+ * Nothing.
+ */
+ set extname(extname) {
+ if (assertPart(extname, "extname"), assertPath(this.dirname, "extname"), extname) {
+ if (extname.codePointAt(0) !== 46)
+ throw new Error("`extname` must start with `.`");
+ if (extname.includes(".", 1))
+ throw new Error("`extname` cannot contain multiple dots");
+ }
+ this.path = default2.join(this.dirname, this.stem + (extname || ""));
+ }
+ /**
+ * Get the full path (example: `'~/index.min.js'`).
+ *
+ * @returns {string}
+ * Path.
+ */
+ get path() {
+ return this.history[this.history.length - 1];
+ }
+ /**
+ * Set the full path (example: `'~/index.min.js'`).
+ *
+ * Cannot be nullified.
+ * You can set a file URL (a `URL` object with a `file:` protocol) which will
+ * be turned into a path with `url.fileURLToPath`.
+ *
+ * @param {URL | string} path
+ * Path.
+ * @returns {undefined}
+ * Nothing.
+ */
+ set path(path) {
+ isUrl(path) && (path = fileURLToPath(path)), assertNonEmpty(path, "path"), this.path !== path && this.history.push(path);
+ }
+ /**
+ * Get the stem (basename w/o extname) (example: `'index.min'`).
+ *
+ * @returns {string | undefined}
+ * Stem.
+ */
+ get stem() {
+ return typeof this.path == "string" ? default2.basename(this.path, this.extname) : void 0;
+ }
+ /**
+ * Set the stem (basename w/o extname) (example: `'index.min'`).
+ *
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
+ * on windows).
+ * Cannot be nullified (use `file.path = file.dirname` instead).
+ *
+ * @param {string} stem
+ * Stem.
+ * @returns {undefined}
+ * Nothing.
+ */
+ set stem(stem) {
+ assertNonEmpty(stem, "stem"), assertPart(stem, "stem"), this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
+ }
+ // Normal prototypal methods.
+ /**
+ * Create a fatal message for `reason` associated with the file.
+ *
+ * The `fatal` field of the message is set to `true` (error; file not usable)
+ * and the `file` field is set to the current file path.
+ * The message is added to the `messages` field on `file`.
+ *
+ * > 🪦 **Note**: also has obsolete signatures.
+ *
+ * @overload
+ * @param {string} reason
+ * @param {MessageOptions | null | undefined} [options]
+ * @returns {never}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {string | null | undefined} [origin]
+ * @returns {never}
+ *
+ * @param {Error | VFileMessage | string} causeOrReason
+ * Reason for message, should use markdown.
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
+ * Configuration (optional).
+ * @param {string | null | undefined} [origin]
+ * Place in code where the message originates (example:
+ * `'my-package:my-rule'` or `'my-rule'`).
+ * @returns {never}
+ * Never.
+ * @throws {VFileMessage}
+ * Message.
+ */
+ fail(causeOrReason, optionsOrParentOrPlace, origin) {
+ let message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
+ throw message.fatal = !0, message;
+ }
+ /**
+ * Create an info message for `reason` associated with the file.
+ *
+ * The `fatal` field of the message is set to `undefined` (info; change
+ * likely not needed) and the `file` field is set to the current file path.
+ * The message is added to the `messages` field on `file`.
+ *
+ * > 🪦 **Note**: also has obsolete signatures.
+ *
+ * @overload
+ * @param {string} reason
+ * @param {MessageOptions | null | undefined} [options]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @param {Error | VFileMessage | string} causeOrReason
+ * Reason for message, should use markdown.
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
+ * Configuration (optional).
+ * @param {string | null | undefined} [origin]
+ * Place in code where the message originates (example:
+ * `'my-package:my-rule'` or `'my-rule'`).
+ * @returns {VFileMessage}
+ * Message.
+ */
+ info(causeOrReason, optionsOrParentOrPlace, origin) {
+ let message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
+ return message.fatal = void 0, message;
+ }
+ /**
+ * Create a message for `reason` associated with the file.
+ *
+ * The `fatal` field of the message is set to `false` (warning; change may be
+ * needed) and the `file` field is set to the current file path.
+ * The message is added to the `messages` field on `file`.
+ *
+ * > 🪦 **Note**: also has obsolete signatures.
+ *
+ * @overload
+ * @param {string} reason
+ * @param {MessageOptions | null | undefined} [options]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {string} reason
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Node | NodeLike | null | undefined} parent
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {Point | Position | null | undefined} place
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @overload
+ * @param {Error | VFileMessage} cause
+ * @param {string | null | undefined} [origin]
+ * @returns {VFileMessage}
+ *
+ * @param {Error | VFileMessage | string} causeOrReason
+ * Reason for message, should use markdown.
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
+ * Configuration (optional).
+ * @param {string | null | undefined} [origin]
+ * Place in code where the message originates (example:
+ * `'my-package:my-rule'` or `'my-rule'`).
+ * @returns {VFileMessage}
+ * Message.
+ */
+ message(causeOrReason, optionsOrParentOrPlace, origin) {
+ let message = new VFileMessage(
+ // @ts-expect-error: the overloads are fine.
+ causeOrReason,
+ optionsOrParentOrPlace,
+ origin
+ );
+ return this.path && (message.name = this.path + ":" + message.name, message.file = this.path), message.fatal = !1, this.messages.push(message), message;
+ }
+ /**
+ * Serialize the file.
+ *
+ * > **Note**: which encodings are supported depends on the engine.
+ * > For info on Node.js, see:
+ * > .
+ *
+ * @param {string | null | undefined} [encoding='utf8']
+ * Character encoding to understand `value` as when it’s a `Uint8Array`
+ * (default: `'utf-8'`).
+ * @returns {string}
+ * Serialized file.
+ */
+ toString(encoding) {
+ return this.value === void 0 ? "" : typeof this.value == "string" ? this.value : new TextDecoder(encoding || void 0).decode(this.value);
+ }
+};
+function assertPart(part, name2) {
+ if (part && part.includes(default2.sep))
+ throw new Error(
+ "`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`"
+ );
+}
+function assertNonEmpty(part, name2) {
+ if (!part)
+ throw new Error("`" + name2 + "` cannot be empty");
+}
+function assertPath(path, name2) {
+ if (!path)
+ throw new Error("Setting `" + name2 + "` requires `path` to be set too");
+}
+function isUint8Array(value) {
+ return !!(value && typeof value == "object" && "byteLength" in value && "byteOffset" in value);
+}
+
+// ../../../node_modules/markdown-extensions/index.js
+var markdownExtension = [
+ "md",
+ "markdown",
+ "mdown",
+ "mkdn",
+ "mkd",
+ "mdwn",
+ "mkdown",
+ "ron"
+], markdown_extensions_default = markdownExtension;
+
+// ../../../node_modules/@mdx-js/mdx/lib/util/extnames.js
+var md = markdown_extensions_default.map(function(d) {
+ return "." + d;
+});
+
+// ../../../node_modules/@mdx-js/mdx/lib/util/resolve-file-and-options.js
+function resolveFileAndOptions(vfileCompatible, options) {
+ let file = looksLikeAVFile(vfileCompatible) ? vfileCompatible : new VFile(vfileCompatible), { format, ...rest } = options || {};
+ return {
+ file,
+ options: {
+ format: format === "md" || format === "mdx" ? format : file.extname && (rest.mdExtensions || md).includes(file.extname) ? "md" : "mdx",
+ ...rest
+ }
+ };
+}
+function looksLikeAVFile(value) {
+ return !!(value && typeof value == "object" && "message" in value && "messages" in value);
+}
+
+// ../../../node_modules/estree-util-is-identifier-name/lib/index.js
+var startRe = /[$_\p{ID_Start}]/u, contRe = /[$_\u{200C}\u{200D}\p{ID_Continue}]/u, contReJsx = /[-$_\u{200C}\u{200D}\p{ID_Continue}]/u, nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, emptyOptions = {};
+function start(code2) {
+ return code2 ? startRe.test(String.fromCodePoint(code2)) : !1;
+}
+function cont(code2, options) {
+ let re2 = (options || emptyOptions).jsx ? contReJsx : contRe;
+ return code2 ? re2.test(String.fromCodePoint(code2)) : !1;
+}
+function name(name2, options) {
+ return ((options || emptyOptions).jsx ? nameReJsx : nameRe).test(name2);
+}
+
+// ../../../node_modules/estree-walker/src/walker.js
+var WalkerBase = class {
+ constructor() {
+ this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
+ skip: () => this.should_skip = !0,
+ remove: () => this.should_remove = !0,
+ replace: (node2) => this.replacement = node2
+ };
+ }
+ /**
+ * @template {Node} Parent
+ * @param {Parent | null | undefined} parent
+ * @param {keyof Parent | null | undefined} prop
+ * @param {number | null | undefined} index
+ * @param {Node} node
+ */
+ replace(parent, prop, index2, node2) {
+ parent && prop && (index2 != null ? parent[prop][index2] = node2 : parent[prop] = node2);
+ }
+ /**
+ * @template {Node} Parent
+ * @param {Parent | null | undefined} parent
+ * @param {keyof Parent | null | undefined} prop
+ * @param {number | null | undefined} index
+ */
+ remove(parent, prop, index2) {
+ parent && prop && (index2 != null ? parent[prop].splice(index2, 1) : delete parent[prop]);
+ }
+};
+
+// ../../../node_modules/estree-walker/src/sync.js
+var SyncWalker = class extends WalkerBase {
+ /**
+ *
+ * @param {SyncHandler} [enter]
+ * @param {SyncHandler} [leave]
+ */
+ constructor(enter, leave) {
+ super(), this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
+ skip: () => this.should_skip = !0,
+ remove: () => this.should_remove = !0,
+ replace: (node2) => this.replacement = node2
+ }, this.enter = enter, this.leave = leave;
+ }
+ /**
+ * @template {Node} Parent
+ * @param {Node} node
+ * @param {Parent | null} parent
+ * @param {keyof Parent} [prop]
+ * @param {number | null} [index]
+ * @returns {Node | null}
+ */
+ visit(node2, parent, prop, index2) {
+ if (node2) {
+ if (this.enter) {
+ let _should_skip = this.should_skip, _should_remove = this.should_remove, _replacement = this.replacement;
+ this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.enter.call(this.context, node2, parent, prop, index2), this.replacement && (node2 = this.replacement, this.replace(parent, prop, index2, node2)), this.should_remove && this.remove(parent, prop, index2);
+ let skipped = this.should_skip, removed = this.should_remove;
+ if (this.should_skip = _should_skip, this.should_remove = _should_remove, this.replacement = _replacement, skipped) return node2;
+ if (removed) return null;
+ }
+ let key2;
+ for (key2 in node2) {
+ let value = node2[key2];
+ if (value && typeof value == "object")
+ if (Array.isArray(value)) {
+ let nodes = (
+ /** @type {Array} */
+ value
+ );
+ for (let i = 0; i < nodes.length; i += 1) {
+ let item = nodes[i];
+ isNode(item) && (this.visit(item, node2, key2, i) || i--);
+ }
+ } else isNode(value) && this.visit(value, node2, key2, null);
+ }
+ if (this.leave) {
+ let _replacement = this.replacement, _should_remove = this.should_remove;
+ this.replacement = null, this.should_remove = !1, this.leave.call(this.context, node2, parent, prop, index2), this.replacement && (node2 = this.replacement, this.replace(parent, prop, index2, node2)), this.should_remove && this.remove(parent, prop, index2);
+ let removed = this.should_remove;
+ if (this.replacement = _replacement, this.should_remove = _should_remove, removed) return null;
+ }
+ }
+ return node2;
+ }
+};
+function isNode(value) {
+ return value !== null && typeof value == "object" && "type" in value && typeof value.type == "string";
+}
+
+// ../../../node_modules/estree-walker/src/index.js
+function walk(ast, { enter, leave }) {
+ return new SyncWalker(enter, leave).visit(ast, null);
+}
+
+// ../../../node_modules/estree-util-build-jsx/lib/index.js
+var regex = /@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g;
+function buildJsx(tree, options) {
+ let config = options || {}, automatic = config.runtime === "automatic", annotations = {}, imports = {};
+ walk(tree, {
+ enter(node2) {
+ if (node2.type === "Program") {
+ let comments = node2.comments || [], index2 = -1;
+ for (; ++index2 < comments.length; ) {
+ regex.lastIndex = 0;
+ let match = regex.exec(comments[index2].value);
+ for (; match; )
+ annotations[match[1]] = match[2], match = regex.exec(comments[index2].value);
+ }
+ if (annotations.jsxRuntime)
+ if (annotations.jsxRuntime === "automatic") {
+ if (automatic = !0, annotations.jsx)
+ throw new Error("Unexpected `@jsx` pragma w/ automatic runtime");
+ if (annotations.jsxFrag)
+ throw new Error(
+ "Unexpected `@jsxFrag` pragma w/ automatic runtime"
+ );
+ } else if (annotations.jsxRuntime === "classic") {
+ if (automatic = !1, annotations.jsxImportSource)
+ throw new Error(
+ "Unexpected `@jsxImportSource` w/ classic runtime"
+ );
+ } else
+ throw new Error(
+ "Unexpected `jsxRuntime` `" + annotations.jsxRuntime + "`, expected `automatic` or `classic`"
+ );
+ }
+ },
+ // eslint-disable-next-line complexity
+ leave(node2) {
+ if (node2.type === "Program") {
+ let specifiers = [];
+ if (imports.fragment && specifiers.push({
+ type: "ImportSpecifier",
+ imported: { type: "Identifier", name: "Fragment" },
+ local: { type: "Identifier", name: "_Fragment" }
+ }), imports.jsx && specifiers.push({
+ type: "ImportSpecifier",
+ imported: { type: "Identifier", name: "jsx" },
+ local: { type: "Identifier", name: "_jsx" }
+ }), imports.jsxs && specifiers.push({
+ type: "ImportSpecifier",
+ imported: { type: "Identifier", name: "jsxs" },
+ local: { type: "Identifier", name: "_jsxs" }
+ }), imports.jsxDEV && specifiers.push({
+ type: "ImportSpecifier",
+ imported: { type: "Identifier", name: "jsxDEV" },
+ local: { type: "Identifier", name: "_jsxDEV" }
+ }), specifiers.length > 0) {
+ let injectIndex = 0;
+ for (; injectIndex < node2.body.length; ) {
+ let child = node2.body[injectIndex];
+ if ("directive" in child && child.directive)
+ injectIndex++;
+ else
+ break;
+ }
+ node2.body.splice(injectIndex, 0, {
+ type: "ImportDeclaration",
+ specifiers,
+ source: {
+ type: "Literal",
+ value: (annotations.jsxImportSource || config.importSource || "react") + (config.development ? "/jsx-dev-runtime" : "/jsx-runtime")
+ }
+ });
+ }
+ }
+ if (node2.type !== "JSXElement" && node2.type !== "JSXFragment")
+ return;
+ let children = [], index2 = -1;
+ for (; ++index2 < node2.children.length; ) {
+ let child = node2.children[index2];
+ if (child.type === "JSXExpressionContainer")
+ child.expression.type !== "JSXEmptyExpression" && children.push(child.expression);
+ else if (child.type === "JSXText") {
+ let value = child.value.replace(/\t/g, " ").replace(/ *(\r?\n|\r) */g, `
+`).replace(/\n+/g, `
+`).replace(/\n+$/, "").replace(/^\n+/, "").replace(/\n/g, " ");
+ if (value) {
+ let text5 = { type: "Literal", value };
+ create(child, text5), children.push(text5);
+ }
+ } else
+ child.type !== "JSXElement" && child.type !== "JSXFragment" && child.type, children.push(child);
+ }
+ let name2, fields = [], parameters = [], key2;
+ if (node2.type === "JSXElement") {
+ if (name2 = toIdentifier(node2.openingElement.name), name2.type === "Identifier" && /^[a-z]/.test(name2.name)) {
+ let next = { type: "Literal", value: name2.name };
+ create(name2, next), name2 = next;
+ }
+ let spread, attributes = node2.openingElement.attributes, index3 = -1;
+ for (; ++index3 < attributes.length; ) {
+ let attribute = attributes[index3];
+ if (attribute.type === "JSXSpreadAttribute")
+ attribute.argument.type === "ObjectExpression" ? fields.push(...attribute.argument.properties) : fields.push({ type: "SpreadElement", argument: attribute.argument }), spread = !0;
+ else {
+ let prop = toProperty(attribute);
+ if (automatic && prop.key.type === "Identifier" && prop.key.name === "key") {
+ if (spread)
+ throw new Error(
+ "Expected `key` to come before any spread expressions"
+ );
+ let value = prop.value;
+ value.type !== "AssignmentPattern" && value.type !== "ArrayPattern" && value.type !== "ObjectPattern" && value.type, key2 = value;
+ } else
+ fields.push(prop);
+ }
+ }
+ } else automatic ? (imports.fragment = !0, name2 = { type: "Identifier", name: "_Fragment" }) : name2 = toMemberExpression(
+ annotations.jsxFrag || config.pragmaFrag || "React.Fragment"
+ );
+ automatic ? children.length > 0 && fields.push({
+ type: "Property",
+ key: { type: "Identifier", name: "children" },
+ value: children.length > 1 ? { type: "ArrayExpression", elements: children } : children[0],
+ kind: "init",
+ method: !1,
+ shorthand: !1,
+ computed: !1
+ }) : parameters = children;
+ let callee;
+ if (automatic) {
+ parameters.push({ type: "ObjectExpression", properties: fields }), key2 ? parameters.push(key2) : config.development && parameters.push({ type: "Identifier", name: "undefined" });
+ let isStaticChildren = children.length > 1;
+ if (config.development) {
+ imports.jsxDEV = !0, callee = {
+ type: "Identifier",
+ name: "_jsxDEV"
+ }, parameters.push({ type: "Literal", value: isStaticChildren });
+ let source = {
+ type: "ObjectExpression",
+ properties: [
+ {
+ type: "Property",
+ method: !1,
+ shorthand: !1,
+ computed: !1,
+ kind: "init",
+ key: { type: "Identifier", name: "fileName" },
+ value: {
+ type: "Literal",
+ value: config.filePath || ""
+ }
+ }
+ ]
+ };
+ node2.loc && source.properties.push(
+ {
+ type: "Property",
+ method: !1,
+ shorthand: !1,
+ computed: !1,
+ kind: "init",
+ key: { type: "Identifier", name: "lineNumber" },
+ value: { type: "Literal", value: node2.loc.start.line }
+ },
+ {
+ type: "Property",
+ method: !1,
+ shorthand: !1,
+ computed: !1,
+ kind: "init",
+ key: { type: "Identifier", name: "columnNumber" },
+ value: { type: "Literal", value: node2.loc.start.column + 1 }
+ }
+ ), parameters.push(source, { type: "ThisExpression" });
+ } else isStaticChildren ? (imports.jsxs = !0, callee = { type: "Identifier", name: "_jsxs" }) : (imports.jsx = !0, callee = { type: "Identifier", name: "_jsx" });
+ } else
+ fields.length > 0 ? parameters.unshift({ type: "ObjectExpression", properties: fields }) : parameters.length > 0 && parameters.unshift({ type: "Literal", value: null }), callee = toMemberExpression(
+ annotations.jsx || config.pragma || "React.createElement"
+ );
+ parameters.unshift(name2);
+ let call = {
+ type: "CallExpression",
+ callee,
+ arguments: parameters,
+ optional: !1
+ };
+ create(node2, call), this.replace(call);
+ }
+ });
+}
+function toProperty(node2) {
+ let value;
+ if (node2.value)
+ if (node2.value.type === "JSXExpressionContainer") {
+ let valueExpression = node2.value.expression;
+ valueExpression.type, value = valueExpression;
+ } else {
+ let nodeValue = node2.value;
+ nodeValue.type !== "JSXElement" && nodeValue.type, value = nodeValue, delete value.raw;
+ }
+ else
+ value = { type: "Literal", value: !0 };
+ let replacement = {
+ type: "Property",
+ key: toIdentifier(node2.name),
+ value,
+ kind: "init",
+ method: !1,
+ shorthand: !1,
+ computed: !1
+ };
+ return create(node2, replacement), replacement;
+}
+function toIdentifier(node2) {
+ let replace;
+ if (node2.type === "JSXMemberExpression") {
+ let id = toIdentifier(node2.property);
+ replace = {
+ type: "MemberExpression",
+ object: toIdentifier(node2.object),
+ property: id,
+ computed: id.type === "Literal",
+ optional: !1
+ };
+ } else node2.type === "JSXNamespacedName" ? replace = {
+ type: "Literal",
+ value: node2.namespace.name + ":" + node2.name.name
+ } : replace = name(node2.name) ? { type: "Identifier", name: node2.name } : { type: "Literal", value: node2.name };
+ return create(node2, replace), replace;
+}
+function toMemberExpression(id) {
+ let identifiers = id.split("."), index2 = -1, result;
+ for (; ++index2 < identifiers.length; ) {
+ let prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
+ result = result ? {
+ type: "MemberExpression",
+ object: result,
+ property: prop,
+ computed: !!(index2 && prop.type === "Literal"),
+ optional: !1
+ } : prop;
+ }
+ return result;
+}
+function create(from, to) {
+ let fields = ["start", "end", "loc", "range", "comments"], index2 = -1;
+ for (; ++index2 < fields.length; ) {
+ let field = fields[index2];
+ field in from && (to[field] = from[field]);
+ }
+}
+
+// ../../../node_modules/recma-build-jsx/lib/index.js
+function recmaJsx(options) {
+ return function(tree, file) {
+ buildJsx(tree, { filePath: file.history[0], ...options });
+ };
+}
+
+// ../../../node_modules/@mdx-js/mdx/node_modules/recma-jsx/lib/index.js
+var import_acorn_jsx = __toESM(require_acorn_jsx(), 1);
+
+// ../../../node_modules/astring/dist/astring.mjs
+var { stringify: stringify2 } = JSON;
+if (!String.prototype.repeat)
+ throw new Error(
+ "String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"
+ );
+if (!String.prototype.endsWith)
+ throw new Error(
+ "String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"
+ );
+var OPERATOR_PRECEDENCE = {
+ "||": 2,
+ "??": 3,
+ "&&": 4,
+ "|": 5,
+ "^": 6,
+ "&": 7,
+ "==": 8,
+ "!=": 8,
+ "===": 8,
+ "!==": 8,
+ "<": 9,
+ ">": 9,
+ "<=": 9,
+ ">=": 9,
+ in: 9,
+ instanceof: 9,
+ "<<": 10,
+ ">>": 10,
+ ">>>": 10,
+ "+": 11,
+ "-": 11,
+ "*": 12,
+ "%": 12,
+ "/": 12,
+ "**": 13
+}, NEEDS_PARENTHESES = 17, EXPRESSIONS_PRECEDENCE = {
+ // Definitions
+ ArrayExpression: 20,
+ TaggedTemplateExpression: 20,
+ ThisExpression: 20,
+ Identifier: 20,
+ PrivateIdentifier: 20,
+ Literal: 18,
+ TemplateLiteral: 20,
+ Super: 20,
+ SequenceExpression: 20,
+ // Operations
+ MemberExpression: 19,
+ ChainExpression: 19,
+ CallExpression: 19,
+ NewExpression: 19,
+ // Other definitions
+ ArrowFunctionExpression: NEEDS_PARENTHESES,
+ ClassExpression: NEEDS_PARENTHESES,
+ FunctionExpression: NEEDS_PARENTHESES,
+ ObjectExpression: NEEDS_PARENTHESES,
+ // Other operations
+ UpdateExpression: 16,
+ UnaryExpression: 15,
+ AwaitExpression: 15,
+ BinaryExpression: 14,
+ LogicalExpression: 13,
+ ConditionalExpression: 4,
+ AssignmentExpression: 3,
+ YieldExpression: 2,
+ RestElement: 1
+};
+function formatSequence(state, nodes) {
+ let { generator } = state;
+ if (state.write("("), nodes != null && nodes.length > 0) {
+ generator[nodes[0].type](nodes[0], state);
+ let { length } = nodes;
+ for (let i = 1; i < length; i++) {
+ let param = nodes[i];
+ state.write(", "), generator[param.type](param, state);
+ }
+ }
+ state.write(")");
+}
+function expressionNeedsParenthesis(state, node2, parentNode, isRightHand) {
+ let nodePrecedence = state.expressionsPrecedence[node2.type];
+ if (nodePrecedence === NEEDS_PARENTHESES)
+ return !0;
+ let parentNodePrecedence = state.expressionsPrecedence[parentNode.type];
+ return nodePrecedence !== parentNodePrecedence ? !isRightHand && nodePrecedence === 15 && parentNodePrecedence === 14 && parentNode.operator === "**" || nodePrecedence < parentNodePrecedence : nodePrecedence !== 13 && nodePrecedence !== 14 ? !1 : node2.operator === "**" && parentNode.operator === "**" ? !isRightHand : nodePrecedence === 13 && parentNodePrecedence === 13 && (node2.operator === "??" || parentNode.operator === "??") ? !0 : isRightHand ? OPERATOR_PRECEDENCE[node2.operator] <= OPERATOR_PRECEDENCE[parentNode.operator] : OPERATOR_PRECEDENCE[node2.operator] < OPERATOR_PRECEDENCE[parentNode.operator];
+}
+function formatExpression(state, node2, parentNode, isRightHand) {
+ let { generator } = state;
+ expressionNeedsParenthesis(state, node2, parentNode, isRightHand) ? (state.write("("), generator[node2.type](node2, state), state.write(")")) : generator[node2.type](node2, state);
+}
+function reindent(state, text5, indent2, lineEnd) {
+ let lines = text5.split(`
+`), end = lines.length - 1;
+ if (state.write(lines[0].trim()), end > 0) {
+ state.write(lineEnd);
+ for (let i = 1; i < end; i++)
+ state.write(indent2 + lines[i].trim() + lineEnd);
+ state.write(indent2 + lines[end].trim());
+ }
+}
+function formatComments(state, comments, indent2, lineEnd) {
+ let { length } = comments;
+ for (let i = 0; i < length; i++) {
+ let comment2 = comments[i];
+ state.write(indent2), comment2.type[0] === "L" ? state.write("// " + comment2.value.trim() + `
+`, comment2) : (state.write("/*"), reindent(state, comment2.value, indent2, lineEnd), state.write("*/" + lineEnd));
+ }
+}
+function hasCallExpression(node2) {
+ let currentNode = node2;
+ for (; currentNode != null; ) {
+ let { type } = currentNode;
+ if (type[0] === "C" && type[1] === "a")
+ return !0;
+ if (type[0] === "M" && type[1] === "e" && type[2] === "m")
+ currentNode = currentNode.object;
+ else
+ return !1;
+ }
+}
+function formatVariableDeclaration(state, node2) {
+ let { generator } = state, { declarations } = node2;
+ state.write(node2.kind + " ");
+ let { length } = declarations;
+ if (length > 0) {
+ generator.VariableDeclarator(declarations[0], state);
+ for (let i = 1; i < length; i++)
+ state.write(", "), generator.VariableDeclarator(declarations[i], state);
+ }
+}
+var ForInStatement, FunctionDeclaration, RestElement, BinaryExpression, ArrayExpression, BlockStatement, GENERATOR = {
+ /*
+ Default generator.
+ */
+ Program(node2, state) {
+ let indent2 = state.indent.repeat(state.indentLevel), { lineEnd, writeComments } = state;
+ writeComments && node2.comments != null && formatComments(state, node2.comments, indent2, lineEnd);
+ let statements = node2.body, { length } = statements;
+ for (let i = 0; i < length; i++) {
+ let statement = statements[i];
+ writeComments && statement.comments != null && formatComments(state, statement.comments, indent2, lineEnd), state.write(indent2), this[statement.type](statement, state), state.write(lineEnd);
+ }
+ writeComments && node2.trailingComments != null && formatComments(state, node2.trailingComments, indent2, lineEnd);
+ },
+ BlockStatement: BlockStatement = function(node2, state) {
+ let indent2 = state.indent.repeat(state.indentLevel++), { lineEnd, writeComments } = state, statementIndent = indent2 + state.indent;
+ state.write("{");
+ let statements = node2.body;
+ if (statements != null && statements.length > 0) {
+ state.write(lineEnd), writeComments && node2.comments != null && formatComments(state, node2.comments, statementIndent, lineEnd);
+ let { length } = statements;
+ for (let i = 0; i < length; i++) {
+ let statement = statements[i];
+ writeComments && statement.comments != null && formatComments(state, statement.comments, statementIndent, lineEnd), state.write(statementIndent), this[statement.type](statement, state), state.write(lineEnd);
+ }
+ state.write(indent2);
+ } else
+ writeComments && node2.comments != null && (state.write(lineEnd), formatComments(state, node2.comments, statementIndent, lineEnd), state.write(indent2));
+ writeComments && node2.trailingComments != null && formatComments(state, node2.trailingComments, statementIndent, lineEnd), state.write("}"), state.indentLevel--;
+ },
+ ClassBody: BlockStatement,
+ StaticBlock(node2, state) {
+ state.write("static "), this.BlockStatement(node2, state);
+ },
+ EmptyStatement(node2, state) {
+ state.write(";");
+ },
+ ExpressionStatement(node2, state) {
+ let precedence = state.expressionsPrecedence[node2.expression.type];
+ precedence === NEEDS_PARENTHESES || precedence === 3 && node2.expression.left.type[0] === "O" ? (state.write("("), this[node2.expression.type](node2.expression, state), state.write(")")) : this[node2.expression.type](node2.expression, state), state.write(";");
+ },
+ IfStatement(node2, state) {
+ state.write("if ("), this[node2.test.type](node2.test, state), state.write(") "), this[node2.consequent.type](node2.consequent, state), node2.alternate != null && (state.write(" else "), this[node2.alternate.type](node2.alternate, state));
+ },
+ LabeledStatement(node2, state) {
+ this[node2.label.type](node2.label, state), state.write(": "), this[node2.body.type](node2.body, state);
+ },
+ BreakStatement(node2, state) {
+ state.write("break"), node2.label != null && (state.write(" "), this[node2.label.type](node2.label, state)), state.write(";");
+ },
+ ContinueStatement(node2, state) {
+ state.write("continue"), node2.label != null && (state.write(" "), this[node2.label.type](node2.label, state)), state.write(";");
+ },
+ WithStatement(node2, state) {
+ state.write("with ("), this[node2.object.type](node2.object, state), state.write(") "), this[node2.body.type](node2.body, state);
+ },
+ SwitchStatement(node2, state) {
+ let indent2 = state.indent.repeat(state.indentLevel++), { lineEnd, writeComments } = state;
+ state.indentLevel++;
+ let caseIndent = indent2 + state.indent, statementIndent = caseIndent + state.indent;
+ state.write("switch ("), this[node2.discriminant.type](node2.discriminant, state), state.write(") {" + lineEnd);
+ let { cases: occurences } = node2, { length: occurencesCount } = occurences;
+ for (let i = 0; i < occurencesCount; i++) {
+ let occurence = occurences[i];
+ writeComments && occurence.comments != null && formatComments(state, occurence.comments, caseIndent, lineEnd), occurence.test ? (state.write(caseIndent + "case "), this[occurence.test.type](occurence.test, state), state.write(":" + lineEnd)) : state.write(caseIndent + "default:" + lineEnd);
+ let { consequent } = occurence, { length: consequentCount } = consequent;
+ for (let i2 = 0; i2 < consequentCount; i2++) {
+ let statement = consequent[i2];
+ writeComments && statement.comments != null && formatComments(state, statement.comments, statementIndent, lineEnd), state.write(statementIndent), this[statement.type](statement, state), state.write(lineEnd);
+ }
+ }
+ state.indentLevel -= 2, state.write(indent2 + "}");
+ },
+ ReturnStatement(node2, state) {
+ state.write("return"), node2.argument && (state.write(" "), this[node2.argument.type](node2.argument, state)), state.write(";");
+ },
+ ThrowStatement(node2, state) {
+ state.write("throw "), this[node2.argument.type](node2.argument, state), state.write(";");
+ },
+ TryStatement(node2, state) {
+ if (state.write("try "), this[node2.block.type](node2.block, state), node2.handler) {
+ let { handler } = node2;
+ handler.param == null ? state.write(" catch ") : (state.write(" catch ("), this[handler.param.type](handler.param, state), state.write(") ")), this[handler.body.type](handler.body, state);
+ }
+ node2.finalizer && (state.write(" finally "), this[node2.finalizer.type](node2.finalizer, state));
+ },
+ WhileStatement(node2, state) {
+ state.write("while ("), this[node2.test.type](node2.test, state), state.write(") "), this[node2.body.type](node2.body, state);
+ },
+ DoWhileStatement(node2, state) {
+ state.write("do "), this[node2.body.type](node2.body, state), state.write(" while ("), this[node2.test.type](node2.test, state), state.write(");");
+ },
+ ForStatement(node2, state) {
+ if (state.write("for ("), node2.init != null) {
+ let { init } = node2;
+ init.type[0] === "V" ? formatVariableDeclaration(state, init) : this[init.type](init, state);
+ }
+ state.write("; "), node2.test && this[node2.test.type](node2.test, state), state.write("; "), node2.update && this[node2.update.type](node2.update, state), state.write(") "), this[node2.body.type](node2.body, state);
+ },
+ ForInStatement: ForInStatement = function(node2, state) {
+ state.write(`for ${node2.await ? "await " : ""}(`);
+ let { left } = node2;
+ left.type[0] === "V" ? formatVariableDeclaration(state, left) : this[left.type](left, state), state.write(node2.type[3] === "I" ? " in " : " of "), this[node2.right.type](node2.right, state), state.write(") "), this[node2.body.type](node2.body, state);
+ },
+ ForOfStatement: ForInStatement,
+ DebuggerStatement(node2, state) {
+ state.write("debugger;", node2);
+ },
+ FunctionDeclaration: FunctionDeclaration = function(node2, state) {
+ state.write(
+ (node2.async ? "async " : "") + (node2.generator ? "function* " : "function ") + (node2.id ? node2.id.name : ""),
+ node2
+ ), formatSequence(state, node2.params), state.write(" "), this[node2.body.type](node2.body, state);
+ },
+ FunctionExpression: FunctionDeclaration,
+ VariableDeclaration(node2, state) {
+ formatVariableDeclaration(state, node2), state.write(";");
+ },
+ VariableDeclarator(node2, state) {
+ this[node2.id.type](node2.id, state), node2.init != null && (state.write(" = "), this[node2.init.type](node2.init, state));
+ },
+ ClassDeclaration(node2, state) {
+ if (state.write("class " + (node2.id ? `${node2.id.name} ` : ""), node2), node2.superClass) {
+ state.write("extends ");
+ let { superClass } = node2, { type } = superClass, precedence = state.expressionsPrecedence[type];
+ (type[0] !== "C" || type[1] !== "l" || type[5] !== "E") && (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.ClassExpression) ? (state.write("("), this[node2.superClass.type](superClass, state), state.write(")")) : this[superClass.type](superClass, state), state.write(" ");
+ }
+ this.ClassBody(node2.body, state);
+ },
+ ImportDeclaration(node2, state) {
+ state.write("import ");
+ let { specifiers, attributes } = node2, { length } = specifiers, i = 0;
+ if (length > 0) {
+ for (; i < length; ) {
+ i > 0 && state.write(", ");
+ let specifier = specifiers[i], type = specifier.type[6];
+ if (type === "D")
+ state.write(specifier.local.name, specifier), i++;
+ else if (type === "N")
+ state.write("* as " + specifier.local.name, specifier), i++;
+ else
+ break;
+ }
+ if (i < length) {
+ for (state.write("{"); ; ) {
+ let specifier = specifiers[i], { name: name2 } = specifier.imported;
+ if (state.write(name2, specifier), name2 !== specifier.local.name && state.write(" as " + specifier.local.name), ++i < length)
+ state.write(", ");
+ else
+ break;
+ }
+ state.write("}");
+ }
+ state.write(" from ");
+ }
+ if (this.Literal(node2.source, state), attributes && attributes.length > 0) {
+ state.write(" with { ");
+ for (let i2 = 0; i2 < attributes.length; i2++)
+ this.ImportAttribute(attributes[i2], state), i2 < attributes.length - 1 && state.write(", ");
+ state.write(" }");
+ }
+ state.write(";");
+ },
+ ImportAttribute(node2, state) {
+ this.Identifier(node2.key, state), state.write(": "), this.Literal(node2.value, state);
+ },
+ ImportExpression(node2, state) {
+ state.write("import("), this[node2.source.type](node2.source, state), state.write(")");
+ },
+ ExportDefaultDeclaration(node2, state) {
+ state.write("export default "), this[node2.declaration.type](node2.declaration, state), state.expressionsPrecedence[node2.declaration.type] != null && node2.declaration.type[0] !== "F" && state.write(";");
+ },
+ ExportNamedDeclaration(node2, state) {
+ if (state.write("export "), node2.declaration)
+ this[node2.declaration.type](node2.declaration, state);
+ else {
+ state.write("{");
+ let { specifiers } = node2, { length } = specifiers;
+ if (length > 0)
+ for (let i = 0; ; ) {
+ let specifier = specifiers[i], { name: name2 } = specifier.local;
+ if (state.write(name2, specifier), name2 !== specifier.exported.name && state.write(" as " + specifier.exported.name), ++i < length)
+ state.write(", ");
+ else
+ break;
+ }
+ if (state.write("}"), node2.source && (state.write(" from "), this.Literal(node2.source, state)), node2.attributes && node2.attributes.length > 0) {
+ state.write(" with { ");
+ for (let i = 0; i < node2.attributes.length; i++)
+ this.ImportAttribute(node2.attributes[i], state), i < node2.attributes.length - 1 && state.write(", ");
+ state.write(" }");
+ }
+ state.write(";");
+ }
+ },
+ ExportAllDeclaration(node2, state) {
+ if (node2.exported != null ? state.write("export * as " + node2.exported.name + " from ") : state.write("export * from "), this.Literal(node2.source, state), node2.attributes && node2.attributes.length > 0) {
+ state.write(" with { ");
+ for (let i = 0; i < node2.attributes.length; i++)
+ this.ImportAttribute(node2.attributes[i], state), i < node2.attributes.length - 1 && state.write(", ");
+ state.write(" }");
+ }
+ state.write(";");
+ },
+ MethodDefinition(node2, state) {
+ node2.static && state.write("static ");
+ let kind = node2.kind[0];
+ (kind === "g" || kind === "s") && state.write(node2.kind + " "), node2.value.async && state.write("async "), node2.value.generator && state.write("*"), node2.computed ? (state.write("["), this[node2.key.type](node2.key, state), state.write("]")) : this[node2.key.type](node2.key, state), formatSequence(state, node2.value.params), state.write(" "), this[node2.value.body.type](node2.value.body, state);
+ },
+ ClassExpression(node2, state) {
+ this.ClassDeclaration(node2, state);
+ },
+ ArrowFunctionExpression(node2, state) {
+ state.write(node2.async ? "async " : "", node2);
+ let { params } = node2;
+ params != null && (params.length === 1 && params[0].type[0] === "I" ? state.write(params[0].name, params[0]) : formatSequence(state, node2.params)), state.write(" => "), node2.body.type[0] === "O" ? (state.write("("), this.ObjectExpression(node2.body, state), state.write(")")) : this[node2.body.type](node2.body, state);
+ },
+ ThisExpression(node2, state) {
+ state.write("this", node2);
+ },
+ Super(node2, state) {
+ state.write("super", node2);
+ },
+ RestElement: RestElement = function(node2, state) {
+ state.write("..."), this[node2.argument.type](node2.argument, state);
+ },
+ SpreadElement: RestElement,
+ YieldExpression(node2, state) {
+ state.write(node2.delegate ? "yield*" : "yield"), node2.argument && (state.write(" "), this[node2.argument.type](node2.argument, state));
+ },
+ AwaitExpression(node2, state) {
+ state.write("await ", node2), formatExpression(state, node2.argument, node2);
+ },
+ TemplateLiteral(node2, state) {
+ let { quasis, expressions } = node2;
+ state.write("`");
+ let { length } = expressions;
+ for (let i = 0; i < length; i++) {
+ let expression = expressions[i], quasi2 = quasis[i];
+ state.write(quasi2.value.raw, quasi2), state.write("${"), this[expression.type](expression, state), state.write("}");
+ }
+ let quasi = quasis[quasis.length - 1];
+ state.write(quasi.value.raw, quasi), state.write("`");
+ },
+ TemplateElement(node2, state) {
+ state.write(node2.value.raw, node2);
+ },
+ TaggedTemplateExpression(node2, state) {
+ formatExpression(state, node2.tag, node2), this[node2.quasi.type](node2.quasi, state);
+ },
+ ArrayExpression: ArrayExpression = function(node2, state) {
+ if (state.write("["), node2.elements.length > 0) {
+ let { elements } = node2, { length } = elements;
+ for (let i = 0; ; ) {
+ let element2 = elements[i];
+ if (element2 != null && this[element2.type](element2, state), ++i < length)
+ state.write(", ");
+ else {
+ element2 == null && state.write(", ");
+ break;
+ }
+ }
+ }
+ state.write("]");
+ },
+ ArrayPattern: ArrayExpression,
+ ObjectExpression(node2, state) {
+ let indent2 = state.indent.repeat(state.indentLevel++), { lineEnd, writeComments } = state, propertyIndent = indent2 + state.indent;
+ if (state.write("{"), node2.properties.length > 0) {
+ state.write(lineEnd), writeComments && node2.comments != null && formatComments(state, node2.comments, propertyIndent, lineEnd);
+ let comma = "," + lineEnd, { properties } = node2, { length } = properties;
+ for (let i = 0; ; ) {
+ let property = properties[i];
+ if (writeComments && property.comments != null && formatComments(state, property.comments, propertyIndent, lineEnd), state.write(propertyIndent), this[property.type](property, state), ++i < length)
+ state.write(comma);
+ else
+ break;
+ }
+ state.write(lineEnd), writeComments && node2.trailingComments != null && formatComments(state, node2.trailingComments, propertyIndent, lineEnd), state.write(indent2 + "}");
+ } else writeComments ? node2.comments != null ? (state.write(lineEnd), formatComments(state, node2.comments, propertyIndent, lineEnd), node2.trailingComments != null && formatComments(state, node2.trailingComments, propertyIndent, lineEnd), state.write(indent2 + "}")) : node2.trailingComments != null ? (state.write(lineEnd), formatComments(state, node2.trailingComments, propertyIndent, lineEnd), state.write(indent2 + "}")) : state.write("}") : state.write("}");
+ state.indentLevel--;
+ },
+ Property(node2, state) {
+ node2.method || node2.kind[0] !== "i" ? this.MethodDefinition(node2, state) : (node2.shorthand || (node2.computed ? (state.write("["), this[node2.key.type](node2.key, state), state.write("]")) : this[node2.key.type](node2.key, state), state.write(": ")), this[node2.value.type](node2.value, state));
+ },
+ PropertyDefinition(node2, state) {
+ if (node2.static && state.write("static "), node2.computed && state.write("["), this[node2.key.type](node2.key, state), node2.computed && state.write("]"), node2.value == null) {
+ node2.key.type[0] !== "F" && state.write(";");
+ return;
+ }
+ state.write(" = "), this[node2.value.type](node2.value, state), state.write(";");
+ },
+ ObjectPattern(node2, state) {
+ if (state.write("{"), node2.properties.length > 0) {
+ let { properties } = node2, { length } = properties;
+ for (let i = 0; this[properties[i].type](properties[i], state), ++i < length; )
+ state.write(", ");
+ }
+ state.write("}");
+ },
+ SequenceExpression(node2, state) {
+ formatSequence(state, node2.expressions);
+ },
+ UnaryExpression(node2, state) {
+ if (node2.prefix) {
+ let {
+ operator,
+ argument,
+ argument: { type }
+ } = node2;
+ state.write(operator);
+ let needsParentheses = expressionNeedsParenthesis(state, argument, node2);
+ !needsParentheses && (operator.length > 1 || type[0] === "U" && (type[1] === "n" || type[1] === "p") && argument.prefix && argument.operator[0] === operator && (operator === "+" || operator === "-")) && state.write(" "), needsParentheses ? (state.write(operator.length > 1 ? " (" : "("), this[type](argument, state), state.write(")")) : this[type](argument, state);
+ } else
+ this[node2.argument.type](node2.argument, state), state.write(node2.operator);
+ },
+ UpdateExpression(node2, state) {
+ node2.prefix ? (state.write(node2.operator), this[node2.argument.type](node2.argument, state)) : (this[node2.argument.type](node2.argument, state), state.write(node2.operator));
+ },
+ AssignmentExpression(node2, state) {
+ this[node2.left.type](node2.left, state), state.write(" " + node2.operator + " "), this[node2.right.type](node2.right, state);
+ },
+ AssignmentPattern(node2, state) {
+ this[node2.left.type](node2.left, state), state.write(" = "), this[node2.right.type](node2.right, state);
+ },
+ BinaryExpression: BinaryExpression = function(node2, state) {
+ let isIn = node2.operator === "in";
+ isIn && state.write("("), formatExpression(state, node2.left, node2, !1), state.write(" " + node2.operator + " "), formatExpression(state, node2.right, node2, !0), isIn && state.write(")");
+ },
+ LogicalExpression: BinaryExpression,
+ ConditionalExpression(node2, state) {
+ let { test } = node2, precedence = state.expressionsPrecedence[test.type];
+ precedence === NEEDS_PARENTHESES || precedence <= state.expressionsPrecedence.ConditionalExpression ? (state.write("("), this[test.type](test, state), state.write(")")) : this[test.type](test, state), state.write(" ? "), this[node2.consequent.type](node2.consequent, state), state.write(" : "), this[node2.alternate.type](node2.alternate, state);
+ },
+ NewExpression(node2, state) {
+ state.write("new ");
+ let precedence = state.expressionsPrecedence[node2.callee.type];
+ precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression || hasCallExpression(node2.callee) ? (state.write("("), this[node2.callee.type](node2.callee, state), state.write(")")) : this[node2.callee.type](node2.callee, state), formatSequence(state, node2.arguments);
+ },
+ CallExpression(node2, state) {
+ let precedence = state.expressionsPrecedence[node2.callee.type];
+ precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression ? (state.write("("), this[node2.callee.type](node2.callee, state), state.write(")")) : this[node2.callee.type](node2.callee, state), node2.optional && state.write("?."), formatSequence(state, node2.arguments);
+ },
+ ChainExpression(node2, state) {
+ this[node2.expression.type](node2.expression, state);
+ },
+ MemberExpression(node2, state) {
+ let precedence = state.expressionsPrecedence[node2.object.type];
+ precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.MemberExpression ? (state.write("("), this[node2.object.type](node2.object, state), state.write(")")) : this[node2.object.type](node2.object, state), node2.computed ? (node2.optional && state.write("?."), state.write("["), this[node2.property.type](node2.property, state), state.write("]")) : (node2.optional ? state.write("?.") : state.write("."), this[node2.property.type](node2.property, state));
+ },
+ MetaProperty(node2, state) {
+ state.write(node2.meta.name + "." + node2.property.name, node2);
+ },
+ Identifier(node2, state) {
+ state.write(node2.name, node2);
+ },
+ PrivateIdentifier(node2, state) {
+ state.write(`#${node2.name}`, node2);
+ },
+ Literal(node2, state) {
+ node2.raw != null ? state.write(node2.raw, node2) : node2.regex != null ? this.RegExpLiteral(node2, state) : node2.bigint != null ? state.write(node2.bigint + "n", node2) : state.write(stringify2(node2.value), node2);
+ },
+ RegExpLiteral(node2, state) {
+ let { regex: regex2 } = node2;
+ state.write(`/${regex2.pattern}/${regex2.flags}`, node2);
+ }
+}, EMPTY_OBJECT = {};
+var State = class {
+ constructor(options) {
+ let setup = options ?? EMPTY_OBJECT;
+ this.output = "", setup.output != null ? (this.output = setup.output, this.write = this.writeToStream) : this.output = "", this.generator = setup.generator != null ? setup.generator : GENERATOR, this.expressionsPrecedence = setup.expressionsPrecedence != null ? setup.expressionsPrecedence : EXPRESSIONS_PRECEDENCE, this.indent = setup.indent != null ? setup.indent : " ", this.lineEnd = setup.lineEnd != null ? setup.lineEnd : `
+`, this.indentLevel = setup.startingIndentLevel != null ? setup.startingIndentLevel : 0, this.writeComments = setup.comments ? setup.comments : !1, setup.sourceMap != null && (this.write = setup.output == null ? this.writeAndMap : this.writeToStreamAndMap, this.sourceMap = setup.sourceMap, this.line = 1, this.column = 0, this.lineEndSize = this.lineEnd.split(`
+`).length - 1, this.mapping = {
+ original: null,
+ // Uses the entire state to avoid generating ephemeral objects
+ generated: this,
+ name: void 0,
+ source: setup.sourceMap.file || setup.sourceMap._file
+ });
+ }
+ write(code2) {
+ this.output += code2;
+ }
+ writeToStream(code2) {
+ this.output.write(code2);
+ }
+ writeAndMap(code2, node2) {
+ this.output += code2, this.map(code2, node2);
+ }
+ writeToStreamAndMap(code2, node2) {
+ this.output.write(code2), this.map(code2, node2);
+ }
+ map(code2, node2) {
+ if (node2 != null) {
+ let { type } = node2;
+ if (type[0] === "L" && type[2] === "n") {
+ this.column = 0, this.line++;
+ return;
+ }
+ if (node2.loc != null) {
+ let { mapping } = this;
+ mapping.original = node2.loc.start, mapping.name = node2.name, this.sourceMap.addMapping(mapping);
+ }
+ if (type[0] === "T" && type[8] === "E" || type[0] === "L" && type[1] === "i" && typeof node2.value == "string") {
+ let { length: length2 } = code2, { column, line } = this;
+ for (let i = 0; i < length2; i++)
+ code2[i] === `
+` ? (column = 0, line++) : column++;
+ this.column = column, this.line = line;
+ return;
+ }
+ }
+ let { length } = code2, { lineEnd } = this;
+ length > 0 && (this.lineEndSize > 0 && (lineEnd.length === 1 ? code2[length - 1] === lineEnd : code2.endsWith(lineEnd)) ? (this.line += this.lineEndSize, this.column = 0) : this.column += length);
+ }
+ toString() {
+ return this.output;
+ }
+};
+function generate(node2, options) {
+ let state = new State(options);
+ return state.generator[node2.type](node2, state), state.output;
+}
+
+// ../../../node_modules/estree-util-to-js/lib/index.js
+var emptyOptions2 = {};
+function toJs(tree, options) {
+ let { SourceMapGenerator, filePath, handlers: handlers3 } = options || emptyOptions2, sourceMap = SourceMapGenerator ? new SourceMapGenerator({ file: filePath || ".js" }) : void 0, value = generate(
+ tree,
+ // @ts-expect-error: `sourceMap` can be undefined, `astring` types are buggy.
+ {
+ comments: !0,
+ generator: { ...GENERATOR, ...handlers3 },
+ sourceMap: sourceMap || void 0
+ }
+ ), map = sourceMap ? sourceMap.toJSON() : void 0;
+ return { value, map };
+}
+
+// ../../../node_modules/estree-util-to-js/lib/jsx.js
+var jsx = {
+ JSXAttribute: jsxAttribute,
+ JSXClosingElement: jsxClosingElement,
+ JSXClosingFragment: jsxClosingFragment,
+ JSXElement: jsxElement,
+ JSXEmptyExpression: jsxEmptyExpression,
+ JSXExpressionContainer: jsxExpressionContainer,
+ JSXFragment: jsxFragment,
+ JSXIdentifier: jsxIdentifier,
+ JSXMemberExpression: jsxMemberExpression,
+ JSXNamespacedName: jsxNamespacedName,
+ JSXOpeningElement: jsxOpeningElement,
+ JSXOpeningFragment: jsxOpeningFragment,
+ JSXSpreadAttribute: jsxSpreadAttribute,
+ JSXText: jsxText
+};
+function jsxAttribute(node2, state) {
+ this[node2.name.type](node2.name, state), node2.value !== null && node2.value !== void 0 && (state.write("="), node2.value.type === "Literal" ? state.write(
+ '"' + encodeJsx(String(node2.value.value)).replace(/"/g, """) + '"',
+ node2
+ ) : this[node2.value.type](node2.value, state));
+}
+function jsxClosingElement(node2, state) {
+ state.write(""), this[node2.name.type](node2.name, state), state.write(">");
+}
+function jsxClosingFragment(node2, state) {
+ state.write(">", node2);
+}
+function jsxElement(node2, state) {
+ let index2 = -1;
+ if (this[node2.openingElement.type](node2.openingElement, state), node2.children)
+ for (; ++index2 < node2.children.length; ) {
+ let child = node2.children[index2];
+ if (child.type === "JSXSpreadChild")
+ throw new Error("JSX spread children are not supported");
+ this[child.type](child, state);
+ }
+ node2.closingElement && this[node2.closingElement.type](node2.closingElement, state);
+}
+function jsxEmptyExpression() {
+}
+function jsxExpressionContainer(node2, state) {
+ state.write("{"), this[node2.expression.type](node2.expression, state), state.write("}");
+}
+function jsxFragment(node2, state) {
+ let index2 = -1;
+ if (this[node2.openingFragment.type](node2.openingFragment, state), node2.children)
+ for (; ++index2 < node2.children.length; ) {
+ let child = node2.children[index2];
+ if (child.type === "JSXSpreadChild")
+ throw new Error("JSX spread children are not supported");
+ this[child.type](child, state);
+ }
+ this[node2.closingFragment.type](node2.closingFragment, state);
+}
+function jsxIdentifier(node2, state) {
+ state.write(node2.name, node2);
+}
+function jsxMemberExpression(node2, state) {
+ this[node2.object.type](node2.object, state), state.write("."), this[node2.property.type](node2.property, state);
+}
+function jsxNamespacedName(node2, state) {
+ this[node2.namespace.type](node2.namespace, state), state.write(":"), this[node2.name.type](node2.name, state);
+}
+function jsxOpeningElement(node2, state) {
+ let index2 = -1;
+ if (state.write("<"), this[node2.name.type](node2.name, state), node2.attributes)
+ for (; ++index2 < node2.attributes.length; )
+ state.write(" "), this[node2.attributes[index2].type](node2.attributes[index2], state);
+ state.write(node2.selfClosing ? " />" : ">");
+}
+function jsxOpeningFragment(node2, state) {
+ state.write("<>", node2);
+}
+function jsxSpreadAttribute(node2, state) {
+ state.write("{"), this.SpreadElement(node2, state), state.write("}");
+}
+function jsxText(node2, state) {
+ state.write(encodeJsx(node2.value).replace(/[<>{}]/g, replaceJsxChar), node2);
+}
+function encodeJsx(value) {
+ return value.replace(/&(?=[#a-z])/gi, "&");
+}
+function replaceJsxChar($0) {
+ return $0 === "<" ? "<" : $0 === ">" ? ">" : $0 === "{" ? "{" : "}";
+}
+
+// ../../../node_modules/@mdx-js/mdx/node_modules/recma-jsx/lib/index.js
+function recmaJsx2() {
+ let data2 = this.data(), settings = data2.settings || (data2.settings = {}), handlers3 = settings.handlers || (settings.handlers = {});
+ (settings.plugins || (settings.plugins = [])).push((0, import_acorn_jsx.default)()), Object.assign(handlers3, jsx);
+}
+
+// ../../../node_modules/recma-stringify/lib/index.js
+function recmaStringify(options) {
+ let self2 = this;
+ this.compiler = compiler2;
+ function compiler2(tree, file) {
+ let settings = { ...self2.data("settings"), ...options }, result = toJs(tree, {
+ SourceMapGenerator: settings.SourceMapGenerator,
+ filePath: file.path || "unknown.js",
+ handlers: settings.handlers
+ });
+ return file.map = result.map, result.value;
+ }
+}
+
+// ../../../node_modules/hast-util-to-estree/lib/handlers/comment.js
+function comment(node2, state) {
+ let result = { type: "Block", value: node2.value };
+ state.inherit(node2, result), state.comments.push(result);
+ let expression = {
+ type: "JSXEmptyExpression",
+ // @ts-expect-error: `comments` is custom.
+ comments: [Object.assign({}, result, { leading: !1, trailing: !0 })]
+ };
+ state.patch(node2, expression);
+ let container = { type: "JSXExpressionContainer", expression };
+ return state.patch(node2, container), container;
+}
+
+// ../../../node_modules/comma-separated-tokens/index.js
+function stringify3(values, options) {
+ let settings = options || {};
+ return (values[values.length - 1] === "" ? [...values, ""] : values).join(
+ (settings.padRight ? " " : "") + "," + (settings.padLeft === !1 ? "" : " ")
+ ).trim();
+}
+
+// ../../../node_modules/property-information/lib/util/schema.js
+var Schema = class {
+ /**
+ * @param {SchemaType['property']} property
+ * Property.
+ * @param {SchemaType['normal']} normal
+ * Normal.
+ * @param {Space | undefined} [space]
+ * Space.
+ * @returns
+ * Schema.
+ */
+ constructor(property, normal, space) {
+ this.normal = normal, this.property = property, space && (this.space = space);
+ }
+};
+Schema.prototype.normal = {};
+Schema.prototype.property = {};
+Schema.prototype.space = void 0;
+
+// ../../../node_modules/property-information/lib/util/merge.js
+function merge(definitions, space) {
+ let property = {}, normal = {};
+ for (let definition2 of definitions)
+ Object.assign(property, definition2.property), Object.assign(normal, definition2.normal);
+ return new Schema(property, normal, space);
+}
+
+// ../../../node_modules/property-information/lib/normalize.js
+function normalize(value) {
+ return value.toLowerCase();
+}
+
+// ../../../node_modules/property-information/lib/util/info.js
+var Info = class {
+ /**
+ * @param {string} property
+ * Property.
+ * @param {string} attribute
+ * Attribute.
+ * @returns
+ * Info.
+ */
+ constructor(property, attribute) {
+ this.attribute = attribute, this.property = property;
+ }
+};
+Info.prototype.attribute = "";
+Info.prototype.booleanish = !1;
+Info.prototype.boolean = !1;
+Info.prototype.commaOrSpaceSeparated = !1;
+Info.prototype.commaSeparated = !1;
+Info.prototype.defined = !1;
+Info.prototype.mustUseProperty = !1;
+Info.prototype.number = !1;
+Info.prototype.overloadedBoolean = !1;
+Info.prototype.property = "";
+Info.prototype.spaceSeparated = !1;
+Info.prototype.space = void 0;
+
+// ../../../node_modules/property-information/lib/util/types.js
+var types_exports = {};
+__export(types_exports, {
+ boolean: () => boolean,
+ booleanish: () => booleanish,
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated,
+ commaSeparated: () => commaSeparated,
+ number: () => number,
+ overloadedBoolean: () => overloadedBoolean,
+ spaceSeparated: () => spaceSeparated
+});
+var powers = 0, boolean = increment(), booleanish = increment(), overloadedBoolean = increment(), number = increment(), spaceSeparated = increment(), commaSeparated = increment(), commaOrSpaceSeparated = increment();
+function increment() {
+ return 2 ** ++powers;
+}
+
+// ../../../node_modules/property-information/lib/util/defined-info.js
+var checks = (
+ /** @type {ReadonlyArray} */
+ Object.keys(types_exports)
+), DefinedInfo = class extends Info {
+ /**
+ * @constructor
+ * @param {string} property
+ * Property.
+ * @param {string} attribute
+ * Attribute.
+ * @param {number | null | undefined} [mask]
+ * Mask.
+ * @param {Space | undefined} [space]
+ * Space.
+ * @returns
+ * Info.
+ */
+ constructor(property, attribute, mask, space) {
+ let index2 = -1;
+ if (super(property, attribute), mark(this, "space", space), typeof mask == "number")
+ for (; ++index2 < checks.length; ) {
+ let check = checks[index2];
+ mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
+ }
+ }
+};
+DefinedInfo.prototype.defined = !0;
+function mark(values, key2, value) {
+ value && (values[key2] = value);
+}
+
+// ../../../node_modules/property-information/lib/util/create.js
+function create2(definition2) {
+ let properties = {}, normals = {};
+ for (let [property, value] of Object.entries(definition2.properties)) {
+ let info = new DefinedInfo(
+ property,
+ definition2.transform(definition2.attributes || {}, property),
+ value,
+ definition2.space
+ );
+ definition2.mustUseProperty && definition2.mustUseProperty.includes(property) && (info.mustUseProperty = !0), properties[property] = info, normals[normalize(property)] = property, normals[normalize(info.attribute)] = property;
+ }
+ return new Schema(properties, normals, definition2.space);
+}
+
+// ../../../node_modules/property-information/lib/aria.js
+var aria = create2({
+ properties: {
+ ariaActiveDescendant: null,
+ ariaAtomic: booleanish,
+ ariaAutoComplete: null,
+ ariaBusy: booleanish,
+ ariaChecked: booleanish,
+ ariaColCount: number,
+ ariaColIndex: number,
+ ariaColSpan: number,
+ ariaControls: spaceSeparated,
+ ariaCurrent: null,
+ ariaDescribedBy: spaceSeparated,
+ ariaDetails: null,
+ ariaDisabled: booleanish,
+ ariaDropEffect: spaceSeparated,
+ ariaErrorMessage: null,
+ ariaExpanded: booleanish,
+ ariaFlowTo: spaceSeparated,
+ ariaGrabbed: booleanish,
+ ariaHasPopup: null,
+ ariaHidden: booleanish,
+ ariaInvalid: null,
+ ariaKeyShortcuts: null,
+ ariaLabel: null,
+ ariaLabelledBy: spaceSeparated,
+ ariaLevel: number,
+ ariaLive: null,
+ ariaModal: booleanish,
+ ariaMultiLine: booleanish,
+ ariaMultiSelectable: booleanish,
+ ariaOrientation: null,
+ ariaOwns: spaceSeparated,
+ ariaPlaceholder: null,
+ ariaPosInSet: number,
+ ariaPressed: booleanish,
+ ariaReadOnly: booleanish,
+ ariaRelevant: null,
+ ariaRequired: booleanish,
+ ariaRoleDescription: spaceSeparated,
+ ariaRowCount: number,
+ ariaRowIndex: number,
+ ariaRowSpan: number,
+ ariaSelected: booleanish,
+ ariaSetSize: number,
+ ariaSort: null,
+ ariaValueMax: number,
+ ariaValueMin: number,
+ ariaValueNow: number,
+ ariaValueText: null,
+ role: null
+ },
+ transform(_, property) {
+ return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
+ }
+});
+
+// ../../../node_modules/property-information/lib/util/case-sensitive-transform.js
+function caseSensitiveTransform(attributes, attribute) {
+ return attribute in attributes ? attributes[attribute] : attribute;
+}
+
+// ../../../node_modules/property-information/lib/util/case-insensitive-transform.js
+function caseInsensitiveTransform(attributes, property) {
+ return caseSensitiveTransform(attributes, property.toLowerCase());
+}
+
+// ../../../node_modules/property-information/lib/html.js
+var html = create2({
+ attributes: {
+ acceptcharset: "accept-charset",
+ classname: "class",
+ htmlfor: "for",
+ httpequiv: "http-equiv"
+ },
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
+ properties: {
+ // Standard Properties.
+ abbr: null,
+ accept: commaSeparated,
+ acceptCharset: spaceSeparated,
+ accessKey: spaceSeparated,
+ action: null,
+ allow: null,
+ allowFullScreen: boolean,
+ allowPaymentRequest: boolean,
+ allowUserMedia: boolean,
+ alt: null,
+ as: null,
+ async: boolean,
+ autoCapitalize: null,
+ autoComplete: spaceSeparated,
+ autoFocus: boolean,
+ autoPlay: boolean,
+ blocking: spaceSeparated,
+ capture: null,
+ charSet: null,
+ checked: boolean,
+ cite: null,
+ className: spaceSeparated,
+ cols: number,
+ colSpan: null,
+ content: null,
+ contentEditable: booleanish,
+ controls: boolean,
+ controlsList: spaceSeparated,
+ coords: number | commaSeparated,
+ crossOrigin: null,
+ data: null,
+ dateTime: null,
+ decoding: null,
+ default: boolean,
+ defer: boolean,
+ dir: null,
+ dirName: null,
+ disabled: boolean,
+ download: overloadedBoolean,
+ draggable: booleanish,
+ encType: null,
+ enterKeyHint: null,
+ fetchPriority: null,
+ form: null,
+ formAction: null,
+ formEncType: null,
+ formMethod: null,
+ formNoValidate: boolean,
+ formTarget: null,
+ headers: spaceSeparated,
+ height: number,
+ hidden: overloadedBoolean,
+ high: number,
+ href: null,
+ hrefLang: null,
+ htmlFor: spaceSeparated,
+ httpEquiv: spaceSeparated,
+ id: null,
+ imageSizes: null,
+ imageSrcSet: null,
+ inert: boolean,
+ inputMode: null,
+ integrity: null,
+ is: null,
+ isMap: boolean,
+ itemId: null,
+ itemProp: spaceSeparated,
+ itemRef: spaceSeparated,
+ itemScope: boolean,
+ itemType: spaceSeparated,
+ kind: null,
+ label: null,
+ lang: null,
+ language: null,
+ list: null,
+ loading: null,
+ loop: boolean,
+ low: number,
+ manifest: null,
+ max: null,
+ maxLength: number,
+ media: null,
+ method: null,
+ min: null,
+ minLength: number,
+ multiple: boolean,
+ muted: boolean,
+ name: null,
+ nonce: null,
+ noModule: boolean,
+ noValidate: boolean,
+ onAbort: null,
+ onAfterPrint: null,
+ onAuxClick: null,
+ onBeforeMatch: null,
+ onBeforePrint: null,
+ onBeforeToggle: null,
+ onBeforeUnload: null,
+ onBlur: null,
+ onCancel: null,
+ onCanPlay: null,
+ onCanPlayThrough: null,
+ onChange: null,
+ onClick: null,
+ onClose: null,
+ onContextLost: null,
+ onContextMenu: null,
+ onContextRestored: null,
+ onCopy: null,
+ onCueChange: null,
+ onCut: null,
+ onDblClick: null,
+ onDrag: null,
+ onDragEnd: null,
+ onDragEnter: null,
+ onDragExit: null,
+ onDragLeave: null,
+ onDragOver: null,
+ onDragStart: null,
+ onDrop: null,
+ onDurationChange: null,
+ onEmptied: null,
+ onEnded: null,
+ onError: null,
+ onFocus: null,
+ onFormData: null,
+ onHashChange: null,
+ onInput: null,
+ onInvalid: null,
+ onKeyDown: null,
+ onKeyPress: null,
+ onKeyUp: null,
+ onLanguageChange: null,
+ onLoad: null,
+ onLoadedData: null,
+ onLoadedMetadata: null,
+ onLoadEnd: null,
+ onLoadStart: null,
+ onMessage: null,
+ onMessageError: null,
+ onMouseDown: null,
+ onMouseEnter: null,
+ onMouseLeave: null,
+ onMouseMove: null,
+ onMouseOut: null,
+ onMouseOver: null,
+ onMouseUp: null,
+ onOffline: null,
+ onOnline: null,
+ onPageHide: null,
+ onPageShow: null,
+ onPaste: null,
+ onPause: null,
+ onPlay: null,
+ onPlaying: null,
+ onPopState: null,
+ onProgress: null,
+ onRateChange: null,
+ onRejectionHandled: null,
+ onReset: null,
+ onResize: null,
+ onScroll: null,
+ onScrollEnd: null,
+ onSecurityPolicyViolation: null,
+ onSeeked: null,
+ onSeeking: null,
+ onSelect: null,
+ onSlotChange: null,
+ onStalled: null,
+ onStorage: null,
+ onSubmit: null,
+ onSuspend: null,
+ onTimeUpdate: null,
+ onToggle: null,
+ onUnhandledRejection: null,
+ onUnload: null,
+ onVolumeChange: null,
+ onWaiting: null,
+ onWheel: null,
+ open: boolean,
+ optimum: number,
+ pattern: null,
+ ping: spaceSeparated,
+ placeholder: null,
+ playsInline: boolean,
+ popover: null,
+ popoverTarget: null,
+ popoverTargetAction: null,
+ poster: null,
+ preload: null,
+ readOnly: boolean,
+ referrerPolicy: null,
+ rel: spaceSeparated,
+ required: boolean,
+ reversed: boolean,
+ rows: number,
+ rowSpan: number,
+ sandbox: spaceSeparated,
+ scope: null,
+ scoped: boolean,
+ seamless: boolean,
+ selected: boolean,
+ shadowRootClonable: boolean,
+ shadowRootDelegatesFocus: boolean,
+ shadowRootMode: null,
+ shape: null,
+ size: number,
+ sizes: null,
+ slot: null,
+ span: number,
+ spellCheck: booleanish,
+ src: null,
+ srcDoc: null,
+ srcLang: null,
+ srcSet: null,
+ start: number,
+ step: null,
+ style: null,
+ tabIndex: number,
+ target: null,
+ title: null,
+ translate: null,
+ type: null,
+ typeMustMatch: boolean,
+ useMap: null,
+ value: booleanish,
+ width: number,
+ wrap: null,
+ writingSuggestions: null,
+ // Legacy.
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
+ align: null,
+ // Several. Use CSS `text-align` instead,
+ aLink: null,
+ // ``. Use CSS `a:active {color}` instead
+ archive: spaceSeparated,
+ // ` |